/* ============================================================================
 * Close Couples — styles.css  ·  the shared design system (Epic A · A1)
 * ----------------------------------------------------------------------------
 * Framework-free, ZERO build step. One long-cacheable stylesheet consumed by
 * every page (index, privacy, terms, 404). Per-page critical CSS is inlined
 * by each page in a <style> in <head>; this is the full sheet, loaded async-ish
 * (a normal <link>, but long-cached + immutable — see web/_headers).
 *
 * Cozy "Our Sanctuary / Hearth & Home" palette — Earth & Ember on cream, soft
 * hearth-glow atmosphere. Tokens MIRROR src/constants/colors.ts (the single
 * source of truth for brand hues — keep in sync if the app's hues move).
 *
 * Voice the design serves: cozy · warm · intimate · a little playful —
 * never sickly-sweet, never corporate (docs_nathan/FULL-SYSTEM-OVERVIEW.md).
 *
 * A11y: WCAG AA contrast, visible focus rings, prefers-reduced-motion honored,
 * responsive 320px → desktop with no horizontal scroll.
 * ==========================================================================*/

/* ---------------------------------------------------------------------------
 * 1. Design tokens  (mirrors src/constants/colors.ts)
 * ------------------------------------------------------------------------- */
:root {
  /* --- Brand color tokens (from colors.ts) --- */
  --terracotta:       #C15F3C;  /* primary — decorative / large-text only (white-on it is 4.2:1) */
  --terracotta-dark:  #9C4A2D;  /* primaryDark — AA-safe for white text (6.1:1): CTA bg, links */
  --terracotta-deep:  #7E3A22;  /* CTA hover (white text 8.3:1) */
  --terracotta-light: #D98A6A;  /* primaryLight */
  --terracotta-bright:#E2A07E;  /* primaryBright */
  --olive:            #7C8A4E;  /* accent — decorative / icon use only (3.5:1 as text on cream) */
  --olive-dark:       #5C6838;  /* accent TEXT — AA-safe on cream/cream-2 (5.1–5.6:1) */
  --sage:             #8FA978;  /* accent-2 (electricCyan remap) */
  --green-muted:      #6E8B6A;  /* ambientTeal remap */

  --cream:            #FBF6EF;  /* background */
  --cream-2:          #F4EBDF;  /* backgroundSecondary */
  --surface:          #FFFDF9;  /* card surface */
  --skeleton:         #EDE3D6;

  --espresso:         #3A2E28;  /* text / textPrimary */
  --muted:            #6F6258;  /* textSecondary — darkened from #7A6A5E for AA on cream-2 (5.0:1) */
  --muted-2:          #A4978C;  /* textMuted / taupe */
  --inverse:          #FBF6EF;  /* textInverse (on dark/terracotta) */

  --border:           rgba(58, 46, 40, 0.12);
  --border-strong:    rgba(58, 46, 40, 0.20);

  /* Semantic (warm-tuned, from colors.ts) */
  --success:          #5E8C61;
  --warning:          #D9A14E;
  --error:            #C7553F;
  --success-bg:       rgba(94, 140, 97, 0.12);
  --error-bg:         rgba(199, 85, 63, 0.10);

  /* --- Fluid type scale (clamp: min @320px → max @~1280px) --- */
  --fs-50:  clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);   /* 12 → 13  (eyebrow/fine) */
  --fs-100: clamp(0.8125rem, 0.78rem + 0.18vw, 0.875rem);  /* 13 → 14  (small) */
  --fs-200: clamp(0.9375rem, 0.91rem + 0.16vw, 1rem);      /* 15 → 16  (body) */
  --fs-300: clamp(1rem, 0.95rem + 0.27vw, 1.125rem);       /* 16 → 18  (lede/large body) */
  --fs-400: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);    /* 18 → 22  (h4 / card title) */
  --fs-500: clamp(1.375rem, 1.2rem + 0.85vw, 1.875rem);    /* 22 → 30  (h3) */
  --fs-600: clamp(1.75rem, 1.4rem + 1.7vw, 2.625rem);      /* 28 → 42  (h2 / section) */
  --fs-700: clamp(2.125rem, 1.5rem + 3.1vw, 3.75rem);      /* 34 → 60  (h1 / hero) */

  --lh-tight:  1.15;
  --lh-snug:   1.3;
  --lh-body:   1.62;

  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-extra:    800;

  /* --- Spacing scale (rem-based, 8px-ish rhythm) --- */
  --sp-1:  0.25rem;   /*  4 */
  --sp-2:  0.5rem;    /*  8 */
  --sp-3:  0.75rem;   /* 12 */
  --sp-4:  1rem;      /* 16 */
  --sp-5:  1.5rem;    /* 24 */
  --sp-6:  2rem;      /* 32 */
  --sp-7:  3rem;      /* 48 */
  --sp-8:  4rem;      /* 64 */
  --sp-9:  6rem;      /* 96 */
  --sp-10: 8rem;      /* 128 */

  /* --- Radii --- */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-2xl:  36px;
  --r-pill: 999px;

  /* --- Shadows (warm-tinted, soft) --- */
  --sh-sm:    0 2px 8px rgba(58, 46, 40, 0.06);
  --sh-md:    0 8px 24px rgba(58, 46, 40, 0.08);
  --sh-lg:    0 18px 48px rgba(58, 46, 40, 0.10);
  --sh-cta:   0 8px 20px rgba(193, 95, 60, 0.30);
  --sh-mark:  0 10px 24px rgba(193, 95, 60, 0.32);
  --sh-focus: 0 0 0 3px rgba(193, 95, 60, 0.45);

  /* --- Layout --- */
  --container:      72rem;   /* 1152px */
  --container-prose:42rem;   /* 672px  — long-form legal/readable width */
  --container-narrow:38rem;  /* 608px  — hero copy / forms */
  --gutter:         clamp(1.25rem, 4vw, 2.5rem);
  --header-h:       4rem;    /* sticky header height (scroll-margin offset) */

  /* --- z-index scale --- */
  --z-base:    0;
  --z-raised:  10;
  --z-sticky:  100;  /* sticky header */
  --z-nav:     200;  /* mobile nav overlay */
  --z-skip:    300;  /* skip link (above all) */

  /* --- Motion --- */
  --ease:       cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast:   120ms;
  --dur-base:   220ms;
  --dur-slow:   500ms;
}

