/* =============================================================
   Digital Greenhouse - main stylesheet
   Tokens -> Base -> Layout -> Components -> Sections -> Utilities
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette */
  --color-emerald:   #0E5C3A;
  --color-emerald-2: #0a4a2f;
  --color-sprout:    #3FB37F;
  --color-sprout-2:  #2f9e6a;
  --color-cream:     #F7F4EE;
  --color-cream-2:   #efeae0;
  --color-mist:      #E6EFE9;
  --color-ink:       #0B1F17;
  --color-ink-2:     #2a3a32;
  --color-muted:     #5b6b62;
  --color-line:      #d8e2db;
  --color-gold:      #C8A24A;
  --color-gold-2:    #b3893a;
  --color-gold-deep: #8A6526; /* gold legible on white (5.3:1) — small-text accents */
  --color-rust:      #A84A20; /* 5.7:1 on white — "Top story" eyebrow accent */
  --color-white:     #ffffff;
  --color-danger:    #b3261e;

  /* Surfaces */
  --bg-page:    var(--color-cream);
  --bg-card:    var(--color-white);
  --bg-dark:    var(--color-ink);
  --text:       var(--color-ink);
  --text-muted: var(--color-muted);
  --text-on-dark: #eaf3ed;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* Type scale (fluid) */
  --fs-xs:   clamp(0.78rem, 0.76rem + 0.1vw, 0.85rem);
  --fs-sm:   clamp(0.88rem, 0.86rem + 0.15vw, 0.95rem);
  --fs-base: clamp(1rem,    0.97rem + 0.2vw,  1.075rem);
  --fs-lg:   clamp(1.1rem,  1.05rem + 0.3vw,  1.2rem);
  --fs-xl:   clamp(1.25rem, 1.18rem + 0.5vw,  1.45rem);
  --fs-2xl:  clamp(1.55rem, 1.4rem + 0.9vw,   2rem);
  --fs-3xl:  clamp(2rem,    1.7rem + 1.6vw,   2.85rem);
  --fs-4xl:  clamp(2.5rem,  2rem + 2.4vw,     3.75rem);
  --fs-5xl:  clamp(3rem,    2.4rem + 3vw,     4.5rem);

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --container: 1180px;
  --container-narrow: 820px;
  --gutter: clamp(1rem, 4vw, 2rem);

  /* Radius */
  --radius-sm: 6px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(11,31,23,0.06), 0 1px 3px rgba(11,31,23,0.05);
  --shadow:    0 6px 20px rgba(11,31,23,0.08), 0 2px 6px rgba(11,31,23,0.05);
  --shadow-lg: 0 18px 40px rgba(11,31,23,0.12), 0 6px 14px rgba(11,31,23,0.08);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 140ms;
  --t-mid:  260ms;
  --t-slow: 480ms;
}

/* ---------- Base ---------- */
html { color-scheme: light; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--bg-page);
  background-image:
    radial-gradient(1200px 600px at -10% -20%, rgba(63,179,127,0.10), transparent 60%),
    radial-gradient(900px 500px at 110% 0%, rgba(14,92,58,0.08), transparent 60%);
  background-attachment: fixed;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
/* Fixed-attachment is expensive on mobile browsers (especially iOS Safari);
   fall back to scroll on small viewports to keep scrolling smooth. */
@media (max-width: 760px) {
  body { background-attachment: scroll; }
}
/* Body lock used by the mobile nav. The JS toggles this class so the markup
   stays clean (no inline overflow:hidden style). */
body.is-nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}
h1 { font-size: var(--fs-5xl); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-3xl); line-height: 1.1; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { color: var(--text); }
p + p { margin-top: var(--space-4); }

a { color: var(--color-emerald); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--t-fast) var(--ease); }
/* Hover darkens (emerald-2): sprout-2 only manages 3.1:1 on cream. Dark mode
   keeps its lighten-on-hover override further down. */
a:hover { color: var(--color-emerald-2); }

::selection { background: var(--color-sprout); color: var(--color-ink); }

:focus-visible {
  outline: 3px solid var(--color-emerald); /* sprout is only 2.4:1 against cream */
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-ink);
  color: white;
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

main { display: block; }

section { padding-block: clamp(3rem, 6vw, 6rem); }
section.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }

/* Homepage: halve the vertical gaps around the AI training band on desktop
   (under the hero/hourly-rate and under the band). Mobile (<921px) unchanged. */
@media (min-width: 921px) {
  section.hero { padding-bottom: clamp(1.5rem, 3vw, 3rem); }
  #home-ai { padding-block: clamp(1.5rem, 3vw, 3rem); }
  #play { padding-block: clamp(1.5rem, 3vw, 3rem); }
  #current-projects { padding-top: clamp(1.5rem, 3vw, 3rem); }
}

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-8);
}
.section__head .eyebrow { justify-content: center; }
.section__head p {
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--fs-lg);
}

/* ---------- Utilities ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-emerald);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.section__head .eyebrow::before { display: none; }
.section__head .eyebrow { padding: 6px 12px; background: var(--color-mist); border-radius: var(--radius-pill); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.muted { color: var(--text-muted); }
.text-center { text-align: center; }
.lead {
  font-size: var(--fs-xl);
  color: var(--text-muted);
  max-width: 60ch;
}

.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--color-emerald);
  --btn-fg: #fff;
  --btn-bd: var(--color-emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  min-height: 44px; /* iOS/Android recommended tap target */
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1;
  letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1.5px solid var(--btn-bd);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  white-space: nowrap;
  touch-action: manipulation; /* avoid 300ms tap delay on older mobile browsers */
}
/* Lift on hover only on devices with a real pointer. On touch this would stick
   after a tap and feel buggy. */
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--btn-fg); }
}
.btn:active { transform: translateY(0); }

