/* ORGANIDIO home: the film (30 Nov 2026), on the pattern of ALKALIO's home film (alkalio-site/public/assets/site.css «the home film»,
   read only) in ORGANIDIO's teal. Four chapters, each a film from the game's own 3D (site/dev/hero/hero.mjs) that the scroll plays
   forwards and backwards (assets/scrub.js), with its words coming in word by word.
   🚨 Never hides by default: without scrub.js (no script, reduced motion, Save-Data) every chapter is a full picture with every line
   and button showing (reduced motion gets the film's last frame, a still). Only html.ch-scrub, set by scrub.js, makes the sections
   tall, pins the stage and hands the words to the scroll.
   🚨 The picture (.ch-p) lies UNDER the video (ALKALIO, 20 Nov: a picture over the video hid the scrub).
   Text never moves under the reader's finger: a chapter's words come in once and then stay where they are until the chapter
   scrolls away with the page; buttons only fade in, never slide. Loaded on the home page only. */
.ch{position:relative;background:#06100f;color:#fff}
.ch-stage{position:relative;min-height:100svh;overflow:hidden;display:grid;align-items:end}
.ch-frame{position:absolute;inset:0}
.ch-p,.ch-v{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;max-width:none}
.ch-p{z-index:0}
.ch-v{z-index:1;opacity:0;transition:opacity .35s ease}
.ch.ready .ch-v{opacity:1}
.ch-shade{position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(to top,rgba(4,14,13,.94) 0%,rgba(4,14,13,.72) 34%,rgba(4,14,13,.12) 62%,rgba(4,14,13,.3) 100%)}
.ch-num{position:absolute;z-index:4;right:max(16px,3vw);bottom:max(18px,4vh);font:700 clamp(64px,11vw,180px)/.8 var(--brandf);letter-spacing:-.02em;color:transparent;-webkit-text-stroke:1.5px rgba(255,255,255,.26);pointer-events:none;user-select:none}
.ch-cues{position:relative;z-index:5;display:grid;gap:28px;padding:96px 16px 10vh}
.cue{display:grid;gap:14px;justify-items:start;max-width:min(820px,100%)}
.ch .kick{display:inline-flex;align-items:center;gap:10px;margin:0;padding:6px 12px;border-radius:999px;background:#0e8a83;color:#fff;font:700 14px/1.3 var(--sans)}
.ch .eyebrow{margin:0;font:600 13px/1.3 var(--mono);letter-spacing:.08em;color:#7fe6dc}
.ch .eyebrow a{color:inherit;text-underline-offset:3px}
.kin{margin:0;color:#fff;font-weight:800;letter-spacing:-.02em;line-height:1.02;font-size:clamp(38px,5vw,84px);text-wrap:balance}
.kin em{font-style:normal;color:#5fe0d4}
/* the words stay readable where the film is light behind them (a white tile, a lit wall) */
.kin,.ch .sub,.ch .eyebrow,.ch .ctaNote{text-shadow:0 1px 2px rgba(4,14,13,.5),0 2px 22px rgba(4,14,13,.7)}
.kin.s{font-size:clamp(32px,4vw,64px);line-height:1.05}
.ch .sub{margin:0;max-width:38em;color:rgba(255,255,255,.9);font-size:clamp(17px,1.4vw,21px);line-height:1.5}
.ch .sub b{color:#fff}
.ch .cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:4px}
.ch .btn{background:#0e8a83;border-color:#0e8a83;color:#fff}
.ch .btn.ghost{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.6)}
.ch .btn.ghost:hover{border-color:#5fe0d4;color:#fff;background:rgba(95,224,212,.16)}
.ch .ctaNote{margin:0;font-size:14px;color:rgba(255,255,255,.75)}
.ch .cellmark{width:30px;height:30px;color:#fff;flex:none}
.ch .kick .cellmark .mx{fill:#fff}
.ch .kick .cellmark .cr{stroke:#0e8a83}
.ch .kick .cellmark .gr circle{fill:#0e8a83}
.ch .kick .cellmark .atp circle{fill:#fff}
.ch-cue-scroll{display:none}
/* word by word (scrub.js wraps each word of a .kin; the real text stays in the heading for readers and search) */
.kin .w{display:inline-block;white-space:nowrap}

/* scrub: tall sections, the stage pinned; at its end it scrolls up with its words still showing and the next follows */
html.ch-scrub .ch{height:calc(var(--len,240) * 1vh)}
html.ch-scrub .ch-stage{position:sticky;top:0;height:100vh;height:100svh;min-height:0}
html.ch-scrub .ch-cues{position:absolute;inset:0;max-width:none;margin:0;display:block;height:100%;padding:0}
html.ch-scrub .cue{position:absolute;left:16px;right:16px;bottom:max(28px,5vh);opacity:0}
html.ch-scrub .cue.on{pointer-events:auto}
html.ch-scrub .cue:not(.on){pointer-events:none;visibility:hidden}
html.ch-scrub .ch-cue-scroll{display:flex;position:absolute;z-index:6;left:50%;bottom:16px;transform:translateX(-50%);flex-direction:column;align-items:center;gap:8px;font:700 12px/1 var(--sans);letter-spacing:.12em;color:rgba(255,255,255,.75);transition:opacity .4s;pointer-events:none}
.ch-cue-scroll i{display:block;width:1px;height:36px;background:linear-gradient(rgba(255,255,255,.8),rgba(255,255,255,0));animation:chCue 1.8s ease-in-out infinite;transform-origin:top}
@keyframes chCue{0%{transform:scaleY(0)}50%{transform:scaleY(1)}100%{transform:scaleY(1);opacity:0}}
html.ch-scrub .ch-cue-scroll.off{opacity:0}

/* phones held upright (and any upright screen, below): the film's subject in the upper part, the words at the bottom */
@media (max-width:899px){
  .ch-num{top:72px;bottom:auto;right:14px;font-size:56px}
  .ch .btn.big{height:50px}
  html.ch-scrub .ch-cue-scroll{display:none}
}

/* an upright screen wider than a phone: the words a little further in */
@media (min-width:900px){.ch-cues{padding-inline:clamp(24px,5vw,64px)}html.ch-scrub .cue{left:clamp(24px,5vw,64px);right:clamp(24px,5vw,64px)}}
/* wide (a computer, a tablet on its side or a phone held sideways): the words on the left, the film's subject on the right */
/* (a tall screen, 1080 × 1920 say, keeps the upright layout: the portrait film, its subject above the words) */
@media (min-width:900px) and (min-aspect-ratio:9/10),(min-width:600px) and (min-aspect-ratio:4/3){
  .ch-shade{background:linear-gradient(90deg,rgba(4,14,13,.9) 0%,rgba(4,14,13,.6) 34%,rgba(4,14,13,0) 60%),linear-gradient(to top,rgba(4,14,13,.6),transparent 38%)}
  .ch-cues{padding:96px clamp(24px,6vw,150px) 10vh}
  .cue{max-width:min(820px,54vw)}
  html.ch-scrub .cue{left:clamp(24px,6vw,150px);right:auto;width:min(820px,52vw);bottom:11vh}
  .ch-num{top:auto;bottom:max(18px,4vh);right:max(16px,3vw);font-size:clamp(64px,11vw,180px)}
}
/* a short screen (a phone on its side): smaller words; the paragraph gives way to the heading and the buttons */
@media (max-height:520px) and (min-aspect-ratio:4/3){
  .kin,.kin.s{font-size:clamp(26px,4.4vw,40px)}
  .ch .sub,.ch .ctaNote{display:none}
  .cue{gap:10px}
  html.ch-scrub .cue{bottom:22px;width:min(820px,48vw)}
  .ch .btn.big{height:46px;font-size:15px;padding:0 18px}
  .ch-num{font-size:56px}
}
/* a phone upright: the heading a little smaller, so the film keeps the top half */
@media (max-width:599px){
  .kin{font-size:clamp(32px,9vw,44px)}
  .kin.s{font-size:clamp(28px,8vw,38px)}
  .ch .sub{font-size:16px}
}

/* the chapter rail: one way in per chapter, beside the film on wide screens */
.ch-rail{display:none}
@media (min-width:900px){
  html.ch-scrub .ch-rail{display:grid;position:fixed;z-index:15;right:18px;top:50%;transform:translateY(-50%);gap:6px;opacity:0;pointer-events:none;transition:opacity .35s}
  html.ch-scrub .ch-rail.on{opacity:1;pointer-events:auto}
  .ch-rail a{display:grid;grid-template-columns:auto 26px;align-items:center;justify-content:end;gap:10px;height:34px;color:rgba(255,255,255,.75);text-decoration:none;font:700 13px/1 var(--sans)}
  .ch-rail a b{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;border:1.5px solid rgba(255,255,255,.45);font-size:11px;background:rgba(4,14,13,.45)}
  .ch-rail a>span{opacity:0;transition:opacity .25s;background:rgba(4,14,13,.75);padding:5px 9px;border-radius:999px;white-space:nowrap}
  .ch-rail a:hover>span,.ch-rail a.on>span{opacity:1}
  .ch-rail a.on b{background:#0e8a83;border-color:#0e8a83;color:#fff}
  .ch-rail a:focus-visible{outline:2px solid #5fe0d4;outline-offset:2px;border-radius:999px}
}
@media (prefers-reduced-motion:reduce){.ch-cue-scroll i{animation:none}}
