/* zerofucks.tech
   Cobalt field, milk type, toy colours (cherry, butter, bubblegum) reserved for objects and selections.
   The background is a live WebGL scene (scene.js); the page itself is transparent over it. */

:root {
  --cobalt: #2A44F5;
  --navy: #0C155E;
  --sky: #8EA2FF;
  --milk: #FBF7EF;
  --milk-dim: rgba(251, 247, 239, .74);
  --cherry: #FF4133;
  --butter: #FFD84D;
  --bubble: #FF9FCF;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --voice: "Instrument Serif", Georgia, serif;

  --pad: clamp(18px, 3.2vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  color: var(--milk);
  background: var(--cobalt) radial-gradient(120% 80% at 70% 20%, #4A63FF 0%, var(--cobalt) 45%, var(--navy) 100%) fixed;
  -webkit-text-size-adjust: 100%;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--display);
  font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: var(--butter); color: var(--navy); }
:focus-visible { outline: 2.5px solid var(--butter); outline-offset: 3px; }

.skip {
  position: fixed; left: var(--pad); top: -60px; z-index: 100;
  background: var(--butter); color: var(--navy); padding: 10px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

.stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
main, .hud, .meter { position: relative; z-index: 2; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font-size: 16px; font-weight: 700; font-variation-settings: "wdth" 108;
  text-decoration: none; border: 2px solid transparent;
  transition: transform .25s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.96); }
.btn-milk { background: var(--milk); color: var(--navy); }
.btn-milk:hover { background: var(--butter); }
.btn-ghost { background: transparent; color: var(--milk); border-color: rgba(251, 247, 239, .5); }
.btn-ghost:hover { border-color: var(--milk); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- HUD ---------- */

.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px var(--pad);
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-brand {
  text-decoration: none; font-weight: 800; font-size: 17px;
  font-variation-settings: "wdth" 118; letter-spacing: -.01em;
}
.hud-cta {
  text-decoration: none; font-size: 14px; font-weight: 700; font-variation-settings: "wdth" 106;
  background: var(--milk); color: var(--navy); padding: 10px 16px; border-radius: 999px;
  transition: background-color .2s, opacity .3s;
}
.hud-cta:hover { background: var(--butter); }
.hud-cta.is-hidden { opacity: 0; pointer-events: none; }

/* The meter: always zero, except when it isn't */
.meter {
  position: fixed; right: var(--pad); bottom: 16px; z-index: 50;
  display: flex; align-items: baseline; gap: 10px; pointer-events: none;
}
.meter-l { font-size: 13px; color: var(--milk-dim); }
.meter-n {
  display: inline-block; height: 1em; overflow: hidden;
  font-size: 42px; line-height: 1; font-weight: 900;
  font-variation-settings: "wdth" 125; font-variant-numeric: tabular-nums;
  color: var(--butter);
}
.meter-n b { display: block; font-weight: inherit; }
.meter.twitch .meter-n, .meter.live .meter-n { color: var(--bubble); }

/* ---------- Hero ---------- */

.s-hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 90px var(--pad) clamp(70px, 10vh, 120px);
}
.hero-in { max-width: 1100px; }
.hero-h {
  margin: 0 0 28px;
  font-weight: 900; font-variation-settings: "wdth" 112;
  font-size: clamp(50px, 8.6vw, 158px); line-height: .88; letter-spacing: -.025em;
}
.hero-h span { display: block; }
.hero-sub { margin: 0 0 30px; max-width: 34ch; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.4; color: var(--milk); text-shadow: 0 1px 14px rgba(12, 21, 94, .6); }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-hint { margin: 0; font-family: var(--voice); font-style: italic; font-size: 21px; color: var(--milk-dim); }

/* ---------- Tunnel ---------- */

.s-tunnel { position: relative; height: 520vh; }
.tunnel-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  perspective: 800px; perspective-origin: 50% 50%;
}
.tunnel-intro {
  position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%);
  font-family: var(--voice); font-style: italic; font-size: clamp(34px, 4.6vw, 70px);
  white-space: nowrap;
}
.ops { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; transform-style: preserve-3d; }
.op {
  position: absolute; left: 50%; top: 50%; padding: 6px 12px;
  font-family: var(--voice); font-style: italic;
  font-size: clamp(28px, 3.2vw, 50px); line-height: 1.05; white-space: nowrap;
  color: var(--milk);
  text-shadow: 0 2px 18px rgba(12, 21, 94, .55);
  cursor: pointer; will-change: transform, opacity;
}
.op:nth-child(3n+2) { color: var(--butter); }
.op:nth-child(3n) { color: var(--bubble); }
.op.cut { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--cherry); }
.tunnel-end {
  position: absolute; left: 50%; top: 50%; margin: 0; width: min(90vw, 14ch);
  transform: translate(-50%, -50%); text-align: center;
  font-weight: 900; font-variation-settings: "wdth" 112; line-height: .92; letter-spacing: -.02em;
  font-size: clamp(42px, 6.6vw, 112px);
  opacity: 0; pointer-events: none;
}
.tunnel-hint {
  position: absolute; left: 50%; bottom: 70px; margin: 0; transform: translateX(-50%);
  font-size: 13px; color: var(--milk-dim); transition: opacity .4s;
}

