/* Portamem landing page. Mobile first, built section by section.
   Section 1: the hero. Big bold heading in the centre, its letters filled with mint and outlined in deep green
   (pure mint on a light page would be too pale to read); a short description; then "Request access". */

:root {
  --bg: #f3faf6;
  --bg-2: #e3f4ea;
  --mint: #7fd6b4;         /* the heading's fill */
  --mint-deep: #3aa57c;
  --ink: #0f3d2e;          /* text and outlines: 12:1 on --bg */
  --ink-soft: #3b5f52;     /* description: 7:1 on --bg */
  --line: rgb(15 61 46 / .12);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Geist", system-ui, sans-serif;
  --gutter: clamp(18px, 5vw, 56px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background:
    radial-gradient(60% 50% at 50% 42%, rgb(127 214 180 / .22), transparent 70%),
    var(--bg);
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mint-deep); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }

/* Bar: logo on one side, menu on the other. */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  background: linear-gradient(var(--bg), rgb(243 250 246 / 0));
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 800 1.3rem/1 var(--display); letter-spacing: -0.02em; }
.brand svg { height: 30px; width: auto; flex: none; }
.brand span { padding-top: 2px; } /* optical centre: the wordmark has no descenders, so nudge it to the mark's middle */

.nav { position: relative; }
.menu { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.menu a {
  display: block; padding: 10px 14px; border-radius: 999px; text-decoration: none;
  font: 500 .95rem/1 var(--sans); color: var(--ink-soft); transition: background-color .2s, color .2s;
}
.menu a:hover { background: var(--bg-2); color: var(--ink); }
.menu-btn { display: none; }

/* Phones: the menu collapses behind a button. */
@media (max-width: 760px) {
  .menu-btn {
    display: grid; place-content: center; gap: 5px; width: 46px; height: 46px; padding: 0; cursor: pointer;
    border: 1.5px solid var(--ink); border-radius: 14px; background: var(--bg);
  }
  .menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu {
    position: absolute; right: 0; top: calc(100% + 10px); width: min(78vw, 280px);
    flex-direction: column; gap: 2px; padding: 8px;
    background: #fff; border: 1.5px solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink);
    visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .menu.open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
  .menu a { padding: 14px 14px; font-size: 1.05rem; color: var(--ink); border-radius: 12px; }
}

/* Section 1: the hero, everything centred. */
.hero {
  min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: clamp(20px, 3.4vw, 34px);
  padding: 110px var(--gutter) 64px; text-align: center;
}
.hero h1 {
  margin: 0; max-width: 14ch;
  font: 800 clamp(3.1rem, 12.5vw, 7.4rem)/0.95 var(--display); letter-spacing: -0.035em; text-wrap: balance;
  color: var(--mint);
  -webkit-text-stroke: clamp(1.5px, 0.22vw, 3px) var(--ink);
  paint-order: stroke fill;
  text-shadow: clamp(3px, 0.6vw, 7px) clamp(3px, 0.6vw, 7px) 0 var(--ink);
}
.lede { margin: 0; max-width: 46ch; font-size: clamp(1.02rem, 1.7vw, 1.2rem); color: var(--ink-soft); text-wrap: pretty; }
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  font: 600 1.05rem/1 var(--sans); color: var(--ink); background: var(--mint);
  padding: 18px 30px; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 5px 5px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.cta:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.cta:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- Sections 1 → 2: the tear ----------
   The scene pins two layers: the hero on top (.tear) and section 2 underneath (.problems).
   Scrolling tears the hero into two halves that pull apart; js/main.js sets --p (0–1) and the jagged clip paths.
   Before the tear starts, only the real hero shows, whole, so everything in it stays clickable. */
.scene { position: relative; }
.tear { position: sticky; top: 0; height: 100svh; margin-bottom: -100svh; z-index: 3; pointer-events: none; }
.half { position: absolute; inset: 0; pointer-events: auto; will-change: transform; }
.face { position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 42%, rgb(127 214 180 / .22), transparent 70%), var(--bg); }
.edge { position: absolute; inset: 0; display: none; background: #fff; }
.half-r { display: none; }
.scene.tearing .half-r { display: block; }
.scene.tearing .edge { display: block; }
.scene.tearing .half-l .face { clip-path: var(--clip-l); }
.scene.tearing .half-l .edge { clip-path: var(--edge-l); }
.scene.tearing .half-r .face { clip-path: var(--clip-r); }
.scene.tearing .half-r .edge { clip-path: var(--edge-r); }
.scene.tearing .half { filter: drop-shadow(0 18px 30px rgb(15 61 46 / .25)); }
.scene.torn .tear { visibility: hidden; } /* fully torn away: stop it covering section 2 */

/* ---------- Sections 2 ↔ 3: the bottle ----------
   Both sections are labels on one bottle. At rest the front label is shown flat and fully interactive.
   During the turn (.turning) js/main.js shows copies of both labels cut into thin vertical strips, each strip
   placed on a cylinder, so the labels genuinely curve around the bottle as it rotates. */
.bottle {
  position: sticky; top: 0; height: 100svh; z-index: 1; overflow: hidden;
  perspective: 1500px; perspective-origin: 50% 50%;
  background: radial-gradient(70% 60% at 50% 50%, #eaf7ef, #cfe6da);
}
/* The glass between the labels: soft vertical highlights, seen only while the bottle is mid-turn. */
.glass {
  position: absolute; inset: 0; opacity: var(--glass, 0); pointer-events: none;
  background:
    linear-gradient(90deg, rgb(15 61 46 / .3), transparent 16%, rgb(255 255 255 / .6) 30%, transparent 42%, transparent 68%, rgb(255 255 255 / .4) 80%, rgb(15 61 46 / .32)),
    #cfe9dc;
}
.spin { position: absolute; inset: 0; transform-style: preserve-3d; }
.label-face { position: absolute; inset: 0; }
.face-b { visibility: hidden; }
.bottle.show-b .face-a { visibility: hidden; }
.bottle.show-b .face-b { visibility: visible; }
.bottle.turning .face-a, .bottle.turning .face-b { visibility: hidden; }
/* The strips: each holds a full copy of its label, offset so only its own slice shows. */
.strip { position: absolute; top: 0; height: 100%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: none; }
.bottle.turning .strip { display: block; }
.strip > .label-face { visibility: visible !important; pointer-events: none; }
.strip .shade { position: absolute; inset: 0; pointer-events: none; }

/* ---------- Section 2: What we're solving ---------- */
.problems {
  display: grid; grid-template-rows: auto 1fr auto; align-content: center; gap: clamp(18px, 3vh, 30px);
  padding: 92px var(--gutter) 28px;
  background:
    repeating-linear-gradient(0deg, rgb(15 61 46 / .035) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgb(15 61 46 / .035) 0 1px, transparent 1px 32px),
    var(--bg-2);
}
.problems-head { display: grid; gap: 8px; text-align: center; justify-items: center; }
.kicker { margin: 0; font: 600 .78rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #1d6f52; }
.problems h2 {
  margin: 0; font: 800 clamp(2.3rem, 7vw, 4.4rem)/1 var(--display); letter-spacing: -0.03em;
  color: var(--mint); -webkit-text-stroke: clamp(1.2px, 0.16vw, 2px) var(--ink); paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
}
.sub { margin: 0; color: var(--ink-soft); max-width: 42ch; }

/* The cards: a 3×3 grid on desktop, all nine visible at once.
   Each card is a fixed-size cell; its box grows over its neighbours to show the explanation
   on hover, keyboard focus or a tap (.open). The bottom row grows upward so it stays on screen. */
.track-wrap { min-height: 0; display: grid; align-items: center; }
.track {
  --gap: clamp(12px, 1.8vh, 18px); --ch: clamp(76px, 12vh, 112px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap);
  width: min(100%, 1120px); margin: 0 auto; padding: 0; list-style: none;
}
.card { position: relative; height: var(--ch); }
.card-box {
  position: absolute; left: 0; right: 0; top: 0; min-height: 100%; z-index: 1; overflow: hidden;
  display: grid; align-content: start;
  background: #fff; border: 2px solid var(--ink); border-radius: 20px; box-shadow: 5px 5px 0 var(--ink);
  transition: box-shadow .25s, transform .25s cubic-bezier(.2,.7,.2,1), background-color .25s;
}
.card:nth-child(n + 7) .card-box { top: auto; bottom: 0; } /* bottom row: grow upward */
.card-btn {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: calc(var(--ch) - 4px); padding: 12px 18px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
}
.card-btn:focus-visible { outline: 3px solid var(--mint-deep); outline-offset: -6px; border-radius: 18px; }
.ico { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  background: var(--mint); border: 2px solid var(--ink); border-radius: 10px; padding: 3px; box-sizing: content-box; }
.card-title { font: 800 clamp(1rem, 1.35vw, 1.2rem)/1.2 var(--display); letter-spacing: -0.01em; }
.hint { font: 600 1.4rem/1 var(--sans); color: #1d6f52; transition: rotate .3s; }
.card-desc {
  margin: 0; padding: 0 18px; max-height: 0; opacity: 0; color: var(--ink-soft); font-size: .93rem; line-height: 1.45;
  transition: max-height .35s cubic-bezier(.2,.7,.2,1), opacity .25s, padding .35s;
}
.card:hover .card-box, .card:focus-within .card-box, .card.open .card-box {
  z-index: 5; background: #f7fffb; transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink);
}
.card:hover .card-desc, .card:focus-within .card-desc, .card.open .card-desc { max-height: 9em; opacity: 1; padding: 0 18px 16px 62px; }
.card:hover .hint, .card:focus-within .hint, .card.open .hint { rotate: 45deg; }

/* Desktop shows every card, so the slide controls only appear on phones. */
.track-ui { display: none; align-items: center; justify-content: center; gap: 16px; }
.arrow {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font: 600 1.1rem/1 var(--sans); color: var(--ink);
  background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.arrow:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.arrow:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.progress { width: min(240px, 40vw); height: 8px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--mint); border-right: 2px solid var(--ink); }

/* Phones: one row, one card at a time with the next one peeking in; each card shows its explanation. */
@media (max-width: 760px) {
  .problems { padding-top: 84px; gap: 16px; }
  .track {
    --gap: 14px; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 6px 10px 14px 4px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }
  .track::-webkit-scrollbar { display: none; }
  .card { height: auto; scroll-snap-align: start; }
  .card-box, .card:nth-child(n + 7) .card-box { position: relative; inset: auto; min-height: 210px; }
  .card-btn { pointer-events: none; min-height: 0; padding: 20px 22px 8px; grid-template-columns: auto 1fr; }
  .card-desc, .card:hover .card-desc { max-height: none; opacity: 1; padding: 0 22px 22px; }
  .hint { display: none; }
  .card:hover .card-box, .card.open .card-box, .card:focus-within .card-box { transform: none; box-shadow: 5px 5px 0 var(--ink); }
  .track-ui { display: flex; }
}

/* ---------- Section 3: Benchmark (sample data) ---------- */
.bench {
  display: grid; grid-template-rows: auto 1fr; align-content: center; gap: clamp(18px, 3vh, 30px);
  padding: 92px var(--gutter) 32px;
  background:
    repeating-linear-gradient(90deg, rgb(15 61 46 / .035) 0 1px, transparent 1px 32px),
    #f6fcf8;
}
.bench-head { display: grid; gap: 8px; justify-items: center; text-align: center; }
.bench h2 {
  margin: 0; font: 800 clamp(2.2rem, 6.6vw, 4.2rem)/1 var(--display); letter-spacing: -0.03em;
  color: var(--mint); -webkit-text-stroke: clamp(1.2px, 0.16vw, 2px) var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink);
}
.sample-badge {
  margin: 4px 0 0; padding: 6px 12px; border: 1.5px dashed var(--ink); border-radius: 999px;
  font: 600 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: #fff7d6;
}
.bench-body { width: min(100%, 860px); margin: 0 auto; display: grid; gap: 18px; align-content: center; }
.tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tabs button {
  cursor: pointer; font: 600 .95rem/1 var(--sans); color: var(--ink); background: #fff;
  padding: 11px 18px; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s, background-color .2s;
}
.tabs button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.tabs button[aria-selected="true"] { background: var(--mint); }
.tabs button:focus-visible { outline: 3px solid var(--mint-deep); outline-offset: 3px; }
.chart { background: #fff; border: 2px solid var(--ink); border-radius: 24px; box-shadow: 6px 6px 0 var(--ink); padding: clamp(18px, 3vw, 30px); display: grid; gap: 16px; }
.chart-note { margin: 0; color: var(--ink-soft); text-align: center; min-height: 2.9em; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
/* Chart rows are .bm (not .bar: the header already uses .bar). */
.bm { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 54px; align-items: center; gap: 14px; }
.bar-name { font: 600 .95rem/1.2 var(--sans); }
.bm-us .bar-name { font: 800 1.05rem/1.2 var(--display); }
.bar-track { height: 28px; border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: #cfe3d9; border-right: 2px solid var(--ink); transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.bm-us .bar-fill { background: var(--mint); }
.bm-us .bar-track { box-shadow: 3px 3px 0 var(--ink); }
.bar-val { font: 800 1.05rem/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.chart-foot { margin: 0; font-size: .8rem; color: var(--ink-soft); text-align: center; }
@media (max-width: 760px) {
  .bench { padding-top: 84px; }
  .bm { grid-template-columns: 1fr 48px; grid-template-areas: "name val" "track track"; gap: 6px 10px; }
  .bar-name { grid-area: name; } .bar-val { grid-area: val; } .bar-track { grid-area: track; height: 22px; }
  .tabs button { padding: 10px 14px; font-size: .88rem; }
}

/* ---------- Sections 3 → 4: the fog ----------
   A full-screen layer above the benchmark. js/main.js draws drifting fog into the canvas (WebGL noise) and sets
   its density from the scroll: it thickens until nothing shows, section 4 swaps in behind it, then it thins away. */
.fog, .stage { position: sticky; top: 0; height: 100svh; margin-bottom: -100svh; }
.fog { z-index: 4; pointer-events: none; visibility: hidden; }
.fog.on { visibility: visible; }
.fog canvas { width: 100%; height: 100%; display: block; }
.stage { z-index: 2; visibility: hidden; overflow: hidden; }
.scene.fading #stage { visibility: visible; }
.stage-faq { z-index: 3; }
.scene.faq-on .stage-faq { visibility: visible; }
.scene.faq-past #stage { visibility: hidden; } /* section 5 covers it */
.scene.past-fog .bottle { visibility: hidden; } /* faded out under section 4: stop drawing it */

/* ---------- Section 4: How it works (the graph) ---------- */
.how {
  height: 100%; display: grid; grid-template-rows: auto 1fr; align-content: center; gap: clamp(14px, 3vh, 30px);
  padding: 92px var(--gutter) 28px;
  background: radial-gradient(rgb(15 61 46 / .13) 1.2px, transparent 1.4px) 0 0 / 26px 26px, #f6fcf8;
}
.how-head { display: grid; gap: 8px; justify-items: center; text-align: center; }
.how .sub { max-width: 46ch; text-wrap: balance; }
.how h2 {
  margin: 0; font: 800 clamp(2.2rem, 6.6vw, 4.2rem)/1 var(--display); letter-spacing: -0.03em; text-wrap: balance;
  color: var(--mint); -webkit-text-stroke: clamp(1.2px, 0.16vw, 2px) var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink);
}

/* The star: the doc hub in the middle, the leaves on a ring around it (placed by js/main.js), joined by
   right-angled connectors like a technical diagram. */
.graph { position: relative; width: min(100%, 1080px); height: 100%; min-height: 340px; margin: 0 auto; }
.edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.edges .link { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.edges .flow { fill: none; stroke: var(--mint-deep); stroke-width: 3; stroke-linecap: butt; stroke-linejoin: miter; stroke-dasharray: .03 .07; opacity: 0; }
.edges .lit.link { stroke-width: 2.8; }
.edges .flow.lit { opacity: 1; }

.hub {
  position: absolute; z-index: 2; width: 148px; aspect-ratio: 1; border-radius: 50%; /* above the leaves, so they go into it */
  display: grid; place-content: center; justify-items: center; gap: 6px;
  background: var(--mint); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
}
.hub svg { height: 46px; width: auto; }
.hub span { font: 800 1.08rem/1.1 var(--display); }

.leaves { list-style: none; margin: 0; padding: 0; }
.leaf {
  position: absolute; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; text-decoration: none; white-space: nowrap;
  background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s, background-color .2s;
}
/* A small page with a folded corner: the doc on each leaf. */
.doc {
  position: relative; flex: none; width: 24px; height: 30px; border: 2px solid var(--ink); border-radius: 3px 9px 3px 3px; background: var(--bg-2);
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
  background-size: 11px 2px, 11px 2px, 7px 2px; background-position: 4px 10px, 4px 15px, 4px 20px; background-repeat: no-repeat;
}
.doc::after { content: ""; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; background: var(--mint); border: 2px solid var(--ink); border-radius: 0 7px 0 3px; }
.leaf-t { font: 800 1.05rem/1 var(--display); }
.leaf:hover, .leaf:focus-visible { background: var(--mint); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.leaf:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.leaf:focus-visible { outline: 3px solid var(--mint-deep); outline-offset: 3px; }

/* The graph grows once the cloud clears: the hub, then each leaf in turn round the ring; links draw outwards. */
.how .node { transition: opacity .45s calc(var(--d) * .08s), transform .5s cubic-bezier(.3,1.5,.5,1) calc(var(--d) * .08s); }
.how:not(.grown) .node { opacity: 0; transform: scale(.6); }
.how.settled .leaf { transition: transform .15s, box-shadow .15s, background-color .2s; }
.edges .link { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .5s cubic-bezier(.4,0,.2,1) var(--delay, 0s); }
.how.grown .edges .link { stroke-dashoffset: 0; }
@keyframes flow { to { stroke-dashoffset: -.1; } }
.how.grown .edges .flow { animation: flow 1.2s linear infinite; transition: opacity .25s; }

/* Phones: the same star, smaller. */
@media (max-width: 760px) {
  .how { padding: 80px 12px 18px; gap: 10px; }
  .how .sub { font-size: .92rem; }
  .graph { min-height: 380px; }
  .hub { width: 96px; gap: 3px; box-shadow: 4px 4px 0 var(--ink); }
  .hub svg { height: 30px; }
  .hub span { font-size: .82rem; }
  .leaf { gap: 6px; padding: 6px 10px 6px 7px; border-radius: 11px; box-shadow: 3px 3px 0 var(--ink); }
  .doc { width: 17px; height: 21px; border-width: 1.5px; background-size: 8px 1.5px, 8px 1.5px, 5px 1.5px; background-position: 3px 7px, 3px 10.5px, 3px 14px; }
  .doc::after { width: 6px; height: 6px; border-width: 1.5px; }
  .leaf-t { font-size: .86rem; }
}

/* ---------- Sections 4 → 5: the hub falls into the Q ----------
   The leaves are pulled into the doc hub, then a copy of the hub (.ball) is tossed up and falls into the Q of
   "FAQ", shrinking to its size; js/main.js moves it with the scroll. The Q is the same mint circle with a tail. */
.ball {
  position: fixed; left: 0; top: 0; z-index: 6; display: none; pointer-events: none; transform-origin: 50% 50%;
  border-radius: 50%; background: var(--mint); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  place-content: center; justify-items: center; gap: 6px;
}
.ball.on { display: grid; }
.ball svg { height: 46px; width: auto; }
.ball span { font: 800 1.08rem/1.1 var(--display); }

/* ---------- Section 5: FAQ ---------- */
.faq {
  height: 100%; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; align-content: center;
  gap: clamp(28px, 5vw, 72px); padding: 92px max(var(--gutter), calc((100% - 1160px) / 2)) 32px;
  background:
    repeating-linear-gradient(0deg, rgb(15 61 46 / .035) 0 1px, transparent 1px 32px),
    var(--bg-2);
}
.faq-head { display: grid; gap: 14px; justify-items: start; }
.faq h2 {
  margin: 0; font: 800 clamp(5rem, 14vw, 11rem)/.9 var(--display); letter-spacing: -0.04em;
  color: var(--mint); -webkit-text-stroke: clamp(1.6px, .25vw, 3px) var(--ink); paint-order: stroke fill;
  text-shadow: clamp(4px, .5vw, 7px) clamp(4px, .5vw, 7px) 0 var(--ink);
}
/* The Q: a mint circle (the doc hub, landed) with a tail. Empty until the hub arrives. */
.q {
  position: relative; display: inline-block; width: .74em; height: .74em; margin-left: .03em; vertical-align: -.02em;
  border-radius: 50%; background: var(--mint); border: clamp(3px, .45vw, 6px) solid var(--ink);
  box-shadow: clamp(4px, .5vw, 7px) clamp(4px, .5vw, 7px) 0 var(--ink); visibility: hidden;
}
.q::after {
  content: ""; position: absolute; right: -.1em; bottom: -.06em; width: .3em; height: .1em; border-radius: .05em;
  background: var(--ink); transform: rotate(40deg) scaleX(0); transform-origin: 0 50%; transition: transform .35s cubic-bezier(.3,1.6,.5,1) .12s;
}
.q.filled { visibility: visible; animation: land .45s cubic-bezier(.3,1.4,.5,1); }
.q.filled::after { transform: rotate(40deg) scaleX(1); }
@keyframes land { 0% { transform: scale(1.12, .82); } 60% { transform: scale(.96, 1.05); } }
.faq .sub { max-width: 32ch; }
.ask {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin-top: 6px;
  font: 600 .92rem/1 var(--sans); color: var(--ink); background: #fff;
  padding: 10px 16px 10px 10px; border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s, box-shadow .15s, background-color .2s;
}
.ask::before { content: "?"; display: grid; place-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--mint); border: 1.5px solid var(--ink); font: 800 .8rem/1 var(--display); }
.ask:hover { background: #f2fff8; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.ask:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* The accordion: one answer open at a time. */
.qa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.qa { background: #fff; border: 2px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); transition: background-color .2s; }
.qa h3 { margin: 0; }
.qa-btn {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 18px; font: 800 1.02rem/1.25 var(--display); letter-spacing: -0.005em;
}
.qa-btn:focus-visible { outline: 3px solid var(--mint-deep); outline-offset: -5px; border-radius: 14px; }
.qa-ico { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); border: 2px solid var(--ink); transition: rotate .3s; }
.qa-ico::before, .qa-ico::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; margin: -1px 0 0 -5px; background: var(--ink); border-radius: 2px; }
.qa-ico::after { rotate: 90deg; transition: opacity .2s; }
.qa-btn[aria-expanded="true"] .qa-ico { rotate: 180deg; }
.qa-btn[aria-expanded="true"] .qa-ico::after { opacity: 0; }
.qa:has(.qa-btn[aria-expanded="true"]) { background: #f7fffb; }
.qa-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.2,.7,.2,1); }
.qa-a > div { overflow: hidden; }
.qa-a p { margin: 0; padding: 0 18px 16px; color: var(--ink-soft); font-size: .95rem; line-height: 1.5; }
.qa.open .qa-a { grid-template-rows: 1fr; }

@media (max-width: 760px) {
  .faq { grid-template-columns: 1fr; align-content: start; gap: 16px; padding: 78px 16px 18px; }
  .faq-head { grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; row-gap: 8px; }
  .faq-head .kicker { grid-column: 1 / -1; }
  .faq h2 { font-size: clamp(3.6rem, 19vw, 5rem); grid-row: 2 / 4; }
  .faq .sub { font-size: .9rem; }
  .ask { justify-self: start; margin: 0; font-size: .84rem; padding: 7px 12px 7px 7px; }
  .qa-list { gap: 9px; }
  .qa { border-radius: 13px; box-shadow: 3px 3px 0 var(--ink); }
  .qa-btn { padding: 11px 13px; font-size: .9rem; gap: 10px; }
  .qa-ico { width: 22px; height: 22px; }
  .qa-a p { padding: 0 13px 12px; font-size: .86rem; }
}

/* ---------- Section 6: Request access ----------
   An ordinary section after the pinned scene: the FAQ scrolls up and away, and this comes up beneath it. */
.access {
  position: relative; z-index: 1; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 5vw, 72px);
  padding: 110px max(var(--gutter), calc((100% - 1160px) / 2)) 80px;
  background: radial-gradient(60% 50% at 30% 40%, rgb(127 214 180 / .28), transparent 70%), var(--bg);
  border-top: 2px solid var(--ink);
}
.access-copy { display: grid; gap: 18px; justify-items: start; }
.access h2 {
  margin: 0; font: 800 clamp(2.6rem, 6.4vw, 5rem)/.95 var(--display); letter-spacing: -0.035em; text-wrap: balance;
  color: var(--mint); -webkit-text-stroke: clamp(1.4px, .2vw, 2.5px) var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--ink);
}
.access .lede { max-width: 42ch; }
.access-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.access-points li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.access-points li::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--mint); border: 2px solid var(--ink); }

.form {
  display: grid; gap: 14px; padding: clamp(20px, 3vw, 32px);
  background: #fff; border: 2px solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--ink);
}
.field { display: grid; gap: 6px; }
.field label { font: 600 .95rem/1.2 var(--sans); }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--ink); background: var(--bg);
  padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; transition: box-shadow .15s, background-color .15s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field textarea[rows="2"] { min-height: 64px; }
.field input:focus, .field textarea:focus { outline: none; background: #fff; box-shadow: 4px 4px 0 var(--mint-deep); }
.field [aria-invalid="true"] { border-color: #b3261e; background: #fff6f5; }
.field-hint { margin: 0; font-size: .84rem; color: var(--ink-soft); }
.error { margin: 0; min-height: 0; font-size: .86rem; font-weight: 600; color: #b3261e; }
.error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.submit { justify-self: start; border: 2px solid var(--ink); cursor: pointer; }
.submit:disabled { opacity: .6; cursor: progress; }
.form-status { margin: 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.error { color: #b3261e; }
.form-done { display: grid; gap: 8px; padding: 18px 4px; }
.form-done h3 { margin: 0; font: 800 1.8rem/1.1 var(--display); }
.form-done p { margin: 0; color: var(--ink-soft); }
.form-done:focus { outline: none; }

@media (max-width: 760px) {
  .access { grid-template-columns: 1fr; padding: 90px 16px 56px; gap: 26px; }
  .form { box-shadow: 5px 5px 0 var(--ink); border-radius: 20px; }
}

/* ---------- Section 7: Footer ---------- */
.foot {
  position: relative; z-index: 1; overflow: hidden; color: #d8efe4; background: var(--ink);
  padding: clamp(48px, 7vw, 80px) max(var(--gutter), calc((100% - 1160px) / 2)) 24px;
}
.foot a { text-decoration: none; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 40px; }
.foot-brand { display: grid; gap: 16px; justify-items: start; align-content: start; }
.foot .brand { color: #fff; }
.foot-brand p { margin: 0; max-width: 36ch; color: #b6d9c9; }
.foot-cta { padding: 14px 24px; font-size: .98rem; box-shadow: 4px 4px 0 #000; border-color: #000; }
.foot-cta:hover { box-shadow: 6px 6px 0 #000; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-cols h2 { margin: 0 0 12px; font: 600 .76rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--mint); }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-cols a { color: #e6f6ee; transition: color .15s; }
.foot-cols a:hover, .foot-base a:hover { color: var(--mint); }
.foot :focus-visible { outline-color: var(--mint); }
/* The giant wordmark: mint outline, filling the width. */
.foot-word {
  margin: clamp(32px, 5vw, 56px) 0 clamp(10px, 1.5vw, 18px); text-align: center; white-space: nowrap; user-select: none;
  font: 800 clamp(4rem, 20vw, 17rem)/.82 var(--display); letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: clamp(1.5px, .25vw, 3px) var(--mint); opacity: .85;
}
.foot-base {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px;
  border-top: 1.5px solid rgb(127 214 180 / .3); font-size: .86rem; color: #9cc6b3;
}
.foot-base p { margin: 0; }
.foot-base a { color: #d8efe4; }
@media (max-width: 760px) {
  .foot-top { grid-template-columns: 1fr; gap: 32px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
}

/* Reduced motion: no tear, no pinning; the sections simply follow each other and the track scrolls natively. */
@media (prefers-reduced-motion: reduce) {
  .tear { position: relative; margin-bottom: 0; height: auto; }
  .half { position: relative; }
  .face { position: relative; }
  .bottle { position: relative; height: auto; overflow: visible; perspective: none; background: none; }
  .glass { display: none; }
  .spin, .label-face, .face-a, .face-b { position: relative; transform: none; visibility: visible !important; }
  .strip { display: none !important; }
  .problems, .bench { min-height: 100svh; }
  .scene-space { display: none; }
  .fog { display: none; }
  .scene { display: flex; flex-direction: column; }
  .stage { order: 2; }
  .stage { position: relative; margin-bottom: 0; height: auto; visibility: visible; }
  .how { min-height: 100svh; }
  .stage-faq { order: 3; }
  .faq { min-height: 100svh; }
  .q { visibility: visible; }
  .q::after { transform: rotate(40deg); }
  .ball { display: none !important; }
  .graph { height: 520px; }
  .track { scroll-snap-type: x mandatory; }
  .card { scroll-snap-align: start; }
}

/* The hero arrives in three short steps. */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero > :nth-child(2) { animation-delay: .12s; }
  .hero > :nth-child(3) { animation-delay: .24s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
