/* =========================================================
   MomPath — marketing site styles
   Mobile-first. Tokens in :root, dark mode redefines them.
   ========================================================= */

/* Local fallbacks scaled to the web fonts' widths, so text barely
   reflows when Newsreader and Instrument Sans arrive (fonts load async). */
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia");
  font-weight: 200 500;
  size-adjust: 86.6%;
}
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia Bold"), local("Georgia-Bold");
  font-weight: 600 800;
  size-adjust: 86.3%;
}
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia Italic"), local("Georgia-Italic");
  font-style: italic;
  font-weight: 200 500;
  size-adjust: 86.6%;
}
@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia Bold Italic"), local("Georgia-BoldItalic");
  font-style: italic;
  font-weight: 600 800;
  size-adjust: 86.3%;
}
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400 500;
  size-adjust: 102%;
}
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 600 700;
  size-adjust: 97.3%;
}

:root {
  --cream:     #FFFAF7;  /* logo background — page background */
  --surface:    #FFFFFF;  /* cards, form */
  --ink:        #1C1C1C;  /* logo "mom" — headings and body text */
  --muted:      #6B605A;  /* secondary text (warm grey) */
  --line:       #EDE3DC;  /* borders, dividers */
  --terracotta: #C46B3F;  /* logo "path" — large display accents, icons */
  --terracotta-deep: #A5532B; /* buttons with white text, links, small accent text */
  --blush:      #F7E6DC;  /* soft tinted panels */
  --dusk:       #2A211D;  /* mission band and footer */

  --on-accent: #FFFFFF;   /* text on terracotta-deep buttons */
  --card-shadow: 0 1px 2px rgba(42, 33, 29, 0.05), 0 20px 44px -18px rgba(42, 33, 29, 0.18);

  /* Fixed colours for the always-dark dusk band and footer */
  --dusk-text: #F4ECE6;
  --dusk-muted: #CDBFB5;
  --dusk-accent: #E59B73;
  --dusk-line: rgba(244, 236, 230, 0.18);

  --font-display: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", "Instrument Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --max: 1180px;
  --gutter-l: max(20px, env(safe-area-inset-left));
  --gutter-r: max(20px, env(safe-area-inset-right));
  --header-h: 68px;
  --ease-entrance: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

html[data-theme="dark"] {
  --cream: #16120F;
  --surface: #201A16;
  --ink: #F4ECE6;
  --muted: #B8A99F;
  --line: #3A2F29;
  --terracotta: #E08A5F;
  --terracotta-deep: #E59B73;
  --blush: #33241C;
  --dusk: #0F0C0A;

  --on-accent: #1C1C1C;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 20px 44px -18px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* keep section headings clear of the sticky header on in-page jumps */
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }

h1, h2 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: 0;
}

/* Display headings: a fixed optical size keeps stroke contrast consistent
   across the fluid heading sizes. */
h1, h2, .pull-quote,
h1 em, h2 em, .pull-quote em {
  font-weight: 600;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 36;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }

h1 em,
h2 em {
  font-style: italic;
  color: var(--terracotta);
}

p { margin: 0; }

a { color: var(--terracotta-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--terracotta-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.skip-link:focus { top: 12px; }

.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  box-sizing: content-box;
}

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
}