/* ---------------------------------------------------------------------------
 * 2. Reset / base
 * ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: var(--fs-200);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* prevent horizontal scroll from decorative overflow at small widths */
  overflow-x: hidden;
}

img, svg, video, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }

a { color: var(--terracotta-dark); text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; }
a:hover { color: var(--terracotta); }

ul, ol { padding-left: 1.25em; }

button { font: inherit; color: inherit; }

:target { scroll-margin-top: calc(var(--header-h) + var(--sp-4)); }

/* Visible focus everywhere — keyboard a11y (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Remove the default outline only where :focus-visible is supported, to avoid
   showing it on mouse clicks while preserving it for keyboard. */
:focus:not(:focus-visible) { outline: none; }

/* ---------------------------------------------------------------------------
 * 3. Skip link (a11y — first focusable element)
 * ------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -200%;
  z-index: var(--z-skip);
  padding: var(--sp-2) var(--sp-4);
  background: var(--terracotta-dark);
  color: #fff;
  border-radius: var(--r-md);
  font-weight: var(--fw-bold);
  text-decoration: none;
  box-shadow: var(--sh-md);
}
.skip-link:focus {
  top: var(--sp-3);
  color: #fff;
}

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

.section {
  padding-block: clamp(var(--sp-7), 8vw, var(--sp-9));
}
.section--tight { padding-block: clamp(var(--sp-6), 6vw, var(--sp-8)); }
.section--alt   { background: var(--cream-2); }
.section--surface { background: var(--surface); }

/* Responsive grid helpers — auto-fit cards, never overflow at 320px */
.grid { display: grid; gap: var(--sp-5); }
.grid--2   { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.grid--3   { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.grid--features {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--sp-5);
}

/* A two-column "split" (copy + media) that stacks on mobile */
.split {
  display: grid;
  gap: clamp(var(--sp-5), 5vw, var(--sp-8));
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 56rem) {
  .split { grid-template-columns: 1.05fr 0.95fr; }
  .split--reverse > :first-child { order: 2; }
}

/* Utility helpers */
.center        { text-align: center; }
.mx-auto       { margin-inline: auto; }
.measure       { max-width: 38ch; }
.measure-wide  { max-width: 52ch; }
.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------------------
 * 5. Typography helpers
 * ------------------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-50);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-dark);
  margin-bottom: var(--sp-3);
}
.h1, h1.h1 { font-size: var(--fs-700); line-height: var(--lh-tight); font-weight: var(--fw-extra); letter-spacing: -0.02em; }
.h2 { font-size: var(--fs-600); line-height: var(--lh-snug);  font-weight: var(--fw-extra); letter-spacing: -0.015em; }
.h3 { font-size: var(--fs-500); line-height: var(--lh-snug);  font-weight: var(--fw-bold);  letter-spacing: -0.01em; }
.h4 { font-size: var(--fs-400); line-height: var(--lh-snug);  font-weight: var(--fw-bold); }
.lede { font-size: var(--fs-300); line-height: 1.55; color: var(--muted); }
.text-muted { color: var(--muted); }
.text-fine  { font-size: var(--fs-100); color: var(--muted); }

