/* ============================================================
   KREAKS — cinematic command-center design system
   ============================================================ */
:root {
  --bg: #04060c;
  --bg-2: #070b16;
  --ink: #eaf3ff;
  --ink-dim: rgba(214, 231, 255, 0.62);
  --ink-faint: rgba(190, 214, 248, 0.38);
  --blue: #4db8ff;
  --cyan: #7fe9ff;
  --violet: #9d7bff;
  --green: #58f5b4;
  --line: rgba(127, 205, 255, 0.16);
  --glass: rgba(10, 18, 34, 0.55);
  --font-display: "Avenir Next", "Helvetica Neue", "Segoe UI", "Inter", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); }
html, body { height: auto; }
body {
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }

::selection { background: rgba(77, 184, 255, 0.35); color: #fff; }

a { color: inherit; }

/* ---------------- scroll spacer (drives the timeline) ---------------- */
#scroll-space { width: 1px; pointer-events: none; }

/* ---------------- WebGL stage ---------------- */
#stage {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
}
#vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(1, 2, 6, 0.55) 100%),
    linear-gradient(to bottom, rgba(2, 4, 9, 0.5), transparent 18%, transparent 84%, rgba(2, 4, 9, 0.62));
}

/* ---------------- boot sequence ---------------- */
#boot {
  position: fixed; inset: 0; z-index: 100;
  background: #020409;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.9s var(--ease-out), visibility 0.9s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(420px, 78vw); }
.boot-mark {
  font-size: 28px; font-weight: 700; letter-spacing: 0.34em;
  color: var(--ink);
}
.boot-os { color: var(--blue); letter-spacing: 0.34em; }
.boot-lines {
  margin: 26px 0 18px;
  font-family: var(--font-mono);
  font-size: 11px; line-height: 1.9; letter-spacing: 0.08em;
  color: var(--ink-faint);
  min-height: 116px;
}
.boot-lines .ok { color: var(--blue); }
.boot-bar {
  height: 2px; background: rgba(127, 205, 255, 0.12);
  overflow: hidden;
}
.boot-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 12px rgba(77, 184, 255, 0.8);
}
.boot-pct {
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3em;
  color: var(--ink-dim); text-align: right;
}

/* ---------------- cursor ---------------- */
#cursor { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) { #cursor { display: block; } }
.cursor-dot, .cursor-ring {
  position: absolute; top: 0; left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot { width: 5px; height: 5px; background: var(--cyan); box-shadow: 0 0 10px var(--blue); }
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(127, 205, 255, 0.45);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s, opacity 0.25s;
}
#cursor.hot .cursor-ring {
  width: 58px; height: 58px;
  border-color: rgba(127, 233, 255, 0.9);
  box-shadow: 0 0 24px rgba(77, 184, 255, 0.35), inset 0 0 18px rgba(77, 184, 255, 0.2);
}

/* ---------------- nav ---------------- */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 22px;
  padding: 22px clamp(20px, 4vw, 52px);
}
.wordmark {
  font-weight: 800; letter-spacing: 0.32em; font-size: 15px;
  text-decoration: none; color: var(--ink);
  text-shadow: 0 0 24px rgba(77, 184, 255, 0.45);
}
.nav-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.28em;
  color: var(--ink-faint);
  margin-right: auto;
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------------- buttons ---------------- */
.btn {
  --btn-glow: rgba(77, 184, 255, 0.45);
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 16px 30px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(20, 34, 60, 0.55), rgba(8, 14, 28, 0.55));
  border: 1px solid rgba(127, 205, 255, 0.35);
  border-radius: 4px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
  will-change: transform;
}
.btn:hover {
  border-color: rgba(127, 233, 255, 0.85);
  box-shadow: 0 0 28px var(--btn-glow), inset 0 0 22px rgba(77, 184, 255, 0.12);
}
.btn-primary {
  background: linear-gradient(180deg, rgba(38, 96, 168, 0.75), rgba(16, 42, 88, 0.75));
  border-color: rgba(127, 205, 255, 0.6);
  box-shadow: 0 0 22px rgba(38, 118, 220, 0.28);
}
.btn-ghost { background: rgba(8, 14, 28, 0.35); }
.btn-nav { padding: 11px 20px; font-size: 11px; }
.btn-lg { padding: 20px 42px; font-size: 14px; }
.btn-arrow { font-size: 15px; color: var(--cyan); }

/* ---------------- system progress HUD ---------------- */
#hud {
  position: fixed; z-index: 40;
  left: clamp(16px, 3vw, 40px); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 16px;
}
.hud-readout {
  display: flex; flex-direction: column; gap: 3px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.3em;
}
#hud-sys { color: var(--blue); }
#hud-name { color: var(--ink-faint); }
.hud-track {
  position: relative;
  width: 2px; height: min(38vh, 320px);
  background: rgba(127, 205, 255, 0.12);
}
.hud-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: linear-gradient(180deg, var(--blue), var(--violet));
  box-shadow: 0 0 10px rgba(77, 184, 255, 0.7);
}
.hud-tick {
  position: absolute; left: 50%;
  width: 12px; height: 12px;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none; cursor: pointer; padding: 0;
}
.hud-tick::after {
  content: ""; position: absolute; inset: 3px;
  border: 1px solid rgba(127, 205, 255, 0.5);
  transform: rotate(45deg);
  background: var(--bg);
  transition: background 0.3s, box-shadow 0.3s;
}
.hud-tick.on::after { background: var(--blue); box-shadow: 0 0 10px var(--blue); }

