/* ============================================================
   Tack — Concept 02 · "The loop, in motion"
   Same identity, rethought structure + motion system.
   Layers: reset → base → components → sections → motion
   ============================================================ */
@layer reset, base, components, sections, motion;

/* ---------- tokens ---------- */
:root {
  --paper: #eef2f7;
  --paper-2: #e2e8f1;
  --ink: #0b0d11;
  --night: #090b0f;
  --night-2: #111722;
  --card: #151a22;
  --muted: #94a0b0;
  --muted-dark: #566170;
  --blue: #013ff4;
  --blue-light: #8fbef7;
  --line: rgba(210, 220, 232, 0.15);
  --line-dark: rgba(11, 13, 17, 0.14);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --max: 1560px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-reveal: 0.9s;
  --t-hover: 0.28s;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  img { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button, a { -webkit-tap-highlight-color: transparent; }
}

@layer base {
  html { scroll-behavior: smooth; overflow-x: clip; }

  body {
    min-width: 320px;
    overflow-x: clip;
    background: var(--night);
    color: var(--paper);
    font-family: var(--sans);
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  main { background: var(--paper); }

  /* film grain */
  body::before {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    content: "";
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
  }

  :focus-visible { outline: 2px solid var(--blue-light); outline-offset: 4px; }

  .shell { width: min(var(--max), calc(100% - 64px)); margin-inline: auto; }

  h1, h2, h3 { font-weight: 500; text-wrap: balance; }
  p { text-wrap: pretty; }

  .visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
  }

  .section-title {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 4.6vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -0.01em;
  }
  .section-title em, .deep-title em, .chooser h2 em {
    font-style: italic;
    font-weight: 500;
    color: var(--blue);
  }
  /* dark sections: powder blue for contrast (10.2:1 vs 2.8:1) */
  .chooser h2 em { color: var(--blue-light); }
}

/* ============================================================
   COMPONENTS
   ============================================================ */
@layer components {

  /* ---------- nav ---------- */
  .site-nav {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 700;
    padding-block: 18px;
    transition: transform 0.5s var(--ease), background-color 0.35s ease, padding 0.35s ease;
  }
  .site-nav.nav-scrolled {
    padding-block: 12px;
    background: color-mix(in oklab, var(--night) 82%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.nav-hidden { transform: translateY(-110%); }

  .site-nav .shell { display: flex; align-items: center; gap: 40px; }

  .brand { display: flex; align-items: center; }
  .brand-logo { height: 24px; width: auto; }

  .nav-links { display: flex; gap: 30px; margin-inline-start: auto; }
  .nav-links a {
    padding-block: 8px;
    font-size: 0.86rem;
    font-weight: 400;
    color: var(--muted);
    transition: color var(--t-hover) ease;
  }
  .nav-links a:hover { color: var(--paper); }

  .nav-actions,
  .nav-primary-actions {
    display: flex;
    align-items: center;
  }
  .nav-primary-actions { gap: 16px; }
  .nav-signin {
    padding-block: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 400;
    transition: color var(--t-hover) ease;
  }
  .nav-signin:hover { color: var(--paper); }

  .nav-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 500;
    transition: transform var(--t-hover) var(--ease), background-color var(--t-hover) ease;
  }
  .nav-button:hover { transform: translateY(-1px); background: #174ff5; }

  .nav-account {
    position: relative;
    display: none;
  }
  .nav-account.is-visible { display: block; }
  .nav-account-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 9px 4px 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(238, 242, 247, 0.05);
    color: var(--paper);
    font: inherit;
    cursor: pointer;
    transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-hover) var(--ease);
  }
  .nav-account-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(143, 190, 247, 0.42);
    background: rgba(238, 242, 247, 0.08);
  }
  .nav-account-avatar {
    display: inline-grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 2px rgba(143, 190, 247, 0.82);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1;
  }
  .nav-account-caret {
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1;
  }
  .nav-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    width: 240px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: color-mix(in oklab, var(--night-2) 96%, transparent);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  }
  .nav-account.open .nav-account-menu { display: block; }
  .nav-account-email {
    margin-block-end: 6px;
    color: var(--paper);
    font-size: 0.9rem;
    font-weight: 400;
    overflow-wrap: anywhere;
  }
  .nav-account-plan {
    display: inline-flex;
    margin-block-end: 14px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(238, 242, 247, 0.05);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
  }
  .nav-account-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .nav-account-btn {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(238, 242, 247, 0.04);
    color: var(--paper);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease;
  }
  .nav-account-btn:hover {
    border-color: rgba(143, 190, 247, 0.32);
    background: rgba(238, 242, 247, 0.08);
  }
  .hidden-auth { display: none !important; }
  .signed-in-cta { display: none; }
  body.is-signed-in .signed-in-cta { display: inline-flex; }
  body.is-signed-in .signed-out-cta { display: none !important; }

  /* ghost sibling of the nav button — outline until it means it */
  .ghost-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 26px;
    border-radius: 999px;
    border: 1px solid rgba(143, 190, 247, 0.45);
    color: var(--paper);
    font-size: 0.92rem;
    font-weight: 500;
    transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-hover) var(--ease);
  }

  .button-mark {
    width: 23px;
    height: 23px;
    flex: none;
    object-fit: contain;
  }
  .ghost-button:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    transform: translateY(-1px);
  }

  .hero-platform-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 22px;
    border: 1px solid rgba(143, 190, 247, 0.42);
    border-radius: 999px;
    color: var(--paper);
    font-size: 0.88rem;
    font-weight: 500;
    transition: transform var(--t-hover) var(--ease), background-color var(--t-hover) ease, border-color var(--t-hover) ease;
  }
  .hero-platform-button.primary {
    border-color: var(--blue);
    background: var(--blue);
  }
  .hero-platform-button:hover {
    transform: translateY(-2px);
    border-color: var(--blue-light);
    background: rgba(143, 190, 247, 0.08);
  }
  .hero-platform-button.primary:hover { border-color: #174ff5; background: #174ff5; }
  .hero-platform-button .chrome-mark { width: 27px; height: 27px; }

  /* ---------- store badges — identical pill geometry, color tells them apart ---------- */
  .store-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    block-size: 62px;
    padding-inline: 30px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--blue);
    color: #fff;
    line-height: 1.1;
    transition: transform var(--t-hover) var(--ease), background-color var(--t-hover) ease, border-color var(--t-hover) ease;
  }
  .store-mark { flex: none; object-fit: contain; }
  .store-badge.apple .store-mark { width: 39px; height: 39px; }
  .store-badge.chrome .store-mark { width: 43px; height: 43px; }
  .store-badge .badge-text { display: flex; flex-direction: column; gap: 2px; text-align: start; }
  .store-badge small { font-size: 0.68rem; font-weight: 400; opacity: 0.8; letter-spacing: 0.02em; }
  .store-badge strong { font-size: 1.02rem; font-weight: 500; letter-spacing: -0.01em; }
  .store-badge:hover { transform: translateY(-2px); background: #174ff5; }

  .store-badge.chrome {
    background: transparent;
    border-color: rgba(11, 13, 17, 0.4);
    color: var(--ink);
  }
  .store-badge.chrome small { opacity: 0.7; }
  .store-badge.chrome:hover { background: rgba(11, 13, 17, 0.05); border-color: rgba(11, 13, 17, 0.72); }

  .chooser .store-badge.chrome {
    border-color: rgba(143, 190, 247, 0.52);
    color: var(--paper);
  }
  .chooser .store-badge.chrome:hover {
    background: rgba(143, 190, 247, 0.08);
    border-color: var(--blue-light);
  }

  .button-row { display: flex; flex-wrap: wrap; gap: 14px; }

  /* ---------- reveal primitives ---------- */
  .reveal {
    opacity: 0;
    translate: 0 26px;
    transition: opacity var(--t-reveal) var(--ease), translate var(--t-reveal) var(--ease);
  }
  .reveal.d2 { transition-delay: 0.12s; }
  .reveal.d3 { transition-delay: 0.24s; }
  .in .reveal, .reveal.in { opacity: 1; translate: 0 0; }

  /* headline word reveal */
  .headline-reveal .w { display: inline-block; overflow: clip; vertical-align: bottom; }
  .headline-reveal .w > span {
    display: inline-block;
    translate: 0 110%;
    transition: translate 1s var(--ease);
  }
  .headline-reveal .w:nth-child(2) > span { transition-delay: 0.06s; }
  .headline-reveal .w:nth-child(3) > span { transition-delay: 0.12s; }
  .headline-reveal .w:nth-child(4) > span { transition-delay: 0.16s; }
  .headline-reveal .w:nth-child(5) > span { transition-delay: 0.2s; }
  .headline-reveal .w:nth-child(6) > span { transition-delay: 0.24s; }
  .headline-reveal .w:nth-child(7) > span { transition-delay: 0.28s; }
  .headline-reveal .w:nth-child(8) > span { transition-delay: 0.34s; }
  .loaded .headline-reveal .w > span { translate: 0 0; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
@layer sections {

  /* ---------- hero + Tack workflow ---------- */
  .hero {
    position: relative;
    background: var(--night);
    color: var(--paper);
    border-radius: 0 0 clamp(16px, 1.8vw, 28px) clamp(16px, 1.8vw, 28px);
  }
  .hero-stage-wrap {
    position: relative;
    min-height: 255svh;
  }
  .hero-sticky {
    position: sticky;
    top: 0;
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding-block: 108px 54px;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 4.7fr) minmax(0, 7.3fr);
    gap: clamp(42px, 5vw, 82px);
    align-items: center;
  }
  .hero-copy { position: relative; z-index: 2; }
  .section-eyebrow {
    margin-block-end: 16px;
    color: var(--blue-light);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .hero h1 {
    font-family: var(--serif);
    font-size: clamp(3rem, 5.15vw, 5.35rem);
    line-height: 0.96;
    letter-spacing: -0.015em;
  }
  .hero h1 .em > span { font-style: italic; color: var(--blue-light); }

  .hero-lede {
    max-width: 46ch;
    margin-block: 20px 26px;
    font-size: clamp(0.96rem, 1.15vw, 1.08rem);
    line-height: 1.62;
    color: var(--muted);
  }
  .hero-flow {
    display: grid;
    gap: 22px;
    min-width: 0;
  }

  .loop-rail {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 1.5vw, 22px);
    padding-block-start: 17px;
  }
  .loop-progress {
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: var(--line);
    border-radius: 2px;
    overflow: clip;
  }
  .loop-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--blue-light);
    transform-origin: left;
    scale: 0.05 1;
    transition: scale 0.7s var(--ease);
  }
  .loop[data-step="1"] .loop-progress span { scale: 0.2 1; }
  .loop[data-step="2"] .loop-progress span { scale: 0.55 1; }
  .loop[data-step="3"] .loop-progress span { scale: 1 1; }

  .loop-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 9px;
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    opacity: 0.42;
    cursor: pointer;
    transition: opacity 0.5s ease, translate var(--t-hover) var(--ease);
  }
  .loop-step:hover { opacity: 0.76; translate: 0 -1px; }
  .loop-num {
    font-family: var(--serif);
    font-style: italic;
    font-size: 0.94rem;
    color: var(--blue-light);
    padding-block-start: 1px;
  }
  .loop-step strong {
    display: block;
    font-family: var(--serif);
    font-size: clamp(1.05rem, 1.4vw, 1.28rem);
    font-weight: 500;
    line-height: 1.05;
  }
  .loop-step small {
    display: block;
    margin-block-start: 5px;
    color: var(--muted);
    font-size: clamp(0.72rem, 0.78vw, 0.8rem);
    line-height: 1.45;
  }

  .loop[data-step="1"] .loop-step:nth-child(1),
  .loop[data-step="2"] .loop-step:nth-child(2),
  .loop[data-step="3"] .loop-step:nth-child(3) { opacity: 1; }

  /* one consistent frame; the recordings themselves carry the reframing */
  .loop-frame {
    --loop-chrome-height: clamp(27px, 3vw, 36px);
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    margin-inline: auto;
    border-radius: 18px;
    overflow: clip;
    border: 1px solid var(--line);
    background: var(--night-2);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.26);
  }
  .loop-urlbar {
    position: absolute;
    inset: 0 0 auto;
    z-index: 4;
    height: var(--loop-chrome-height);
    display: grid;
    place-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.035);
    background: #252525;
    pointer-events: none;
  }
  .loop-site-lockup { display: block; width: clamp(82px, 7.6vw, 98px); height: auto; opacity: 0.88; }
  .loop-shot {
    position: absolute;
    inset: var(--loop-chrome-height) 0 0;
    opacity: 0;
    scale: 1.045;
    transition: opacity 0.75s var(--ease), scale 1.2s var(--ease);
  }
  .loop-shot video { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
  .loop-shot.s1 video { width: 101.6%; max-width: none; margin-inline-start: -1.6%; }
  .loop-shot.s2 video { object-position: left 50%; }

  /* generated-result swap layer: sits exactly on the footage's real result slots */
  .gen-overlay { position: absolute; inset: 0; pointer-events: none; }
  .gen-overlay::before {
    position: absolute;
    inset: 0 0 0 42.4%;
    z-index: 0;
    background: #110e0d;
    content: "";
    opacity: 0;
  }
  .gen-overlay::after {
    position: absolute;
    inset: 0 0 auto 42.4%;
    z-index: 0;
    height: 22%;
    background: #110e0d;
    content: "";
  }
  .gen-prompt-heading {
    position: absolute;
    inset: 17% 0 auto 42.4%;
    z-index: 2;
    color: #f3f4f7;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(0.82rem, 1.3vw, 1.04rem);
    font-weight: 400;
    line-height: 1;
    text-align: center;
    transition: opacity 180ms ease;
  }
  .gen-prompt-heading em { color: #8ec2ff; font-weight: 400; }
  .gen-result {
    position: absolute;
    left: 47.32%;
    z-index: 1;
    width: 44.78%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(9, 11, 15, 0.5);
    opacity: 0;
    scale: 0.985;
    transition: scale 0.5s var(--ease);
  }
  .gen-result.r1 { top: 7.8%; }
  .gen-result.r2 { top: 84.4%; }
  .gen-in .gen-overlay::before { opacity: 1; }
  .gen-in .gen-prompt-heading { opacity: 0; }
  .gen-in .gen-result { opacity: 1; scale: 1; }
  .loop[data-step="1"] .loop-shot.s1,
  .loop[data-step="2"] .loop-shot.s2,
  .loop[data-step="3"] .loop-shot.s3 { opacity: 1; scale: 1; }

  .loop-zones { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr 1fr 1fr; pointer-events: none; }

  /* ---------- reversible illustration states ---------- */
  .two-state-illustration {
    position: relative;
    aspect-ratio: 1;
  }
  .two-state-illustration.portrait { aspect-ratio: 2 / 3; }
  .two-state-illustration .illustration-state {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 440ms cubic-bezier(0.22, 0.8, 0.32, 1);
    will-change: opacity;
  }
  .two-state-illustration .state-start { opacity: 1; }
  .two-state-illustration .state-end { opacity: 0; }
  .two-state-illustration.is-complete .state-start { opacity: 0; }
  .two-state-illustration.is-complete .state-end { opacity: 1; }

  /* ---------- combined Why Tack chapter (dark) ---------- */
  .browser-chapter {
    background: var(--paper);
    color: var(--ink);
    padding-block: clamp(100px, 14vh, 180px);
    border-top: 1px solid var(--line-dark);
  }
  .chapter-head { text-align: center; max-width: 920px; margin-inline: auto; margin-block-end: clamp(40px, 5.5vh, 70px); }
  .deep-title {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 4.6vw, 4.4rem);
    line-height: 0.98;
  }
  .chapter-intro {
    max-width: 58ch;
    margin: 20px auto 0;
    color: var(--muted-dark);
    font-size: 1.05rem;
    line-height: 1.6;
  }

  /* centered, tile-less explanation of the product's three core advantages */
  .deep-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(30px, 4vw, 70px);
  }
  .deep-card { text-align: center; }
  .deep-illustration {
    width: min(240px, 70%);
    margin-inline: auto;
    margin-block-end: 26px;
    transition: translate 0.5s var(--ease), rotate 0.5s var(--ease);
  }
  .deep-illustration.square-art .illustration-state { scale: 1.08; }
  .deep-card:hover .deep-illustration { translate: 0 -6px; rotate: -1.2deg; }
  .deep-card h3 { font-family: var(--serif); font-size: clamp(1.5rem, 1.9vw, 1.9rem); line-height: 1.04; }
  .deep-card h3 .number { font-style: italic; color: var(--blue); font-size: 0.8em; margin-inline-end: 6px; }
  .deep-card p { margin-block-start: 10px; color: var(--muted-dark); line-height: 1.55; max-width: 34ch; margin-inline: auto; }

  /* ---------- compact audience tile ---------- */
  .audience {
    background: var(--paper);
    color: var(--paper);
    padding-block: 0 clamp(84px, 11vh, 132px);
  }
  .audience-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(56px, 8vw, 130px);
    align-items: center;
    padding: clamp(54px, 7vw, 100px);
    border: 1px solid var(--line);
    border-radius: clamp(24px, 2.6vw, 38px);
    background: var(--night);
  }
  .audience .section-eyebrow,
  .audience .section-title em { color: var(--blue-light); }
  .audience-copy > p:last-child {
    max-width: 54ch;
    margin-block-start: 20px;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.65;
  }
  .audience-list { border-bottom: 1px solid var(--line); }
  .audience-use {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 18px;
    align-items: baseline;
    padding-block: 20px;
    border-top: 1px solid var(--line);
  }
  .audience-use > span {
    color: var(--blue-light);
    font-family: var(--serif);
    font-size: 0.95rem;
    font-style: italic;
  }
  .audience-use p {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2vw, 2rem);
    line-height: 1.05;
  }

  /* ---------- two ways to use Tack ---------- */
  .chooser {
    position: relative;
    background: var(--night);
    text-align: center;
    padding-block: clamp(78px, 10vh, 120px) clamp(70px, 9vh, 110px);
    border-radius: clamp(16px, 1.8vw, 28px) clamp(16px, 1.8vw, 28px) 0 0;
    overflow: clip;
  }
  .chooser h2 {
    font-family: var(--serif);
    font-size: clamp(2.8rem, 5.4vw, 5.4rem);
    line-height: 0.98;
  }
  .chooser .section-eyebrow { margin-block-end: 18px; }
  .chooser-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2.4vw, 32px);
    max-width: 1080px;
    margin-inline: auto;
    margin-block-start: clamp(28px, 4vh, 46px);
  }
  /* tile-less: two centered columns, the badge alone carries the action */
  .chooser-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: clamp(10px, 1.5vw, 24px);
  }
  .chooser-card h3 { font-family: var(--serif); font-size: clamp(1.9rem, 2.4vw, 2.5rem); line-height: 1.04; }
  .cc-desc { color: var(--muted); line-height: 1.55; max-width: 36ch; }
  .chooser-card .store-badge { margin-block-start: auto; pointer-events: none; }
  .chooser-card:hover .store-badge { transform: translateY(-2px); }

  /* ---------- footer ---------- */
  .site-footer { border-top: 1px solid var(--line); padding-block: 30px; background: var(--night); }
  .site-footer .shell {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--muted-dark);
  }
  .footer-links { display: flex; gap: 24px; }
  .footer-links a { transition: color var(--t-hover) ease; }
  .footer-links a:hover { color: var(--paper); }

  .copy-line { display: block; }
  .hero-lede,
  .chapter-intro,
  .deep-card p,
  .audience-copy > p,
  .cc-desc { text-wrap: balance; }
}