.btn--primary { --btn-bg: var(--color-emerald); --btn-bd: var(--color-emerald); --btn-fg: #fff; }
.btn--primary:hover { --btn-bg: var(--color-emerald-2); --btn-bd: var(--color-emerald-2); }

.btn--gold { --btn-bg: var(--color-gold); --btn-bd: var(--color-gold); --btn-fg: var(--color-ink); }
.btn--gold:hover { --btn-bg: var(--color-gold-2); --btn-bd: var(--color-gold-2); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-bd: var(--color-emerald);
  --btn-fg: var(--color-emerald);
}
.btn--ghost:hover { --btn-bg: var(--color-emerald); --btn-fg: #fff; }

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-bd: rgba(255,255,255,0.45);
  --btn-fg: #fff;
}
.btn--ghost-light:hover { --btn-bg: rgba(255,255,255,0.1); --btn-bd: #fff; }

.btn--lg { padding: 1.05rem 1.7rem; font-size: var(--fs-base); }
.btn--sm { padding: 0.6rem 1rem; font-size: var(--fs-xs); }

.btn .arrow {
  display: inline-block;
  transition: transform var(--t-fast) var(--ease);
}
@media (hover: hover) {
  .btn:hover .arrow { transform: translateX(3px); }
}

/* ---------- Header / Nav ---------- */
/* Light mode: white header, dark text. The header swaps to dark green in
   dark mode further down — the override block keeps both states colocated. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  color: var(--color-ink-2);
  border-bottom: 1px solid transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--color-line);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: 0.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  /* The header bar is a flex row and the nav is wide. Without this the brand -
     and the img inside it - get shrunk horizontally while the fixed height
     stays put, which squashes the logo out of proportion. */
  flex-shrink: 0;
}
.brand__logo {
  height: 56px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
/* Only bump the logo where the bar has the room: the nav needs ~835px and the
   container tops out at 1116px of content, so 60px (~232px wide) is the most
   that fits alongside it. */
@media (min-width: 1180px) {
  .brand__logo { height: 60px; }
}
/* Step the logo down on phones so it doesn't crowd the hamburger / CTA. */
@media (max-width: 480px) {
  .brand__logo { height: 44px; }
}
.brand--footer .brand__logo { height: 40px; }

/* Two logo variants live in the markup; CSS shows the right one per theme.
   The dark-bg logo stays out of the DOM flow when hidden so it doesn't reserve
   space alongside the visible one. */
.brand__logo--dark { display: none; }
[data-theme="dark"] .brand__logo--light { display: none; }
[data-theme="dark"] .brand__logo--dark { display: block; }

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.primary-nav a {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-ink-2);
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.primary-nav a:hover { background: var(--color-mist); color: var(--color-emerald); }
.primary-nav a[aria-current="page"] {
  color: var(--color-emerald);
  background: var(--color-mist);
}
.primary-nav__cta { margin-left: var(--space-2); }
.primary-nav__cta a { padding: 0.7rem 1.2rem; }
/* Nav link color (.primary-nav a) beats .btn alone - restore CTA contrast */
.primary-nav a.btn { color: var(--btn-fg); }
.primary-nav__cta a:hover { background: var(--color-emerald-2); color: #fff; }

/* Dropdown */
.primary-nav__has-menu { position: relative; }
.primary-nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
}
.primary-nav__has-menu:hover .primary-nav__menu,
.primary-nav__has-menu:focus-within .primary-nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav__menu a {
  display: block;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--color-ink-2);
}
.primary-nav__menu a:hover { background: var(--color-mist); color: var(--color-emerald); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--color-mist); }
.nav-toggle__bar {
  width: 22px; height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop bar. Nine links + theme toggle + CTA is a lot of nav, so trim the
   in-between space a little to leave the logo its full, undistorted width. */
@media (min-width: 1180px) {
  .site-header__inner { gap: var(--space-4); }
  .primary-nav__list { gap: 0.25rem; }
  .primary-nav a { padding-inline: 0.7rem; }
  .primary-nav__cta a { padding-inline: 1rem; }
}

/* The nav collapses to the hamburger below 1180px, not 920px: between those
   widths the full link row can't fit beside the logo without crushing one or
   the other. The 920px breakpoint elsewhere is page layout, not the nav. */
@media (max-width: 1179px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--color-cream);
    border-top: 1px solid var(--color-line);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-mid) var(--ease), background var(--t-fast) var(--ease);
  }
  .primary-nav.is-open { max-height: 80vh; overflow: auto; }
  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-4);
    gap: var(--space-1);
  }
  .primary-nav a { padding: 0.85rem 1rem; border-radius: var(--radius-sm); }
  .primary-nav__has-menu .primary-nav__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 0 var(--space-4);
    margin-top: var(--space-1);
  }
  .primary-nav__cta { margin-top: var(--space-3); margin-left: 0; }
  .primary-nav__cta a { text-align: center; justify-content: center; }
}

/* --- Header in dark mode ---
   Switches the bar to dark green so it blends with the dark page surface
   and matches the dark-bg logo variant. */
[data-theme="dark"] .site-header {
  background: var(--color-ink);
  color: var(--text-on-dark);
  border-bottom-color: transparent;
}
[data-theme="dark"] .site-header.is-scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.04);
}
[data-theme="dark"] .primary-nav a { color: var(--text-on-dark); }
[data-theme="dark"] .primary-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
[data-theme="dark"] .primary-nav a[aria-current="page"] {
  color: var(--color-sprout);
  background: rgba(63,179,127,0.14);
}
/* CTA pill: emerald reads fine on white, but on the dark bar sprout pops harder */
[data-theme="dark"] .primary-nav__cta a {
  --btn-bg: var(--color-sprout);
  --btn-bd: var(--color-sprout);
  --btn-fg: var(--color-ink);
}
[data-theme="dark"] .primary-nav__cta a:hover {
  --btn-bg: var(--color-sprout-2);
  --btn-bd: var(--color-sprout-2);
  background: var(--color-sprout-2);
  color: var(--color-ink);
}
[data-theme="dark"] .nav-toggle__bar { background: var(--text-on-dark); }
[data-theme="dark"] .nav-toggle:hover { background: rgba(255,255,255,0.08); }