.line-icon { color: var(--terracotta); flex: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

/* hover tint: an overlay whose opacity changes, so only opacity animates */
.btn::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.btn-primary {
  background: var(--terracotta-deep);
  color: var(--on-accent);
}

.btn-outline {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-outline::before { background: var(--ink); }

.btn-small {
  min-height: 42px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn[disabled] { opacity: .7; cursor: progress; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid transparent;
}

/* Once the page has scrolled, a backdrop layer (bottom border, and a
   translucent blurred cream where supported) fades in. Only its opacity
   animates. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -1px;
  z-index: -1;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 300ms ease-out;
  pointer-events: none;
}
.site-header.is-scrolled::before { opacity: 1; }

@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .site-header::before {
    background: color-mix(in srgb, var(--cream) 85%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .site-header.is-scrolled { background: transparent; }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
  position: relative;
}

.brand { display: inline-flex; flex: none; border-radius: 6px; }
.brand img { width: auto; height: 26px; }

/* header logo follows the chosen theme */
.brand .logo-for-dark { display: none; }
html[data-theme="dark"] .brand .logo-for-light { display: none; }
html[data-theme="dark"] .brand .logo-for-dark { display: block; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.site-nav ul { list-style: none; }

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--terracotta-deep); }

.menu-toggle,
.theme-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle:hover,
.theme-toggle:hover { border-color: var(--terracotta-deep); }

/* theme toggle needs JS, so it only appears when JS runs */
.js .theme-toggle { display: inline-flex; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile navigation: collapsible when JS is available */
@media (max-width: 859.98px) {
  .js .menu-toggle { display: inline-flex; }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter-r) 20px var(--gutter-l);
    background: var(--cream);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav.is-open { display: block; }
  .site-nav a { display: block; padding: 12px 0; font-size: 1.05rem; }
  .site-nav li + li { border-top: 1px solid var(--line); }

  /* Without JS, show links on their own row */
  .header-inner { flex-wrap: wrap; }
  html:not(.js) .site-nav { order: 3; width: 100%; padding-bottom: 8px; }
  html:not(.js) .site-nav ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
  html:not(.js) .site-nav li + li { border-top: 0; }
}

@media (max-width: 399.98px) {
  .header-actions .btn-small { padding: 8px 12px; font-size: 0.85rem; }
}

@media (min-width: 400px) {
  .brand img { height: 34px; }
  .header-actions { gap: 8px; }
  .menu-toggle,
  .theme-toggle { width: 44px; height: 44px; }
}

@media (min-width: 860px) {
  .header-inner { gap: 24px; }
  .site-nav { margin-left: auto; }
  .site-nav ul { display: flex; gap: 28px; }
  .header-actions { margin-left: 12px; }
  .btn-small { padding: 8px 20px; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(64px, 8vw, 104px); }

.section-tinted {
  background: var(--blush);
  background: color-mix(in srgb, var(--blush) 55%, var(--cream));
}

.section-head { max-width: 65ch; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { max-width: 22ch; }
.section-intro { margin-top: 20px; color: var(--muted); max-width: 60ch; }

.pill {
  display: inline-block;
  margin-top: 18px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--terracotta-deep);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(48px, 9vw, 112px);
  padding-bottom: 0; /* the next section's top padding is the gap */
}

/* soft warm glow, decorative only */
.hero::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -25%;
  width: min(720px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--blush), transparent);
  opacity: .9;
  pointer-events: none;
}

.hero .container { position: relative; }

.hero-copy { max-width: 760px; }
.hero h1 { max-width: 14ch; }

.lead {
  margin-top: 24px;
  max-width: 54ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--ink);
}

.small-note { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }

/* Weekly check-in preview card: below the copy on small screens,
   beside it from 960px. */
.hero-visual {
  position: relative;
  max-width: 420px;
  margin-top: 48px;
  margin-right: 14px; /* room for the offset backdrop */
}

.checkin-backdrop {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: var(--blush);
  transform: translate(14px, 14px);
}

.checkin-card {
  position: relative;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.checkin-question {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  font-weight: 600;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 36;
  line-height: 1.15;
  text-wrap: balance;
}
.checkin-question em { font-style: italic; color: var(--terracotta); }

.checkin-prompt { margin-top: 26px; font-weight: 600; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  min-height: 40px;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 0.9rem/1.2 var(--font-body);
  cursor: pointer;
}
.chip:hover { border-color: var(--terracotta-deep); }
.chip[aria-pressed="true"] {
  border-color: var(--terracotta-deep);
  background: var(--terracotta-deep);
  color: var(--on-accent);
}

.checkin-note {
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--dusk);
  color: var(--dusk-text);
  font-size: 0.95rem;
  line-height: 1.5;
}
.checkin-note p + p { margin-top: 4px; color: var(--dusk-muted); }

@media (min-width: 960px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    align-items: center;
    gap: clamp(40px, 5vw, 72px);
  }
  .hero-visual { max-width: 520px; margin-top: 0; justify-self: end; width: calc(100% - 14px); }
}

/* ---------- The path ---------- */

.path-figure {
  margin: clamp(56px, 8vw, 96px) 0 0;
}

.path { position: relative; }

.path-line { display: none; }

.path-stops {
  list-style: none;
  position: relative;
  display: grid;
  gap: 18px;
}