/* ---------------------------------------------------------------------------
 * 6. Brand mark / wordmark
 * ------------------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--espresso);
  font-weight: var(--fw-extra);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--espresso); }
.brand__mark {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--terracotta), var(--terracotta-dark));
  box-shadow: var(--sh-mark);
  color: #fff;
}
.brand__mark svg { width: 1.15rem; height: 1.15rem; }
.brand__name { font-size: var(--fs-300); }

/* Large standalone mark (404 / hero accents) */
.mark-lg {
  width: 4.75rem; height: 4.75rem;
  border-radius: var(--r-xl);
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--terracotta), var(--terracotta-dark));
  box-shadow: var(--sh-mark);
  color: #fff;
}
.mark-lg svg { width: 2.375rem; height: 2.375rem; }

/* ---------------------------------------------------------------------------
 * 7. Site header + nav  (sticky, with mobile hamburger)
 * ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
/* Fallback for browsers without backdrop-filter — solid cream */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--cream); }
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.site-nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__links a {
  color: var(--espresso);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-200);
  padding: var(--sp-2) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] { color: var(--terracotta-dark); border-color: var(--terracotta); }

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  color: var(--espresso);
}
.nav-toggle:hover { background: var(--cream-2); }
.nav-toggle__bars { position: relative; width: 1.25rem; height: 0.875rem; }
.nav-toggle__bars span,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars span    { top: 50%; transform: translateY(-50%); }
.nav-toggle__bars::after  { bottom: 0; }
/* open (X) state — driven by [aria-expanded="true"] on the button */
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span    { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-flex; }

  /* The collapsible menu panel */
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-lg);
    padding: var(--sp-3) var(--gutter) var(--sp-5);
    z-index: var(--z-nav);
    /* hidden by default; JS toggles [data-open] / the hidden attr */
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease), visibility var(--dur-base);
  }
  .site-nav[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .site-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .site-nav__links li { border-bottom: 1px solid var(--border); }
  .site-nav__links a {
    display: block;
    padding: var(--sp-4) 0;
    border-bottom: none;
  }
  .site-nav .btn { margin-top: var(--sp-4); justify-content: center; }
}

/* No-JS / progressive enhancement: when JS is off we leave the menu visible
   inline on mobile (the <noscript> in the page can flip a class, or it simply
   degrades to anchors below the header). The .no-js hook is set in <html>. */
@media (max-width: 52rem) {
  .no-js .site-nav {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding: 0 0 var(--sp-4);
  }
  .no-js .nav-toggle { display: none; }
}

/* ---------------------------------------------------------------------------
 * 8. Buttons
 * ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-200);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--terracotta-dark);   /* AA: white-on-#C15F3C is 4.2:1; #9C4A2D is 6.1:1 */
  color: #fff;
  box-shadow: var(--sh-cta);
}
.btn-primary:hover { background: var(--terracotta-deep); color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--espresso);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--cream-2); color: var(--espresso); }

.btn-ghost {
  background: transparent;
  color: var(--terracotta-dark);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--terracotta) 10%, transparent); }

.btn--lg { padding: 0.9375rem 1.75rem; font-size: var(--fs-300); border-radius: var(--r-lg); }
.btn--block { display: flex; width: 100%; }

/* ---------------------------------------------------------------------------
 * 9. Cards
 * ------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(var(--sp-5), 4vw, var(--sp-6));
  box-shadow: var(--sh-md);
}
.card--flat   { box-shadow: none; }
.card--center { text-align: center; }
.card__icon {
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--olive) 16%, var(--surface));
  color: var(--olive);
  margin-bottom: var(--sp-4);
}
.card__icon svg { width: 1.5rem; height: 1.5rem; }
.card__icon--terracotta {
  background: color-mix(in srgb, var(--terracotta) 14%, var(--surface));
  color: var(--terracotta-dark);
}
.card__title { font-size: var(--fs-400); font-weight: var(--fw-bold); margin-bottom: var(--sp-2); }
.card__body  { color: var(--muted); font-size: var(--fs-200); }

/* Feature card with a small device-screenshot at the top */
.feature-card { display: flex; flex-direction: column; gap: var(--sp-4); }

