/* IOIHAN Deck: deck.ioihan.com
   Palette from the logo. No web fonts: Bahnschrift (built into Windows 10/11) for display,
   Segoe UI for text, Cascadia for code, with sensible fallbacks elsewhere. */

@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --bg: #0d1931;
  --bg-deep: #070e1e;
  --panel: #0f1d39;
  --line: rgb(140 180 255 / .12);
  --ink: #e9f1ff;
  --dim: #9aabc9;
  --muted: #66789d;
  --cyan: #2cc8e4;
  --blue: #2a7fe0;
  --amber: #f2a93b;
  --green: #34d27b;
  --red: #ff5a4e;
  --off: #5f6f8c;

  --display: Bahnschrift, "DIN Alternate", "DIN Condensed", "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", monospace;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --tx: 0;  /* pointer position over the hero, -1..1, set by site.js */
  --ty: 0;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; interpolate-size: allow-keywords; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Film grain over everything: keeps the gradients from looking flat and digital. */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-stretch: condensed; font-weight: 700; line-height: .95; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
p { text-wrap: pretty; }
.mono, code, kbd { font-family: var(--mono); font-size: .86em; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(780px, 100% - 2.5rem); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--cyan); color: var(--bg-deep); padding: .5rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.kicker {
  font: 600 .78rem/1 var(--mono);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: .8rem;
}
.kicker::before { content: ""; width: 2.2rem; height: 1px; background: currentColor; opacity: .6; }

/* ---------- Nav: transparent at the top, frosted once you scroll (scroll-driven, no JS) ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem clamp(1.25rem, 3vw, 2.5rem);
  border-bottom: 1px solid transparent;
}
@supports (animation-timeline: scroll()) {
  .nav { animation: nav-solid linear both; animation-timeline: scroll(); animation-range: 0 160px; }
  @keyframes nav-solid {
    to { background: rgb(9 18 38 / .72); backdrop-filter: blur(14px) saturate(1.4); border-bottom-color: var(--line); }
  }
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand img { border-radius: 9px; }
.brand span { font: 700 1.15rem/1 var(--display); font-stretch: condensed; letter-spacing: .14em; text-transform: uppercase; }
.brand b { color: var(--cyan); font-weight: 700; }
.nav nav { display: flex; align-items: center; gap: clamp(.9rem, 2.2vw, 2rem); font-size: .92rem; }
.nav nav a { text-decoration: none; color: var(--dim); transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.nav .nav-dl { color: var(--ink); border: 1px solid rgb(44 200 228 / .5); padding: .45rem .95rem; border-radius: 999px; }
.nav .nav-dl:hover { background: rgb(44 200 228 / .12); }
@media (max-width: 640px) { .nav nav a:not(.nav-dl) { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center; gap: clamp(1rem, 4vw, 4rem);
  padding: 7rem clamp(1.25rem, 5vw, 5rem) 4rem;
  overflow: clip;
}
.aurora, .aurora::before, .aurora::after { position: absolute; z-index: -2; border-radius: 50%; filter: blur(90px); }
.aurora { inset: 0; filter: none; border-radius: 0; pointer-events: none; }
.aurora::before, .aurora::after { content: ""; }
.aurora::before { width: 46vw; height: 46vw; right: -6vw; top: -8vw; background: radial-gradient(closest-side, rgb(44 200 228 / .38), transparent); animation: drift 18s ease-in-out infinite alternate; }
.aurora::after  { width: 38vw; height: 38vw; right: 22vw; bottom: -14vw; background: radial-gradient(closest-side, rgb(42 127 224 / .4), transparent); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-6vw, 4vw) scale(1.15); } }

/* Perspective grid floor that fades into the dark. */
.floor {
  position: absolute; z-index: -1; left: -25%; right: -25%; bottom: -10%; height: 70%;
  background:
    linear-gradient(rgb(44 200 228 / .2) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgb(44 200 228 / .2) 1px, transparent 1px) 0 0 / 64px 64px;
  transform: perspective(600px) rotateX(62deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 10%, transparent 75%);
  animation: floor-run 6s linear infinite;
}
@keyframes floor-run { to { background-position: 0 64px, 0 0; } }

