/* ==========================================================================
   Marketing site. Tokens mirror cutcrew-app/docs/08-DESIGN.md.
   ========================================================================== */

:root {
  --ground: #F5F3EF;
  --surface: #FFFFFF;
  --surface-2: #EFEDE8;
  --ink: #15181C;
  --muted: #5E636A;
  --faint: #8E949B;
  --line: #DFDCD5;
  --accent: #BE3F28;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(190, 63, 40, .09);
  --protein: #BE3F28;
  --carbs: #C98A1E;
  --fat: #47707E;
  --good: #3F7A4B;
  --good-soft: rgba(63, 122, 75, .12);
  --nav-bg: rgba(245, 243, 239, .97);
  --shadow-card: 0 1px 2px rgba(21, 24, 28, .04), 0 8px 24px -12px rgba(21, 24, 28, .12);
  --glow: rgba(190, 63, 40, .16);

  --font-display: Archivo, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 68px;
  --gutter: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #101316;
    --surface: #171B1F;
    --surface-2: #1E2328;
    --ink: #EFEDE8;
    --muted: #A3AAB2;
    --faint: #737A82;
    --line: #262C32;
    --accent: #E9634A;
    --accent-ink: #101316;
    --accent-soft: rgba(233, 99, 74, .12);
    --protein: #E9634A;
    --carbs: #DDA03A;
    --fat: #5F8A99;
    --good: #71B583;
    --good-soft: rgba(113, 181, 131, .14);
    --nav-bg: rgba(16, 19, 22, .97);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
    --glow: rgba(233, 99, 74, .14);
    color-scheme: dark;
  }
}

/* ---- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  background: var(--ground);
}
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (min-width: 900px) { body { font-size: 17px; } }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; }
p a, .lede a, .answer a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
p a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.wrap { width: min(1200px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
@media (min-width: 700px) { :root { --gutter: 32px; } }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--ground); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---- Type --------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 1.55rem + 4.6vw, 5.1rem); line-height: 1.01; letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.6rem); line-height: 1.04; }
h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.25; letter-spacing: -.02em; }

.lede {
  color: var(--muted);
  font-size: clamp(1.075rem, 1rem + .35vw, 1.27rem);
  line-height: 1.55;
  max-width: 36em;
  text-wrap: pretty;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font: 600 12.5px/1.2 var(--font-body);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.fine { color: var(--muted); font-size: .9rem; }
.center { text-align: center; margin-inline: auto; }
.accent-text { color: var(--accent); }
.muted-text { color: var(--muted); }

.badge {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line);
  font: 600 11px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface);
}
.badge-accent { border-color: transparent; background: var(--accent-soft); color: var(--accent); }

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 4px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font: 600 10.5px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  vertical-align: 2px;
}
.tag-free { background: var(--good-soft); color: var(--good); }
.tag-inline { margin-left: 6px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 16px/1 var(--font-body); letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s, color .2s;
}
.btn .ic { width: 18px; height: 18px; stroke-width: 2; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -10px var(--accent); }
.btn-primary:hover { box-shadow: 0 12px 26px -10px var(--accent); }
.btn-primary:hover .ic { transform: translateX(2px); }
.btn-primary .ic { transition: transform .2s var(--ease); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-lg { height: 58px; padding: 0 28px; font-size: 16.5px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:active { transform: scale(.98); }

.btn-store {
  height: 58px; padding: 0 22px 0 18px; gap: 12px;
  background: var(--ink); color: var(--ground);
  text-align: left;
}
.btn-store .ic { width: 24px; height: 24px; stroke-width: 1.7; }
.btn-store span { display: flex; flex-direction: column; gap: 3px; font: 700 17px/1 var(--font-display); letter-spacing: -.01em; }
.btn-store small { font: 500 11px/1 var(--font-body); letter-spacing: .01em; opacity: .8; }
.btn-store.is-disabled {
  background: transparent; color: var(--muted);
  border: 1.5px dashed var(--line);
  cursor: default; box-shadow: none;
}
.btn-store.is-disabled:active { transform: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 600; text-decoration: none;
}
.link-arrow .ic { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover .ic { transform: translateX(3px); }

/* ---- Nav ---------------------------------------------------------------- */
.nav-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 24px; pointer-events: none; }
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: var(--nav-h); transition: height .3s var(--ease); }
.nav.is-condensed { border-bottom-color: var(--line); }
.nav.is-condensed .nav-inner { height: 56px; }
.brand { display: inline-flex; align-items: center; flex: none; margin-right: auto; border-radius: 8px; }
.brand-logo { width: auto; height: 30px; transition: height .3s var(--ease); }
.nav.is-condensed .brand-logo { height: 26px; }
.nav-links { display: none; gap: 4px; }
.nav-links a {
  padding: 8px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
@media (min-width: 760px) { .nav-links { display: flex; } }

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; padding: 40px 0 32px; overflow: clip; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 900px; height: 900px; right: -320px; top: -260px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero h1 { max-width: 11.5em; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero .fine { margin-top: -6px; }

.hero-media { position: relative; display: flex; justify-content: center; }
.hero-phones {
  position: relative;
  display: grid; place-items: start center;
  height: 470px; width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, #000 78%, transparent);
}
.hero-phones .device { grid-area: 1 / 1; }
.hero-phones .device--front { --z: .6; }
.hero-phones .device--back { display: none; }

@media (min-width: 560px) {
  .hero-phones { height: 560px; }
  .hero-phones .device--front { --z: .62; transform: translateX(120px); }
  .hero-phones .device--back { display: block; --z: .54; transform: translate(-200px, 90px) rotate(-5deg); opacity: .96; }
}
@media (min-width: 1000px) {
  .hero { padding: 72px 0 40px; }
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 32px; }
  .hero-phones { height: 680px; -webkit-mask-image: none; mask-image: none; overflow: visible; }
  .hero-phones .device--front { --z: .68; transform: translateX(110px); }
  .hero-phones .device--back { --z: .58; transform: translate(-190px, 110px) rotate(-6deg); }
}

/* ---- One app instead of five -------------------------------------------- */
.replaces { padding: 64px 0 40px; }
.replaces-title { font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.9rem); line-height: 1.12; max-width: 21em; }
.replaces-list {
  display: grid; gap: 0; margin-top: 40px;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}
