/* KAELO. Void, glossy black relief, one violet. Inter Tight only. */
@font-face {
  font-family: "Inter Tight";
  src: url("/lab/_shared/fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #07070A;
  --ink: #F2F1F6;
  --ink-2: #A9A7B6;
  --violet: #7C5CFF;
  --violet-hi: #8D72FF;

  --w-regular: 400;
  --w-medium: 500;
  --w-semi: 600;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  --t-150: 150ms;
  --t-300: 300ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);

  --gutter: 20px;
  --head-h: 64px;
  --copy-h: 240px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --display: clamp(2.5rem, 11.2vw, 3.5rem);
  --body: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); color-scheme: dark; -webkit-text-size-adjust: 100%; }
html.js { scroll-snap-type: y mandatory; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--void);
  color: var(--ink);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--body);
  font-weight: var(--w-regular);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: var(--s-4); top: -64px; z-index: 20; padding: var(--s-3) var(--s-4); background: var(--ink); color: var(--void); font-weight: var(--w-semi); border-radius: var(--s-2); text-decoration: none; }
.skip:focus { top: var(--s-3); }

/* the stage */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; background: var(--void); opacity: 0; transition: opacity var(--t-300) var(--ease-out); }
#stage.live { opacity: 1; }
.scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(7,7,10,0.88) 0, rgba(7,7,10,0.6) calc(var(--copy-h) * 0.7 + 56px), rgba(7,7,10,0) calc(var(--copy-h) + 120px)); }

