/* אטלס הגוף, home page. Tokens come from tokens.css; the kit (premium3d.css) themes from :root here.
   Locked on scroll: nothing here is moved by a scroll handler. The 3D lives in its own boxes (hero, journey stage),
   the journey stage is sticky (native), chapter cards change by opacity, depth and turn, parallax rides view(). */

:root {
  --appbar-h: calc(60px + env(safe-area-inset-top));
  --p3-a: var(--left);
  --p3-b: #ffd6da;
  --p3-d: #02040a;
  --p3-solid: #0e1628;
  --p3-top: max(14px, env(safe-area-inset-top));
  --pad-x: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right));
  --soft: #c9d2df;
  --foot: #04070e;
  --wrap: 1240px;
}

html { background: var(--foot); overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--appbar-h); scrollbar-color: #26314a var(--ink); }
body { overflow-x: clip; }
::selection { background: rgba(255, 77, 94, .38); color: #fff; }
a { color: inherit; }
img, svg { display: block; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--pad-x)); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: 0 1.45em; border-radius: var(--r-pill);
  font: 600 1.04rem/1 var(--font-ui); text-decoration: none; white-space: nowrap; color: var(--text);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), color .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn .ic { width: 1.05em; height: 1.05em; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #d42a42, #9e1226);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 140, 150, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #e0334b, #a8152a); }
.btn-ghost {
  background: rgba(255, 255, 255, .045); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .38); }