/* vertical (mobile) layout: line on the left, labels to the right */
.path-stops::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  border-left: 2px dotted var(--terracotta);
}

.path-stops li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.path-dot {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--terracotta);
  background: var(--cream);
}

.path-label { font-size: 0.95rem; font-weight: 500; line-height: 1.3; }

.path-figure figcaption {
  margin-top: 28px;
  max-width: 48ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.45;
  color: var(--muted);
}

@media (min-width: 720px) {
  .path-line {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    overflow: visible;
  }
  .path-line line {
    stroke: var(--terracotta);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 0 7;
  }

  .path-stops {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
  }
  .path-stops::before { display: none; }

  .path-stops li {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding-inline: 6px;
  }
  /* gentle zig-zag: alternate stops sit lower */
  .path-stops li:nth-child(even) { margin-top: 30px; }

  .path-label { font-size: 0.9rem; }
  .path-figure figcaption { margin-top: 40px; }
}

/* Pulse: a fill and an expanding ring on each stop, animated with
   opacity and transform only. Starts after the hero entrance (~0.9s). */
.path-dot { position: relative; }
.path-dot::before,
.path-dot::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.path-dot::before { inset: 1px; background: var(--terracotta); }
.path-dot::after { inset: -2px; border: 2px solid var(--terracotta); }

@media (prefers-reduced-motion: no-preference) {
  .path.is-pulsing .path-dot::before {
    animation: stop-fill 2.4s var(--ease-entrance) calc(var(--i) * 0.5s + 1.2s) 1 both;
  }
  .path.is-pulsing .path-dot::after {
    animation: stop-ring 2.4s var(--ease-entrance) calc(var(--i) * 0.5s + 1.2s) 1 both;
  }
}

@keyframes stop-fill {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes stop-ring {
  0%   { opacity: .45; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.4); }
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--blush);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 500;
}

.card-featured {
  display: grid;
  gap: 14px;
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 16px;
  position: relative;
}
.card-featured h3 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 500;
  font-style: italic;
  color: var(--terracotta);
}
.card-featured p:not(.tag) { max-width: 52ch; color: var(--muted); }

@media (min-width: 860px) {
  .card-featured {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: end;
    gap: 40px;
  }
}

.community-grid {
  list-style: none;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 700px) {
  .community-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .community-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.community-card { padding: 24px 22px 26px; }
.community-card h3 { margin: 18px 0 8px; }
.community-card p { font-size: 0.975rem; color: var(--muted); }

.ring {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--terracotta);
}

.aside-line { margin-top: 28px; color: var(--muted); }

/* ---------- Weekly cycle ---------- */

.cycle { --gap: 28px; }

.steps {
  list-style: none;
  display: grid;
  gap: var(--gap);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
}

.step-num {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--terracotta);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--terracotta-deep);
  position: relative;
  z-index: 1;
}

.step h3 { padding-top: 8px; }
.step p { margin-top: 8px; color: var(--muted); max-width: 40ch; }

/* connecting line (vertical on mobile) */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 52px;
  bottom: calc(-1 * var(--gap) + 8px);
  border-left: 1.5px solid var(--terracotta);
  opacity: .55;
}

.cycle-return { margin-top: 24px; position: relative; }
.cycle-arrow { display: none; }

.cycle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--terracotta-deep);
}
.cycle-label svg { flex: none; }

@media (min-width: 760px) {
  .cycle { --gap: 40px; }

  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .step { grid-template-columns: minmax(0, 1fr); }
  .step-num { grid-row: auto; }
  .step h3 { padding-top: 20px; }

  /* horizontal connector with a small arrowhead */
  .step:not(:last-child)::after {
    left: 56px;
    right: calc(-1 * var(--gap) + 12px);
    top: 21.25px;
    bottom: auto;
    border-left: 0;
    border-top: 1.5px solid var(--terracotta);
  }
  .step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 17.5px;
    right: calc(-1 * var(--gap) + 12px);
    width: 8px;
    height: 8px;
    border-top: 1.5px solid var(--terracotta);
    border-right: 1.5px solid var(--terracotta);
    transform: rotate(45deg);
    opacity: .55;
  }

  /* return path: from below step 3 back up to step 1 */
  .cycle-return {
    margin-top: 20px;
    margin-left: 22px;
    width: calc((100% - 2 * var(--gap)) * 2 / 3 + 2 * var(--gap) - 22px);
    height: 44px;
    border: 1.5px solid var(--terracotta);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    border-color: color-mix(in srgb, var(--terracotta) 55%, transparent);
  }
  .cycle-arrow {
    display: block;
    position: absolute;
    left: -5.5px;
    top: -2px;
    width: 9px;
    height: 9px;
    border-top: 1.5px solid var(--terracotta);
    border-left: 1.5px solid var(--terracotta);
    transform: rotate(45deg);
  }
  .cycle-label {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    padding: 0 14px;
    white-space: nowrap;
    background: var(--blush);
    background: color-mix(in srgb, var(--blush) 55%, var(--cream));
  }
}

