/* ============================================================================
   terp.com — the marketing site.
   A picture-book that grows up: the page matures as you scroll, mirroring a
   Terp's arc from hatchling to elder.

   Design tokens + primitives are copied VERBATIM from @terp/ui/styles.css (the
   portal's source of truth) so the storefront is unmistakably the same
   creature as the app — then taken a touch bolder (bigger type, a little more
   colour, a little more motion), plus one addition the app doesn't have:
   Fraunces italic, reserved for the Terp's own first-person voice.
   ============================================================================ */

/* Michroma = display, Saira = body/UI, Fraunces = the creature's voice. */
@import url("https://fonts.googleapis.com/css2?family=Michroma&family=Saira:wght@300;400;500;600;700&family=Fraunces:ital,opsz,wght@1,9..144,400;1,9..144,500;0,9..144,400&display=swap");

:root {
  color-scheme: light;

  /* --- portal palette (exact) --------------------------------------------- */
  --paper: #f2eee3;
  --bone: #fbfaf5;
  --ink: #16150f;
  --muted: #6e6a5e;
  --line: #dad3c2;
  --volt: #b6e021;
  --leaf: #5e8b16;
  --alert: #c8462a;

  /* Leaf, deepened toward ink for AA-legible small text + links. Because it
     mixes with --ink it auto-adapts: darker on light paper, lighter on dark. */
  --leaf-text: color-mix(in srgb, var(--leaf) 72%, var(--ink));

  --volt-soft: rgba(182, 224, 33, 0.16);
  --leaf-soft: rgba(94, 139, 22, 0.12);
  --alert-soft: rgba(200, 70, 42, 0.1);
  --ink-soft: rgba(22, 21, 15, 0.06);

  /* The trio's other two personalities — secondary accents, used sparingly. */
  --sky: #7aa9cf;
  --peach: #e6a279;
  --sky-soft: rgba(122, 169, 207, 0.16);
  --peach-soft: rgba(230, 162, 121, 0.16);

  /* Deep-pod gradient stops (traced from the real eye render). */
  --pod-hi: #c3d75f;
  --pod: #a9c135;
  --pod-lo: #92ae22;

  --font-display: "Michroma", "Eurostile", "Saira", system-ui, sans-serif;
  --font-text: "Saira", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-voice: "Fraunces", "Georgia", "Times New Roman", serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow: 0 1px 2px rgba(20, 18, 10, 0.05), 0 10px 30px rgba(20, 18, 10, 0.06);
  --shadow-sm: 0 1px 2px rgba(20, 18, 10, 0.06);
  --shadow-lg: 0 2px 6px rgba(20, 18, 10, 0.06), 0 24px 60px rgba(20, 18, 10, 0.12);
  --ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--volt);

  /* Drives the "coming alive" glow — JS deepens it as Part III enters view. */
  --alive: 0;

  --nav-h: 66px;
}

/* --- optional dark theme: the app is light-only; the storefront may go dark.
   Volt stays constant across both. Honours the OS unless the toggle overrides. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14130d;
    --bone: #1f1d15;
    --ink: #f4f0e6;
    --muted: #a7a291;
    --line: #34301f;
    --ink-soft: rgba(244, 240, 230, 0.06);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.5);
    --ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--volt);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14130d;
  --bone: #1f1d15;
  --ink: #f4f0e6;
  --muted: #a7a291;
  --line: #34301f;
  --ink-soft: rgba(244, 240, 230, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* --- base ----------------------------------------------------------------- */
* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.02rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Two soft radial gradients (fixed) — kept from the portal, warmed up a bit. */
  background-image:
    radial-gradient(70% 55% at 50% -8%, rgba(182, 224, 33, 0.12), transparent 70%),
    radial-gradient(45% 45% at 100% 2%, rgba(94, 139, 22, 0.06), transparent 70%),
    radial-gradient(40% 40% at 0% 12%, rgba(122, 169, 207, 0.05), transparent 70%);
  background-attachment: fixed;
}

