/* Leinaki landing page, version 2 ("ink and signal"), 3 Dec 2026, ALLEINA-103713.
   Manrope only (no third face; figures use tabular-nums). Three body sizes below the hero: --h2, --body, --small.
   Motion: scroll-driven where supported (gated per modern-web-guidance "scrollytelling"), an IntersectionObserver
   class fallback from site.js elsewhere, and nothing at all under prefers-reduced-motion. Transform and opacity only,
   so layout never shifts. */

@font-face{font-family:Manrope;font-weight:400;font-display:swap;src:url(fonts/manrope-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:Manrope;font-weight:500;font-display:swap;src:url(fonts/manrope-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:Manrope;font-weight:700;font-display:swap;src:url(fonts/manrope-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:Manrope;font-weight:800;font-display:swap;src:url(fonts/manrope-latin-800-normal.woff2) format("woff2")}

:root{
  color-scheme:light dark;
  --ink:#0f131a; --blue:#518de1; --lime:#8BC34A; --amber:#F5A623;
  --text:light-dark(#0f131a,#eef2f8);
  --muted:light-dark(#536d93,#a3b1c6);
  --bg:light-dark(#f6f7f8,#0f131a);
  --surface:light-dark(#ffffff,#161b24);
  --line:light-dark(#e8ecf2,#263042);
  --ring:light-dark(rgba(15,19,26,.08),rgba(255,255,255,.08));
  --h2:clamp(1.75rem,1.05rem + 2.2vw,2.75rem);
  --body:1.0625rem;
  --small:.875rem;
  --ease:cubic-bezier(.22,1,.36,1);
}
:root[data-theme="light"]{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark}
@view-transition{navigation:auto}

*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:84px;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font:400 var(--body)/1.6 Manrope,ui-sans-serif,system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums}
img,video,svg{display:block;max-width:100%}
a{color:inherit}
h1,h2,h3{margin:0;text-wrap:balance}
p{margin:0}
.wrap{width:min(1200px,100% - 48px);margin-inline:auto}
.skip{position:absolute;left:-999px;top:8px;z-index:20;background:var(--surface);color:var(--text);padding:10px 14px;border-radius:8px}
.skip:focus{left:12px}
:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:6px}

/* Links: the underline grows from the left on hover and on keyboard focus. */
.u{text-decoration:none;background:linear-gradient(currentColor,currentColor) 0 100%/0 2px no-repeat;
  transition:background-size 240ms var(--ease)}
.u:hover,.u:focus-visible{background-size:100% 2px}

/* One primary button per section; its focus ring opens outwards. */
.btn{display:inline-flex;align-items:center;min-height:48px;padding:0 22px;border-radius:8px;background:var(--blue);color:#fff;
  font-weight:700;text-decoration:none;outline:2px solid transparent;outline-offset:0;
  transition:transform 180ms var(--ease),background-color 180ms var(--ease),outline-offset 240ms var(--ease),outline-color 240ms var(--ease)}
.btn:hover{background:#3f7bd2;transform:translateY(-2px)}
.btn:focus-visible{outline-color:var(--blue);outline-offset:5px}

/* Header: transparent over the ink hero, a surface once the hero has scrolled away (site.js sets .scrolled). */
.top{position:fixed;inset:0 0 auto;z-index:10;color:#fff;transition:background-color 220ms var(--ease),color 220ms var(--ease),box-shadow 220ms var(--ease)}
.top.scrolled{background:color-mix(in srgb,var(--surface) 92%,transparent);color:var(--text);backdrop-filter:blur(12px);box-shadow:0 1px 0 var(--line)}
.bar{display:flex;align-items:center;gap:28px;height:72px}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none}
.brand b{display:block;font-size:1.375rem;font-weight:800;letter-spacing:-.02em;line-height:1.1}
.brand small,.foot-brand small{display:block;font-size:var(--small);opacity:.75}
.mark{flex:none;border-radius:9px}
.main{display:flex;gap:26px;margin-left:auto;font-weight:600;font-size:var(--small)}
.langs{display:inline-flex;border:1px solid color-mix(in srgb,currentColor 30%,transparent);border-radius:999px;padding:3px;font-size:var(--small);font-weight:700}
.langs a{padding:4px 11px;border-radius:999px;text-decoration:none;transition:background-color 180ms var(--ease),color 180ms var(--ease)}
.top:not(.scrolled) .langs a[aria-current]{background:#fff;color:var(--ink)}
.top.scrolled .langs a[aria-current]{background:var(--text);color:var(--bg)}

/* Hero: ink from the top edge, with the Leinaki mark's own fade rising from below as the page's one gradient. */
.hero{position:relative;color:#fff;padding:148px 0 56px;overflow:clip;
  background:radial-gradient(120% 62% at 50% 108%,#518de1 0%,rgba(81,141,225,.38) 34%,rgba(81,141,225,0) 64%),var(--ink)}
.hero-copy{text-align:center;display:grid;justify-items:center;gap:26px}
.hero-mark{border-radius:22px;box-shadow:0 20px 60px -20px rgba(81,141,225,.6)}
h1{font-size:clamp(2.75rem,1rem + 6.2vw,6.25rem);line-height:.98;font-weight:800;letter-spacing:-.035em;max-width:14ch}
.w{display:inline-block}
.lead{max-width:44ch;color:#c8d4e6}
.stage{margin-top:64px;max-width:1080px}
.note{margin-top:18px;text-align:center;font-size:var(--small);color:#9fb0c8}

/* Film players: the poster lifts and the play disc grows on hover and focus. The hero's AiKi label sits above its
   frame, outside the poster, so it never meets the film's burned-in subtitle; the cards carry no label at all. */
.player{position:relative;border-radius:14px;overflow:clip;background:#0f131a;box-shadow:0 0 0 1px var(--ring),0 24px 60px -28px rgba(15,19,26,.5);
  transition:transform 240ms var(--ease),box-shadow 240ms var(--ease)}
.player video{width:100%;height:auto;aspect-ratio:16/9}
/* The disc sits top right on a card and right of centre on the hero: measured clear of text on every poster
   (logs/leinaki/v2/notes.md), so it covers no title, subtitle or recording line. */
.play{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:flex-end;border:0;padding:14px;
  background:none;color:#fff;cursor:pointer;font:inherit}
.player.big .play{padding:clamp(14px,2vw,22px)}
.player.hero-film .play{align-items:center}
.play .disc{flex:none;display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:#fff;color:var(--blue);
  box-shadow:0 0 0 1px rgba(15,19,26,.08),0 10px 30px rgba(15,19,26,.3);transition:transform 200ms var(--ease)}
.player.big .play .disc{width:78px;height:78px}
.stage-by{display:flex;align-items:center;gap:10px;margin:0 0 12px;font-size:var(--small);font-weight:700;color:#fff}
.stage-by .aiki{width:42px;color:#fff}
.play .glyph{width:46%;height:46%;margin-left:6%}
.player:hover,.player:has(.play:focus-visible){transform:translateY(-4px);box-shadow:0 0 0 1px var(--ring),0 34px 70px -28px rgba(15,19,26,.6)}
.play:hover .disc,.play:focus-visible .disc{transform:scale(1.1)}
.play:focus-visible{outline-offset:-4px;border-radius:14px}
.player.playing .play{display:none}
html:not(.js) .play{display:none}

/* Sections: shared heading rhythm. */
/* overflow-x: clip keeps a reveal's sideways start offset from widening the page (Chrome measured 40 px at 390 px)
   without making the section a scroll container. */
section{padding:clamp(72px,9vw,128px) 0;overflow-x:clip}
h2{font-size:var(--h2);line-height:1.12;font-weight:800;letter-spacing:-.025em;max-width:22ch}
.intro{margin-top:14px;color:var(--muted);max-width:60ch}

/* Problems: editorial rows that differ, not one card seven times. */
.problems .intro{margin-bottom:clamp(24px,4vw,48px)}
.problem{display:grid;grid-template-columns:5fr 7fr;gap:clamp(28px,5vw,80px);align-items:center;padding-block:clamp(36px,5vw,72px);border-top:1px solid var(--line)}
.problem.v-b .still{order:2}
.still{margin:0;border-radius:14px;overflow:clip;background:var(--surface);box-shadow:0 0 0 1px var(--ring),0 18px 50px -30px rgba(15,19,26,.45)}
.still img{width:100%;height:auto}
.statement{font-size:var(--h2);line-height:1.15;font-weight:700;letter-spacing:-.02em;max-width:18ch}
.answer{display:flex;gap:16px;align-items:flex-start;margin-top:22px;max-width:52ch}
.who{position:relative;flex:none;width:52px;padding-top:4px;color:var(--blue)}
.who .aiki{width:100%;height:auto}
.go{display:inline-block;margin-top:18px;margin-left:68px;font-weight:700;color:var(--blue)}
.problem.v-wide{grid-template-columns:1fr;gap:28px}
.problem.v-wide .statement{max-width:24ch}
.problem.v-wide .copy{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:end}
.problem.v-wide .copy .answer{margin-top:0}
.problem.v-wide .go{grid-column:2;margin-top:-6px}
.pair-row{display:grid;grid-template-columns:1fr 1fr;gap:clamp(28px,4vw,56px);border-top:1px solid var(--line)}
.pair-row .problem{grid-template-columns:1fr;border-top:0;align-items:start}
.pair-row .still img{aspect-ratio:4/3;object-fit:cover;object-position:top}

/* AiKi's pulse: a ring opens around the mark three times when it comes into view, then rests (no idle loop). */
.who::after{content:"";position:absolute;inset:-6px -8px;border:2px solid var(--blue);border-radius:12px;opacity:0;pointer-events:none}
.live.who::after{animation:pulse 1.6s var(--ease) 3}
@keyframes pulse{0%{opacity:.7;transform:scale(.7)}100%{opacity:0;transform:scale(1.35)}}

/* Films: one feature, then four. The step count counts up when the card comes into view (site.js). */
.films{background:var(--surface)}
.film-grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(28px,4vw,48px);margin-top:clamp(28px,4vw,48px)}
.film.feature{grid-column:1/-1;display:grid;grid-template-columns:7fr 5fr;gap:clamp(24px,4vw,56px);align-items:center}
.film .meta{padding-top:18px}
.film.feature .meta{padding-top:0}
.film h3{font-size:var(--body);line-height:1.4;font-weight:800}
.film.feature h3{font-size:var(--h2);line-height:1.15}
.film p{color:var(--muted);margin-top:8px;max-width:48ch}
.facts{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:var(--small);font-weight:600}
.facts span+span::before{content:"·";margin-right:18px;color:var(--line)}
.facts b{color:var(--text);font-weight:800}

/* How AiKi works: one real screen, assembled from three bands as the visitor scrolls. */
.how{background:var(--ink);color:#fff}
.how h2{max-width:14ch}
.how-grid{display:grid;grid-template-columns:5fr 7fr;gap:clamp(32px,5vw,88px);align-items:center}
.beat{margin-top:26px;color:#a9b7cc;max-width:42ch;transition:color 400ms var(--ease)}
.beat b{color:#fff;font-weight:700}
.beat.on{color:#dbe4f1}
.screen{position:relative;margin:0;aspect-ratio:800/760;border-radius:14px;background:#161b24;box-shadow:0 0 0 1px rgba(255,255,255,.08),0 40px 90px -40px rgba(81,141,225,.55)}
.layer{position:absolute;inset:0;border-radius:14px;background-size:100% 100%;background-repeat:no-repeat}
.l0{clip-path:inset(0 0 64% 0 round 14px 14px 0 0)}
.l1{clip-path:inset(36% 0 30% 0)}
.l2{clip-path:inset(70% 0 0 0 round 0 0 14px 14px)}
.waits{position:absolute;left:18px;bottom:-22px;display:flex;align-items:center;gap:12px;padding:10px 16px 10px 12px;border-radius:12px;
  background:var(--blue);color:#fff;font-size:var(--small);font-weight:700;box-shadow:0 14px 30px -12px rgba(81,141,225,.8)}
.waits .aiki{width:40px;color:#fff}
.live.waits{animation:nudge 1.6s var(--ease) 3}
@keyframes nudge{0%,100%{transform:none}40%{transform:translateY(-6px)}}

/* Contact: part of the page, the Leinaki mark beside it. */
.contact-grid{display:grid;grid-template-columns:auto 1fr;gap:clamp(28px,5vw,72px);align-items:start}
.contact-mark{border-radius:26px;box-shadow:0 24px 60px -24px rgba(81,141,225,.55)}
.contact p{margin-top:14px;color:var(--muted);max-width:52ch}
.contact .btn{margin-top:28px}
.contact .direct{margin-top:18px}
.contact .direct a{color:var(--blue);font-weight:700}

footer{border-top:1px solid var(--line);padding:36px 0 44px;font-size:var(--small);color:var(--muted)}
.foot{display:grid;grid-template-columns:auto 1fr auto;gap:20px 40px;align-items:center}
.foot-brand{display:flex;align-items:center;gap:10px;color:var(--text)}
.foot-brand b{font-weight:800;font-size:var(--body)}
.foot-aiki{display:flex;align-items:center;gap:12px}
.foot-aiki .aiki{width:44px;flex:none;color:var(--blue)}
footer nav{display:flex;gap:18px;flex-wrap:wrap}

/* ── Motion ─────────────────────────────────────────────────────────────────────────────────────────────────────
   Every element with data-reveal starts from its --from offset. site.js puts "sda" on <html> where scroll-driven
   animations work and "io" where they do not; with reduced motion it puts neither, and nothing moves. */
[data-reveal="left"]{--from:translateX(-56px)}
[data-reveal="right"]{--from:translateX(56px)}
[data-reveal="up"]{--from:translateY(32px)}
[data-reveal="scale"]{--from:scale(.93)}

html.io [data-reveal]{opacity:0;transform:var(--from);transition:opacity 700ms var(--ease),transform 700ms var(--ease);
  transition-delay:calc(var(--i,0) * 110ms)}
html.io [data-reveal].in{opacity:1;transform:none}

@supports ((animation-timeline: view()) and (animation-range: 0% 100%)){
  /* Each reveal finishes by "entry 100%" (the element fully on screen), which any element that fits the viewport
     reaches, so nothing near the end of the page can be left half-faded. */
  html.sda [data-reveal]{animation:reveal linear both;animation-timeline:view();
    animation-range:entry calc(var(--i,0) * 8%) entry calc(72% + var(--i,0) * 8%)}
  /* The stills settle a little more slowly than the words beside them. */
  html.sda .still[data-reveal]{animation-range:entry 0% entry 100%}
  /* The hero headline drifts up and fades a touch as the page scrolls past it. */
  html.sda .hero-copy{animation:drift linear both;animation-timeline:view();animation-range:exit 0% exit 100%}
}
@keyframes reveal{from{opacity:0;transform:var(--from)}to{opacity:1;transform:none}}
@keyframes drift{to{opacity:.35;transform:translateY(-60px)}}

@media (prefers-reduced-motion:no-preference){
  /* The hero mark opens from the left and the headline's words rise in turn, once, on load. */
  .hero-mark{animation:open 900ms var(--ease) both}
  .w{animation:rise 760ms var(--ease) both;animation-delay:calc(260ms + var(--i) * 60ms)}
  .lead{animation:rise 760ms var(--ease) both;animation-delay:820ms}
  .hero-copy .btn{animation:rise 760ms var(--ease) both;animation-delay:920ms}
  /* The hero film rises in once on load; it is the page's main visual, so it never waits for a scroll. */
  .stage{animation:lift 900ms var(--ease) both;animation-delay:700ms}
}
@keyframes open{from{clip-path:inset(0 100% 0 0 round 22px);transform:scale(.92)}to{clip-path:inset(0 0 0 0 round 22px);transform:none}}
@keyframes rise{from{opacity:0;transform:translateY(.45em)}to{opacity:1;transform:none}}
@keyframes lift{from{opacity:0;transform:translateY(40px) scale(.96)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  @view-transition{navigation:none}
  *,*::before,*::after{animation:none!important;transition:none!important}
  [data-reveal]{opacity:1!important;transform:none!important}
}

/* ── Narrow screens ────────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width:960px){
  .main{display:none}
  .langs{margin-left:auto}
  .problem,.problem.v-b,.how-grid,.film.feature,.contact-grid{grid-template-columns:1fr}
  .problem.v-b .still{order:0}
  .problem.v-wide .copy{grid-template-columns:1fr}
  .problem.v-wide .go{grid-column:1;margin-top:0}
  .pair-row{grid-template-columns:1fr;gap:0}
  .pair-row .problem+.problem{border-top:1px solid var(--line)}
  .film-grid{grid-template-columns:1fr}
  .foot{grid-template-columns:1fr}
  .screen{margin-bottom:24px}
}
@media (max-width:560px){
  .wrap{width:min(1200px,100% - 32px)}
  .hero{padding-top:118px}
  .brand small{display:none}
  .stage{margin-top:40px}
  .play,.player.big .play{padding:10px}
  .play .disc,.player.big .play .disc{width:44px;height:44px}
  .player.hero-film .play .disc{width:56px;height:56px}
  .player.hero-film .play{padding:14px}
  .go{margin-left:0}
  .contact-mark{width:72px;height:72px}
  .btn{width:100%;justify-content:center}
}