/* ---------- Mission band ---------- */

.mission {
  background: var(--dusk);
  color: var(--dusk-text);
  padding-block: clamp(64px, 8vw, 104px);
}

.mission :focus-visible { outline-color: var(--dusk-accent); }

.mission-inner {
  display: grid;
  gap: 56px;
}

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.12;
  text-wrap: balance;
  color: var(--dusk-text);
}
.pull-quote em { font-style: italic; color: var(--dusk-accent); }

.mission-text {
  margin-top: 28px;
  max-width: 58ch;
  color: var(--dusk-muted);
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.chips li {
  padding: 6px 14px;
  border: 1px solid var(--dusk-line);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--dusk-text);
}

.mission-figure {
  padding-top: 28px;
  border-top: 1px solid var(--dusk-line);
}
.figure-number {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(3.2rem, 6vw, 5rem);
  white-space: nowrap;
  line-height: 1;
  color: var(--dusk-accent);
}
.figure-label { margin-top: 14px; max-width: 22ch; color: var(--dusk-muted); }

@media (min-width: 960px) {
  .mission-inner {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: end;
    gap: 72px;
  }
  .mission-figure {
    padding: 0 0 6px 48px;
    border-top: 0;
    border-left: 1px solid var(--dusk-line);
  }
}

/* ---------- Ecosystem ---------- */

.eco-grid {
  list-style: none;
  display: grid;
  gap: 16px;
}
.eco-card { padding: 28px 26px 30px; }
.eco-card h3 { margin: 18px 0 8px; }
.eco-card p { color: var(--muted); max-width: 40ch; }

@media (min-width: 760px) {
  .eco-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Organizations ---------- */

.org-grid {
  list-style: none;
  display: grid;
  gap: 32px;
  margin-bottom: 44px;
}
.org-grid li {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.org-grid h3 { margin: 16px 0 8px; }
.org-grid p { color: var(--muted); max-width: 40ch; }

@media (min-width: 760px) {
  .org-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
}

/* ---------- Commitments ---------- */

.commit-grid {
  list-style: none;
  display: grid;
  gap: 36px;
}
.commit-grid li { display: flex; gap: 18px; align-items: flex-start; }
.commit-grid h3 { margin-bottom: 6px; }
.commit-grid p { color: var(--muted); max-width: 48ch; }

@media (min-width: 760px) {
  .commit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 64px; }
}

/* ---------- Waitlist ---------- */

.join-inner { display: grid; gap: 48px; }

.join-copy h2 { max-width: 16ch; }
.join-copy > p { margin-top: 20px; color: var(--muted); max-width: 46ch; }

.next-title { margin-top: 40px; font-size: 1rem; }
.next-list { list-style: none; margin-top: 14px; display: grid; gap: 12px; max-width: 46ch; }
.next-list li { position: relative; padding-left: 28px; color: var(--muted); }
.next-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--terracotta);
}

@media (min-width: 960px) {
  .join-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 72px;
    align-items: start;
  }
  .join-copy { position: sticky; top: calc(var(--header-h) + 32px); }
}

.form-panel { padding: clamp(22px, 4vw, 40px); }

.form-required-note { font-size: 0.875rem; color: var(--muted); margin-bottom: 20px; }
.req { color: var(--terracotta-deep); }
.optional { color: var(--muted); font-weight: 400; }