@media (max-width: 1179px) {
  [data-theme="dark"] .primary-nav {
    background: var(--color-ink);
    border-top-color: rgba(255,255,255,0.06);
    box-shadow: 0 12px 24px rgba(0,0,0,0.35);
  }
  [data-theme="dark"] .primary-nav__menu a { color: var(--text-on-dark); }
  [data-theme="dark"] .primary-nav__menu a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
  }
}

/* ---------- Theme toggle (in nav) ---------- */
/* Sits between the regular nav links and the CTA pill. Renders as a 40px
   round icon button on desktop and an icon+label row on mobile. The visible
   icon/label pair is swapped via [data-theme="dark"]. */
.primary-nav__theme {
  display: inline-flex;
  align-items: center;
  margin-left: var(--space-1);
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 40px; height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  color: var(--color-ink-2);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.theme-toggle:hover {
  background: var(--color-mist);
  color: var(--color-emerald);
  border-color: var(--color-mist);
}
.theme-toggle__icon { width: 20px; height: 20px; flex-shrink: 0; }
.theme-toggle__label { display: none; font-size: var(--fs-sm); font-weight: 500; }

/* Light mode shows the moon (clicking goes dark); dark mode shows the sun. */
.theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: block; }
[data-theme="dark"] .theme-toggle__icon--moon { display: none; }

[data-theme="dark"] .theme-toggle {
  border-color: rgba(255,255,255,0.18);
  color: var(--text-on-dark);
}
[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255,255,255,0.10);
  color: #fff;
  border-color: rgba(255,255,255,0.30);
}

@media (max-width: 1179px) {
  .primary-nav__theme { margin-left: 0; }
  .theme-toggle {
    width: 100%;
    height: auto;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    justify-content: flex-start;
  }
  .theme-toggle__label--dark { display: inline; }
  [data-theme="dark"] .theme-toggle__label--dark { display: none; }
  [data-theme="dark"] .theme-toggle__label--light { display: inline; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(0.5rem, 2vw, 1.5rem) clamp(3rem, 6vw, 6rem);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 920px) {
  .hero__inner { grid-template-columns: 1fr; }
}
.hero__title {
  font-size: var(--fs-5xl);
  line-height: 1.02;
  margin-bottom: var(--space-5);
}
.hero__title em {
  font-style: italic;
  color: var(--color-emerald);
  font-weight: 500;
}
.hero__sub {
  font-size: var(--fs-xl);
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero__meta {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-line);
  flex-wrap: wrap;
}
.hero__meta li {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: var(--fs-sm);
  color: var(--color-ink-2);
}
.hero__meta svg { width: 18px; height: 18px; color: var(--color-sprout-2); }

/* Hero panel (right column) */
.hero__panel {
  background: linear-gradient(145deg, var(--color-emerald) 0%, var(--color-emerald-2) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  align-self: center;
}
.hero__panel::before {
  content: "";
  position: absolute;
  top: -50%; right: -20%;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(63,179,127,0.45), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.hero__panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(234,243,237,0.8); /* 0.65 fell to ~4:1 on the emerald panel */
  margin-bottom: var(--space-2);
}
.hero__panel-kicker svg { flex-shrink: 0; }
.hero__stat {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
}
.hero__stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  margin-top: 2px;
  background: rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  color: #fff;
}
.hero__stat-icon svg { display: block; flex: 0 0 auto; }
.hero__stat strong {
  display: block;
  color: #fff;
  font-size: var(--fs-base);
  font-weight: 600;
}
.hero__stat > div > span {
  display: block;
  color: rgba(234,243,237,0.85); /* 0.7 fell to ~3.7:1 on the stat tile */
  font-size: var(--fs-xs);
  margin-top: 0.15rem;
}
@media (max-width: 920px) {
  .hero__panel { max-width: 480px; margin-inline: auto; }
  /* Stack the hero meta items vertically on narrow screens so each "feature"
     row stays comfortably above tap-target size and doesn't clip. */
  .hero__meta { gap: var(--space-3); margin-top: var(--space-5); padding-top: var(--space-4); }
}
@media (max-width: 480px) {
  .hero { padding-block: var(--space-3) clamp(2rem, 8vw, 3rem); }
  .hero__sub { font-size: var(--fs-lg); }
  .hero__actions .btn { width: 100%; }
  .hero__panel { padding: var(--space-5); }
  .hero__stat { padding: var(--space-3) var(--space-4); }
}

/* ---------- Logos / Trust strip ---------- */
.trust-strip {
  background: #fff;
  border-block: 1px solid var(--color-line);
}
.trust-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-5);
  flex-wrap: wrap;
}
.trust-strip__label {
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.trust-strip__logos {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
}
.trust-strip__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-ink-2);
  opacity: 0.85;
}
.trust-strip__logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-sprout); }

