/* Lowki showcase: cinematic scenes over one WebGPU stage. Brand values from tokens.css. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-display: swap; src: url(fonts/bricolage-grotesque-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url(fonts/bricolage-grotesque-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url(fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root { --pad: clamp(20px, 5vw, 88px); --ink: #0F1B0D; --cream: #F4F7EC; color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-snap-type: y proximity; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: #0F1B0D; color: var(--cream); font: 400 1rem/1.5 var(--lk-font-text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--lk-font-mono); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 8px; }

.stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; }

/* top bar: a glass pill that reads on every colour */
.bar { position: fixed; z-index: 5; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.bar > * { pointer-events: auto; }
.bar-logo { display: block; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgb(5 8 5 / 0.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bar-logo img { height: 32px; width: auto; }
.bar-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--lk-lime); color: var(--ink); font-weight: 600; text-decoration: none; box-shadow: 0 0 0 2px rgb(15 27 13 / 0.85), 0 6px 30px rgb(181 242 61 / 0.35); }

/* scenes */
.scene { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: 24px; padding: 96px var(--pad) 64px; scroll-snap-align: start; overflow: hidden; }
.ink-dark { color: #120A10; }
.ink-light { color: var(--cream); }
.copy { position: relative; z-index: 1; max-width: 760px; }
.copy.wide { max-width: 1100px; grid-column: 1 / -1; justify-self: center; width: 100%; }
.art { position: relative; height: min(78svh, 760px); }
.art-full { position: absolute; inset: 0; height: auto; z-index: 0; }
.mega { margin: 0 0 24px; font: 700 clamp(5rem, 14vw, 13rem)/0.82 var(--lk-font-display); letter-spacing: -0.05em; }
.big { margin: 0 0 20px; font: 700 clamp(3.4rem, 8.4vw, 9rem)/0.88 var(--lk-font-display); letter-spacing: -0.045em; text-wrap: balance; }
.sub { margin: 0; font-size: clamp(1.15rem, 1.9vw, 1.6rem); line-height: 1.35; font-weight: 500; max-width: 30ch; opacity: 0.88; }
.sub.small { font-size: clamp(0.9rem, 1.1vw, 1rem); max-width: 70ch; margin-top: 28px; opacity: 0.75; }
.ink-light .sub b { color: var(--lk-lime); font-weight: 500; }
.warm { color: #FF8A5C; font-weight: 600; }
.lime { color: var(--lk-lime); font-weight: 600; }

/* copy rises in */
:root.anim .scene .copy > *, :root.anim .race-ui > * { opacity: 0; transform: translateY(40px); transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 900ms cubic-bezier(.2,.7,.2,1); }
:root.anim .scene.in .copy > *, :root.anim .scene.in .race-ui > * { opacity: 1; transform: none; }
:root.anim .scene.in .copy > :nth-child(2), :root.anim .scene.in .race-ui > :nth-child(2) { transition-delay: 90ms; }
:root.anim .scene.in .copy > :nth-child(3), :root.anim .scene.in .race-ui > :nth-child(3) { transition-delay: 180ms; }
:root.anim .scene.in .copy > :nth-child(n+4), :root.anim .scene.in .race-ui > :nth-child(n+4) { transition-delay: 260ms; }

/* buttons */
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border-radius: 999px; border: 0; font: 600 1.1rem/1 var(--lk-font-text); text-decoration: none; cursor: pointer; transition: transform 160ms ease, box-shadow 200ms ease, background 160ms ease; }
.btn-lime { background: var(--lk-lime); color: var(--ink); box-shadow: 0 10px 40px -8px rgb(181 242 61 / 0.6); }
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -8px rgb(181 242 61 / 0.75); }
.btn-glass { background: rgb(255 255 255 / 0.12); color: inherit; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.35); backdrop-filter: blur(10px); }
.btn[aria-disabled="true"] { cursor: default; }
.soon { opacity: 0.6; font-weight: 400; margin-left: 0.35em; }