.field { margin: 0 0 20px; }
.field > label,
.checks legend {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

fieldset.field { border: 0; padding: 0; min-width: 0; }
.checks legend { padding: 0; margin-bottom: 10px; }

.field-row { display: grid; gap: 0 16px; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

input[type="text"],
input[type="email"] {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--muted);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
input[type="text"]:focus-visible,
input[type="email"]:focus-visible { border-color: var(--terracotta-deep); }

input[aria-invalid="true"] { border-color: #B3261E; border-width: 2px; }

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

/* optional questions sit under their own subheading, below a divider */
.form-optional { margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-subhead { margin-bottom: 18px; font-size: 1.05rem; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.45;
  cursor: pointer;
}
.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--terracotta-deep);
  cursor: pointer;
}

.org-toggle { padding-top: 4px; }
.org-toggle .check { font-weight: 600; }

.org-fields {
  margin: -4px 0 20px;
  padding: 18px 18px 2px;
  border-left: 2px solid var(--terracotta);
  background: var(--blush);
  background: color-mix(in srgb, var(--blush) 50%, var(--surface));
  border-radius: 0 12px 12px 0;
}
.org-fields[hidden] { display: none; }

.consent { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }

.field-error {
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #B3261E;
}
.field-error:empty { display: none; }

html[data-theme="dark"] .field-error { color: #FFB4AB; }
html[data-theme="dark"] input[aria-invalid="true"] { border-color: #FFB4AB; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit { width: 100%; margin-top: 4px; }

.form-status { margin-top: 14px; font-size: 0.95rem; }
.form-status:empty { display: none; }
.form-status.is-error { color: #B3261E; font-weight: 500; }
html[data-theme="dark"] .form-status.is-error { color: #FFB4AB; }

.thanks { padding: 12px 0; }
.thanks h3 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.4rem);
  font-weight: 500;
}
.thanks h3:focus { outline: none; }
.thanks h3:focus-visible { outline: 2px solid var(--terracotta-deep); }
.thanks p { margin-top: 14px; color: var(--muted); }

/* ---------- FAQ ---------- */

.faq-inner { display: grid; gap: 36px; }

@media (min-width: 960px) {
  .faq-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 72px; }
}

.faq-list { border-top: 1px solid var(--line); }

.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
  position: relative;
  display: block;
  padding: 20px 44px 20px 0;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }

/* plus / minus marker */
.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: var(--terracotta-deep);
  transition: transform .2s ease;
}
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }

.faq-list details p {
  padding: 0 44px 22px 0;
  color: var(--muted);
  max-width: 65ch;
}

/* ---------- Privacy ---------- */

.privacy { padding-block: clamp(64px, 8vw, 104px); }
.privacy h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }

.privacy-list {
  display: grid;
  gap: 22px 40px;
  margin: 28px 0 0;
}
.privacy-list dt { font-weight: 600; font-size: 0.95rem; }
.privacy-list dd { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; max-width: 60ch; }

@media (min-width: 760px) {
  .privacy-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .privacy-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.updated { margin-top: 28px; font-size: 0.875rem; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dusk);
  color: var(--dusk-muted);
  padding: 72px 0 36px;
  font-size: 0.95rem;
}
.site-footer a { color: var(--dusk-text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--dusk-accent); }

.footer-top { display: grid; gap: 48px; }

.footer-logo { display: inline-block; border-radius: 6px; }
.footer-logo img { width: auto; height: 40px; }

.footer-tagline {
  margin-top: 20px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--dusk-text);
}
.footer-brand p + p { margin-top: 6px; max-width: 38ch; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 32px;
}
.footer-heading {
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dusk-accent);
}
.footer-cols ul { list-style: none; display: grid; gap: 10px; }
.footer-cols a { display: inline-block; padding: 2px 0; overflow-wrap: anywhere; }

.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--dusk-line);
  font-size: 0.875rem;
}

@media (min-width: 860px) {
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 64px; }
}

/* =========================================================
   Motion
   Subtle and restrained. Only opacity and transform animate.
   Everything here is off when the visitor prefers reduced motion.
   ========================================================= */