/* ---------- Service cards ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
@media (max-width: 1020px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .service-grid { grid-template-columns: 1fr; } }

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
  overflow: hidden;
}
.service-card::after {
  content: "";
  position: absolute;
  inset: auto -40% -40% auto;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-mist), transparent 70%);
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease);
  pointer-events: none;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-mist);
}
.service-card:hover::after { opacity: 1; }
.service-card__icon {
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: var(--radius);
  background: var(--color-mist);
  color: var(--color-emerald);
  margin-bottom: var(--space-2);
}
.service-card__icon svg { width: 30px; height: 30px; }
.service-card h3 { font-size: var(--fs-xl); }
.service-card p { color: var(--text-muted); }
.service-card__link {
  margin-top: auto;
  padding-top: var(--space-3);
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-emerald);
  text-decoration: none;
}
.service-card__link .arrow { transition: transform var(--t-fast) var(--ease); }
.service-card:hover .service-card__link .arrow { transform: translateX(4px); }

/* ---------- Why us / feature list ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 920px) { .feature-list { grid-template-columns: 1fr; } }
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.feature__icon {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--color-mist); color: var(--color-emerald);
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-family: var(--font-sans); font-size: var(--fs-lg); font-weight: 600; }
.feature p { color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- Huntress partner callout ---------- */
.partner {
  background: linear-gradient(135deg, var(--color-emerald) 0%, var(--color-emerald-2) 100%);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.partner::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(63,179,127,0.4), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.partner h2 { color: #fff; }
.partner p { color: var(--text-on-dark); opacity: 0.9; max-width: 50ch; }
.partner__badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.partner__actions {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-top: var(--space-5);
}
.partner__art {
  display: grid;
  place-items: center;
}
.partner__art-shield {
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 30% 70% 40% 60% / 50% 50% 50% 50%;
  display: grid; place-items: center;
  color: #fff;
}
.partner__art-shield svg { width: 96px; height: 96px; }
@media (max-width: 760px) {
  .partner { grid-template-columns: 1fr; text-align: center; }
  .partner__actions { justify-content: center; }
  .partner__art { order: -1; }
}
@media (max-width: 480px) {
  /* The shield art is dramatic but takes too much vertical real estate on
     small phones — shrink it so the headline + CTA stay above the fold. */
  .partner__art-shield { width: 128px; height: 128px; }
  .partner__art-shield svg { width: 68px; height: 68px; }
  .partner__actions .btn { width: 100%; }
}

/* ---------- Pricing teaser ---------- */
.pricing-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  padding: clamp(2rem, 4vw, 3rem);
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  align-items: center;
}
@media (max-width: 760px) { .pricing-teaser { grid-template-columns: 1fr; } }
.pricing-teaser__rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.pricing-teaser__rate {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  background: var(--color-mist);
  text-align: center;
}
.pricing-teaser__rate strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  color: var(--color-emerald);
}
.pricing-teaser__rate span {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ---------- Cost savings ---------- */
.savings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 1020px) { .savings-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .savings-grid { grid-template-columns: 1fr; } }

.savings-card {
  padding: var(--space-6);
  background: var(--color-mist);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.savings-card__amount {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  color: var(--color-emerald);
  margin: 0;
  line-height: 1;
}
.savings-card__amount span {
  font-size: var(--fs-base); /* was --fs-md, which doesn't exist — "/yr" inherited the 3xl size */
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.25rem;
}
.savings-card h3 {
  font-size: var(--fs-lg);
  margin: var(--space-1) 0 var(--space-2);
  color: var(--text);
}
.savings-card__detail {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}
.savings-card__detail span {
  display: inline-block;
  min-width: 2.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--fs-xs);
  color: var(--color-emerald);
  margin-right: 0.5rem;
}
.savings-card--total {
  background: var(--color-emerald);
  border-color: var(--color-emerald);
}
.savings-card--total .savings-card__amount,
.savings-card--total .savings-card__amount span,
.savings-card--total h3,
.savings-card--total .savings-card__detail,
.savings-card--total .savings-card__detail span,
.savings-card--total .savings-card__detail strong {
  color: #fff;
}

[data-theme="dark"] .savings-card {
  background: var(--bg-card);
  border-color: var(--color-line);
}
[data-theme="dark"] .savings-card--total {
  background: var(--color-emerald);
  border-color: var(--color-emerald);
}
/* Dollar amounts and WAS/NOW labels are emerald in light mode — near-invisible
   (1.8:1) on the dark card. :not() keeps the --total card's white text intact. */
[data-theme="dark"] .savings-card:not(.savings-card--total) .savings-card__amount,
[data-theme="dark"] .savings-card:not(.savings-card--total) .savings-card__detail span {
  color: var(--color-sprout);
}

/* Aggregate summary tiles on /savings */
.savings-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 820px) { .savings-summary { grid-template-columns: 1fr; } }
.savings-summary__stat {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--color-emerald);
  color: #fff;
  border-radius: var(--radius-lg);
  text-align: center;
}
.savings-summary__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1;
  margin-bottom: var(--space-3);
}
.savings-summary__stat span {
  display: block;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.85);
}

/* "More to come" panel */
.case-coming {
  padding: clamp(2rem, 4vw, 3rem);
  background: #fff;
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-lg);
  text-align: center;
}
.case-coming h2 { margin: var(--space-3) 0 var(--space-3); }
.case-coming p  { color: var(--text-muted); max-width: 60ch; margin-left: auto; margin-right: auto; }
.case-coming__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-5);
  flex-wrap: wrap;
}
[data-theme="dark"] .case-coming { background: var(--bg-card); border-color: var(--color-line); }

/* ---------- Current projects ---------- */
.project {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.project + .project {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--color-line);
}
@media (min-width: 961px) {
  .project--reverse .project__header { order: 2; }
  .project--reverse .project__gallery { order: 1; }
}
@media (max-width: 960px) {
  .project { grid-template-columns: 1fr; }
}

.project__header > div { max-width: 56ch; }
/* No colour override: inherits .eyebrow emerald (sprout-2 was 3.4:1 on the
   white section). The "Top story" variant gets its own accessible rust. */
.project__eyebrow--rust { color: var(--color-rust); }
.project__title {
  font-size: var(--fs-3xl);
  line-height: 1.1;
  margin-bottom: var(--space-4);
}
.project__lede {
  font-size: var(--fs-lg);
  color: var(--color-ink-2);
  line-height: 1.55;
}
.project__lede a { font-weight: 600; }