/* ============================================================
   MOTION EXTRAS + RESPONSIVE + A11Y
   ============================================================ */
@layer motion {

  @media (max-width: 1080px) {
    .shell { width: calc(100% - 44px); }
    .hero-grid { grid-template-columns: minmax(0, 4.3fr) minmax(0, 7.7fr); gap: 34px; }
    .hero h1 { font-size: clamp(2.8rem, 5.6vw, 4.2rem); }
    .loop-step small { display: none; }
    .nav-links { display: none; }
    .nav-actions { margin-inline-start: auto; }
    .deep-grid, .chooser-cards { grid-template-columns: 1fr; }
    .deep-illustration { width: min(180px, 50%); }
    .audience-grid { grid-template-columns: 1fr; gap: 44px; }
  }

  @media (max-width: 820px) {
    .hero-stage-wrap { min-height: auto; }
    .hero-sticky {
      position: relative;
      min-height: auto;
      padding-block: 124px 84px;
    }
    .hero-grid { grid-template-columns: 1fr; gap: 44px; }
    .hero-copy { max-width: 680px; }
    .hero h1 { font-size: clamp(3rem, 10vw, 5rem); }
    .loop-zones { display: none; }
    .loop-step small { display: block; }
  }

  @media (max-width: 640px) {
    .site-nav .shell { gap: 12px; }
    .brand-logo { height: 22px; }
    .nav-actions { margin-inline-start: auto; }
    .nav-primary-actions { gap: 10px; }
    .nav-signin { font-size: 0.8rem; }
    .nav-button { padding: 9px 12px; font-size: 0.78rem; }
    .nav-button .button-mark { display: none; }
    .nav-account-menu { width: min(240px, calc(100vw - 44px)); }
    .store-badge { width: 100%; justify-content: center; }
    .button-row { width: 100%; }
    .hero-platform-button { width: 100%; justify-content: center; }
    .hero-sticky { padding-block: 112px 72px; }
    .hero-flow { gap: 18px; }
    .loop-frame { border-radius: 12px; }
    .loop-rail { grid-template-columns: 1fr; gap: 5px; padding-block-start: 15px; }
    .loop-step { padding-block: 8px; }
    .audience-grid { padding: 34px 28px; border-radius: 24px; }
    .audience-use { grid-template-columns: 30px 1fr; gap: 12px; }
  }

  /* reduced motion: content always visible, nothing moves */
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .in .reveal { opacity: 1; translate: 0 0; transition: none; }
    .headline-reveal .w > span { translate: 0 0; transition: none; }
    .loop-shot, .loop-progress span, .loop-step { transition: none; }
    .two-state-illustration .illustration-state { transition: none; }
    .two-state-illustration .state-start { opacity: 0; }
    .two-state-illustration .state-end { opacity: 1; }
  }
}