/* ---------- Hero entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: fade-up 900ms var(--ease-entrance) both;
  }
  .hero-copy > :nth-child(1) { animation-delay: 0ms; }
  .hero-copy > :nth-child(2) { animation-delay: 150ms; }
  .hero-copy > :nth-child(3) { animation-delay: 300ms; }
  .hero-copy > :nth-child(4) { animation-delay: 450ms; }
  .hero-copy > :nth-child(5) { animation-delay: 600ms; }
  .hero-visual { animation: fade-up 900ms var(--ease-entrance) 750ms both; }

  /* hero entrance and path pulse wait until the logo intro has landed */
  html.intro-on .hero-copy > *,
  html.intro-on .hero-visual,
  html.intro-on .path-dot::before,
  html.intro-on .path-dot::after { animation-play-state: paused; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Scroll reveal ----------
   main.js adds .reveal-ready to <html> only after it confirms
   IntersectionObserver exists, so without JS nothing is ever hidden.
   Reveal uses the `translate` property so it never fights the hover
   `transform` on cards. */

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal],
  .reveal-ready [data-reveal-group] > * {
    transition:
      opacity 800ms var(--ease-entrance) var(--reveal-delay, 0ms),
      translate 800ms var(--ease-entrance) var(--reveal-delay, 0ms),
      transform 300ms ease-out;
  }
  .reveal-ready [data-reveal]:not(.is-revealed),
  .reveal-ready [data-reveal-group]:not(.is-revealed) > * {
    opacity: 0;
    translate: 0 20px;
  }
}

/* ---------- Hover and press (pointer devices only) ---------- */

.lift { position: relative; }
.lift::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--terracotta);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}
.org-grid .lift::after { border-width: 1px 0 0; }

@media (hover: hover) {
  .lift::after { transition: opacity 300ms ease-out; }
  .btn::before { transition: opacity 200ms ease-out; }

  .lift:hover::after { opacity: .45; }

  .btn:hover::before,
  .btn:focus-visible::before { opacity: .12; }
  .btn-outline:hover::before,
  .btn-outline:focus-visible::before { opacity: .08; }
}

/* movement only when the visitor hasn't asked for reduced motion */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lift { transition: transform 300ms ease-out; }
  .btn { transition: transform 100ms ease-out; }

  .lift:hover { transform: translateY(-3px); }
  .btn:active { transform: translateY(1px); }
}

/* nav underline that draws in from the left */
@media (hover: hover) and (min-width: 860px) {
  .site-nav a { position: relative; }
  .site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 1.5px;
    background: var(--terracotta-deep);
    transform: scaleX(0);
    transform-origin: left center;
  }
  .site-nav a:hover::after,
  .site-nav a:focus-visible::after { transform: scaleX(1); }
}
@media (hover: hover) and (min-width: 860px) and (prefers-reduced-motion: no-preference) {
  .site-nav a::after { transition: transform 250ms ease-out; }
}

/* ---------- Reduced motion: everything instant ---------- */

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

/* ---------- Logo intro (first visit per session) ----------
   Only displayed while the inline <head> script has set html.intro-on.
   main.js flies the big logo onto the header logo (FLIP) and removes it. */

.intro { display: none; }

html.intro-on .intro {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 100;
  cursor: pointer;
}

.intro-bg {
  position: absolute;
  inset: 0;
  background: var(--cream);
}

.intro-logo {
  position: relative;
  width: min(60vw, 520px);
  height: auto;
  transform-origin: 0 0;
  opacity: 0;
  transition: opacity 250ms ease-out;
}
.intro.is-ready .intro-logo { opacity: 1; }

.intro .logo-for-dark { display: none; }
html[data-theme="dark"] .intro .logo-for-light { display: none; }
html[data-theme="dark"] .intro .logo-for-dark { display: block; }

/* no double logo while the intro runs */
html.intro-on .brand img { visibility: hidden; }

/* ---------- Visibility failsafe ----------
   main.js adds html.motion-done 2.5s after DOMContentLoaded (or after the
   logo intro, when it plays), so nothing can stay invisible if animations
   stall. Reveal items keep their transform transition for the hover lift;
   the decorative path pulse overlays rest at opacity 0 and are left alone. */

html.motion-done .hero-copy > *,
html.motion-done .hero-visual,
html.motion-done .path-stops li,
html.motion-done .path-dot,
html.motion-done .path-label {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

html.motion-done [data-reveal],
html.motion-done [data-reveal-group] > * {
  opacity: 1 !important;
  translate: none !important;
  animation: none !important;
  transition: transform 300ms ease-out !important;
}