/* one import */
.diff { margin: 8px 0 28px; display: grid; gap: 6px; font-size: clamp(1rem, 2.1vw, 1.6rem); }
.diff div { padding: 10px 18px; border-radius: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diff span { display: inline-block; width: 1.4em; font-weight: 500; }
.diff .del { background: rgb(255 90 95 / 0.16); color: #FFB3A8; text-decoration: line-through; text-decoration-color: rgb(255 90 95 / 0.7); }
.diff .add { background: rgb(181 242 61 / 0.16); color: var(--cream); }
.diff .add b { color: var(--lk-lime); font-weight: 500; }

/* the race */
.race { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.race-ui { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1100px; }
.race .sub { max-width: none; }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 4vw, 64px); width: 100%; margin: clamp(24px, 5vh, 56px) 0 8px; }
.side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 12px; border-radius: 28px; background: rgb(2 4 3 / 0.38); }
.who { font: 600 clamp(1.1rem, 1.8vw, 1.5rem)/1.2 var(--lk-font-display); display: inline-flex; align-items: center; gap: 10px; }
.tag { font: 500 11px/1 var(--lk-font-mono); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: var(--lk-lime); color: var(--ink); white-space: nowrap; }
.num { font-size: clamp(3.6rem, 10vw, 9rem); line-height: 1; font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.num small { font-size: 0.35em; margin-left: 0.08em; opacity: 0.6; }
.side-lowki .num { color: var(--lk-lime); text-shadow: 0 0 40px rgb(181 242 61 / 0.45); }
.side-snark .num { color: #E8EFDD; opacity: 0.85; }
.race-ui[data-state="idle"] .num { opacity: 0.28; text-shadow: none; }
.ok { min-height: 1.4em; font: 500 0.9rem/1.4 var(--lk-font-mono); color: var(--lk-lime); }
.ok[data-ok="false"] { color: #FF6B6B; }
.x { margin: 4px 0 20px; min-height: 1em; font: 700 clamp(3rem, 8vw, 7.5rem)/1 var(--lk-font-display); letter-spacing: -0.04em; background: linear-gradient(90deg, #B5F23D, #2EF2D0 35%, #FF2E7E 70%, #FFB000); -webkit-background-clip: text; background-clip: text; color: transparent; }
.x:empty { min-height: 0; margin: 0 0 12px; }
.btn-race { min-height: 68px; min-width: min(360px, 100%); font-size: 1.25rem; position: relative; overflow: hidden; isolation: isolate; }
.btn-race::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(15 27 13 / 0.18); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 120ms linear; }
.race[data-state="idle"] .btn-race::before, .race-ui[data-state="idle"] .btn-race::before { transform: scaleX(0); }
.btn-race:disabled { cursor: progress; }
.race-note { min-height: 1.5em; margin: 14px 0 0; font-size: 0.95rem; opacity: 0.75; }

/* who sees what */
.sees { display: grid; gap: 6px; margin-top: 12px; }
.sees .row { display: grid; grid-template-columns: minmax(110px, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 6px; align-items: center; }
.sees .row > span:first-child { font: 600 clamp(0.95rem, 1.5vw, 1.25rem)/1.2 var(--lk-font-display); }
.sees .head span { font: 500 clamp(0.7rem, 1vw, 0.85rem)/1.2 var(--lk-font-mono); text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.8; text-align: center; }
.sees i { font-style: normal; display: grid; place-items: center; min-height: 44px; border-radius: 12px; font: 600 clamp(0.8rem, 1.2vw, 1rem)/1 var(--lk-font-text); }
.sees .no { background: rgb(181 242 61 / 0.92); color: var(--ink); }
.sees .yes { background: #FF5A5F; color: #fff; }
.sees .part { background: #FFB000; color: #1A0612; }

/* numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.stat { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 230px; padding: 24px; border-radius: 28px; }
.stat b { font: 700 clamp(3rem, 6vw, 5.6rem)/0.9 var(--lk-font-display); letter-spacing: -0.04em; }
.stat b small { font-size: 0.35em; margin-left: 0.1em; }
.stat span { font: 600 1.05rem/1.25 var(--lk-font-text); }
.stat em { font: 400 0.85rem/1.3 var(--lk-font-mono); font-style: normal; opacity: 0.75; }
.st-ink { background: var(--ink); color: var(--lk-lime); }
.st-ink span { color: #E8EFDD; }
.st-magenta { background: #FF2E7E; color: #fff; }
.st-teal { background: #0F3D3A; color: #2EF2D0; }
.st-teal span { color: #E8FFFB; }
.st-white { background: #FFFDF5; color: var(--ink); }

/* end */
.demos { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; max-width: 520px; }
.demo { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 0 22px; border-radius: 999px; background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.25); color: inherit; text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.demo span { font: 500 0.8rem/1 var(--lk-font-mono); opacity: 0.7; }
a.demo[href]:hover { background: rgb(181 242 61 / 0.18); }
.audit { display: flex; align-items: center; gap: 8px; margin: 40px 0 0; font-size: 0.8rem; opacity: 0.8; }
.audit i { width: 8px; height: 8px; border-radius: 50%; background: var(--lk-lime); box-shadow: 0 0 10px var(--lk-lime); }
.audit b { color: var(--lk-lime); font-weight: 500; }

/* without WebGPU: static colour worlds */
.fallback-art { position: absolute; inset: 0; margin: auto; height: 80%; width: auto; opacity: 0; }
:root.ready:not(.gpu) .fallback-art { opacity: 1; }
:root:not(.gpu) .s0, :root:not(.gpu) .s9 { background: radial-gradient(80% 80% at 70% 50%, #2A1B7A, #07061F 70%); }
:root:not(.gpu) .s1 { background: linear-gradient(135deg, #B5F23D, #2EF2D0 60%, #0FB89C); }
:root:not(.gpu) .s2 { background: radial-gradient(90% 90% at 70% 40%, #00566A, #021A1E 60%, #160A45); }
:root:not(.gpu) .s3 { background: linear-gradient(135deg, #FFB000, #FF6A00 50%, #FF2E7E); }
:root:not(.gpu) .s4 { background: radial-gradient(80% 80% at 60% 50%, #173A14, #020402 70%); }
:root:not(.gpu) .s5 { background: linear-gradient(160deg, #FF5A5F, #E8336D 50%, #5B1A8C); }
:root:not(.gpu) .s6 { background: radial-gradient(80% 80% at 50% 50%, #0B1B2E, #020403 70%); }
:root:not(.gpu) .s7 { background: linear-gradient(135deg, #0077B6, #1B4DFF 50%, #2A1B7A); }
:root:not(.gpu) .s8 { background: linear-gradient(135deg, #FFD23F, #B5F23D 50%, #FF9F45); }

/* phones */
@media (max-width: 860px) {
  .scene { grid-template-columns: 1fr; align-content: center; padding: 84px 20px 48px; gap: 8px; }
  .art { order: -1; height: 36svh; min-height: 220px; }
  .art-full { order: 0; height: auto; }
  .mega { font-size: clamp(4.4rem, 24vw, 7rem); }
  .big { font-size: clamp(2.8rem, 13vw, 4.4rem); }
  .s0 .art, .s9 .art { height: 34svh; }
  .duel { grid-template-columns: 1fr 1fr; gap: 10px; }
  .side { padding: 14px 6px; border-radius: 20px; }
  .num { font-size: clamp(2.6rem, 14vw, 4rem); }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { min-height: 150px; padding: 16px; border-radius: 20px; }
  .stat em { font-size: 0.72rem; }
  .sees .row { grid-template-columns: 82px repeat(4, minmax(0, 1fr)); gap: 4px; }
  .sees i { min-height: 38px; font-size: 0.72rem; border-radius: 9px; }
  .sees .head span { font-size: 0.56rem; letter-spacing: 0; }
  .sees .row > span:first-child { font-size: 0.82rem; }
  .diff { font-size: 0.86rem; }
  .diff div { padding: 8px 12px; }
}

/* ---- v3: five sections, readable type ---- */
.big { font-size: clamp(2.5rem, 4.8vw, 4.5rem); line-height: 0.98; letter-spacing: -0.035em; margin-bottom: 18px; }
.sub { font-size: clamp(1.05rem, 1.4vw, 1.3rem); max-width: 40ch; }
.kicker { margin: 0 0 14px; font: 500 0.8rem/1 var(--lk-font-mono); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
.ink-light .kicker { color: var(--lk-lime); }
.scene { min-height: auto; padding-top: 112px; padding-bottom: 96px; }
.hero, .race { min-height: 100svh; }
.hero .big { font-size: clamp(2.8rem, 5.6vw, 5rem); max-width: 13ch; }
.how { grid-template-columns: 1fr; align-content: center; min-height: 100svh; }
.how-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 24px; align-items: center; }
.art-small { height: 300px; }
.diff { font-size: clamp(0.85rem, 1.15vw, 1.05rem); margin: 4px 0 0; max-width: 640px; }
.diff .del { background: rgb(120 0 30 / 0.16); color: #5A0A1E; text-decoration-color: rgb(120 0 30 / 0.6); }
.diff .add { background: rgb(15 27 13 / 0.88); color: var(--cream); }
.steps4 { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.steps4 li { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 24px; min-height: 210px; }
.steps4 svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.steps4 b { font: 700 1.3rem/1.15 var(--lk-font-display); }
.steps4 span { font-size: 0.98rem; line-height: 1.4; opacity: 0.9; }
.steps4 code { font: 500 0.9em var(--lk-font-mono); }
.c-ink { background: var(--ink); color: #E8EFDD; } .c-ink svg, .c-ink b { color: var(--lk-lime); }
.c-magenta { background: #FF2E7E; color: #fff; }
.c-green { background: #0F3D3A; color: #E8FFFB; } .c-green svg, .c-green b { color: #2EF2D0; }
.c-coral { background: #FFFDF5; color: #1A0612; } .c-coral svg, .c-coral b { color: #E8336D; }
.num { font-size: clamp(3rem, 7vw, 6rem); }
.x { font-size: clamp(2.6rem, 5.5vw, 5rem); }
.facts { grid-template-columns: 1fr; }
.facts-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 56px); align-items: start; width: 100%; max-width: 1280px; justify-self: center; }
.facts .copy { max-width: none; }
.facts .stats { grid-template-columns: 1fr 1fr; }
.facts .stat { min-height: 150px; padding: 20px; }
.facts .stat b { font-size: clamp(2.4rem, 3.6vw, 3.4rem); }
.pillars { margin: 28px 0 0; font-size: 0.95rem; color: var(--lk-lime); }
@media (max-width: 860px) {
  .how-head, .facts-grid { grid-template-columns: 1fr; }
  .art-small { order: -1; height: 200px; }
  .steps4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .steps4 li { padding: 16px; min-height: 0; }
  .big, .hero .big { font-size: clamp(2.2rem, 9vw, 3rem); }
}

/* ---- v4: brand palette, contrast ---- */
:root:not(.gpu) .s0, :root:not(.gpu) .s9 { background: radial-gradient(80% 80% at 70% 50%, #1F4A14, #0F1B0D 70%); }
:root:not(.gpu) .s6 { background: radial-gradient(80% 80% at 50% 50%, #1A3310, #050A05 70%); }
:root:not(.gpu) .s7 { background: linear-gradient(135deg, #FFB000, #FF6A00 50%, #E8336D); }
.soon { opacity: 0.85; }
.sub.small { opacity: 1; }
.facts .copy { background: rgb(255 250 240 / 0.9); color: #1A0612; padding: 28px; border-radius: 28px; }
.facts .kicker { color: #8A1C3A; opacity: 1; }
.sees .head span { opacity: 1; }
.sees .yes { background: #B3123A; color: #fff; }
.sees .no { background: #B5F23D; color: #0F1B0D; }
.sees .part { background: #FFB000; color: #1A0612; }
.st-magenta, .c-magenta { background: #C8155A; color: #fff; }
.stat em { opacity: 0.9; }
.c-coral svg, .c-coral b { color: #A3134F; }
.how .kicker { opacity: 1; }
.race-ui .big, .race-ui .sub { text-shadow: 0 2px 24px rgb(0 0 0 / 0.7); }
.side { background: rgb(5 10 5 / 0.78); }
.x { background: rgb(5 10 5 / 0.82); -webkit-background-clip: border-box; background-clip: border-box; color: var(--lk-lime); padding: 8px 28px 12px; border-radius: 24px; }
.x:empty { padding: 0; background: none; }
.ok { color: var(--lk-lime); }
.race-note { opacity: 1; }
.btn-glass { background: rgb(5 10 5 / 0.55); color: #F4F7EC; }
.demo { background: rgb(5 10 5 / 0.55); }
.audit { opacity: 1; }
.race-ui .sub { background: rgb(5 10 5 / 0.72); padding: 6px 16px; border-radius: 999px; }