::selection { background: var(--volt); color: #16150f; }

* { scrollbar-width: thin; scrollbar-color: #cfc8b6 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #cfc8b6; border-radius: 9999px; }
*::-webkit-scrollbar-thumb:hover { background: #bdb6a2; }

a { color: inherit; }

a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

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

.skip-link {
  position: absolute; left: 14px; top: -60px; z-index: 100;
  background: var(--volt); color: var(--ink); padding: 10px 16px;
  border-radius: var(--r-pill); font-weight: 600; transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* --- type primitives ------------------------------------------------------ */
.display { font-family: var(--font-display); font-weight: 400; line-height: 1.04; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--font-text); font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.2em; color: var(--leaf-text);
}

/* The signature volt underline — ONE key word per view. The brand's hero move. */
.u-volt {
  background-image: linear-gradient(var(--volt), var(--volt));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 0.30em;
  padding: 0 0.04em;
}
@media (min-width: 700px) { .u-volt { background-size: 100% 0.24em; } }

/* The Terp's own voice — reserved, never used for UI chrome. */
.voice {
  font-family: var(--font-voice);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
}
.voice--muted { color: var(--muted); }

/* --- surfaces ------------------------------------------------------------- */
.panel { background: var(--bone); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }

/* --- buttons -------------------------------------------------------------- */
.btn {
  font-family: var(--font-text); font-weight: 600; font-size: 0.95rem; line-height: 1;
  border: 0; border-radius: var(--r-pill); padding: 0 1.35rem; min-height: 46px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.12s, background 0.12s, box-shadow 0.12s, color 0.12s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn--primary { background: var(--volt); color: #16150f; box-shadow: 0 6px 18px rgba(182, 224, 33, 0.35); }
.btn--primary:hover { background: #c4ec3a; box-shadow: 0 8px 24px rgba(182, 224, 33, 0.45); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { background: var(--ink-soft); }
.btn--lg { min-height: 54px; font-size: 1.02rem; padding: 0 1.8rem; }

/* --- chips ---------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--bone); padding: 0.3rem 0.7rem;
  font-size: 0.78rem; font-weight: 600; color: var(--muted);
}
.chip--volt { border-color: color-mix(in srgb, var(--volt) 45%, var(--line)); color: var(--leaf); background: var(--volt-soft); }
.chip--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); flex: 0 0 auto; }

/* ============================================================================
   The Terp eye — logo mark + recurring motif.
   .eye : the data-URI mark (nav logo / inline glyph), copied from @terp/ui.
   The BIG hero eye is inline <svg> (see .hero-eye) so JS can move the pupil.
   ============================================================================ */
.eye {
  --eye: 26px; width: var(--eye); height: var(--eye);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 200'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='.15' y1='0' x2='.6' y2='1'%3E%3Cstop offset='0' stop-color='%23c3d75f'/%3E%3Cstop offset='.55' stop-color='%23a9c135'/%3E%3Cstop offset='1' stop-color='%2392ae22'/%3E%3C/linearGradient%3E%3CradialGradient id='p' cx='.38' cy='.2' r='1'%3E%3Cstop offset='0' stop-color='%2343423a'/%3E%3Cstop offset='1' stop-color='%231b1a14'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath fill='url(%23b)' fill-rule='evenodd' d='M234 100C234 42.4 190 6 120 6S6 42.4 6 100s44 94 114 94 114-36.4 114-94ZM36 100c8-10 26-14 84-14s76 4 84 14c-10 28-42 50-84 50s-74-22-84-50Z'/%3E%3Cpath fill='url(%23p)' d='M70 86a50 50 0 0 0 100 0Z'/%3E%3C/svg%3E") no-repeat center / contain;
  display: inline-block; position: relative; flex: 0 0 auto;
  transition: filter 0.25s, transform 0.25s;
}
.eye--on { filter: drop-shadow(0 0 5px rgba(182, 224, 33, calc(0.55 + 0.4 * var(--alive)))); }
.eye--blink { animation: eye-blink 0.5s ease 0.25s 1; }
@keyframes eye-blink { 45% { transform: scaleY(0.1); } 55% { transform: scaleY(1); } }

/* ============================================================================
   Nav
   ============================================================================ */
.nav {
  position: sticky; top: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand .eye { --eye: 30px; }
.brand b { font-family: var(--font-display); font-weight: 400; font-size: 1.18rem; letter-spacing: 0.02em; }
.nav-links { display: none; align-items: center; gap: 1.6rem; }
.nav-links a {
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.92rem;
  transition: color 0.15s; position: relative; padding: 4px 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--volt); border-radius: 2px; transition: right 0.2s ease;
}
.nav-links a:hover::after { right: 0; }
.nav-right { display: inline-flex; align-items: center; gap: 0.6rem; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--r-pill); border: 1.5px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1rem; transition: background 0.15s;
}
.theme-toggle:hover { background: var(--ink-soft); }
@media (min-width: 900px) { .nav-links { display: flex; } }

/* ============================================================================
   Hero
   ============================================================================ */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; text-align: center; }

.hero-eye-wrap { width: clamp(150px, 26vw, 240px); margin: 0 auto clamp(22px, 4vw, 40px); }
.hero-eye {
  width: 100%; height: auto; display: block; overflow: visible;
  filter:
    drop-shadow(0 14px 24px rgba(20, 18, 10, 0.12))
    drop-shadow(0 0 calc(6px + 32px * var(--alive)) rgba(182, 224, 33, calc(0.18 + 0.55 * var(--alive))));
  transition: filter 0.5s ease;
}
.hero-eye .lid, .hero-eye .pupil { transition: transform 0.18s ease-out; }

.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.15rem, 6.4vw, 4.6rem); line-height: 1.03; letter-spacing: -0.015em;
}
.hero .lede {
  max-width: 40ch; margin: clamp(20px, 3vw, 30px) auto 0;
  font-size: clamp(1.05rem, 2.3vw, 1.32rem); font-weight: 300; color: var(--muted); line-height: 1.5;
}
.hero .cta-row { margin-top: clamp(26px, 4vw, 38px); display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .whisper {
  margin-top: 26px; font-family: var(--font-voice); font-style: italic;
  color: var(--muted); font-size: 1.04rem;
}

/* the trio render, floating gently under the hero copy */
.hero-art { margin: clamp(34px, 6vw, 64px) auto 0; max-width: 940px; position: relative; z-index: 2; }
.hero-art img { width: 100%; height: auto; }
.float { will-change: transform; animation: float 9s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* aura shimmer behind the hero eye */
.aura {
  position: absolute; inset: -40% -10% auto; height: 620px; z-index: 1; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(182, 224, 33, 0.16), transparent 70%),
    conic-gradient(from 0deg, transparent, rgba(182, 224, 33, 0.10), transparent 40%, rgba(94, 139, 22, 0.08), transparent 70%);
  filter: blur(30px); opacity: 0.9;
  animation: spin 40s linear infinite;
  border-radius: 50%;
  left: 50%; translate: -50% 0; width: min(760px, 92vw);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================================
   Sections + scroll reveal
   ============================================================================ */
section { position: relative; padding: clamp(56px, 9vw, 108px) 0; }
.sec-head { max-width: 60ch; margin: 0 0 clamp(28px, 4vw, 46px); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head .eyebrow { display: block; margin-bottom: 14px; }
.sec-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.55rem, 4vw, 2.5rem); line-height: 1.08; }
.sec-head .intro { margin-top: 16px; color: var(--muted); font-size: clamp(1.02rem, 2vw, 1.18rem); max-width: 56ch; }
.sec-head.center .intro { margin-left: auto; margin-right: auto; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* chapter marker — a REAL life stage, not a decorative 01/02/03 */
.chapter { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.chapter .stage {
  font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--leaf-text); white-space: nowrap;
}
.chapter .rule { height: 1px; background: var(--line); flex: 1; }
.chapter .dots { display: inline-flex; gap: 6px; }
.chapter .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.chapter .dots i.on { background: var(--volt); }

/* ============================================================================
   Bands + story rows (alternating render + prose vignette)
   ============================================================================ */
.band { background: var(--bone); border-block: 1px solid var(--line); }

.story-row { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (min-width: 900px) {
  .story-row { grid-template-columns: 1.02fr 0.98fr; }
  .story-row.flip .story-media { order: 2; }
}
.story-media { position: relative; }
.story-media img {
  width: 100%; height: auto; border-radius: var(--r-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.story-media.plain img { border: 0; box-shadow: none; border-radius: var(--r-lg); }
.story-media figcaption {
  margin-top: 12px; font-family: var(--font-voice); font-style: italic;
  color: var(--muted); font-size: 0.94rem; text-align: center;
}
.story-body h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.3rem, 3vw, 1.9rem); line-height: 1.12; margin-bottom: 16px; }
.story-body p { color: color-mix(in srgb, var(--ink) 82%, var(--muted)); font-size: 1.06rem; }
.story-body .voice { display: block; margin-top: 18px; font-size: 1.12rem; padding-left: 16px; border-left: 2px solid var(--volt); }

/* ============================================================================
   Feature-lines (woven capabilities inside a story beat)
   ============================================================================ */
.feat { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.feat li { position: relative; padding-left: 24px; font-size: 0.98rem; color: var(--muted); }
.feat li b { color: var(--ink); font-weight: 600; }
.feat li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 11px; height: 7px;
  border-radius: 999px 999px 45% 45%; background: var(--pod);
}

/* ============================================================================
   Inner-life grid (Part III showcase)
   ============================================================================ */
.grid-cards { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 680px) { .grid-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid-cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--bone); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 26px; display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .card-motif { height: 92px; display: flex; align-items: center; justify-content: flex-start; }
.card .card-motif svg { height: 100%; width: auto; overflow: visible; }
.card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.12rem; }
.card p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.card .voice { font-size: 1.04rem; margin-top: auto; padding-top: 6px; }

/* Trait radar — its own feature block */
.radar-block { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; }
@media (min-width: 820px) { .radar-block { grid-template-columns: 0.9fr 1.1fr; } }
.radar-wrap { max-width: 380px; margin: 0 auto; width: 100%; }
.radar-wrap svg { width: 100%; height: auto; overflow: visible; }

/* ============================================================================
   Social band (encounters / auras)
   ============================================================================ */
.encounter-motif { max-width: 520px; margin: 0 auto 8px; }
.encounter-motif svg { width: 100%; height: auto; overflow: visible; }

/* ============================================================================
   Trust / sovereignty
   ============================================================================ */
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .trust-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust {
  display: flex; gap: 14px; padding: 22px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bone) 60%, transparent);
}
.trust .ic { flex: 0 0 auto; width: 40px; height: 40px; color: var(--leaf); }
.trust .ic svg { width: 100%; height: 100%; }
.trust h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.trust p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ============================================================================
   How it works — three ways you meet it
   ============================================================================ */
.how-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 820px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }
.how {
  text-align: center; padding: 30px 24px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--bone); box-shadow: var(--shadow);
}
.how .how-ic { width: 62px; height: 62px; margin: 0 auto 16px; color: var(--leaf); }
.how .how-ic svg { width: 100%; height: 100%; overflow: visible; }
.how h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.06rem; margin-bottom: 8px; }
.how p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.how .arrow { display: none; }

