/* oozh x riff. Black and white, light is the only colour. Drawn, not lit. */
:root {
  --bg: #050505;
  --ink: #f3f2ee;
  --mute: #a4a39d;
  --faint: #66655f;
  --line: rgba(243, 242, 238, 0.14);
  --ink-dim: #7e7d78;
  --paper: #f7f5ee;
  --pen: #1d1d1d;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --gutter: clamp(16px, 3.2vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
p { margin: 0; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
section[id] { scroll-margin-top: 72px; }

/* ---------- bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  pointer-events: none;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}
.bar > * { pointer-events: auto; }
.bar.is-scrolled { background: rgba(5, 5, 5, 0.94); border-bottom-color: var(--line); padding-top: 12px; padding-bottom: 12px; }
.mark { display: inline-flex; align-items: baseline; gap: 0.45em; color: var(--ink); text-decoration: none; }
.mark-pre { font: 500 11px/1 var(--mono); letter-spacing: 0.06em; color: var(--mute); }
.mark-riff { font: 400 36px/0.8 var(--serif); letter-spacing: -0.01em; }
.bar-right { display: flex; align-items: center; gap: 10px; }
.bar-link {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font: 500 12px/1 var(--sans);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.bar-link:hover { border-color: rgba(243, 242, 238, 0.35); }
.bar-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink); }
.sound {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(5, 5, 5, 0.6); color: var(--mute);
  font: 500 12px/1 var(--sans); cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.sound:hover { color: var(--ink); border-color: rgba(243, 242, 238, 0.3); }
.sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound .spk { fill: currentColor; stroke: none; }
.sound .wave { display: none; }
.sound[aria-pressed="true"] { color: var(--ink); }
.sound[aria-pressed="true"] .wave { display: block; }
.sound[aria-pressed="true"] .mute { display: none; }
.sound:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: max(720px, 100svh);
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 90% at 70% 35%, #0b0b0b 0%, var(--bg) 60%);
}
.layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
.layer-beam { z-index: 1; }

.intro {
  position: absolute; z-index: 4;
  left: var(--gutter); top: clamp(92px, 13vh, 132px);
  width: min(30vw, 420px);
}
.intro-title { margin: 0; font: 400 clamp(34px, 3.4vw, 54px)/1.02 var(--serif); letter-spacing: -0.01em; }
.intro-title span { color: var(--mute); font-style: italic; }
.intro-sub { margin-top: 16px; max-width: 34ch; font-size: 15px; line-height: 1.55; color: var(--mute); }

/* ---------- projector ---------- */
.projector {
  position: absolute; z-index: 2;
  left: clamp(4px, 2.4vw, 48px);
  bottom: clamp(72px, 11vh, 128px);
  width: clamp(250px, 22vw, 380px);
  aspect-ratio: 620 / 540;
}
.projector-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ink { fill: #0a0a0a; stroke: var(--ink-dim); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.ink .arm { stroke-width: 19; }
.ink .arm-core { stroke: #0a0a0a; stroke-width: 12; }
.ink .panel { fill: none; stroke-width: 1.5; opacity: 0.45; }
.ink .vent { fill: none; stroke-width: 3.5; }
.ink .knurl, .ink .spoke { fill: none; stroke-width: 2; }
.ink .dot { fill: var(--ink-dim); stroke: none; }
.ink .ring { fill: none; stroke-width: 2; }
.ink .plate { fill: var(--ink-dim); stroke: none; font: 400 19px var(--serif); letter-spacing: 0.02em; }
.ink .film-edge { fill: none; stroke-width: 12; }
.ink .film-perf { fill: none; stroke: #0a0a0a; stroke-width: 4; stroke-dasharray: 4 6; stroke-linecap: butt; }
.sprocket { transform-box: fill-box; transform-origin: 50% 50%; }

.spin { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; will-change: transform; }
.takeup { position: absolute; left: 2.258%; top: 27.037%; width: 29.032%; aspect-ratio: 1; filter: brightness(0.55); }

.reel {
  position: absolute; left: 61.29%; top: 20.37%; width: max(78%, 210px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.reel.is-dragging { cursor: grabbing; }
.reel > svg { filter: brightness(0.78); transition: filter 0.35s ease; }
.reel:hover > svg, .reel:focus-visible > svg, .reel.is-dragging > svg { filter: brightness(1); }
.reel-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gate-ring { fill: none; stroke: #fff; stroke-width: 2.5; opacity: 0.9; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.55)); }
.gate-mark { fill: var(--ink); }
.spin-ring {
  fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 1 8; stroke-linecap: round;
  opacity: 0; transform-box: fill-box; transform-origin: 50% 50%;
  transition: opacity 0.35s ease;
  animation: ring 24s linear infinite;
}
.reel:hover .spin-ring, .reel:focus-visible .spin-ring, .reel.is-dragging .spin-ring { opacity: 0.6; }
.reel:focus-visible .gate-ring { stroke-width: 4; }
@keyframes ring { to { transform: rotate(360deg); } }

/* reel parts (generated) */
.r-disc { fill: #0a0a0a; stroke: var(--ink); stroke-width: 3; }
.r-ring { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: 0.35; }
.r-tick { stroke: var(--ink); stroke-width: 1.2; opacity: 0.45; }
.r-tick.long { stroke-width: 2; opacity: 0.85; }
.r-win-ring { fill: #f3f2ee; stroke: #0a0a0a; stroke-width: 2; }
.r-win-bg { fill: #f3f2ee; }
.r-hub { fill: #0a0a0a; stroke: var(--ink); stroke-width: 3; }
.r-hub-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 2 5; opacity: 0.7; }
.r-hub-core { fill: var(--ink); }
.r-hub-key { fill: #0a0a0a; }
.r-hole { fill: #050505; stroke: var(--ink); stroke-width: 2.5; }
.r-label { fill: var(--ink); font: 500 9px var(--mono); letter-spacing: 0.18em; opacity: 0.55; }

.lens-point { position: absolute; left: 95.8%; top: 74.8%; width: 0; height: 0; }

.hint {
  position: absolute; left: 50%; top: -3%;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.hint svg { width: 44px; height: 28px; fill: none; stroke: var(--mute); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform: scaleX(-1) rotate(-10deg); }
.hint.is-gone { opacity: 0; transform: translate(-50%, calc(-100% - 6px)); }

/* ---------- the story, as the projector throws it ---------- */
.story {
  position: absolute; z-index: 4;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-54%);
  width: min(62vw, 960px, calc((100svh - 190px) * 1000 / 620));
  aspect-ratio: 1000 / 620;
}
.story canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.corner { position: absolute; width: 0; height: 0; }

/* ---------- disclaimer ---------- */
.disclaimer {
  position: absolute; z-index: 5;
  left: 50%; bottom: clamp(20px, 4vh, 40px); transform: translateX(-50%);
  width: min(92vw, 860px);
  font-size: clamp(15px, 1.15vw, 17px); line-height: 1.55; color: var(--mute); text-align: center;
  opacity: 0;
}
.disclaimer b { color: var(--ink); font-weight: 500; }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(88px, 12vw, 168px) var(--gutter); border-top: 1px solid var(--line); }
.wrap { width: min(1160px, 100%); margin: 0 auto; }
.wrap-narrow { width: min(680px, 100%); text-align: center; }
.kicker { font: 500 11px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); margin-bottom: 22px; }
.section-title { margin: 0; font: 400 clamp(42px, 5.6vw, 84px)/1 var(--serif); letter-spacing: -0.01em; }
.section-title span { color: var(--mute); font-style: italic; }

/* drawn bits shared by the section illustrations */
.ink-art { display: block; width: 100%; height: 100%; overflow: visible; }
.paper-edge { fill: var(--ink); stroke: var(--ink); stroke-width: 12; stroke-linejoin: round; }
.paper { fill: var(--paper); stroke: #0b0b0b; stroke-width: 2.5; stroke-linejoin: round; }
.type { fill: #c6c4bc; }
.type-faint { fill: #d9d7cf; }
.type-dark { fill: #1b1b1b; }
.rule { fill: rgba(22, 22, 22, 0.14); }
.tape { fill: rgba(232, 230, 221, 0.95); stroke: #0b0b0b; stroke-width: 2; stroke-linejoin: round; }
.pen { fill: none; stroke: var(--pen); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s ease 0.3s; }
.pen-2 { transition-delay: 1.1s; }
.hand { font: 500 26px var(--hand); fill: var(--pen); opacity: 0; transition: opacity 0.6s ease 1.7s; }
.is-in .pen { stroke-dashoffset: 0; }
.is-in .hand { opacity: 1; }
.badge-edge { fill: var(--ink); }
.badge { fill: var(--paper); stroke: #0b0b0b; stroke-width: 2.5; }

/* how a riff works */
.steps {
  list-style: none; margin: clamp(48px, 7vw, 88px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px);
}
.step-art {
  aspect-ratio: 320 / 220;
  border: 1px solid var(--line); border-radius: 18px;
  background: radial-gradient(80% 70% at 50% 45%, #0e0e0e, var(--bg));
  overflow: hidden;
}
.step-num { display: block; margin-top: 22px; font: 500 11px/1 var(--mono); letter-spacing: 0.16em; color: var(--faint); }
.step h3 { margin: 10px 0 10px; font: 400 clamp(26px, 2.4vw, 32px)/1.1 var(--serif); }
.step p { max-width: 36ch; color: var(--mute); font-size: 16px; line-height: 1.6; }

/* the promise */
.promise-title { margin: 0; font: 400 clamp(48px, 8.4vw, 132px)/0.98 var(--serif); letter-spacing: -0.02em; }
.promise-title span { color: var(--mute); font-style: italic; }
.nots {
  margin-top: clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px);
}
.not h3 { margin: 0 0 18px; font: 400 clamp(30px, 2.6vw, 40px)/1 var(--serif); }
.not p { max-width: 34ch; color: var(--mute); font-size: 16px; line-height: 1.6; }
.pen-under { position: relative; display: inline-block; }
.pen-under svg { position: absolute; left: -3%; bottom: -12px; width: 106%; height: 14px; overflow: visible; }
.pen-under path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s ease 0.25s; }
.is-in .pen-under path { stroke-dashoffset: 0; }

/* waitlist */
.waitlist { text-align: center; }
.wl-reel { display: block; width: 64px; height: 64px; margin: 0 auto 28px; animation: ring 16s linear infinite; }
.wl-reel-disc { fill: #0a0a0a; stroke: var(--ink-dim); stroke-width: 3; }
.wl-reel-ring { fill: none; stroke: var(--ink-dim); stroke-width: 1.5; stroke-dasharray: 2 5; }
.wl-reel-holes circle { fill: var(--bg); stroke: var(--ink-dim); stroke-width: 2.5; }
.wl-reel-hub { fill: var(--ink-dim); }
.wl-sub { margin: 20px auto 0; max-width: 46ch; color: var(--mute); font-size: 17px; line-height: 1.55; }
.wl-form { display: flex; gap: 10px; justify-content: center; max-width: 520px; margin: 36px auto 0; }
.wl-form input {
  flex: 1; min-width: 0; height: 52px; padding: 0 20px;
  border-radius: 999px; border: 1px solid rgba(243, 242, 238, 0.22);
  background: #0b0b0b; color: var(--ink); font: 400 16px var(--sans);
}
.wl-form input::placeholder { color: var(--faint); }
.wl-form input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn {
  height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--ink); color: #050505; font: 600 15px/1 var(--sans);
  cursor: pointer; transition: transform 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wl-status { min-height: 1.5em; margin-top: 16px; color: var(--mute); font-size: 15px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 36px var(--gutter) 44px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.footer .mark-riff { font-size: 30px; }
.footer-fine { max-width: 76ch; color: var(--faint); font-size: 13px; line-height: 1.6; }
.footer-meta { color: var(--faint); font: 500 12px/1 var(--mono); }
.footer-meta a { color: var(--mute); }

/* sections arrive as you reach them */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .hero { height: auto; min-height: 100svh; padding: 92px var(--gutter) 28px; display: flex; flex-direction: column; }
  .intro { position: relative; inset: auto; order: 0; width: 100%; margin-bottom: 28px; }
  .intro-title { font-size: clamp(34px, 9vw, 44px); }
  .story { position: relative; inset: auto; transform: none; order: 1; width: 100%; }
  .projector {
    order: 2; position: relative; left: auto; bottom: auto;
    width: min(64vw, 300px); margin: clamp(96px, 28vw, 128px) 0 0 4vw;
  }
  .reel { width: max(78%, 190px); }
  .disclaimer { order: 3; position: relative; left: auto; bottom: auto; transform: none; width: 100%; margin-top: 36px; font-size: 16px; text-align: left; }
  .steps, .nots { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }
  .wl-form { flex-direction: column; }
}
@media (max-width: 420px) {
  .bar-link .long { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spin-ring, .wl-reel { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pen, .pen-under path { stroke-dashoffset: 0; transition: none; }
  .hand { opacity: 1; transition: none; }
}