/* The logo, presented like an app icon: a slow light ring turns behind it and it floats gently. */
.hero-mark {
  position: relative; isolation: isolate;
  width: clamp(132px, 12vw, 200px); aspect-ratio: 1;
  margin: 0 0 2rem;
  animation: mark-in 1.2s var(--ease-out) backwards, float 7s ease-in-out 1.2s infinite;
}
.hero-mark img { width: 100%; height: 100%; border-radius: 24%; box-shadow: 0 0 0 1px rgb(140 180 255 / .16), 0 24px 50px -18px rgb(0 0 0 / .8); }
.hero-mark::before {
  content: ""; position: absolute; inset: -10%; z-index: -1; border-radius: 34%;
  background: conic-gradient(from var(--spin), var(--cyan), var(--blue), var(--amber), var(--cyan));
  filter: blur(26px); opacity: .5;
  animation: spin 8s linear infinite;
}
@keyframes mark-in { from { opacity: 0; transform: translateY(18px) scale(.92); } }
@keyframes float { 50% { transform: translateY(-8px); } }

.eyebrow { display: inline-flex; align-items: center; gap: .6rem; color: var(--dim); font: 500 .82rem/1 var(--mono); letter-spacing: .06em; margin: 0 0 1.6rem; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: rgb(255 255 255 / .03); }
.pip { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgb(52 210 123 / .6); animation: pip 2.4s infinite; }
@keyframes pip { 70% { box-shadow: 0 0 0 9px rgb(52 210 123 / 0); } 100% { box-shadow: 0 0 0 0 rgb(52 210 123 / 0); } }

h1 { font-size: clamp(3.1rem, 7.4vw, 6.6rem); letter-spacing: -.015em; line-height: .9; }
h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--cyan) 10%, var(--green) 55%, var(--cyan) 90%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s ease-in-out infinite;
}
@keyframes sheen { 50% { background-position: 100% 0; } }
.lede { font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--dim); max-width: 34rem; margin: 1.8rem 0 2.2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.meta { color: var(--muted); font: .8rem/1.5 var(--mono); margin-top: 1.4rem; }