/* ---------- Manifesto ---------- */

.s-manifesto { position: relative; padding: 26vh var(--pad) 30vh; }
.mf { max-width: 1400px; }
.mf p {
  margin: 0 0 .16em; font-weight: 800; line-height: .98; letter-spacing: -.015em;
  font-size: clamp(38px, 6.8vw, 118px);
}
.mf .w { display: inline-block; opacity: .22; font-weight: normal; font-variation-settings: "wdth" 62, "wght" 200; }
.mf .mf-last {
  margin-top: .8em; max-width: 20ch;
  font-family: var(--voice); font-style: italic; font-weight: 400; letter-spacing: 0; line-height: 1.04;
  font-size: clamp(34px, 4.8vw, 80px); color: var(--butter);
}
.mf .mf-last .w { font-variation-settings: normal; }

/* ---------- Survey ---------- */

.s-survey {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 100px var(--pad) 110px;
}
.sv { width: min(680px, 100%); }
.sv-top { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.sv-count { margin: 0; font-size: 14px; font-weight: 700; font-variation-settings: "wdth" 110; white-space: nowrap; }
.sv-bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(251, 247, 239, .2); overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; background: var(--butter); border-radius: 6px; transition: width .6s var(--ease); }

fieldset.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step { display: none; }
.step.is-on { display: block; }
.step:focus { outline: none; }
.q {
  display: block; padding: 0; margin: 0 0 30px;
  font-weight: 800; font-variation-settings: "wdth" 104;
  font-size: clamp(32px, 4.2vw, 60px); line-height: 1; letter-spacing: -.02em;
}
.q-note { margin: 18px 0 0; font-size: 15px; color: var(--milk-dim); max-width: 52ch; }
.q-note a { color: var(--milk); text-underline-offset: 3px; }

/* sliders */
.heavy-n {
  display: block; font-weight: 900; font-variation-settings: "wdth" 125;
  font-size: clamp(90px, 12vw, 170px); line-height: .82; color: var(--butter);
  font-variant-numeric: tabular-nums;
}
.heavy-w { margin: 10px 0 26px; font-family: var(--voice); font-style: italic; font-size: clamp(24px, 2.4vw, 34px); min-height: 1.3em; }
.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: grab; margin: 0;
}
.range:active { cursor: grabbing; }
.range::-webkit-slider-runnable-track { height: 12px; border-radius: 12px; background: linear-gradient(90deg, var(--butter) var(--fill, 50%), rgba(251, 247, 239, .22) var(--fill, 50%)); }
.range::-moz-range-track { height: 12px; border-radius: 12px; background: rgba(251, 247, 239, .22); }
.range::-moz-range-progress { height: 12px; border-radius: 12px; background: var(--butter); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 38px; height: 38px; margin-top: -13px; border-radius: 50%;
  background: var(--cherry); border: 4px solid var(--milk);
  box-shadow: 0 6px 18px rgba(12, 21, 94, .45);
}
.range::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: var(--cherry); border: 4px solid var(--milk); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--butter); outline-offset: 2px; }
.range-scale { display: flex; justify-content: space-between; margin: 8px 0 0; font-size: 13px; color: var(--milk-dim); }