.btn-sm { min-height: 44px; padding: 0 1.15em; font-size: .95rem; }
.btn-xl { min-height: 64px; padding: 0 2.1em; font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  background: radial-gradient(circle at 40% 35%, #ff8a95, var(--left) 55%, #a3172a); color: #fff;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.brand-mark .ic { width: 20px; height: 20px; }
.brand-name { font: 800 1.12rem/1 var(--font-display); letter-spacing: -.01em; }

/* ---------- 3D boxes (shared): the hero box and the journey stage, each holding its own canvas ---------- */
.body-box canvas.gl { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s var(--ease); }
.body-box.is-ready canvas.gl { opacity: 1; }
.sil { position: absolute; fill: rgba(159, 216, 255, .05); stroke: rgba(159, 216, 255, .42); stroke-width: 3.2; stroke-linejoin: round;
  transition: opacity 1s var(--ease); pointer-events: none; overflow: visible; }
.sil .sil-heart { fill: var(--left); stroke: none; transform-box: fill-box; transform-origin: center; animation: beat 1s infinite; }
.tag {
  position: absolute; left: 0; top: 0; z-index: 4; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px 6px 12px; border-radius: var(--r-pill); border: 1px solid;
  font: 600 .86rem/1 var(--font-ui); white-space: nowrap; pointer-events: none;
  background: rgba(6, 10, 19, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .45s var(--ease); will-change: transform, opacity;
}
.tag .ic { width: 13px; height: 13px; }
.tag-l { color: #ff7a87; border-color: rgba(255, 77, 94, .65); background-color: rgba(40, 8, 16, .66); }
.tag-r { color: var(--right); border-color: rgba(90, 209, 230, .6); background-color: rgba(6, 26, 34, .66); }
.tag::before { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: currentColor; outline: 3px solid color-mix(in srgb, currentColor 25%, transparent); }
.tag[data-dir="r"]::before { left: -15px; }
.tag[data-dir="l"]::before { right: -15px; }
.tag.is-on { opacity: 1; }

@keyframes beat { 0%, 100% { transform: scale(1); opacity: .85; } 8% { transform: scale(1.28); opacity: 1; } 22% { transform: scale(1.02); } 34% { transform: scale(1.16); opacity: .95; } 60% { transform: scale(1); } }

/* ---------- 1. hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: clip; min-height: 100svh;
  display: grid;
  grid-template-columns: var(--pad-x) minmax(0, 1fr) var(--pad-x);
  grid-template-rows: var(--appbar-h) auto minmax(250px, 1fr) auto auto;
  grid-template-areas: ". bar ." ". copy ." ". slot ." ". actions ." ". cue .";
  background:
    radial-gradient(70% 55% at 50% 62%, rgba(255, 77, 94, .13), transparent 70%),
    radial-gradient(60% 50% at 20% 10%, rgba(90, 209, 230, .08), transparent 70%),
    linear-gradient(180deg, #070b16 0%, var(--ink) 60%);
}
.hero-3d { position: absolute; inset: 0; z-index: 1; touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; }
.hero-3d.is-drag { cursor: grabbing; }
.hero-3d.is-ready ~ .hero-slot .sil { opacity: 0; }
/* the app bar stays on screen the whole way down: the app is always one tap away. It is fixed (no scroll handler),
   and every section below starts under it, so it covers nothing. */
.bar { position: fixed; z-index: 40; top: 0; inset-inline: 0; height: var(--appbar-h); box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: env(safe-area-inset-top) var(--pad-x) 0;
  background: linear-gradient(180deg, rgba(6, 10, 19, .86), rgba(6, 10, 19, .7));
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 10px 30px rgba(0, 0, 0, .28); }
.bar-end { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px;
  border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--soft); text-decoration: none;
  font: 600 .9rem/1 var(--font-ui); letter-spacing: .02em; }
.lang:hover { color: var(--text); border-color: rgba(255, 255, 255, .38); }
.btn-app { min-height: 44px; padding: 0 1.05em; font-size: .95rem; gap: .5em; white-space: nowrap; }
.btn .ic { flex: none; }
.bar .brand-name { white-space: nowrap; }
@media (max-width: 430px) {
  .bar { gap: 8px; }
  .bar .brand { gap: 8px; }
  .bar .brand-mark { width: 32px; height: 32px; }
  .bar .brand-name { font-size: 1rem; }
  .bar-end { gap: 8px; }
  .btn-app { padding: 0 .85em; font-size: .9rem; }
}
@media (max-width: 374px) { .bar .brand-name { display: none; } }
.app-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 clamp(12px, 2vh, 20px); padding: 7px 14px 7px 12px;
  border-radius: var(--r-pill); font: 600 clamp(.8rem, .76rem + .2vw, .92rem)/1.25 var(--font-ui); color: #ffd6da;
  background: linear-gradient(180deg, rgba(255, 77, 94, .2), rgba(255, 77, 94, .08)); border: 1px solid rgba(255, 77, 94, .42); }
.app-badge .ic { width: 18px; height: 18px; color: var(--left); flex: none; }
.hero-for { margin: 10px 0 0; max-width: 40ch; color: var(--text); font: 600 clamp(.95rem, .9rem + .3vw, 1.1rem)/1.5 var(--font-ui); }
.hero-copy { grid-area: copy; z-index: 3; padding-top: clamp(18px, 4vh, 44px); }
.hero-title { margin: 0; font: 900 clamp(3.1rem, 1.6rem + 6.4vw, 6rem)/.9 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.hero-title span { display: block; }
.hero-title-in { color: var(--left); }
.hero-lede { margin: clamp(14px, 2.4vh, 26px) 0 0; max-width: 36ch; color: var(--soft);
  font-size: clamp(1.02rem, .96rem + .36vw, 1.24rem); line-height: 1.6; text-wrap: pretty; }
.hero-slot { grid-area: slot; position: relative; pointer-events: none; min-height: 250px; }
.hero-slot::before { /* the heart's light behind the body (under the canvas) */
  content: ""; position: absolute; z-index: 0; left: 50%; top: 18%; width: min(560px, 120%); aspect-ratio: 1; translate: -50% -30%;
  background: radial-gradient(closest-side, rgba(255, 77, 94, .26), rgba(255, 77, 94, .07) 55%, transparent);
  pointer-events: none;
}
.hero-slot .sil { z-index: 0; inset: 0; width: 100%; height: 100%; }
/* a slow anatomical dial behind the body: the Vitruvian circle */
.dial { position: absolute; z-index: 0; left: 50%; top: 50%; height: min(100%, 94vw); aspect-ratio: 1; translate: -50% -50%; overflow: visible; fill: none; pointer-events: none; }
.dial-spin { transform-box: view-box; transform-origin: 0 0; animation: dial 160s linear infinite; }
.dial-ring { stroke: rgba(159, 216, 255, .13); stroke-width: .35; }
.dial-ticks { stroke: rgba(159, 216, 255, .32); stroke-width: 2.2; stroke-dasharray: .18 4.82; }
.dial-major { stroke: rgba(243, 239, 230, .5); stroke-width: 4; stroke-dasharray: .3 29.7; }
@keyframes dial { to { rotate: 360deg; } }
.hint {
  position: absolute; z-index: 3; inset-inline: 0; bottom: 4px; margin-inline: auto; width: max-content; max-width: 100%;
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--r-pill);
  font: 500 .84rem/1.2 var(--font-ui); color: var(--muted); background: rgba(6, 10, 19, .55); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hint b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hint .ic { width: 16px; height: 16px; color: var(--right); }
.hint-ready { display: none; align-items: center; gap: 8px; }
.hero-3d.is-ready ~ .hero-slot .hint-load { display: none; }
.hero-3d.is-ready ~ .hero-slot .hint-ready { display: inline-flex; }
.hero-3d.no-model ~ .hero-slot .hint { display: none; }
.hero-actions { grid-area: actions; z-index: 3; display: flex; flex-wrap: wrap; gap: 12px; padding-top: 14px; }
.cue { grid-area: cue; z-index: 3; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-height: 44px; padding: 14px 12px max(16px, env(safe-area-inset-bottom)); text-decoration: none; color: var(--muted); font-size: .82rem; }
.cue-line { position: relative; width: 2px; height: 34px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.cue-line i { position: absolute; inset-inline: 0; top: 0; height: 12px; border-radius: 2px; background: var(--left); animation: drip 2s var(--ease) infinite; }
@keyframes drip { from { transform: translateY(-12px); } to { transform: translateY(34px); } }

@media (max-width: 899px) and (orientation: portrait), (max-width: 639px) {
  .hero-actions { padding-bottom: 6px; }
  .hero-actions .btn { flex: 1 1 auto; min-width: 0; padding-inline: 1.1em; }
  .hero::after { /* scrim: the legs fade out under the buttons */
    content: ""; position: absolute; z-index: 2; inset-inline: 0; bottom: 0; height: 30%; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(6, 10, 19, .78) 55%, var(--ink));
  }
  .cue { display: none; }
  .hero { grid-template-rows: var(--appbar-h) auto minmax(260px, 1fr) auto; grid-template-areas: ". bar ." ". copy ." ". slot ." ". actions ."; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .hint { bottom: 0; }
}
@media (min-width: 900px), (orientation: landscape) and (min-width: 640px) {
  .hero {
    grid-template-columns: var(--pad-x) minmax(0, 1fr) minmax(0, 1.05fr) var(--pad-x);
    grid-template-rows: var(--appbar-h) 1fr auto auto 1.1fr auto;
    grid-template-areas: ". bar bar ." ". . slot ." ". copy slot ." ". actions slot ." ". . slot ." ". cue cue .";
    background:
      radial-gradient(48% 62% at 32% 46%, rgba(255, 77, 94, .14), transparent 70%),
      radial-gradient(50% 60% at 90% 0%, rgba(90, 209, 230, .07), transparent 70%),
      linear-gradient(180deg, #070b16 0%, var(--ink) 70%);
  }
  .hero-copy { padding-top: 0; }
  .hero-actions { padding-top: clamp(22px, 4vh, 36px); }
  .hero-slot { margin-block: 8px 0; }
  .hint { bottom: -18px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .hero-title { font-size: clamp(2.4rem, 1rem + 5vw, 3.4rem); }
  .hero-lede { font-size: 1rem; margin-top: 10px; }
  .cue { display: none; }
  .hero { grid-template-rows: var(--appbar-h) 1fr auto auto 1fr 0; }
  .hint { bottom: max(8px, env(safe-area-inset-bottom)); }
}

/* ---------- 2. journey ---------- */
.journey { position: relative; overflow-x: clip; background: var(--ink); }
.stage { position: sticky; top: 0; height: 100svh; isolation: isolate; overflow: visible; }
.steps { margin-top: -100svh; pointer-events: none; }
.step { height: 100svh; }

/* the worlds reach under the phone toolbar's collapse (100lvh - 100svh), so the stage never shows a hard edge */
.worlds { position: absolute; inset: 0 0 calc(100svh - 100lvh); z-index: 0; pointer-events: none; background: #070a13; }
.world { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.world::before, .world::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.world:first-child { opacity: 1; }
.w-skin {
  background:
    radial-gradient(34% 52% at var(--cx, 50%) 44%, rgba(255, 178, 128, .34), rgba(255, 128, 80, .1) 55%, transparent 76%),
    radial-gradient(90% 60% at var(--cx, 50%) -10%, rgba(255, 210, 160, .16), transparent 62%),
    linear-gradient(180deg, #170e0c, #0b0708 70%);
}
.w-skin::after { background: radial-gradient(60% 18% at var(--cx, 50%) 96%, rgba(255, 170, 120, .16), transparent 70%); }
.w-muscles {
  background:
    radial-gradient(32% 50% at var(--cx, 50%) 46%, rgba(255, 60, 80, .42), rgba(150, 12, 34, .26) 52%, transparent 78%),
    radial-gradient(80% 70% at var(--cx, 50%) 110%, rgba(120, 6, 24, .5), transparent 70%),
    linear-gradient(180deg, #1c0509, #0a0204 75%);
}
.w-muscles::before { /* muscle fibre */
  background: repeating-linear-gradient(112deg, rgba(255, 110, 120, .07) 0 1.5px, transparent 1.5px 9px);
  -webkit-mask-image: radial-gradient(42% 60% at var(--cx, 50%) 46%, #000, transparent 75%);
  mask-image: radial-gradient(42% 60% at var(--cx, 50%) 46%, #000, transparent 75%);
}
.w-skeleton {
  background:
    radial-gradient(30% 50% at var(--cx, 50%) 46%, rgba(130, 196, 255, .32), rgba(40, 96, 180, .16) 52%, transparent 78%),
    linear-gradient(180deg, #06101f, #03070f 80%);
}
.w-skeleton::before { /* the lightbox grid of a radiograph */
  background-image: linear-gradient(rgba(150, 205, 255, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 205, 255, .09) 1px, transparent 1px);
  background-size: 46px 46px; background-position: var(--cx, 50%) 0;
  -webkit-mask-image: radial-gradient(46% 66% at var(--cx, 50%) 48%, #000 20%, transparent 78%);
  mask-image: radial-gradient(46% 66% at var(--cx, 50%) 48%, #000 20%, transparent 78%);
}
.w-skeleton::after { background: radial-gradient(70% 30% at var(--cx, 50%) 100%, rgba(90, 209, 230, .14), transparent 70%); }
.w-organs {
  background:
    radial-gradient(22% 30% at calc(var(--cx, 50%) + 4%) 38%, rgba(255, 77, 94, .26), transparent 72%),
    radial-gradient(34% 44% at calc(var(--cx, 50%) + 12%) 34%, rgba(150, 100, 255, .26), transparent 72%),
    radial-gradient(36% 48% at calc(var(--cx, 50%) - 12%) 62%, rgba(40, 200, 190, .22), transparent 72%),
    linear-gradient(180deg, #0a0a1d, #05060f 80%);
}
.w-heart {
  background:
    radial-gradient(16% 20% at calc(var(--cx, 50%) + 1.5%) 40%, rgba(255, 77, 94, .42), transparent 72%),
    linear-gradient(90deg, rgba(90, 209, 230, .26), rgba(90, 209, 230, .07) calc(var(--cx, 50%) - 1px), rgba(255, 77, 94, .08) calc(var(--cx, 50%) + 1px), rgba(255, 77, 94, .3)),
    linear-gradient(180deg, #080b15, #05070e 80%);
}
.w-heart::before { /* the wash fades towards top and bottom */
  background: linear-gradient(180deg, rgba(7, 10, 19, .7), transparent 22%, transparent 74%, rgba(5, 7, 14, .85));
}

.journey-slot { position: absolute; z-index: 1; pointer-events: none; }
.journey-slot .sil { inset: 0; width: 100%; height: 100%; }
.stage.is-ready .journey-slot .sil { opacity: 0; }

.stage-head { position: absolute; z-index: 4; }
.stage-title { margin: 0; font: 900 clamp(1.5rem, 1rem + 1.6vw, 2.6rem)/1 var(--font-display); letter-spacing: -.02em; }
.rail-wrap { position: relative; }
.rail { list-style: none; margin: 0; padding: 0; display: flex; }
.rail a {
  position: relative; display: flex; align-items: center; gap: 9px; min-height: 44px; text-decoration: none;
  color: rgba(243, 239, 230, .52); font: 600 .95rem/1.1 var(--font-ui); transition: color .4s var(--ease);
}
.rail a b { font: 700 .76rem/1 var(--font-display); letter-spacing: .06em; color: rgba(243, 239, 230, .55); transition: color .4s var(--ease); }
.rail a::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: rgba(243, 239, 230, .45); transition: background-color .4s; }
.rail a:hover { color: var(--text); }
.rail a[aria-current="step"] { color: var(--text); }
.rail a[aria-current="step"] b { color: var(--left); }
.rail a[aria-current="step"]::after { background: var(--left); outline: 3px solid rgba(255, 77, 94, .28); }
.rail-track { position: absolute; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
.rail-track i { position: absolute; inset: 0; background: linear-gradient(var(--track-dir, 180deg), var(--right), var(--left)); transform-origin: var(--track-origin, 50% 0); transform: scaleY(var(--rail, 0)); transition: transform .5s var(--ease); }
@supports (animation-timeline: view()) {
  .journey { view-timeline: --journey block; }
  .rail-track i { transition: none; animation: rail-fill linear both; animation-timeline: --journey; animation-range: contain 0% contain 100%; }
}
@keyframes rail-fill { from { transform: scaleY(.0001); } to { transform: scaleY(1); } }

/* the five cards share one place (absolutely stacked, not a row): only the chapter in view is shown */
.chapters { position: absolute; z-index: 4; perspective: 1400px; }
.chapter { position: absolute; inset-inline: 0; top: 0; bottom: 0; height: fit-content; margin-block: auto; opacity: 0; pointer-events: none;
  transform: translateZ(-160px) rotateY(var(--turn, -26deg)); transform-origin: 50% 50%;
  transition: opacity .55s var(--ease), transform .9s var(--ease); }
.chapter.is-past { --turn: 26deg; }
.chapter.is-on { opacity: 1; pointer-events: auto; transform: translateZ(0) rotateY(0deg); transition-delay: .12s; }
.chapter .glass { position: relative; }
.glass {
  border-radius: var(--r-lg); padding: 22px 24px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 42%, rgba(255, 255, 255, .04)), var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); overflow: hidden;
}
@media (min-width: 900px) { .glass { padding: 26px 28px; } }
@media (min-width: 1440px) { .glass { padding: 30px 32px; } }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--gloss); pointer-events: none; }
.glass::after { /* the gloss band that crosses a card when its chapter arrives */
  content: ""; position: absolute; top: -30%; bottom: -30%; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .06) 30%, rgba(255, 255, 255, .34) 50%, rgba(255, 255, 255, .06) 70%, transparent);
  transform: skewX(-16deg); opacity: 0;
}
.chapter.is-on .glass::after { animation: sweep 1.25s var(--ease) .2s both; }
@keyframes sweep { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }
.chapter h3 { margin: 0; font: 800 clamp(1.7rem, 1.1rem + 1.7vw, 2.75rem)/1.05 var(--font-display); letter-spacing: -.02em; }
.chapter h3 b { display: inline-block; margin-inline-end: .35em; font: 700 max(13px, .4em)/1 var(--font-display); letter-spacing: .08em; vertical-align: .95em; color: var(--left); }
.chapter p { margin: 12px 0 0; color: var(--soft); font-size: clamp(1.02rem, .96rem + .3vw, 1.2rem); line-height: 1.55; text-wrap: pretty; }
.keys { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; font-size: .9rem; color: var(--muted); }
.keys li { display: inline-flex; align-items: center; gap: 7px; }
.keys li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); outline: 2px solid color-mix(in srgb, var(--c) 30%, transparent); }

/* journey: phone */
@media (max-width: 899px) and (orientation: portrait), (max-width: 639px) {
  .stage-head { top: calc(var(--appbar-h) + 10px); inset-inline: var(--pad-x); }
  .stage-title { font-size: 1.3rem; }
  .rail-wrap { margin-top: 6px; }
  .rail { justify-content: space-between; }
  .rail li { flex: 1 1 0; min-width: 0; }
  .rail a { flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .8rem; min-height: 52px; padding-bottom: 12px; }
  .rail a::after { bottom: -2.5px; left: 50%; margin-left: -3.5px; }
  .rail-track { inset-inline: 0; bottom: 0; height: 2px; --track-dir: 270deg; }
  .rail-track i { transform-origin: 100% 50%; transform: scaleX(var(--rail, 0)); }
  @supports (animation-timeline: view()) { .rail-track i { animation-name: rail-fill-x; } }
  .journey-slot { top: calc(var(--appbar-h) + 112px); inset-inline: var(--pad-x); bottom: calc(var(--card-h, 200px) + max(14px, env(safe-area-inset-bottom)) + 10px); }
  .chapters { inset-inline: var(--pad-x); bottom: max(14px, env(safe-area-inset-bottom)); height: var(--card-h, 200px); }
  .chapter { top: auto; margin-block: 0; }
  .chapter .glass { background: linear-gradient(155deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 42%), rgba(9, 14, 26, .74); }
  .chapter.is-on .glass { border-color: rgba(255, 77, 94, .5); }
  .chapter h3 { font-size: clamp(1.45rem, 1rem + 2.4vw, 1.9rem); }
  .chapter p { margin-top: 8px; font-size: 1rem; }
  .keys { margin-top: 10px; font-size: .84rem; gap: 4px 12px; }
}
@keyframes rail-fill-x { from { transform: scaleX(.0001); } to { transform: scaleX(1); } }

/* journey: desktop and landscape */
@media (min-width: 900px), (orientation: landscape) and (min-width: 640px) {
  .stage-head { inset-inline-end: var(--pad-x); top: calc(50% + var(--appbar-h) / 2); translate: 0 -50%; display: grid; gap: 18px; }
  .stage-title { order: -1; font-size: clamp(1.4rem, 1rem + 1.1vw, 2rem); }
  .rail { flex-direction: column; padding-inline-start: 18px; }
  .rail a { min-height: 46px; }
  .rail a::after { top: 50%; margin-top: -3.5px; inset-inline-start: -20.5px; }
  .rail-track { inset-inline-start: 0; top: 23px; bottom: 23px; width: 2px; }
  .journey-slot { top: calc(var(--appbar-h) + 3svh); bottom: 5svh; inset-inline-start: 34%; inset-inline-end: 22%; }
  .chapters { inset-inline-start: var(--pad-x); top: var(--appbar-h); bottom: 0; width: min(440px, 31vw); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .stage-head { gap: 6px; }
  .rail a { min-height: 44px; font-size: .86rem; }
  .chapter h3 { font-size: 1.5rem; }
  .chapter p { font-size: .98rem; }
  .keys { display: none; }
}

/* ---------- 3. what you can do ---------- */
.tools { position: relative; padding: clamp(80px, 12vw, 160px) 0 clamp(70px, 9vw, 130px); background: linear-gradient(180deg, var(--ink), #070c18 40%, var(--ink)); }
.tools-glow { position: absolute; inset: 10% -10% auto; height: 70%; pointer-events: none;
  background: radial-gradient(40% 50% at 50% 50%, rgba(120, 180, 255, .1), transparent 70%), radial-gradient(25% 30% at 70% 40%, rgba(255, 77, 94, .08), transparent 70%); }
.section-title { margin: 0; font: 900 clamp(2.2rem, 1.3rem + 3.4vw, 4.4rem)/1 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.section-lede { margin: 16px 0 0; max-width: 46ch; color: var(--soft); font-size: clamp(1.02rem, .96rem + .3vw, 1.2rem); }
.films { list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; display: grid; gap: clamp(14px, 1.6vw, 22px);
  grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
.film { position: relative; border-radius: var(--r-lg); }
.film:nth-child(even) { margin-top: clamp(28px, 4vw, 64px); }
.film-link {
  position: relative; display: flex; flex-direction: column; gap: 16px; height: 100%; padding: 14px 14px 18px; border-radius: inherit; text-decoration: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .015) 46%), var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  transition: border-color .35s var(--ease), background-color .35s;
}
.film-link::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--gloss); pointer-events: none; }
.film-link:hover { border-color: rgba(255, 255, 255, .3); }
.film-art {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.08; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(70% 62% at 50% 46%, rgba(190, 222, 255, .2), rgba(70, 120, 200, .07) 62%, transparent),
    linear-gradient(180deg, #0b1528, #070d1a);
  border: 1px solid rgba(170, 210, 255, .14);
}
.film-art .art { width: 78%; height: 78%; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.art-sil { fill: rgba(170, 215, 255, .12); stroke: rgba(190, 225, 255, .75); stroke-width: 9; }
.art-cross { stroke: var(--left); stroke-width: 2.2; }
.art-ring { stroke: rgba(190, 225, 255, .7); stroke-width: 2; }
.art-ring-2 { stroke: rgba(255, 77, 94, .7); }
.art-dot { fill: var(--left); }
.art-half-l { fill: rgba(255, 77, 94, .24); }
.art-half-r { fill: rgba(90, 209, 230, .2); }
.art-mid { stroke: #fff; stroke-width: 1.6; stroke-dasharray: 3 4; opacity: .8; }
.art-lung { fill: rgba(231, 154, 160, .2); stroke: #f0b4ba; stroke-width: 2; }
.art-trachea { stroke: #f0b4ba; stroke-width: 2.4; }
.art-heart { fill: var(--left); }
.art-sheet { fill: rgba(190, 225, 255, .06); stroke: rgba(190, 225, 255, .6); stroke-width: 2; }
.art-ecg { stroke: var(--left); stroke-width: 2.6; }
.art-rows { stroke: rgba(190, 225, 255, .45); stroke-width: 2.4; }
.pop {
  position: absolute; inset-inline-start: 12px; bottom: 12px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  color: #fff; background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, .28), rgba(255, 255, 255, .06) 60%), rgba(20, 30, 52, .7);
  border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.pop .ic { width: 22px; height: 22px; }
.pop-heart { color: var(--left); }
.film-text { display: grid; gap: 8px; padding-inline: 4px; }
.film-title { font: 800 clamp(1.12rem, .98rem + .45vw, 1.35rem)/1.15 var(--font-display); letter-spacing: -.01em; }
.film-line { color: var(--soft); font-size: .95rem; line-height: 1.5; }
.film-go { margin-top: auto; align-self: flex-end; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--text); transition: background-color .35s var(--ease), border-color .35s, color .35s; }
.film-link:hover .film-go, .film-link:focus-visible .film-go { background: var(--left); border-color: var(--left); color: #fff; }
.film-go .ic { width: 18px; height: 18px; }

@media (max-width: 1099px) {
  .films { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .film:nth-child(even) { margin-top: 0; }
}
@media (max-width: 860px) {
  .films { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .film-link { flex-direction: row; align-items: center; gap: 14px; padding: 12px; background-color: var(--p3-solid); }
  .film-art { width: 108px; flex: none; aspect-ratio: 1; border-radius: 14px; }
  .film-art .art { width: 84%; height: 84%; }
  .pop { width: 32px; height: 32px; border-radius: 10px; inset-inline-start: 6px; bottom: 6px; }
  .pop .ic { width: 17px; height: 17px; }
  .film-text { flex: 1; min-width: 0; padding: 0; gap: 4px; }
  .film-line { font-size: .9rem; }
  .film-go { position: absolute; inset-inline-end: 10px; top: 10px; width: 28px; height: 28px; border: 0; color: var(--muted); }
  .film-go .ic { width: 16px; height: 16px; }
  .film-text { padding-inline-end: 22px; }
  .p3-live .films.p3-stack > .film { border-radius: var(--r-lg); }
}

/* ---------- 4. for whom + closing call ---------- */
.close { position: relative; overflow: clip; padding: clamp(90px, 13vw, 180px) 0 clamp(90px, 12vw, 170px); text-align: center;
  background: radial-gradient(60% 60% at 50% 60%, rgba(255, 77, 94, .1), transparent 70%), var(--ink); }
.close-pulse { position: absolute; left: 50%; top: 50%; width: min(70vw, 620px); aspect-ratio: 1; margin: calc(min(70vw, 620px) / -2) 0 0 calc(min(70vw, 620px) / -2);
  display: grid; place-items: center; color: rgba(255, 77, 94, .1); pointer-events: none; }
.close-pulse .ic { width: 100%; height: 100%; filter: blur(3px); animation: beat 1s infinite; }
.close-wrap { position: relative; display: grid; justify-items: center; gap: clamp(34px, 5vw, 54px); }
.close-title { margin: 0; max-width: 22ch; font: 800 clamp(1.8rem, 1.1rem + 2.8vw, 3.7rem)/1.12 var(--font-display); letter-spacing: -.025em; text-wrap: balance; }
.close-title span { display: block; color: var(--left); }

/* ---------- 5. footer ---------- */
.foot { background: var(--foot); border-top: 1px solid var(--line); padding: 44px 0 calc(34px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .9rem; }
.foot-wrap { display: grid; gap: 10px; justify-items: start; }
.foot .brand { margin-bottom: 8px; color: var(--text); }
.foot p { margin: 0; max-width: 70ch; }
.foot-note { color: var(--soft); }
.foot-credit { font-size: .82rem; }
.foot-credit .latin { font-size: .78rem; }
.foot a:not(.brand) { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; }
.foot a:not(.brand):hover { text-decoration-color: var(--left); }
.foot-by { margin-top: 10px !important; }

/* ---------- no JS, no WebGL, reduced motion ---------- */
html:not(.js) .stage { position: relative; height: auto; min-height: 100svh; }
html:not(.js) .steps { display: none; }
html:not(.js) .chapters { position: relative; inset: auto; width: auto; display: grid; gap: 16px; padding: 140px var(--pad-x) 40px; }
html:not(.js) .chapter { position: relative; inset: auto; opacity: 1; transform: none; }
html.no-gl .body-box canvas.gl { display: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chapter, .chapter.is-past { transform: none; }
  .chapter.is-on .glass::after { animation: none; }
  .sil .sil-heart, .close-pulse .ic, .cue-line i, .dial-spin { animation: none; }
}