/* Primary button: filled, with a rotating conic light ring behind it. */
.btn-primary {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.5rem; border-radius: 14px;
  font: 700 1.05rem/1 var(--display); font-stretch: condensed; letter-spacing: .06em; text-transform: uppercase;
  color: #04101f; text-decoration: none;
  box-shadow: 0 14px 30px -10px rgb(44 200 228 / .65);
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
/* The fill sits on ::after so it paints over the glow ring (::before); both stay behind the text. */
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(135deg, #5ce1f2, var(--cyan) 45%, #239fd6);
  box-shadow: 0 1px 0 rgb(255 255 255 / .55) inset, 0 -3px 0 rgb(0 0 0 / .18) inset;
}
.btn-primary::before {
  content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: 17px;
  background: conic-gradient(from var(--spin), var(--cyan), var(--blue), var(--amber), var(--green), var(--cyan));
  filter: blur(10px); opacity: .55;
  animation: spin 5s linear infinite;
}
@keyframes spin { to { --spin: 360deg; } }
.btn-primary svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { color: var(--ink); text-decoration: none; padding: .95rem 1.1rem; border-radius: 14px; border: 1px solid var(--line); transition: background .2s, border-color .2s; }
.btn-ghost:hover { background: rgb(255 255 255 / .05); border-color: rgb(140 180 255 / .3); }

/* ---------- The 3D deck ---------- */
.deck-stage { margin: 0; display: grid; justify-items: center; gap: 2.2rem; perspective: 1500px; }
.deck {
  --key: clamp(44px, 6vw, 90px);
  --gap: clamp(8px, 1.05vw, 15px);
  position: relative;
  transform: rotateX(calc(24deg - var(--ty) * 6deg)) rotateY(calc(-18deg + var(--tx) * 8deg)) rotateZ(5deg);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-out);
  animation: deck-in 1.3s var(--ease-out) backwards .15s;
}
@keyframes deck-in { from { opacity: 0; transform: rotateX(48deg) rotateY(-30deg) rotateZ(10deg) translateY(60px); } }
.deck-body {
  position: relative; transform-style: preserve-3d;
  padding: calc(var(--gap) * 1.9);
  border-radius: calc(var(--key) * .42);
  background:
    radial-gradient(120% 80% at 20% 0%, rgb(255 255 255 / .07), transparent 55%),
    linear-gradient(165deg, #1b263d, #0b111f 70%);
  box-shadow:
    0 1px 0 rgb(255 255 255 / .12) inset,
    0 -2px 0 rgb(0 0 0 / .7) inset,
    0 0 0 1px rgb(255 255 255 / .05);
}
/* Thickness of the device: a darker slab pushed back in Z. */
.deck-body::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: #05080f; transform: translateZ(-22px);
  box-shadow: 0 0 0 1px #000;
}
/* Glass sheen that moves with the tilt. */
.deck-body::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgb(255 255 255 / .07) 45%, transparent 58%);
  background-size: 250% 100%;
  background-position: calc(50% + var(--tx) * 40%) 0;
  transform: translateZ(14px);
}
.deck-shadow {
  position: absolute; left: 8%; right: 8%; bottom: -16%; height: 40%;
  background: radial-gradient(closest-side, rgb(0 0 0 / .75), transparent);
  transform: translateZ(-60px) rotateX(90deg); filter: blur(8px);
}
.keys {
  display: grid; grid-template-columns: repeat(5, var(--key)); gap: var(--gap);
  transform-style: preserve-3d;
}
.k {
  --c: #7f8db0;
  position: relative;
  width: var(--key); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: calc(var(--key) * .2);
  background: radial-gradient(90% 90% at 50% 20%, #142139, #090f1c 75%);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / .06) inset,
    0 1px 0 rgb(255 255 255 / .08) inset,
    0 4px 0 #03060c,
    0 8px 14px rgb(0 0 0 / .55);
  transform: translateZ(8px);
  color: var(--c);
  font: 700 calc(var(--key) * .2)/1 var(--display); font-stretch: condensed; letter-spacing: .08em;
  opacity: .5;
  transition: transform .14s var(--ease-out), box-shadow .14s, opacity .3s;
}
.k svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.k-live { --c: #ff7a6e; }
.k-text { --c: #b9c6e2; }
.k-bt { --c: var(--cyan); opacity: .95; }
.k-bt svg { stroke-width: 2.2; filter: drop-shadow(0 0 6px rgb(44 200 228 / .6)); }

/* The live demo key */
.key-live {
  appearance: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  opacity: 1;
  --c: var(--off); --dot: var(--red);
  -webkit-tap-highlight-color: transparent;
}
.key-live::before {  /* soft halo so it reads as "the one to press" */
  content: ""; position: absolute; inset: -5px; border-radius: inherit;
  border: 1.5px solid rgb(44 200 228 / .55);
  animation: halo 2.2s ease-in-out infinite;
}
@keyframes halo { 50% { opacity: .15; inset: -9px; } }
.key-live[data-state]:not([data-state="off"])::before { animation: none; opacity: 0; }
.key-live:active, .key-live.pressed { transform: translateZ(2px); box-shadow: 0 0 0 1px rgb(255 255 255 / .06) inset, 0 1px 0 #03060c, 0 3px 6px rgb(0 0 0 / .5); }

/* Shared key artwork (demo key + rendered keys in the sections) */
.hp { width: 52%; height: 52%; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; }
.hp rect { fill: currentColor; stroke: none; }
.dot { position: absolute; top: 12%; right: 12%; width: 15%; aspect-ratio: 1; border-radius: 50%; background: var(--dot); transition: background .3s, opacity .3s; }
.dots { position: absolute; bottom: 11%; display: flex; gap: 9%; width: 36%; justify-content: center; opacity: 0; transition: opacity .2s; }
.dots b { width: 22%; aspect-ratio: 1; border-radius: 50%; background: var(--amber); animation: blink 1s infinite; }
.dots b:nth-child(2) { animation-delay: .15s; } .dots b:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }

[data-state="busy"] { --c: var(--amber); }
[data-state="busy"] .dot { opacity: 0; }
[data-state="busy"] .dots { opacity: 1; }
[data-state="on"] { --c: var(--green); --dot: var(--green); }
.key-live[data-state="on"], .key-render.on, .key-render[data-preview="on"] {
  box-shadow:
    0 0 0 1px rgb(52 210 123 / .35) inset,
    0 4px 0 #03060c,
    0 0 28px -2px rgb(52 210 123 / .55),
    0 8px 14px rgb(0 0 0 / .55);
}
.key-live[data-state="busy"] { box-shadow: 0 0 0 1px rgb(242 169 59 / .35) inset, 0 4px 0 #03060c, 0 0 26px -4px rgb(242 169 59 / .5), 0 8px 14px rgb(0 0 0 / .55); }

figcaption { display: grid; justify-items: center; gap: .7rem; text-align: center; color: var(--muted); font-size: .88rem; }
kbd { color: var(--ink); background: rgb(255 255 255 / .06); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .05rem .4rem; }
.readout { display: inline-flex; align-items: center; gap: .55rem; font: .82rem/1 var(--mono); color: var(--dim); padding: .5rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: rgb(0 0 0 / .25); }
.readout i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); transition: background .3s; }
.readout[data-state="busy"] i { background: var(--amber); }
.readout[data-state="on"] i { background: var(--green); box-shadow: 0 0 10px var(--green); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: left; padding-top: 6.5rem; }
  .deck-stage { margin-top: 1rem; }
  .deck { --key: clamp(42px, 12.5vw, 70px); --gap: clamp(7px, 2vw, 12px); }
}

/* ---------- The long way (scroll-driven collapse; static fallback) ---------- */
.longway { position: relative; border-top: 1px solid var(--line); background: linear-gradient(var(--bg-deep), var(--bg) 70%); }
.lw-sticky { width: min(1180px, 100% - 2.5rem); margin-inline: auto; padding: 7rem 0; }
.lw-sticky h2 { max-width: 15ch; }
.path {
  list-style: none; padding: 0; margin: 3rem 0 0;
  display: flex; flex-wrap: wrap; gap: .8rem 2.4rem;
  counter-reset: step;
}
.path li {
  position: relative; counter-increment: step;
  font: 500 clamp(1rem, 1.6vw, 1.25rem)/1 var(--mono);
  padding: .85rem 1.1rem .85rem 2.9rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgb(255 255 255 / .03);
  color: var(--dim);
}
.path li::before { content: counter(step); position: absolute; left: 1rem; top: 50%; translate: 0 -50%; font-size: .75em; color: var(--muted); }
.path li:not(:last-child)::after { /* arrow between steps */
  content: "→"; position: absolute; right: -1.75rem; top: 50%; translate: 0 -50%; color: var(--muted); font-family: var(--text);
}
.path .bar { display: none; }
.shortway { display: flex; align-items: center; gap: 1.4rem; margin-top: 3.2rem; }
.shortway p { margin: 0; font: 700 clamp(1.6rem, 3.4vw, 2.8rem)/1 var(--display); font-stretch: condensed; }
.shortway strong { color: var(--green); font-weight: 700; }

.key-render {
  --c: var(--off); --dot: var(--red);
  position: relative; display: grid; place-items: center; flex: none;
  width: 92px; aspect-ratio: 1; border-radius: 20px;
  color: var(--c);
  background: radial-gradient(90% 90% at 50% 20%, #142139, #090f1c 75%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .06) inset, 0 1px 0 rgb(255 255 255 / .08) inset, 0 5px 0 #03060c, 0 12px 22px rgb(0 0 0 / .55);
  transition: color .3s, box-shadow .3s;
}
.key-render.on { --c: var(--green); --dot: var(--green); }
.key-render.big { width: clamp(150px, 18vw, 210px); border-radius: clamp(30px, 3.6vw, 42px); }
.key-render.bt { --c: var(--cyan); }
.key-render.bt svg { width: 48%; height: 48%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgb(44 200 228 / .55)); }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .longway { height: 280vh; view-timeline: --lw block; }
    .lw-sticky { position: sticky; top: 0; height: 100svh; padding: 0; display: grid; align-content: center; }

    /* 1. each step gets crossed out in turn */
    .path li { overflow: hidden; }
    .path li > .bar { display: block; position: absolute; left: 2.4rem; right: .8rem; top: 50%; height: 2px; background: var(--red); transform-origin: left; scale: 0 1; }
    .path li { animation: fold linear both; animation-timeline: --lw; animation-range: contain 66% contain 80%; }
    .path li > .bar { animation: strike linear both; animation-timeline: --lw; }
    .path li:nth-child(1) > .bar { animation-range: contain 6% contain 12%; }
    .path li:nth-child(2) > .bar { animation-range: contain 13% contain 19%; }
    .path li:nth-child(3) > .bar { animation-range: contain 20% contain 26%; }
    .path li:nth-child(4) > .bar { animation-range: contain 27% contain 33%; }
    .path li:nth-child(5) > .bar { animation-range: contain 34% contain 40%; }
    .path li:nth-child(6) > .bar { animation-range: contain 41% contain 47%; }
    .path li:nth-child(7) > .bar { animation-range: contain 48% contain 54%; }
    @keyframes strike { to { scale: 1 1; } }
    /* 2. then they all fold away... */
    @keyframes fold { to { opacity: 0; filter: blur(6px); transform: translateY(40px) scale(.7); } }
    /* 3. ...and the one key arrives */
    .shortway { animation: arrive linear both; animation-timeline: --lw; animation-range: contain 72% contain 90%; }
    @keyframes arrive { from { opacity: 0; transform: translateY(-50px) scale(.6); } }
    .shortway .key-render { animation: light linear both; animation-timeline: --lw; animation-range: contain 86% contain 94%; }
    @keyframes light { from { --c: var(--off); color: var(--off); box-shadow: 0 5px 0 #03060c, 0 12px 22px rgb(0 0 0 / .55); } }
  }
}

/* ---------- The keys ---------- */
.keys-section { padding: 8rem 0 6rem; position: relative; }
.keys-section h2 { margin-bottom: 4rem; }
.feature {
  display: grid; grid-template-columns: minmax(220px, .8fr) 1.2fr; gap: clamp(2rem, 6vw, 6rem); align-items: center;
  padding: clamp(2rem, 4vw, 3.5rem);
  border: 1px solid var(--line); border-radius: 28px;
  background:
    radial-gradient(60% 90% at 0% 0%, rgb(44 200 228 / .08), transparent 60%),
    linear-gradient(180deg, rgb(255 255 255 / .025), transparent);
  margin-bottom: 1.6rem;
}
.feature-flip { grid-template-columns: 1.2fr minmax(220px, .8fr); }
.feature-flip .feature-key { order: 2; }
.feature-key { display: grid; justify-items: center; gap: 1.8rem; }
.feature-text h3 { margin-bottom: 1rem; }
.feature-text p { color: var(--dim); margin: 0 0 1.2rem; }
.gestures { margin: 1.6rem 0; display: grid; gap: 1rem; }
.gestures div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; padding-bottom: 1rem; border-bottom: 1px dashed var(--line); }
.gestures dt { font: 700 1.25rem/1 var(--display); font-stretch: condensed; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.gestures dd { margin: 0; color: var(--dim); }
.aside { font-size: .92rem; color: var(--muted) !important; }

/* Legend: hover or focus a state and the key above shows it (pure CSS, :has()). */
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.legend li { display: inline-flex; align-items: center; gap: .45rem; font: .78rem/1 var(--mono); color: var(--dim); padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; cursor: default; transition: border-color .2s, color .2s; }
.legend li:hover, .legend li:focus-visible { color: var(--ink); border-color: rgb(140 180 255 / .35); }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.lg-off i { background: var(--off); box-shadow: 4px -3px 0 -2px var(--red); }
.lg-busy i { background: var(--amber); }
.lg-on i { background: var(--green); }
.feature-key:has(.lg-off:is(:hover, :focus-visible)) .key-render { --c: var(--off); --dot: var(--red); box-shadow: 0 0 0 1px rgb(255 255 255 / .06) inset, 0 5px 0 #03060c, 0 12px 22px rgb(0 0 0 / .55); }
.feature-key:has(.lg-busy:is(:hover, :focus-visible)) .key-render { --c: var(--amber); box-shadow: 0 0 0 1px rgb(242 169 59 / .35) inset, 0 5px 0 #03060c, 0 0 36px -4px rgb(242 169 59 / .5); }
.feature-key:has(.lg-busy:is(:hover, :focus-visible)) .key-render .dot { opacity: 0; }
.feature-key:has(.lg-busy:is(:hover, :focus-visible)) .key-render .dots { opacity: 1; }
.key-render[data-preview="on"] { --c: var(--green); --dot: var(--green); }

.more { display: flex; align-items: center; gap: 1.2rem; margin-top: 3rem; color: var(--dim); font-size: 1.05rem; }
.more-grid { display: grid; grid-template-columns: repeat(3, 9px); gap: 4px; padding: 9px; border: 1.5px solid rgb(44 200 228 / .5); border-radius: 9px; flex: none; }
.more-grid i { width: 9px; height: 9px; border-radius: 2px; background: rgb(44 200 228 / .25); animation: twinkle 3.6s infinite; }
.more-grid i:nth-child(2), .more-grid i:nth-child(5) { background: var(--amber); }
.more-grid i:nth-child(3n+1) { animation-delay: .6s; } .more-grid i:nth-child(3n) { animation-delay: 1.3s; }
@keyframes twinkle { 50% { opacity: .35; } }

/* ---------- Under the hood ---------- */
.hood { padding: 7rem 0; background: linear-gradient(180deg, transparent, var(--bg-deep) 30%, var(--bg-deep) 70%, transparent); }
.hood-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.hood h2 { max-width: 14ch; margin-bottom: 1.6rem; }
.hood p { color: var(--dim); max-width: 36rem; }
.spec { margin: 0; font-family: var(--mono); font-size: .92rem; border-top: 1px solid var(--line); }
.spec div { display: flex; align-items: baseline; gap: .8rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.spec dt { display: flex; flex: 1; gap: .8rem; align-items: baseline; color: var(--muted); white-space: nowrap; }
.spec dt::after { content: ""; flex: 1; border-bottom: 1px dotted rgb(140 180 255 / .28); translate: 0 -.25em; } /* dotted leader */
.spec dd { margin: 0; text-align: right; color: var(--ink); }

/* ---------- Install ---------- */
.install { padding: 7rem 0; }
.install h2 { margin-bottom: 3.5rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 3vw, 2.5rem); }
.steps li { position: relative; padding-top: 6.5rem; }
.num {
  position: absolute; top: -.6rem; left: -.2rem;
  font: 700 8.5rem/1 var(--display); font-stretch: condensed;
  color: transparent; -webkit-text-stroke: 1.5px rgb(44 200 228 / .45);
  transition: color .4s, -webkit-text-stroke-color .4s;
}
.steps li:hover .num { color: rgb(44 200 228 / .12); -webkit-text-stroke-color: var(--cyan); }
.steps h3 { margin-bottom: .7rem; }
.steps p { color: var(--dim); margin: 0; }
.steps b { color: var(--ink); }

/* ---------- FAQ (smooth open where ::details-content is supported) ---------- */
.faq { padding: 6rem 0; }
.faq h2 { margin-bottom: 2.6rem; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.35rem 0;
  font: 600 clamp(1.15rem, 1.8vw, 1.4rem)/1.2 var(--display); font-stretch: condensed; letter-spacing: .01em;
  transition: color .2s;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 2px 100% no-repeat;
  color: var(--cyan); transition: rotate .3s var(--ease-out);
}
details[open] summary::after { rotate: 135deg; }
summary:hover { color: var(--cyan); }
details p { margin: 0; padding: 0 0 1.5rem; color: var(--dim); max-width: 62ch; }
details::details-content { block-size: 0; overflow: hidden; transition: block-size .35s var(--ease-out), content-visibility .35s allow-discrete; }
details[open]::details-content { block-size: auto; }

/* ---------- Download ---------- */
.download { padding: 4rem 1.25rem 8rem; }
.dl-panel {
  --b: 1.5px;
  position: relative; isolation: isolate;
  width: min(1000px, 100%); margin-inline: auto;
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding: clamp(1.8rem, 4vw, 3.5rem);
  border-radius: 30px;
  background:
    linear-gradient(var(--panel), var(--bg-deep)) padding-box,
    conic-gradient(from var(--spin), rgb(44 200 228 / .7), rgb(42 127 224 / .15), rgb(242 169 59 / .6), rgb(44 200 228 / .15), rgb(44 200 228 / .7)) border-box;
  border: var(--b) solid transparent;
  animation: spin 9s linear infinite;
  box-shadow: 0 40px 80px -40px rgb(44 200 228 / .35);
}
.dl-logo { width: clamp(110px, 16vw, 168px); border-radius: 30px; box-shadow: 0 20px 40px -18px #000; }
.dl-body h2 { margin-bottom: .6rem; }
.dl-body > p { color: var(--dim); margin: 0 0 1.6rem; }
.req { color: var(--muted) !important; font-size: .88rem; margin: 1.2rem 0 0 !important; }
.sha { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; padding: .7rem .8rem; border-radius: 12px; background: rgb(0 0 0 / .3); border: 1px solid var(--line); }
.sha-label { font: 600 .7rem/1 var(--mono); letter-spacing: .16em; color: var(--muted); }
.sha code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .78rem; color: var(--dim); }
.copy { font: 600 .75rem/1 var(--mono); color: var(--ink); background: rgb(255 255 255 / .06); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .7rem; cursor: pointer; }
.copy:hover { border-color: var(--cyan); }
.copy.done { color: var(--green); border-color: var(--green); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--bg-deep); padding-top: 3.5rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.foot p { color: var(--dim); font-size: .92rem; max-width: 28rem; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; font-size: .92rem; color: var(--dim); align-content: start; }
.foot ul a { text-decoration: none; }
.foot ul a:hover { color: var(--ink); }
.company { display: inline-block; background: #fff; padding: .5rem .75rem; border-radius: 8px; }
.company img { height: 22px; width: auto; }
.love span[aria-hidden] { color: var(--red); }
.legal { border-top: 1px solid var(--line); padding: 1.5rem 0 2rem; font-size: .76rem !important; color: var(--muted) !important; max-width: none !important; line-height: 1.6; }

/* ---------- Scroll reveals (scroll-driven; content is visible without them) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(46px); filter: blur(4px); } }
  }
}

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .feature, .feature-flip, .hood-grid { grid-template-columns: 1fr; }
  .feature-flip .feature-key { order: 0; }
  .steps { grid-template-columns: 1fr; gap: 1rem; }
  .steps li { padding-top: 5.6rem; }
  .num { font-size: 7rem; }
  .dl-panel { grid-template-columns: 1fr; justify-items: start; }
  .foot-grid { grid-template-columns: 1fr; }
  .path { gap: .7rem 2.2rem; }
}

/* ---------- Reduced motion: keep everything, stop the movement ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Text pages (privacy, 404) ---------- */
.doc-page .nav { background: rgb(9 18 38 / .8); backdrop-filter: blur(14px); border-bottom-color: var(--line); animation: none; }
.doc { padding: 8rem 0 5rem; }
.doc h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 1.2rem; }
.doc h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 3rem 0 1rem; }
.doc-lede { font-size: 1.2rem; color: var(--ink); }
.doc p, .doc li { color: var(--dim); }
.doc ul { padding-left: 1.2rem; display: grid; gap: .8rem; }
.doc li::marker { color: var(--cyan); }
.doc b { color: var(--ink); }
.doc a, .legal a { color: var(--cyan); }
.lost { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 1.2rem; text-align: center; padding: 2rem; }
.lost h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
.lost p { color: var(--dim); margin: 0 0 1rem; }