.project__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}
@media (max-width: 560px) { .project__meta { grid-template-columns: 1fr; } }
.project__meta li { display: flex; flex-direction: column; gap: 0.2rem; }
.project__meta span {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.project__meta strong {
  font-size: var(--fs-sm);
  color: var(--color-ink);
  font-weight: 600;
}

.project__actions { margin-top: var(--space-5); }

/* Gallery: a layered "device mockup" composition */
.project__gallery {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  gap: var(--space-4);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(160deg, var(--color-mist), #fff 70%);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
}
@media (min-width: 720px) {
  .project__gallery {
    grid-template-columns: 1.6fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-5);
    align-items: end;
  }
  .project__shot--desktop  { grid-column: 1 / 2; grid-row: 1 / 3; align-self: center; }
  .project__shot--tablet-l { grid-column: 2 / 4; grid-row: 1 / 2; }
  .project__shot--tablet-p { grid-column: 2 / 3; grid-row: 2 / 3; }
  .project__shot--mobile   { grid-column: 3 / 4; grid-row: 2 / 3; }
}

.project__shot {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
}
.project__shot figcaption {
  text-align: center;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.project__shot-frame {
  position: relative;
  background: #0b1f17;
  border: 1px solid rgba(11,31,23,0.18);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.project__shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  aspect-ratio: var(--shot-ratio, auto);
  object-fit: cover;
  object-position: top center;
}

/* Software (Ironbark): two tall app windows side by side, at every width */
.project__gallery--pair { grid-template-columns: 1fr 1fr; grid-template-rows: auto; align-items: start; }

/* Desktop "browser" chrome */
.project__shot-frame--desktop {
  padding-top: 28px;
  border-radius: 12px;
}
.project__shot-chrome {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-inline: 10px;
  background: #0b1f17;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.project__shot-chrome span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
}
.project__shot-chrome span:nth-child(1) { background: #ff5f57; }
.project__shot-chrome span:nth-child(2) { background: #febc2e; }
.project__shot-chrome span:nth-child(3) { background: #28c840; }
.project__shot-frame--desktop img {
  --shot-ratio: 16 / 10;
  border-radius: 0 0 8px 8px;
}

/* Tablet landscape */
.project__shot-frame--tablet-l {
  padding: 10px;
  border-radius: 18px;
}
.project__shot-frame--tablet-l img {
  --shot-ratio: 4 / 3;
  border-radius: 6px;
}

/* Tablet portrait */
.project__shot-frame--tablet-p {
  padding: 10px;
  border-radius: 18px;
  max-width: 320px;
  margin-inline: auto;
}
.project__shot-frame--tablet-p img {
  --shot-ratio: 3 / 4;
  border-radius: 6px;
}

/* Mobile */
.project__shot-frame--mobile {
  padding: 6px;
  border-radius: 22px;
  max-width: 170px;
  margin-inline: auto;
}
.project__shot-frame--mobile img {
  --shot-ratio: 9 / 19.5;
  border-radius: 16px;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative;
  padding-block: clamp(3rem, 6vw, 5rem);
}
.cta-banner__inner {
  background: var(--color-ink);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-banner__inner::before {
  content: "";
  position: absolute;
  inset: -50% -10% auto auto;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(63,179,127,0.35), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.cta-banner__title { color: #fff; font-size: var(--fs-3xl); }
.cta-banner__sub { color: rgba(234,243,237,0.85); margin-top: var(--space-3); max-width: 50ch; }
.cta-banner__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; position: relative; }
.cta-banner .eyebrow { color: var(--color-sprout); }
@media (max-width: 760px) {
  .cta-banner__inner { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .cta-banner__actions .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: var(--text-on-dark);
  margin-top: var(--space-9);
  padding-top: var(--space-9);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: var(--space-8);
}
@media (max-width: 920px) { .site-footer__inner { grid-template-columns: 1fr; } }
.site-footer__tagline {
  margin-top: var(--space-3);
  font-style: italic;
  font-weight: 500;
  color: var(--color-leaf, rgba(234,243,237,0.95));
  letter-spacing: 0.01em;
}
.site-footer__blurb {
  margin-top: var(--space-3);
  color: rgba(234,243,237,0.7);
  max-width: 42ch;
}
.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 640px) { .site-footer__nav { grid-template-columns: 1fr 1fr; } }
.site-footer__heading {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-3);
  font-weight: 600;
}
.site-footer__nav ul { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__nav a {
  color: rgba(234,243,237,0.85);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.site-footer__nav a:hover { color: var(--color-sprout); }

.site-footer__bottom {
  margin-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-block: var(--space-5);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.9);
}
.site-footer__bottom p { color: rgba(255,255,255,0.9); }
.site-footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-4); }
.form__row { display: grid; gap: var(--space-4); grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-ink-2);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius);
  font-size: var(--fs-base);
  color: var(--color-ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-sprout);
  box-shadow: 0 0 0 4px rgba(63,179,127,0.18);
}
.field--check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: var(--fs-sm); color: var(--color-ink-2); }
.field--check input { width: 18px; height: 18px; margin-top: 0.18rem; }

/* Spam trap field. display:none (not just off-screen) so nothing that reads the
   rendered page - a person, autofill or an AI assistant - sees a field to fill. */
.honey { display: none !important; }

.form__hint { font-size: var(--fs-xs); color: var(--text-muted); }

/* ---------- Tables ---------- */
.table {
  width: 100%;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.table th, .table td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--color-line);
  font-size: var(--fs-sm);
}
.table tr:last-child td { border-bottom: 0; }
.table th { background: var(--color-mist); font-weight: 600; color: var(--color-ink); }

/* Wrap wide tables so they horizontal-scroll inside the wrapper instead of
   pushing the page wider than the viewport on mobile. */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}
.table-scroll .table { min-width: 520px; border-radius: 0; border: 0; }
@media (max-width: 640px) {
  .table th, .table td { padding: var(--space-3) var(--space-4); }
}

/* ---------- Pricing rate cards ---------- */
.rate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 760px) { .rate-row { grid-template-columns: 1fr; } }
.rate-card {
  background: #fff;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
}
.rate-card--feature {
  border-color: var(--color-emerald);
  background: linear-gradient(180deg, var(--color-mist), #fff 60%);
}
.rate-card__eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-emerald);
  font-weight: 700;
}
/* RUSH rate accent: brand gold reads at only 3.2:1 on the white card, so the
   light theme uses the deep variant; dark mode restores true gold below. */