/* ---------------- overlays / acts ---------------- */
#overlays { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.act {
  position: absolute; inset: 0;
  display: flex;
  opacity: 0;
  visibility: hidden;
}
.act.live { visibility: visible; }
.act-center {
  margin: auto; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 22px;
  max-width: 1080px;
}
.act-left {
  position: relative;
  margin: auto auto auto clamp(72px, 11vw, 190px);
  max-width: 620px;
  padding: 0 22px;
}
.act-top {
  position: relative;
  margin: max(11vh, 96px) auto auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 22px;
  max-width: 1020px;
}
/* readability scrim — a soft black-glass pool behind every copy block, so
   bright holograms never sit directly under primary text */
.act-left::before, .act-center::before, .act-top::before {
  content: ""; position: absolute; z-index: -1;
  inset: -9% -14%;
  background: radial-gradient(58% 62% at 50% 42%,
    rgba(2, 4, 10, 0.72), rgba(2, 4, 10, 0.38) 55%, transparent 78%);
  pointer-events: none;
}
.act-center { position: relative; }
.act .cta-row, .act .btn, .act a, .hud-tick { pointer-events: auto; }

/* hero clarity pipeline */
.pipeline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-top: clamp(22px, 3.6vh, 36px);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
}
.pipeline em { font-style: normal; color: var(--cyan); text-shadow: 0 0 8px rgba(77, 184, 255, 0.8); }
.pipeline span {
  white-space: nowrap;
  padding: 7px 12px;
  background: rgba(5, 9, 20, 0.72);
  border: 1px solid rgba(127, 205, 255, 0.3);
  border-radius: 4px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* step counter under how-it-works copy */
.step-progress {
  margin-top: clamp(18px, 3vh, 28px);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.3em;
  color: var(--ink-faint);
}
.step-progress b { color: var(--cyan); font-weight: 600; }

/* example questions in step 02 */
.lede .q { color: var(--cyan); font-style: italic; }

/* loop workflow strip */
.workflow-line {
  margin-top: clamp(20px, 3.4vh, 32px);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.14em; line-height: 2;
  color: var(--ink-dim); text-transform: uppercase;
}
.workflow-line span { color: var(--green); }

/* capabilities list — DOM fallback, shown only on small screens where the
   3D card copy would be too small to read */
.cap-list {
  display: none;
  list-style: none;
  margin-top: 26px;
  text-align: left;
  gap: 10px;
  flex-direction: column;
  width: min(440px, 100%);
}
.cap-list li {
  background: linear-gradient(180deg, rgba(14, 24, 46, 0.75), rgba(6, 10, 22, 0.8));
  border: 1px solid rgba(127, 205, 255, 0.22);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px; line-height: 1.55; color: var(--ink-dim);
}
.cap-list li strong {
  display: block; color: var(--ink);
  font-size: 14px; margin-bottom: 2px; letter-spacing: 0.02em;
}

/* brands / agencies columns */
.teams-cols {
  display: flex; gap: clamp(16px, 3vw, 34px); flex-wrap: wrap; justify-content: center;
  margin-top: clamp(26px, 4.5vh, 46px);
}
.team-col {
  flex: 1 1 300px; max-width: 400px;
  text-align: left;
  background: linear-gradient(180deg, rgba(14, 24, 46, 0.68), rgba(6, 10, 22, 0.78));
  border: 1px solid rgba(127, 205, 255, 0.26);
  border-radius: 8px;
  padding: 26px 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(190, 226, 255, 0.1);
}
.team-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.3em;
  color: var(--cyan);
}
.team-tag-violet { color: var(--violet); }
.team-col h3 { font-size: clamp(19px, 1.8vw, 24px); margin: 10px 0 8px; letter-spacing: -0.01em; }
.team-col p { font-size: 14px; line-height: 1.65; color: var(--ink-dim); }

.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.34em; color: var(--blue);
  margin-bottom: clamp(18px, 3vh, 30px);
  text-transform: uppercase;
}
.kicker-line { width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--blue)); }

