/* ==========================================================================
   ClayHills.ee - Design System & Core Styles
   Premium Earthy Aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --color-primary: #8C6A48;      /* Warm Clay / Terracotta */
  --color-primary-hover: #75573A;
  --color-secondary: #2C4228;    /* Forest Green */
  --color-secondary-hover: #22331F;
  --color-accent: #D4A373;       /* Sand / Golden */
  --color-background: #F9F6F0;   /* Warm Off-White */
  --color-surface: #FFFFFF;      /* Pure White for Cards */
  --color-text: #2C2C2C;         /* Dark Charcoal */
  --color-text-muted: #666666;
  --color-border: #E0DCD3;
  --color-footer-bg: #1A1A1A;
  --color-footer-text: #F9F6F0;
  
  /* Typography */
  --font-body: 'Inter', sans-serif;
  --font-heading: 'DM Serif Display', serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(140, 106, 72, 0.08);
  --shadow-lg: 0 12px 24px rgba(44, 66, 40, 0.12);
  --shadow-hover: 0 20px 40px rgba(140, 106, 72, 0.15);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: var(--space-sm); }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-hover); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.section-subtitle {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  display: block;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  font-size: 1rem;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}

.btn-secondary:hover {
  background-color: var(--color-secondary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--color-secondary);
  color: #fff;
}
.btn-accent:hover {
  background-color: var(--color-secondary-hover);
  color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(249, 246, 240, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary);
  transition: width var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.lang-link {
  color: var(--color-text-muted);
}
.lang-link.active {
  color: var(--color-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-secondary);
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 160px 0 80px;
  background: linear-gradient(135deg, rgba(249,246,240,1) 0%, rgba(224,220,211,0.5) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,163,115,0.15) 0%, rgba(255,255,255,0) 70%);
  z-index: 0;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 90%;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
  transition: transform var(--transition-slow);
}

.hero-image-wrapper:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* ==========================================================================
   Services Grid
   ========================================================================== */
.section {
  padding: var(--space-lg) 0;
}

.section-dark {
  background-color: var(--color-secondary);
  color: var(--color-background);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4, .section-dark h5, .section-dark h6, .section-dark .section-subtitle {
  color: var(--color-background);
}
.section-dark p,
.section-dark .process-step p,
.section-dark .feature-content p {
  color: rgba(255, 255, 255, 0.9);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: var(--space-md);
}

.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  border: 1px solid rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(140, 106, 72, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}
.service-icon svg {
  width: 32px;
  height: 32px;
}

.service-card h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.service-link {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.service-link svg {
  margin-left: 0.5rem;
  transition: transform var(--transition-fast);
}
.service-link:hover svg {
  transform: translateX(5px);
}

/* ==========================================================================
   Features / USP Block
   ========================================================================== */
.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: var(--space-md);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-check {
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.feature-content h4 {
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
}

/* ==========================================================================
   Process Steps
   ========================================================================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: var(--space-md);
  position: relative;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 64px;
  height: 64px;
  background-color: var(--color-surface);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.process-step:hover .step-number {
  background-color: var(--color-primary);
  color: #fff;
  transform: scale(1.1);
}

.process-step h4 {
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-container {
  max-width: 800px;
  margin: var(--space-md) auto 0;
}

.faq-item {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-secondary);
}

.faq-icon {
  transition: transform var(--transition-normal);
  color: var(--color-primary);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
  background-color: rgba(249,246,240, 0.5);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.5rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-section {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  margin-top: var(--space-md);
}

.contact-info {
  background-color: var(--color-secondary);
  color: #fff;
  padding: 3rem;
}

.contact-info h2 {
  color: #fff;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.info-item svg {
  color: var(--color-accent);
  margin-top: 0.25rem;
}

.contact-form {
  padding: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
  background-color: var(--color-background);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(140, 106, 72, 0.1);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checkbox-group input {
  margin-top: 0.25rem;
}

.checkbox-group label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--space-lg) 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  max-width: 300px;
}

.footer h4 {
  color: #fff;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
}
.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  margin-left: 1.5rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-container {
    gap: 2rem;
  }
  .contact-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image-wrapper {
    margin-top: 2rem;
    transform: none;
  }
  
  .hero-image-wrapper:hover {
    transform: none;
  }

  .nav-links {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--color-surface);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path var(--transition-normal);
  }
  
  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