.rate-card__eyebrow--gold { color: var(--color-gold-deep); }
.rate-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-display);
  color: var(--color-ink);
}
.rate-card__price strong {
  font-size: clamp(2.5rem, 1.6rem + 3vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
}
.rate-card__price span { font-size: var(--fs-base); color: var(--text-muted); font-family: var(--font-sans); }
.rate-card__inc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.rate-card__list {
  display: flex; flex-direction: column; gap: var(--space-2);
  margin-top: var(--space-2);
}
.rate-card__list li {
  display: flex; align-items: flex-start; gap: 0.55rem;
  font-size: var(--fs-sm);
  color: var(--color-ink-2);
}
.rate-card__list svg { width: 18px; height: 18px; color: var(--color-sprout-2); margin-top: 2px; flex-shrink: 0; }

/* ---------- Process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  counter-reset: step;
}
@media (max-width: 920px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-5);
  position: relative;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-emerald);
  font-weight: 600;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--color-mist);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-3);
}
.step h3 { font-family: var(--font-sans); font-size: var(--fs-lg); font-weight: 600; margin-bottom: var(--space-2); }
.step p { font-size: var(--fs-sm); color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--space-3); max-width: 820px; margin-inline: auto; }
.faq details {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--t-fast) var(--ease);
}
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  list-style: none;
  color: var(--color-ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--color-emerald);
  font-weight: 400;
  transition: transform var(--t-fast) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__body { padding: 0 var(--space-5) var(--space-5); color: var(--color-ink-2); }
/* On tiny phones, drop FAQ summary type a touch so a 3-line question still
   reads cleanly without forcing the chevron off-screen. */
@media (max-width: 480px) {
  .faq summary { font-size: var(--fs-base); padding: var(--space-3) var(--space-4); }
  .faq .faq__body { padding: 0 var(--space-4) var(--space-4); }
}

/* ---------- Page header (sub-pages) ---------- */
.page-header {
  position: relative;
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem);
  background:
    radial-gradient(800px 400px at 90% -20%, rgba(63,179,127,0.15), transparent 60%),
    linear-gradient(180deg, var(--color-mist), transparent 80%);
  border-bottom: 1px solid var(--color-line);
}
.page-header__inner { max-width: 760px; }
.page-header h1 { margin-bottom: var(--space-4); }
.page-header p { color: var(--text-muted); font-size: var(--fs-xl); }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: var(--space-4); }
.crumb a { color: var(--text-muted); text-decoration: none; }
.crumb a:hover { color: var(--color-emerald); }
.crumb span { color: var(--color-ink); }

/* ---------- Service detail page ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.split--narrow { max-width: 980px; margin-inline: auto; }

.checklist {
  display: grid;
  gap: var(--space-3);
}
.checklist li {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: var(--fs-base);
  color: var(--color-ink-2);
}
.checklist svg { width: 22px; height: 22px; color: var(--color-sprout-2); margin-top: 3px; flex-shrink: 0; }

.aside-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  position: sticky;
  top: 100px;
  display: grid;
  gap: var(--space-4);
}
/* On mobile the .split collapses and the aside flows under the main copy —
   sticky would just leave it floating awkwardly mid-scroll, so unstick. */
@media (max-width: 920px) {
  .aside-card { position: static; top: auto; }
}
.aside-card__price {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--color-emerald);
}
.aside-card .btn { width: 100%; justify-content: center; }
.aside-card__note { font-size: var(--fs-xs); color: var(--text-muted); }

/* ---------- Article / prose (contact intro etc.) ---------- */
.prose { max-width: 70ch; }
.prose p, .prose ul, .prose ol { font-size: var(--fs-base); color: var(--color-ink-2); margin-bottom: var(--space-4); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose h2 { font-size: var(--fs-2xl); margin-top: var(--space-7); margin-bottom: var(--space-4); }
.prose h3 { font-size: var(--fs-xl); margin-top: var(--space-5); margin-bottom: var(--space-3); }

/* ---------- Coming soon (thank-you etc.) ---------- */
.coming-soon {
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem);
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
}
.coming-soon__icon {
  display: inline-grid; place-items: center;
  width: 72px; height: 72px;
  background: var(--color-mist);
  color: var(--color-emerald);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}
.coming-soon__icon svg { width: 40px; height: 40px; }

/* ---------- 404 ---------- */
.notfound {
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: clamp(4rem, 8vw, 7rem);
}
.notfound__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 4rem + 5vw, 9rem);
  font-weight: 600;
  line-height: 1;
  color: var(--color-emerald);
  letter-spacing: -0.02em;
}
.notfound__actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; margin-top: var(--space-5); }

/* ---------- Reveal on scroll ----------
   The hidden state sits under html.js (set by the inline script in <head>), so
   without JavaScript nothing is ever invisible. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal][data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal][data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal][data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal][data-reveal-delay="4"] { transition-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Hub fallback lists ----------
   /tools, /articles and /learn carry a plain list of every page in the HTML
   (written by scripts/agent_ready/build.py) for readers without JavaScript.
   With JavaScript the hub script swaps in the filterable cards; hide the list
   until then so it doesn't flash. */
.hub-fallback { display: grid; gap: var(--space-2); grid-column: 1 / -1; margin: 0; padding-left: 1.2rem; }
html.js .hub-fallback { display: none; }

/* ---------- Tag pills ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  padding: 0.3rem 0.65rem;
  background: var(--color-mist);
  color: var(--color-emerald);
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--radius-pill);
}

/* ---------- Status / alerts ---------- */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  background: #fff;
  font-size: var(--fs-sm);
}
.alert--success { border-color: var(--color-sprout); background: var(--color-mist); color: var(--color-emerald); }
.alert--error   { border-color: var(--color-danger); color: var(--color-danger); }