/* header */
.top { position: fixed; z-index: 6; left: 0; right: 0; top: 0; height: var(--head-h); display: flex; align-items: center; justify-content: space-between; padding: 0 calc(var(--gutter) - 12px) 0 var(--gutter); }
.mark { font-size: 1.25rem; line-height: 1.2; font-weight: var(--w-semi); letter-spacing: -0.01em; text-decoration: none; padding: var(--s-2) 0; min-height: 44px; display: inline-flex; align-items: center; }
.ticks { display: flex; }
.ticks a { width: 44px; height: 44px; display: grid; place-items: center; }
.ticks i { display: block; width: 20px; height: 2px; background: rgba(242,241,246,0.34); transition: background-color var(--t-150) var(--ease-out); }
.ticks a[aria-current="true"] i { background: var(--ink); }
.ticks a:hover i { background: rgba(242,241,246,0.7); }
.rule { position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: var(--violet); transform-origin: 0 50%; transform: scaleX(var(--prog, 0)); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* sections are scroll length only; the copy is fixed and fades with progress */
.ch { height: 100svh; position: relative; scroll-snap-align: none; }
.ch::before { content: ""; position: absolute; left: 0; top: 0; height: 100svh; width: 1px; scroll-snap-align: start; scroll-snap-stop: always; pointer-events: none; }
.slot { position: fixed; visibility: hidden; pointer-events: none;
  left: 16px; right: 16px; top: calc(var(--head-h) + 8px); bottom: calc(var(--copy-h) + 64px + var(--safe-b)); }
#c3 .slot { left: 28px; right: 28px; top: calc(var(--head-h) + 24px); bottom: calc(var(--copy-h) + 100px + var(--safe-b)); }

.panel { position: fixed; z-index: 4; left: var(--gutter); right: var(--gutter); bottom: calc(56px + var(--safe-b));
  pointer-events: none; opacity: var(--o, 1); transform: translate3d(0, calc((1 - var(--o, 1)) * 14px), 0); will-change: opacity, transform; }
#c2 .panel, #c3 .panel { --o: 0; }
h1, h2 { margin: 0; font-size: var(--display); line-height: 1.1; font-weight: var(--w-medium); letter-spacing: -0.02em; text-wrap: balance; }
.panel p { margin: var(--s-3) 0 0; max-width: 34ch; color: var(--ink-2); font-size: var(--body); line-height: 1.5; }
.cta { pointer-events: auto; margin-top: var(--s-5); min-height: 56px; padding: 0 var(--s-6); border: 0; border-radius: 28px; background: var(--violet); color: var(--void);
  font: inherit; font-weight: var(--w-semi); font-size: 1rem; line-height: 1.2; cursor: pointer;
  transition: background-color var(--t-150) var(--ease-out), transform var(--t-150) var(--ease-out); }
.cta:hover { background: var(--violet-hi); }
.cta:active { transform: translate3d(0, 1px, 0); }
.panel p.note { margin-top: var(--s-3); min-height: 1.5em; font-size: 0.875rem; }

/* the touch surface over the figure */
.pad { position: fixed; z-index: 3; left: 0; top: 0; width: 0; height: 0; touch-action: pan-y; cursor: crosshair; -webkit-tap-highlight-color: transparent; outline: none; }
.pad:focus-visible { outline: 2px solid rgba(242,241,246,0.72); outline-offset: -3px; border-radius: 6px; }
.hint { position: absolute; left: 0; right: 0; top: 100%; margin-top: var(--s-4); text-align: center; font-size: 0.875rem; line-height: 1.4; color: var(--ink-2); pointer-events: none; transition: opacity var(--t-300) var(--ease-out); }
.pad.used .hint, .pad.away .hint { opacity: 0; }
.kc { position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 2px solid var(--ink); border-radius: 50%; opacity: 0; pointer-events: none; }
.pad:focus-visible .kc { opacity: 1; }

.credit { position: fixed; z-index: 5; left: 0; right: 0; bottom: calc(16px + var(--safe-b)); margin: 0; text-align: center; font-size: 0.75rem; line-height: 1.4; color: var(--ink-2); pointer-events: none; }

@media (min-aspect-ratio: 11/10) {
  :root { --gutter: 6vw; --display: clamp(3rem, 5.4vw, 5.5rem); }
  .panel { right: auto; width: min(36rem, 40vw); bottom: calc(11vh + var(--safe-b)); }
  .scrim { background: linear-gradient(to right, rgba(7,7,10,0.8) 0, rgba(7,7,10,0.5) 30%, rgba(7,7,10,0) 52%),
                      linear-gradient(to top, rgba(7,7,10,0.5) 0, rgba(7,7,10,0) 40%); }
  .slot { left: 6vw; right: 6vw; top: calc(var(--head-h) + 24px); bottom: calc(var(--copy-h) + 11vh + 32px + var(--safe-b)); }
  #c2 .slot { left: 50vw; right: 6vw; top: calc(var(--head-h) + 8px); bottom: 56px; }
  #c3 .slot { left: 54vw; right: 9vw; top: calc(var(--head-h) + 24px); bottom: 64px; }
  .top { padding: 0 calc(var(--gutter) - 12px) 0 var(--gutter); }
  .credit { text-align: right; padding-right: var(--gutter); }
}

@media (min-aspect-ratio: 11/10) {
  .no-gl .panel, .no-js .panel { max-width: min(36rem, 44vw); }
}

@media (prefers-reduced-motion: reduce) {
  .hint { display: none; }
  .panel { transform: none; transition: opacity var(--t-150) var(--ease-out); will-change: auto; }
  .ticks i, .cta { transition: none; }
}

/* no WebGL2, or no script: all copy on stills made from the real render */
.no-gl #stage, .no-js #stage, .no-gl .pad, .no-js .pad, .no-gl .scrim, .no-js .scrim, .no-gl .slot, .no-js .slot { display: none; }
.no-gl html, html.no-gl { scroll-snap-type: none; }
.no-gl .ch, .no-js .ch { height: auto; min-height: 100svh; display: flex; align-items: flex-end; background-color: var(--void); background-repeat: no-repeat; background-position: center top; background-size: cover; }
.no-gl .panel, .no-js .panel { position: relative; left: auto; right: auto; bottom: auto; width: auto; padding: 0 var(--gutter) 64px; opacity: 1; transform: none; --o: 1; }
.no-gl #c3, .no-js #c3 { height: auto; }
.no-gl .ch::before, .no-js .ch::before { content: ""; position: absolute; inset: 0; width: auto; height: auto; background: linear-gradient(to top, rgba(7,7,10,0.9) 0, rgba(7,7,10,0.5) 40%, rgba(7,7,10,0) 70%); }
.no-gl .panel, .no-js .panel { z-index: 2; }
.no-gl #c1 { background-image: url("fallback/c1-p.jpg"); }
.no-gl #c2 { background-image: url("fallback/c2-p.jpg"); }
.no-gl #c3 { background-image: url("fallback/c3-p.jpg"); }
@media (min-aspect-ratio: 11/10) {
  .no-gl #c1 { background-image: url("fallback/c1-l.jpg"); }
  .no-gl #c2 { background-image: url("fallback/c2-l.jpg"); }
  .no-gl #c3 { background-image: url("fallback/c3-l.jpg"); }
}
.no-js #c1, .no-js #c2, .no-js #c3 { background-image: none; }