/* ---------------------------------------------------------------------------
 * 10. Badges (incl. "coming soon" store badges)
 * ------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-50);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  background: var(--cream-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge--olive {
  background: color-mix(in srgb, var(--olive) 16%, var(--surface));
  color: #5c6838;
  border-color: color-mix(in srgb, var(--olive) 30%, transparent);
}
.badge--terracotta {
  background: color-mix(in srgb, var(--terracotta) 14%, var(--surface));
  color: var(--terracotta-dark);
  border-color: color-mix(in srgb, var(--terracotta) 28%, transparent);
}

/* Store badges row */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
/* A "coming soon" app-store badge: looks like a store button, but is a
   non-link status pill (no dead store URLs pre-launch). main.js shows the
   right one(s) per OS; CSS makes them clearly "soon". */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.625rem 1rem;
  border-radius: var(--r-md);
  background: var(--espresso);
  color: var(--cream);
  border: 1px solid var(--espresso);
  text-decoration: none;
  position: relative;
}
.store-badge svg { width: 1.5rem; height: 1.5rem; flex: none; color: var(--cream); }
.store-badge__text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-badge__top { font-size: 0.625rem; opacity: 0.8; letter-spacing: 0.02em; }
.store-badge__bottom { font-size: var(--fs-200); font-weight: var(--fw-bold); }
/* "coming soon" variant — muted, non-interactive look */
.store-badge[aria-disabled="true"] {
  background: var(--cream-2);
  color: var(--espresso);
  border-color: var(--border-strong);
  cursor: default;
}
.store-badge[aria-disabled="true"] svg { color: var(--espresso); }
.store-badge__soon {
  margin-left: var(--sp-1);
  font-size: 0.5625rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--olive-dark);
}

/* ---------------------------------------------------------------------------
 * 11. Accordion (native <details>/<summary> — FAQ)
 * ------------------------------------------------------------------------- */
.accordion { display: grid; gap: var(--sp-3); }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  font-weight: var(--fw-bold);
  font-size: var(--fs-300);
  cursor: pointer;
  list-style: none;            /* hide default marker (Firefox) */
}
.faq-item > summary::-webkit-details-marker { display: none; }  /* Safari/Chrome */
.faq-item > summary:hover { color: var(--terracotta-dark); }
.faq-item > summary::after {
  content: "";
  flex: none;
  width: 0.75rem; height: 0.75rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--dur-base) var(--ease);
  margin-top: -0.25rem;
}
.faq-item[open] > summary::after { transform: rotate(-135deg); margin-top: 0.25rem; }
.faq-item__body {
  padding: 0 var(--sp-5) var(--sp-5);
  color: var(--muted);
  font-size: var(--fs-200);
}
.faq-item__body > * + * { margin-top: var(--sp-3); }

/* ---------------------------------------------------------------------------
 * 12. Forms (waitlist) + inline success/error
 * ------------------------------------------------------------------------- */
.field { display: grid; gap: var(--sp-2); }
.field__label { font-weight: var(--fw-semibold); font-size: var(--fs-100); }
.input {
  width: 100%;
  padding: 0.8125rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--espresso);
  font-size: var(--fs-200);
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.input::placeholder { color: var(--muted-2); }
.input:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: var(--sh-focus);
}
.input[aria-invalid="true"] { border-color: var(--error); }