/* ---------- Misc ---------- */
hr.rule { border: 0; border-top: 1px solid var(--color-line); margin-block: var(--space-7); }

/* =============================================================
   Dark mode
   The page background re-uses the same dark green that forms the
   header so the two surfaces fuse together. We rebind the surface
   tokens (page / card / text / muted / line / mist / shadows) so most
   components inherit the dark treatment automatically. The override
   blocks below catch components that hard-code white or use light
   accent colours.
   ============================================================= */
[data-theme="dark"] {
  --bg-page:       var(--color-ink);          /* same as header */
  --bg-card:       #152E22;                   /* one step lifted */
  --text:          var(--text-on-dark);
  --text-muted:    rgba(234,243,237,0.62);
  --color-line:    rgba(255,255,255,0.08);
  --color-mist:    rgba(63,179,127,0.14);
  --color-cream:   var(--color-ink);
  --color-cream-2: #152E22;

  /* Shadows need more weight on a dark surface to read at all */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
  --shadow:    0 6px 20px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.35);
  --shadow-lg: 0 18px 40px rgba(0,0,0,0.55), 0 6px 14px rgba(0,0,0,0.4);

  color-scheme: dark;
}

/* Headings color-default to --color-ink in the base stylesheet (a dark token).
   In dark mode we point them at --text instead. */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 { color: var(--text); }

[data-theme="dark"] body {
  background-image:
    radial-gradient(1200px 600px at -10% -20%, rgba(63,179,127,0.10), transparent 60%),
    radial-gradient(900px 500px at 110% 0%, rgba(14,92,58,0.20), transparent 60%);
}

[data-theme="dark"] a { color: var(--color-sprout); }
[data-theme="dark"] a:hover { color: var(--color-sprout-2); }

/* White surfaces -> lifted dark card */
[data-theme="dark"] .trust-strip,
[data-theme="dark"] .service-card,
[data-theme="dark"] .pricing-teaser,
[data-theme="dark"] .step,
[data-theme="dark"] .faq details,
[data-theme="dark"] .table,
[data-theme="dark"] .rate-card,
[data-theme="dark"] .aside-card,
[data-theme="dark"] .alert,
[data-theme="dark"] .coming-soon,
[data-theme="dark"] .primary-nav__menu,
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea,
[data-theme="dark"] .field select {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--color-line);
}

/* Trust strip hairlines */
[data-theme="dark"] .trust-strip { border-block-color: var(--color-line); }
/* Partner names are ink-2 in light mode — a fixed dark token that disappears
   (1.2:1) on the dark card. */
[data-theme="dark"] .trust-strip__logo { color: var(--text-on-dark); }

/* Hover states that originally used mist */
[data-theme="dark"] .service-card:hover { border-color: rgba(63,179,127,0.35); }
[data-theme="dark"] .primary-nav__menu a:hover { background: rgba(63,179,127,0.14); color: var(--color-sprout); }

/* Mist-tinted accent surfaces (chips, icons, step numbers, tags) */
[data-theme="dark"] .feature__icon,
[data-theme="dark"] .service-card__icon,
[data-theme="dark"] .coming-soon__icon,
[data-theme="dark"] .pricing-teaser__rate,
[data-theme="dark"] .step::before,
[data-theme="dark"] .tag,
[data-theme="dark"] .section__head .eyebrow {
  background: rgba(63,179,127,0.14);
  color: var(--color-sprout);
}

/* Alerts, table heads, featured rate card */
[data-theme="dark"] .table th { background: rgba(255,255,255,0.04); color: var(--text); }
[data-theme="dark"] .table th, [data-theme="dark"] .table td { border-bottom-color: var(--color-line); }
[data-theme="dark"] .alert--success {
  background: rgba(63,179,127,0.10);
  color: var(--color-sprout);
  border-color: rgba(63,179,127,0.45);
}
[data-theme="dark"] .rate-card--feature {
  background: linear-gradient(180deg, rgba(63,179,127,0.18), var(--bg-card) 60%);
  border-color: rgba(63,179,127,0.45);
}

/* Project gallery: light cream gradient -> sprout-tinted dark gradient */
[data-theme="dark"] .project__gallery {
  background: linear-gradient(160deg, rgba(63,179,127,0.10), var(--bg-card) 70%);
  border-color: var(--color-line);
}

/* Body text on dark works at slightly reduced alpha for hierarchy */
[data-theme="dark"] .project__lede,
[data-theme="dark"] .checklist li,
[data-theme="dark"] .rate-card__list li,
[data-theme="dark"] .hero__meta li,
[data-theme="dark"] .field--check,
[data-theme="dark"] .prose p,
[data-theme="dark"] .prose ul,
[data-theme="dark"] .prose ol,
[data-theme="dark"] .faq .faq__body { color: rgba(234,243,237,0.85); }

/* Subpage hero lede: base rule paints these with --text-muted (62% alpha),
   which is fine on cream but reads as low-contrast on the dark gradient. */
[data-theme="dark"] .page-header h1 ~ p { color: rgba(234,243,237,0.88); }

/* Strong / heading-like text inside cards and subnav */
[data-theme="dark"] .project__meta strong,
[data-theme="dark"] .crumb span,
[data-theme="dark"] .rate-card__price,
[data-theme="dark"] .rate-card__price strong,
[data-theme="dark"] .faq summary,
[data-theme="dark"] .field label { color: var(--text); }

/* Brand-emerald accents -> sprout (legible on dark) */
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .hero__title em,
[data-theme="dark"] .pricing-teaser__rate strong,
[data-theme="dark"] .aside-card__price,
[data-theme="dark"] .notfound__code,
[data-theme="dark"] .rate-card__eyebrow,
[data-theme="dark"] .service-card__link,
[data-theme="dark"] .crumb a:hover,
[data-theme="dark"] .faq summary::after { color: var(--color-sprout); }

/* Non-green accents: light-mode values are tuned for white cards, so lift
   them for the dark surface (rust 5.4:1, gold 6:1 on the card). */