/* chips (real checkboxes and radios underneath) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-block; padding: 11px 18px; border-radius: 999px;
  border: 2px solid rgba(251, 247, 239, .45);
  font-size: 16px; font-weight: 600;
  transition: background-color .15s, color .15s, border-color .15s, transform .25s var(--ease);
}
.chip:hover span { border-color: var(--milk); }
.chip input:checked + span { background: var(--butter); border-color: var(--butter); color: var(--navy); transform: rotate(-2deg); }
.chip input:focus-visible + span { outline: 2.5px solid var(--butter); outline-offset: 3px; }

.line-input {
  display: block; width: min(420px, 100%); margin-top: 16px;
  background: transparent; border: 0; border-bottom: 2px solid rgba(251, 247, 239, .5);
  padding: 8px 2px; font-size: 18px;
}
.line-input[hidden] { display: none; }
.line-input:focus { outline: none; border-bottom-color: var(--butter); }
.line-input::placeholder, .story::placeholder { color: rgba(251, 247, 239, .45); }

/* the sticker pile: Matter.js bodies drawn as DOM stickers */
.pile {
  position: relative; margin: 0 0 22px; height: 200px; overflow: hidden;
  border-radius: 26px; background: rgba(12, 21, 94, .28);
  border: 2px dashed rgba(251, 247, 239, .3);
}
.pile-empty {
  position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center;
  font-family: var(--voice); font-style: italic; font-size: 21px; color: var(--milk-dim);
}
.pile-empty[hidden] { display: none; }
.sticker {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px;
  font-weight: 800; font-variation-settings: "wdth" 112; font-size: 17px; line-height: 1.2;
  color: var(--navy); background: var(--milk);
  box-shadow: inset 0 -4px 0 rgba(12, 21, 94, .18), 0 8px 18px -6px rgba(12, 21, 94, .55);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform;
}
.sticker:active { cursor: grabbing; }
.sticker.c-cherry { background: var(--cherry); color: var(--milk); }
.sticker.c-butter { background: var(--butter); }
.sticker.c-bubble { background: var(--bubble); }
.sticker.static { position: relative; display: inline-block; margin: 8px; }

.story {
  display: block; width: 100%; resize: vertical; min-height: 160px;
  background: rgba(12, 21, 94, .3); border: 2px solid rgba(251, 247, 239, .35); border-radius: 22px;
  padding: 18px 20px; font-family: var(--voice); font-size: 23px; line-height: 1.35;
}
.story:focus { outline: none; border-color: var(--butter); }

.sv-error { margin: 22px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--milk); color: var(--navy); font-weight: 600; display: inline-block; }
.sv-error[hidden] { display: none; }
.sv-nav {
  position: sticky; bottom: 14px; z-index: 3;
  display: flex; gap: 8px; width: fit-content; margin-top: 36px; padding: 7px;
  border-radius: 999px; background: rgba(12, 21, 94, .5);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.sv-nav[hidden], .sv-nav [hidden] { display: none; }

.step-done .q { font-size: clamp(44px, 6vw, 92px); font-variation-settings: "wdth" 118; }
.done-sub { margin: 0 0 30px; max-width: 34ch; font-family: var(--voice); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; }
.done-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.preview { color: var(--butter); }
.preview[hidden] { display: none; }

/* ---------- Footer ---------- */

.foot { padding: 12vh var(--pad) 90px; text-align: center; }
.wordmark {
  margin: 0; white-space: nowrap; line-height: .8;
  font-weight: 900; font-variation-settings: "wdth" 125; letter-spacing: -.035em;
  font-size: 12vw;
}
.foot-note { margin: 26px 0 0; font-size: 14px; color: var(--milk-dim); }

/* ---------- Small screens ---------- */

@media (max-width: 700px) {
  body { font-size: 16px; }
  .s-hero { padding-bottom: 80px; }
  .hero-hint { font-size: 18px; }
  .op { white-space: normal; width: 11ch; text-align: center; }
  .pile { height: 150px; }
  .sv-nav { bottom: 58px; }
  .sticker { font-size: 15px; padding: 9px 15px; }
  .meter-n { font-size: 32px; }
  .s-survey { align-items: flex-start; padding-top: 36vh; }
  .chip span { font-size: 15px; padding: 10px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .chip span, .sv-bar i { transition: none; }
}
