/* ─── DESIGN TOKENS ─── */
:root {
  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
}

/* ─── WARM EARTH PALETTE ─── */
:root,
[data-theme='light'] {
  /* Surfaces — warm cream/stone */
  --color-bg: #faf8f5;
  --color-surface: #f5f1ec;
  --color-surface-2: #ede8e1;
  --color-surface-offset: #e8e2da;
  --color-divider: #d4cdc3;
  --color-border: #c7bfb3;

  /* Text — deep warm brown */
  --color-text: #2c2418;
  --color-text-muted: #6b5e4f;
  --color-text-faint: #a89b8a;
  --color-text-inverse: #faf8f5;

  /* Primary Accent — deep forest/olive */
  --color-primary: #3d5a3a;
  --color-primary-hover: #2d4429;
  --color-primary-active: #1e2e1b;
  --color-primary-highlight: #d5e0d3;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.25 0.02 60 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.25 0.02 60 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.25 0.02 60 / 0.12);
}

/* DARK MODE */
[data-theme='dark'] {
  --color-bg: #1a1814;
  --color-surface: #211f1a;
  --color-surface-2: #282520;
  --color-surface-offset: #2e2b25;
  --color-divider: #3a362f;
  --color-border: #4a453c;

  --color-text: #d9d2c8;
  --color-text-muted: #9a9083;
  --color-text-faint: #6b6258;
  --color-text-inverse: #1a1814;

  --color-primary: #7fa97b;
  --color-primary-hover: #5d8b58;
  --color-primary-active: #436e3f;
  --color-primary-highlight: #2e3a2c;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #1a1814;
    --color-surface: #211f1a;
    --color-surface-2: #282520;
    --color-surface-offset: #2e2b25;
    --color-divider: #3a362f;
    --color-border: #4a453c;
    --color-text: #d9d2c8;
    --color-text-muted: #9a9083;
    --color-text-faint: #6b6258;
    --color-text-inverse: #1a1814;
    --color-primary: #7fa97b;
    --color-primary-hover: #5d8b58;
    --color-primary-active: #436e3f;
    --color-primary-highlight: #2e3a2c;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ─── GLOBAL ─── */
body {
  font-family: var(--font-body);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  color: var(--color-primary-hover);
}

/* ─── SKIP LINK ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
  font-size: var(--text-sm);
}
.skip-link:focus {
  top: var(--space-2);
}

/* ─── HEADER ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-4) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.logo-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.logo-wordmark {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.logo-wordmark span {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Image logo (replaces SVG + wordmark) */
.logo-image {
  height: 70px;
  width: auto;
  display: block;
  margin: -10px 0; /* compensate for whitespace baked into the JPG */
  /* Blends the white background of the JPG into the page background */
  mix-blend-mode: multiply;
}
[data-theme='dark'] .logo-image {
  /* Invert colors so the dark logo becomes light on dark background, then blend */
  filter: invert(1) hue-rotate(180deg);
  mix-blend-mode: screen;
}
@media (min-width: 768px) {
  .logo-image {
    height: 90px;
    margin: -14px 0;
  }
}

/* Nav */
.nav-desktop {
  display: none;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}
.nav-desktop a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  padding: var(--space-1) 0;
  position: relative;
}
.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-primary);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-desktop a:hover {
  color: var(--color-text);
}
.nav-desktop a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

/* Mobile menu toggle */
.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-text);
}
@media (min-width: 768px) {
  .mobile-toggle {
    display: none;
  }
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-md);
}
.nav-mobile.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.nav-mobile a {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  padding: var(--space-2) 0;
  text-decoration: none;
}

/* ─── HERO ─── */
.hero {
  padding: clamp(var(--space-16), 10vw, var(--space-32)) var(--space-4);
  text-align: left;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}
.hero-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}
.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, oklch(from var(--color-primary) l c h / 0.08), transparent);
}

/* CTA button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.hero-ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ─── SECTIONS ─── */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
}
.section-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
}
.section-alt {
  background: var(--color-surface);
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}
.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-10);
  line-height: 1.7;
}

/* ─── ABOUT (two-column text + image) ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: start;
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 5fr 4fr;
    gap: var(--space-12);
  }
}
.about-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}
.about-text p:first-of-type {
  color: var(--color-text);
  font-size: var(--text-base);
}
.about-aside {
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.about-aside h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.stat-item {
  text-align: center;
  padding: var(--space-3);
}
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ─── SERVICES ─── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.service-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.service-icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.service-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ─── EXPERIENCE TIMELINE ─── */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1.5px;
  background: var(--color-divider);
}
.timeline-item {
  position: relative;
  margin-bottom: var(--space-8);
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-8) + 1px);
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-primary);
}
.timeline-item:not(:first-child) .timeline-dot {
  background: var(--color-surface-2);
  box-shadow: 0 0 0 2px var(--color-divider);
}
.timeline-date {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}
.timeline-role {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.timeline-org {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.timeline-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 55ch;
}

/* ─── FEATURED RESULTS / CALLOUT ─── */
.callout-band {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: clamp(var(--space-10), 6vw, var(--space-16)) var(--space-4);
  text-align: center;
}
.callout-band .section-inner {
  max-width: var(--content-default);
}
.callout-band h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-text-inverse);
}
.callout-band p {
  font-size: var(--text-base);
  opacity: 0.85;
  max-width: 50ch;
  margin-inline: auto;
  line-height: 1.7;
}
.results-row {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  flex-wrap: wrap;
  margin-top: var(--space-8);
}
.result-item {
  text-align: center;
}
.result-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}
.result-label {
  font-size: var(--text-xs);
  opacity: 0.7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: var(--space-1);
}

/* ─── CLIENTS / LOGOS ─── */
.clients-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-8);
  padding-top: var(--space-4);
}
.client-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-faint);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* ─── CONTACT ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}
.contact-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}
.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
}
.contact-detail svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.form-group label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}
.form-group input,
.form-group textarea {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.1);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.12);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ─── FOOTER ─── */
.footer {
  background: var(--color-surface);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
  padding: var(--space-8) var(--space-4);
}
.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-links {
  display: flex;
  gap: var(--space-6);
}
.footer-links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-text);
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── DIVIDER ─── */
.section-divider {
  height: 1px;
  background: var(--color-divider);
  max-width: var(--content-wide);
  margin: 0 auto;
}