.h-display {
  font-size: clamp(46px, 7.4vw, 108px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
  background: linear-gradient(180deg, #ffffff 30%, rgba(190, 220, 255, 0.75));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 40px rgba(35, 90, 190, 0.35));
}
.h-mid { font-size: clamp(38px, 5.6vw, 84px); }

.lede {
  margin-top: clamp(18px, 3vh, 30px);
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.65;
  color: var(--ink-dim);
  font-weight: 400;
  max-width: 640px;
}
.act-center .lede { margin-left: auto; margin-right: auto; }

.quiet-quote {
  margin-top: clamp(26px, 4.5vh, 46px);
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.8;
  color: var(--ink-faint);
  font-style: italic;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.cta-quote { border-left: none; padding-left: 0; }

.micro-note {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em; line-height: 1.8;
  color: var(--green);
  opacity: 0.85;
}
.micro-note em { font-style: normal; border: 1px solid rgba(88, 245, 180, 0.4); padding: 1px 7px; border-radius: 3px; }

.sys-line {
  margin-top: clamp(20px, 3.5vh, 34px);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.22em; line-height: 2.1;
  color: var(--ink-dim); text-transform: uppercase;
}
.sys-line span { color: var(--cyan); }

.cta-row {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  margin-top: clamp(30px, 5vh, 52px);
}

.scroll-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.4em;
  color: var(--ink-faint);
}
.scroll-hint-line {
  width: 1px; height: 44px;
  background: linear-gradient(180deg, transparent, var(--blue));
  animation: hintDrop 2.2s var(--ease-out) infinite;
}
@keyframes hintDrop {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(10px); opacity: 0; }
}

.site-footer {
  margin-top: clamp(34px, 6vh, 60px);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--ink-faint);
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  pointer-events: auto;
}
.site-footer a { text-decoration: none; color: var(--ink-dim); }
.site-footer a:hover { color: var(--cyan); }
.foot-sep { color: rgba(127, 205, 255, 0.3); }

/* ---------------- reveals (scrub-driven, JS sets --rv 0..1) ---------------- */
.reveal {
  opacity: calc(var(--rv, 0));
  transform: translateY(calc((1 - var(--rv, 0)) * 46px));
  will-change: transform, opacity;
}

/* ---------------- waitlist dialog ---------------- */
#waitlist { position: fixed; inset: 0; z-index: 200; display: flex; }
#waitlist[hidden] { display: none; }
.wl-backdrop {
  position: absolute; inset: 0; z-index: 0;
  background: rgba(2, 4, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.wl-panel {
  position: relative; z-index: 1;
  margin: auto;
  width: min(480px, calc(100vw - 40px));
  padding: 44px 42px 34px;
  background: linear-gradient(180deg, rgba(14, 24, 46, 0.92), rgba(6, 10, 22, 0.94));
  border: 1px solid rgba(127, 205, 255, 0.3);
  border-radius: 8px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7), 0 0 60px rgba(38, 118, 220, 0.18), inset 0 1px 0 rgba(190, 226, 255, 0.14);
  animation: wlIn 0.5s var(--ease-out);
}
@keyframes wlIn { from { opacity: 0; transform: translateY(26px) scale(0.97); } }
.wl-panel h3 { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.wl-panel p { color: var(--ink-dim); font-size: 14px; line-height: 1.65; }
.wl-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; color: var(--ink-faint);
  font-size: 14px; cursor: pointer; padding: 8px;
}
.wl-close:hover { color: var(--cyan); }
#wl-form { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
#wl-email {
  flex: 1 1 200px;
  background: rgba(4, 8, 18, 0.8);
  border: 1px solid rgba(127, 205, 255, 0.28);
  border-radius: 4px;
  padding: 15px 16px;
  color: var(--ink);
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
#wl-email:focus { border-color: var(--blue); box-shadow: 0 0 18px rgba(77, 184, 255, 0.25); }
.wl-note { margin-top: 16px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-faint) !important; }

.bp-mobile { display: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 880px) {
  .bp-mobile { display: inline; }
  #hud { display: none; }
  .nav-status { display: none; }
  /* copy rides the top of the frame; the scene owns the lower two thirds */
  .act-left { margin: max(13vh, 92px) auto auto; text-align: center; }
  .act-left .kicker { justify-content: center; }
  .quiet-quote { border-left: none; padding-left: 0; }
  .bp-desktop { display: none; }
  .cta-row { justify-content: center; }
  .cap-list { display: flex; }
  .act-top { margin-top: max(10vh, 84px); }
  .pipeline { gap: 7px; font-size: 9px; letter-spacing: 0.16em; }
  .h-display { font-size: clamp(30px, 8.8vw, 46px); }
  .h-mid { font-size: clamp(27px, 8vw, 40px); }
  .kicker { letter-spacing: 0.22em; font-size: 9px; }
  .lede { font-size: 15px; }
  .btn { padding: 14px 22px; font-size: 12px; }
  .btn-lg { padding: 16px 30px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint-line, .pulse-dot { animation: none; }
}

/* ---------------- no-WebGL fallback: static cinematic panels ---------------- */
body.fallback #stage, body.fallback #scroll-space, body.fallback #hud, body.fallback #cursor { display: none; }
body.fallback #overlays { position: static; }
body.fallback .act {
  position: relative;
  min-height: 100vh;
  opacity: 1 !important;
  visibility: visible;
  padding: 14vh 0;
  border-bottom: 1px solid rgba(127, 205, 255, 0.08);
  background: radial-gradient(90% 70% at 50% 30%, rgba(28, 60, 120, 0.18), transparent 70%);
}
body.fallback .reveal { opacity: 1; transform: none; }
body.fallback .scroll-hint { display: none; }