.replaces-list li { display: grid; gap: 4px; align-content: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.struck {
  font: 700 1.15rem/1.2 var(--font-display); letter-spacing: -.02em;
  text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px;
}
.replaces-list li span:last-child { color: var(--muted); font-size: .95rem; }
@media (min-width: 700px) {
  .replaces-list { grid-template-columns: repeat(5, 1fr); border-top: 0; gap: 24px; }
  .replaces-list li { border-bottom: 0; border-top: 2px solid var(--ink); padding: 18px 0 0; }
}

/* ---- Section scaffolding ----------------------------------------------- */
.section-head { display: grid; gap: 18px; justify-items: start; margin-bottom: 48px; }
.section-head h2 { max-width: 15em; }
@media (min-width: 1000px) { .section-head { margin-bottom: 72px; } }

/* ---- Feature story ------------------------------------------------------ */
.story { padding: 88px 0 40px; }
.story-sticky { display: none; }
.story-steps { display: grid; gap: 20px; max-width: 680px; margin-inline: auto; }

.step {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.step-text { display: grid; gap: 14px; padding: 28px 24px 8px; }
.step h3 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.step p { color: var(--muted); }
.step-num { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 600 13px/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.step-num > span:first-child { font-family: var(--font-mono); color: var(--accent); letter-spacing: 0; }

.ticks { list-style: none; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .2em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--good-soft);
}
.ticks li::after {
  content: ""; position: absolute; left: 6.5px; top: calc(.2em + 5px);
  width: 7px; height: 10px;
  border: solid var(--good); border-width: 0 2px 2px 0;
  transform: rotate(40deg) translate(-1px, -1px);
}
.step .ticks { margin-top: 6px; font-size: .97rem; }

.step-media {
  position: relative;
  display: flex; justify-content: center;
  height: 430px; margin-top: 24px; padding-top: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
.step-media .device { --z: .6; }

@media (min-width: 1000px) {
  .story { padding-top: 120px; }
  .story-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }
  .story-sticky {
    position: sticky;
    top: max(calc(var(--nav-h) + 16px), calc(50vh - 360px));
    display: grid; justify-items: center; gap: 22px;
    order: 0;
  }
  .story-phone .device { --z: .7; }
  .story-steps { display: block; max-width: none; margin: 0; }
  .step {
    min-height: 82vh;
    display: flex; align-items: center;
    overflow: visible;
    border: 0; border-radius: 0; background: none; box-shadow: none;
  }
  .step:first-child { min-height: 70vh; align-items: flex-start; padding-top: 10vh; }
  .step:last-child { min-height: 90vh; }
  .step-text { padding: 0; max-width: 30em; }
  .step-media { display: none; }
  .js .step .step-text { opacity: .28; transition: opacity .5s var(--ease); }
  .js .step.is-active .step-text { opacity: 1; }
}
@media (min-width: 1000px) and (max-height: 860px) {
  .story-phone .device { --z: .6; }
  .story-sticky { top: max(calc(var(--nav-h) + 12px), calc(50vh - 316px)); }
}
@media (min-width: 1000px) and (max-height: 720px) {
  .story-phone .device { --z: .52; }
  .story-rail { display: none; }
}

.story-rail {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 2px;
  max-width: 460px;
  font: 500 12px/1 var(--font-body); color: var(--faint);
}
.story-rail li { padding: 7px 9px; border-radius: 999px; transition: color .3s, background-color .3s; }
.story-rail li.is-active { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* ---- Quote --------------------------------------------------------------- */
.quote { padding: 96px 0; }
.quote figure { display: grid; gap: 22px; justify-items: center; text-align: center; }
.quote blockquote p {
  font: 800 clamp(2rem, 1.1rem + 3.9vw, 4.4rem)/1.05 var(--font-display);
  letter-spacing: -.04em; text-wrap: balance; max-width: 15em;
}
.quote figcaption { color: var(--muted); }

/* ---- Privacy ------------------------------------------------------------ */
.privacy { padding: 96px 0; background: var(--surface); border-block: 1px solid var(--line); }
.grid-6 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid-6 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid-6 { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.feature-card {
  display: grid; gap: 10px; align-content: start;
  padding: 28px 24px;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--ground);
}
.feature-card h3 { margin-top: 8px; }
.feature-card p { color: var(--muted); font-size: .97rem; }
.fc-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--accent-soft); color: var(--accent);
}
.fc-icon .ic { width: 22px; height: 22px; }

.integrity {
  margin-top: 56px; padding-top: 40px;
  border-top: 1px solid var(--line);
  display: grid; gap: 24px;
}
.integrity h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; }
.integrity ul { list-style: none; padding: 0; display: grid; gap: 18px; }
.integrity li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; color: var(--muted); }
.integrity li strong { color: var(--ink); display: block; }
.integrity .ic { width: 24px; height: 24px; color: var(--good); margin-top: 2px; }
@media (min-width: 900px) {
  .integrity { grid-template-columns: 1fr 2fr; align-items: start; gap: 48px; }
  .integrity ul { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .integrity li { grid-template-columns: 1fr; gap: 10px; }
}
.section-link { margin-top: 40px; }

/* ---- Pricing ------------------------------------------------------------ */
.pricing { padding: 104px 0 96px; }
.pricing .section-head { justify-items: center; text-align: center; }
.pricing .section-head .lede { margin-inline: auto; }
.plans { display: grid; gap: 20px; max-width: 940px; margin: 0 auto 28px; }
@media (min-width: 780px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan {
  display: flex; flex-direction: column; gap: 14px;
  padding: 32px 28px;
  border: 1px solid var(--line); border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.plan h3 { font-size: 1.4rem; }
.plan .ticks { margin: 10px 0 18px; flex: 1; align-content: start; font-size: .97rem; }
.plan-pro { border: 1.5px solid var(--accent); box-shadow: 0 30px 60px -30px var(--glow), var(--shadow-card); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { display: flex; align-items: baseline; gap: 8px; }
.amount { font: 800 clamp(2.6rem, 2.2rem + 1.4vw, 3.4rem)/1 var(--font-display); letter-spacing: -.045em; }
.per { color: var(--muted); }
.plan-alt { margin-top: -6px; color: var(--muted); }
.plan-alt strong { color: var(--ink); }
.plan-sub { color: var(--muted); }
.pricing .fine { max-width: 40em; }

/* ---- FAQ ---------------------------------------------------------------- */
.faq { padding: 96px 0; border-top: 1px solid var(--line); }
.faq-grid { display: grid; gap: 8px; }
@media (min-width: 1000px) {
  .faq-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .faq .section-head { position: sticky; top: calc(var(--nav-h) + 40px); }
}
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: block;
  padding: 22px 44px 22px 0;
  list-style: none; cursor: pointer;
  font: 600 1.075rem/1.4 var(--font-body);
  border-radius: 8px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 14px; height: 2px; margin-top: -1px; border-radius: 1px;
  background: var(--muted);
  transition: transform .3s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover::before, .faq summary:hover::after { background: var(--accent); }
.answer { padding: 0 44px 24px 0; color: var(--muted); }
.answer p + p { margin-top: 12px; }

/* ---- Final CTA ---------------------------------------------------------- */
.final { position: relative; padding: 112px 0 120px; overflow: clip; }
.final::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: 1000px; height: 700px; transform: translate(-50%, -45%);
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}
.final-inner { display: grid; justify-items: center; gap: 22px; text-align: center; }
.final-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 20px 40px -18px rgba(16, 19, 22, .5), 0 0 0 1px var(--line); }
.final h2 { max-width: 12em; }
.final .lede { margin-inline: auto; }
.final .cta-row { justify-content: center; margin-top: 8px; }

/* ---- Footer ------------------------------------------------------------- */
.footer { padding: 64px 0 40px; border-top: 1px solid var(--line); font-size: .95rem; }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { display: grid; gap: 14px; justify-items: start; max-width: 26em; }
.footer-brand p { color: var(--muted); }
.footer-brand .footer-fine { font-size: .85rem; }
.footer-col { display: grid; gap: 10px; align-content: start; justify-items: start; }
.footer-col h2 { font: 600 12px/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.footer-col a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem;
}

/* ---- Legal pages -------------------------------------------------------- */
.legal { padding: 56px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal-head { display: grid; gap: 14px; margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.legal h1 { font-size: clamp(2.25rem, 1.7rem + 2.4vw, 3.4rem); line-height: 1.05; }
.legal .meta { color: var(--muted); }
.legal h2 {
  font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); line-height: 1.2; letter-spacing: -.02em;
  margin: 48px 0 14px; scroll-margin-top: calc(var(--nav-h) + 20px);
}
.legal h3 { font-size: 1.1rem; margin: 28px 0 10px; }
.legal p, .legal li { line-height: 1.7; }
.legal p + p { margin-top: 14px; }
.legal ul, .legal ol { padding-left: 22px; margin: 12px 0; }
.legal li + li { margin-top: 8px; }
.legal li::marker { color: var(--muted); }
.legal a { color: var(--accent); text-underline-offset: 3px; }
.legal .callout {
  margin: 18px 0; padding: 18px 20px;
  border-left: 3px solid var(--accent); border-radius: 0 14px 14px 0;
  background: var(--surface);
}
.legal .caps { text-transform: uppercase; font-size: .92rem; letter-spacing: .01em; }
.toc {
  margin: 0 0 8px; padding: 20px 24px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
}
.toc h2 { margin: 0 0 10px; font: 600 12px/1.4 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding-left: 22px; columns: 1; column-gap: 32px; font-size: .95rem; }
@media (min-width: 640px) { .toc ol { columns: 2; } }
.toc li { break-inside: avoid; margin: 0 0 6px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* ---- 404 ---------------------------------------------------------------- */
.notfound { padding: 96px 0 120px; text-align: center; }
.notfound .wrap { display: grid; justify-items: center; gap: 20px; }
.notfound .code { font: 800 clamp(5rem, 3rem + 10vw, 10rem)/.9 var(--font-display); letter-spacing: -.06em; color: var(--accent); }
.notfound .cta-row { justify-content: center; }

/* ---- Motion -------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(3); opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: pulse 2.4s var(--ease) infinite; will-change: transform, opacity; }
  .rise { animation: rise .8s var(--ease) both; }
  .rise:nth-child(2) { animation-delay: .06s; }
  .rise:nth-child(3) { animation-delay: .12s; }
  .rise:nth-child(4) { animation-delay: .18s; }
  .rise:nth-child(5) { animation-delay: .24s; }
  .hero-media.rise { animation-duration: 1.1s; animation-delay: .15s; }
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .grid-6 .reveal:nth-child(3n+2) { transition-delay: .06s; }
  .grid-6 .reveal:nth-child(3n) { transition-delay: .12s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---- Scroll performance ------------------------------------------------- */
/* The phone mockups are big static DOM trees: isolate them so scrolling never re-lays them out,
   and give the sticky story phone its own compositor layer. Off-screen sections skip rendering. */
.device { contain: layout paint style; }
.device-screen { contain: strict; }
@media (min-width: 1000px) {
  .story-sticky { will-change: transform; transform: translateZ(0); }
}
.section-defer { content-visibility: auto; contain-intrinsic-size: auto 900px; }
/* On phones each story step carries its own mockup; render them only near the viewport. */
.step-media { content-visibility: auto; contain-intrinsic-size: auto 700px; }