/* Inline waitlist form layout: input + button side-by-side, stacks at 320 */
.waitlist-form { display: grid; gap: var(--sp-3); }
.waitlist-row {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr;
}
@media (min-width: 30rem) {
  .waitlist-row { grid-template-columns: 1fr auto; align-items: start; }
}
/* The Netlify honeypot — visually hidden but present for bots */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Inline form messages */
.form-msg {
  font-size: var(--fs-100);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  margin-top: var(--sp-2);
}
.form-msg--success {
  background: var(--success-bg);
  color: #3f6e42;
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
}
.form-msg--error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid color-mix(in srgb, var(--error) 35%, transparent);
}
.field__hint { font-size: var(--fs-50); color: var(--muted); }
.field__error { font-size: var(--fs-50); color: var(--error); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------------------
 * 13. Hero + hero glow (decorative)
 * ------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(var(--sp-7), 9vw, var(--sp-10));
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 30rem at 50% -10%, rgba(193, 95, 60, 0.14), transparent 60%),
    radial-gradient(48rem 28rem at 10% 110%, rgba(124, 138, 78, 0.12), transparent 60%),
    radial-gradient(40rem 26rem at 92% 30%, rgba(217, 138, 106, 0.10), transparent 60%);
  animation: hero-breathe 14s var(--ease) infinite alternate;
}
@keyframes hero-breathe {
  from { transform: scale(1) translateY(0); opacity: 0.9; }
  to   { transform: scale(1.06) translateY(-1.5%); opacity: 1; }
}
.hero__eyebrow { color: var(--olive-dark); }
.hero__title { margin-bottom: var(--sp-4); }
.hero__lede { margin-bottom: var(--sp-6); max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.hero__reassure { margin-top: var(--sp-4); }

/* ---------------------------------------------------------------------------
 * 14. Device frame (screenshot mockups)
 * ------------------------------------------------------------------------- */
.device-frame {
  position: relative;
  width: 100%;
  max-width: 16rem;
  margin-inline: auto;
  padding: 0.5rem;
  border-radius: 2.25rem;
  background: linear-gradient(160deg, #4a3c34, var(--espresso));
  box-shadow: var(--sh-lg), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.device-frame::before {           /* speaker notch */
  content: "";
  position: absolute;
  top: 0.9rem; left: 50%;
  transform: translateX(-50%);
  width: 4rem; height: 0.3rem;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.18);
  z-index: 2;
}
.device-frame__screen {
  border-radius: 1.85rem;
  overflow: hidden;
  background: var(--cream-2);
  aspect-ratio: 600 / 1299;       /* matches the screenshot slot dimensions */
}
.device-frame__screen img { width: 100%; height: 100%; object-fit: cover; }
.device-frame--lg { max-width: 18rem; }

/* ---------------------------------------------------------------------------
 * 15. Steps (how-it-works) + trust list + pricing
 * ------------------------------------------------------------------------- */
.steps { counter-reset: step; }
.step__num {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--r-pill);
  background: var(--terracotta-dark);
  color: #fff;
  font-weight: var(--fw-extra);
  margin-bottom: var(--sp-3);
}

.checklist { list-style: none; padding: 0; display: grid; gap: var(--sp-3); }
.checklist li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: var(--sp-3);
  align-items: start;
}
.checklist li::before {
  content: "";
  width: 1.25rem; height: 1.25rem;
  margin-top: 0.2rem;
  border-radius: var(--r-pill);
  background:
    var(--olive)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E")
    center / 0.75rem no-repeat;
}

.price-card {
  border: 2px solid color-mix(in srgb, var(--terracotta) 35%, transparent);
  border-radius: var(--r-2xl);
  background: var(--surface);
  padding: clamp(var(--sp-6), 5vw, var(--sp-7));
  box-shadow: var(--sh-lg);
}
.price-card__amount { font-size: var(--fs-600); font-weight: var(--fw-extra); }
.price-card__period { font-size: var(--fs-200); color: var(--muted); font-weight: var(--fw-semibold); }

/* ---------------------------------------------------------------------------
 * 16. Footer
 * ------------------------------------------------------------------------- */
.site-footer {
  background: var(--cream-2);
  border-top: 1px solid var(--border);
  padding-block: var(--sp-7);
  font-size: var(--fs-100);
  color: var(--muted);
}
.site-footer__grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 44rem) {
  .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr; }
}
.site-footer__col h3 {
  font-size: var(--fs-100);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--sp-3);
}
.site-footer__links { list-style: none; padding: 0; display: grid; gap: var(--sp-2); }
.site-footer__links a { color: var(--espresso); text-decoration: none; }
.site-footer__links a:hover { color: var(--terracotta-dark); text-decoration: underline; }
.site-footer__tagline { color: var(--muted); max-width: 32ch; margin-top: var(--sp-3); }
.site-footer__bottom {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: space-between;
  align-items: center;
}

/* Simplified footer/nav variant for legal pages (back-to-home + legal links) */
.legal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
}
.legal-bar__links { display: flex; gap: var(--sp-4); flex-wrap: wrap; }

/* Long-form legal prose */
.prose { max-width: var(--container-prose); }
.prose h2 { font-size: var(--fs-500); margin-top: var(--sp-7); margin-bottom: var(--sp-3); }
.prose h3 { font-size: var(--fs-400); margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--sp-4); color: var(--espresso); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: var(--sp-2); }
.prose a { color: var(--terracotta-dark); }

/* ---------------------------------------------------------------------------
 * 17. Scroll-reveal (JS-driven; safe default = visible if JS off)
 * ------------------------------------------------------------------------- */
/* Elements only become hidden-before-reveal when JS adds .js-reveal-ready to
   <html>; otherwise they are visible (progressive enhancement). */
.js-reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  will-change: opacity, transform;
}
.js-reveal-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------------------
 * 18. Reduced motion — disable non-essential animation (WCAG 2.3.3)
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero__glow { animation: none; }
  .js-reveal-ready [data-reveal] { opacity: 1; transform: none; }
}