/* ============================================================================
   Capabilities index — the full 17 phases, grouped
   ============================================================================ */
.caps { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 780px) { .caps { grid-template-columns: repeat(3, 1fr); } }
.caps-col { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bone); padding: 24px; box-shadow: var(--shadow); }
.caps-col > .eyebrow { display: block; margin-bottom: 4px; }
.caps-col h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.08rem; margin-bottom: 16px; }
.caps-list { display: flex; flex-wrap: wrap; gap: 8px; }
.caps-list .chip { cursor: default; }
.caps-col .part-note { margin-top: 16px; font-size: 0.86rem; color: var(--muted); }

/* ============================================================================
   CTA / notify
   ============================================================================ */
.cta-band { background: var(--bone); border-block: 1px solid var(--line); text-align: center; }
.cta-band h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 4.5vw, 2.9rem); line-height: 1.06; }
.cta-band .lede { max-width: 44ch; margin: 18px auto 0; color: var(--muted); font-size: 1.12rem; }
.waitlist-note { margin-top: 14px; font-size: 0.86rem; color: var(--muted); }

/* ============================================================================
   Notify-me modal
   ============================================================================ */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(20, 18, 10, 0.55);
  backdrop-filter: blur(2px);
  animation: modal-fade 0.18s ease-out;
}
.modal-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px; max-height: calc(100vh - 40px);
  overflow-y: auto; text-align: left;
  padding: clamp(24px, 4vw, 34px);
  box-shadow: var(--shadow-lg);
  animation: modal-rise 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.modal-x {
  position: absolute; top: 12px; right: 14px;
  width: 36px; height: 36px; border-radius: var(--r-pill);
  border: 0; background: transparent; color: var(--muted);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-x:hover { background: var(--ink-soft); color: var(--ink); }
.modal-x:focus-visible { outline: none; box-shadow: var(--ring); }
.modal-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.35rem, 3.4vw, 1.85rem); line-height: 1.08; margin-top: 8px; }
.modal-lede { margin-top: 12px; color: var(--muted); font-size: 1rem; }