[data-theme="dark"] .project__eyebrow--rust { color: #E8825A; }
[data-theme="dark"] .rate-card__eyebrow--gold { color: var(--color-gold); }

/* Error alert: light-mode danger red is only 2.2:1 on the dark card */
[data-theme="dark"] .alert--error {
  border-color: rgba(229,72,77,0.6);
  color: #ff8a8a;
}

/* Skip link: ink-on-ink box would vanish; flip to the accent */
[data-theme="dark"] .skip-link {
  background: var(--color-sprout);
  color: var(--color-ink);
}

/* Focus ring: base rule darkened to emerald for light mode, which would be
   invisible here — sprout reads 6.5:1 on the dark page. */
[data-theme="dark"] :focus-visible { outline-color: var(--color-sprout); }

/* Buttons: re-tone primary + ghost so they read on the dark page */
[data-theme="dark"] .btn--primary {
  --btn-bg: var(--color-sprout);
  --btn-bd: var(--color-sprout);
  --btn-fg: var(--color-ink);
}
[data-theme="dark"] .btn--primary:hover {
  --btn-bg: var(--color-sprout-2);
  --btn-bd: var(--color-sprout-2);
}
[data-theme="dark"] .btn--ghost {
  --btn-bd: var(--color-sprout);
  --btn-fg: var(--color-sprout);
}
[data-theme="dark"] .btn--ghost:hover {
  --btn-bg: var(--color-sprout);
  --btn-fg: var(--color-ink);
}
/* Anchor buttons need to win against [data-theme="dark"] a, otherwise the
   sprout link colour gets painted on top of the (often sprout) button bg
   and the label disappears. Bumping the selector specificity is enough. */
[data-theme="dark"] a.btn { color: var(--btn-fg); }

/* Sub-page hero strip: cream gradient -> sprout glow */
[data-theme="dark"] .page-header {
  background:
    radial-gradient(800px 400px at 90% -20%, rgba(63,179,127,0.18), transparent 60%),
    linear-gradient(180deg, rgba(63,179,127,0.06), transparent 80%);
  border-bottom-color: var(--color-line);
}

/* Misc borders */
[data-theme="dark"] .hero__meta { border-top-color: var(--color-line); }
[data-theme="dark"] .project + .project { border-top-color: var(--color-line); }
[data-theme="dark"] .project__meta { border-color: var(--color-line); }
[data-theme="dark"] hr.rule { border-top-color: var(--color-line); }

/* Form focus ring still pops (sprout works in both modes) */
[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field textarea:focus,
[data-theme="dark"] .field select:focus {
  border-color: var(--color-sprout);
  box-shadow: 0 0 0 4px rgba(63,179,127,0.22);
}

/* The header, footer, .partner and .cta-banner__inner are dark in both themes,
   so they intentionally need no overrides. */

/* --- Defensive overrides for legacy inline styles ---
   A handful of sections, cards and headings on the marketing pages were
   styled inline before dark mode existed (background:#fff, color: emerald,
   etc). Refactoring every page would be churn for little benefit, so we
   target the inline `style=` strings here and re-tone them for dark mode.
   `!important` is required to beat element-level inline styles. */
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"] {
  background: var(--bg-card) !important;
}
/* The "RUSH rate" pricing teaser uses a soft white→mist gradient in light
   mode; in dark mode we mirror it as a sprout-tinted lift on the card. */
[data-theme="dark"] [style*="linear-gradient(180deg, #fff"] {
  background: linear-gradient(180deg, rgba(63,179,127,0.18), var(--bg-card) 60%) !important;
}
/* Brand-emerald inline text colour reads fine on white, vanishes on a
   dark surface; swap it for sprout, which is the dark-mode accent. */
[data-theme="dark"] [style*="color: var(--color-emerald)"],
[data-theme="dark"] [style*="color:var(--color-emerald)"] {
  color: var(--color-sprout) !important;
}

/* ---------- Home: AI showcase (Dead Air feature + two tools) ---------- */
.showcase { margin-top: var(--space-7); }
.showcase__head { max-width: 62ch; margin: 0 auto var(--space-5); text-align: center; }
.showcase__head h3 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.showcase__head p:not(.eyebrow) { color: var(--text-muted); }
.showcase__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: var(--space-5);
}
.showcase-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-ink);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.showcase-card:hover { transform: translateY(-3px); border-color: var(--color-sprout); box-shadow: var(--shadow); color: var(--color-ink); }
.showcase-card--feature { grid-row: span 2; border-color: var(--color-emerald); }
.showcase-card__thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #10161a; border-bottom: 1px solid var(--color-line); }
.showcase-card__body { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; padding: var(--space-4) var(--space-5) var(--space-5); }
.showcase-card__tag { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-emerald); }
.showcase-card__name { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); line-height: 1.25; }
.showcase-card--feature .showcase-card__name { font-size: var(--fs-2xl); }
.showcase-card__blurb { color: var(--text-muted); font-size: var(--fs-sm); }
.showcase-card--feature .showcase-card__blurb { font-size: var(--fs-base); }
.showcase-card--feature .showcase-card__body { gap: 0.5rem; }
.showcase-card__cta { margin-top: auto; align-self: flex-start; }
.showcase-card--feature .showcase-card__blurb { margin-bottom: var(--space-4); }
.showcase__more { text-align: center; margin-top: var(--space-5); }
@media (max-width: 760px) {
  .showcase__grid { grid-template-columns: 1fr; }
  .showcase-card--feature { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) { .showcase-card:hover { transform: none; } }
[data-theme="dark"] .showcase-card { background: var(--bg-card); color: var(--text); border-color: var(--color-line); }
[data-theme="dark"] .showcase-card--feature { border-color: var(--color-sprout); }
[data-theme="dark"] .showcase-card:hover { color: var(--text); }
[data-theme="dark"] .showcase-card__tag { color: var(--color-sprout); }
