/* === Design Tokens (from design-spec.md) === */
:root {
  /* Color Palette (OKLCH) */
  --brand: oklch(0.58 0.14 185);
  --brand-light: color-mix(in oklab, var(--brand) 25%, white);
  --brand-dark: color-mix(in oklab, var(--brand) 75%, black);
  --accent: oklch(0.72 0.18 95);

  /* Tinted Neutrals */
  --surface-1: oklch(0.99 0.006 185);
  --surface-2: oklch(0.96 0.010 185);
  --surface-3: oklch(0.22 0.015 185);
  --text-primary: oklch(0.18 0.012 185);
  --text-secondary: oklch(0.48 0.018 185);

  /* Typography Scale (modular scale 1.3) */
  --text-xs: clamp(0.75rem, 0.9vw, 0.875rem);
  --text-sm: clamp(0.875rem, 1vw, 1rem);
  --text-base: 1rem;
  --text-lg: clamp(1.125rem, 1.3vw, 1.3rem);
  --text-xl: clamp(1.5rem, 2vw, 1.69rem);
  --text-2xl: clamp(2rem, 3vw, 2.2rem);
  --text-3xl: clamp(2.5rem, 4vw, 2.86rem);
  --text-4xl: clamp(3.25rem, 5vw, 3.72rem);

  /* Spatial Rhythm (4-point system) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Fonts */
  --font-heading: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Figtree', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-1);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: color-mix(in oklab, var(--brand) 30%, white);
  color: var(--text-primary);
}

img {
  max-width: 100%;
  display: block;
}

/* Accessibility */
*:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* === Header === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in oklab, var(--brand) 10%, transparent);
  transition: box-shadow 300ms ease-out;
}

.header.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: var(--space-2xl);
  align-items: center;
}

.nav a {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 150ms ease-out;
}

.nav a:hover {
  color: var(--brand);
}

.nav-cta {
  background: var(--brand);
  color: white !important;
  padding: var(--space-sm) var(--space-lg);
  border-radius: 6px;
  font-weight: 600;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--brand) 30%, transparent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 200ms ease-out, opacity 200ms ease-out;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* === Hero Section === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  background-image: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%), url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  padding: var(--space-4xl) var(--space-xl);
  overflow: hidden;
  animation: heroParallax linear;
  animation-timeline: scroll();
}

@keyframes heroParallax {
  to { background-position: center -30%; }
}

.hero-content {
  max-width: 720px;
  z-index: 2;
  animation: heroFadeIn 800ms ease-out;
}

@keyframes heroFadeIn {
  from { opacity: 0; translate: 0 30px; }
  to { opacity: 1; translate: 0 0; }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.hero p {
  font-size: var(--text-lg);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
  color: rgba(255, 255, 255, 0.9);
}

/* Floating Stat Badges */
.stat-badge {
  position: absolute;
  background: white;
  padding: var(--space-lg);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  text-align: center;
  min-width: 120px;
  animation: statFloat linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 80%;
}

@keyframes statFloat {
  from { opacity: 0; translate: 0 40px; }
  to { opacity: 1; translate: 0 0; }
}

.stat-badge-1 {
  top: 20%;
  right: 8%;
  animation-delay: 100ms;
}

.stat-badge-2 {
  bottom: 25%;
  left: 10%;
  animation-delay: 200ms;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--space-xs);
}

/* === Buttons === */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  padding: var(--space-md) var(--space-2xl);
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}

.btn-primary {
  background: var(--brand);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px color-mix(in oklab, var(--brand) 40%, transparent);
}

/* === Trust Bar === */
.trust-bar {
  background: var(--surface-2);
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid color-mix(in oklab, var(--brand) 10%, transparent);
}

.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4xl);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.trust-item svg {
  color: var(--brand);
  flex-shrink: 0;
}

/* === Section Headers === */
.section-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  margin-bottom: var(--space-md);
}

.section-label-light {
  color: var(--accent);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.section-title-light {
  color: white;
}

/* === Services Section === */
.services {
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) 0;
  background: white;
}

.services-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-xl);
}

.service-card {
  background: var(--surface-1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 400ms ease-out, box-shadow 400ms ease-out;
  animation: cardReveal linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 80%;
}

@keyframes cardReveal {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.service-card-large {
  grid-row: 1 / 3;
}

.service-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.service-card-large img {
  height: 400px;
}

.service-card-content {
  padding: var(--space-xl);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.service-card p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.service-price {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--brand);
}

/* === About Section (Split Layout) === */
.about {
  padding: 0;
  background: var(--surface-1);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}

.about-stats {
  background: var(--brand);
  color: white;
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2xl);
}

.stat-box {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1;
}

.stat-text {
  font-size: var(--text-sm);
  margin-top: var(--space-sm);
  opacity: 0.9;
}

.about-content {
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-content .section-title {
  margin-bottom: var(--space-lg);
}

.about-content p {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

/* === Testimonials === */
.testimonials {
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) 0;
  background: var(--surface-2);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.testimonial {
  background: white;
  padding: var(--space-xl);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  animation: cardReveal linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 80%;
}

.testimonial:nth-child(2) {
  animation-delay: 100ms;
}
.testimonial:nth-child(3) {
  animation-delay: 200ms;
}

.testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.testimonial-text {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.testimonial-author {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
}

/* === CTA Section === */
.cta {
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) 0;
  background: var(--surface-3);
  color: white;
  text-align: center;
}

.cta-content {
  max-width: 640px;
  margin: 0 auto;
}

.cta-text {
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
  opacity: 0.9;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cta-form input {
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid color-mix(in oklab, white 20%, transparent);
  border-radius: 8px;
  background: color-mix(in oklab, white 8%, transparent);
  color: white;
  outline: none;
  transition: border-color 200ms ease-out, background 200ms ease-out;
}

.cta-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.cta-form input:focus {
  border-color: var(--brand-light);
  background: color-mix(in oklab, white 12%, transparent);
}

.cta-form button {
  margin-top: var(--space-md);
}

/* === Contact Section === */
.contact {
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) 0;
  background: white;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.contact-card {
  text-align: center;
  padding: var(--space-2xl);
  border: 1px solid color-mix(in oklab, var(--brand) 15%, transparent);
  border-radius: 12px;
  transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
}

.contact-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.contact-card svg {
  color: var(--brand);
  margin: 0 auto var(--space-lg);
}

.contact-card h3 {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.contact-card p,
.contact-card a {
  font-size: var(--text-base);
  color: var(--text-primary);
  text-decoration: none;
  transition: color 150ms ease-out;
}

.contact-card a:hover {
  color: var(--brand);
}

/* === Footer === */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-4xl) 0 var(--space-2xl);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
  color: white;
  margin-bottom: var(--space-md);
}

.footer-brand p {
  font-size: var(--text-sm);
  max-width: 320px;
}

.footer-links {
  display: flex;
  gap: var(--space-4xl);
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  margin-bottom: var(--space-md);
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  margin-bottom: var(--space-sm);
  transition: color 150ms ease-out;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
}

/* === Responsive === */
@media (max-width: 968px) {
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-2xl);
    transform: translateX(100%);
    transition: transform 300ms ease-out;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card-large {
    grid-row: auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--space-2xl);
  }

  .stat-badge-1,
  .stat-badge-2 {
    position: static;
    margin: var(--space-lg) auto;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: var(--space-3xl) var(--space-lg);
  }

  .container {
    padding: 0 var(--space-lg);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-2xl);
  }
}