.notify-form { margin-top: 22px; display: grid; gap: 16px; }
.nf-field { display: grid; gap: 7px; }
.nf-label { font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--leaf-text); }
.nf-field input {
  width: 100%; min-height: 48px; padding: 0 16px; font-size: 1rem; font-family: var(--font-text);
  color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md, 12px);
}
.nf-field input::placeholder { color: #a8a293; }
.nf-field input:focus { outline: none; border-color: var(--leaf); box-shadow: var(--ring); }

.nf-choice { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.nf-choice legend { margin-bottom: 4px; padding: 0; }
.nf-radio {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md, 12px);
  background: var(--paper); font-size: 0.95rem; line-height: 1.35; transition: border-color 0.15s, background 0.15s;
}
.nf-radio:hover { border-color: color-mix(in srgb, var(--leaf) 40%, var(--line)); }
.nf-radio input { margin-top: 2px; accent-color: var(--leaf); flex: 0 0 auto; }
.nf-radio:has(input:checked) { border-color: var(--leaf); background: var(--volt-soft); }
.nf-radio:has(input:focus-visible) { box-shadow: var(--ring); }

.nf-error { margin: 0; color: #b23b2e; font-weight: 600; font-size: 0.9rem; }
.nf-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.nf-done { margin-top: 4px; font-size: 1.06rem; color: var(--leaf-text); }

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-panel { animation: none; }
}
body.modal-open { overflow: hidden; }

/* ============================================================================
   Footer
   ============================================================================ */
.footer { border-top: 1px solid var(--line); padding: clamp(44px, 6vw, 72px) 0 48px; }
.footer .wrap { display: grid; gap: 34px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer .brand { margin-bottom: 14px; }
.footer .tagline { color: var(--muted); font-family: var(--font-voice); font-style: italic; max-width: 34ch; }
.footer h5 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { text-decoration: none; color: var(--ink); font-size: 0.95rem; transition: color 0.15s; }
.footer a:hover { color: var(--leaf-text); }
.footer .legal { grid-column: 1 / -1; margin-top: 10px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.86rem; }
.footer .legal .eye { --eye: 20px; }
.footer .made { display: inline-flex; align-items: center; gap: 8px; }

/* utility */
.center { text-align: center; }
.mt-s { margin-top: 14px; }
.mt-m { margin-top: 26px; }
