:root {
  --ink: #06060a;
  --paper: #f2f3f7;
  --dim: #8b8fa3;
  --magenta: #ff2bd6;
  --cyan: #19f0ff;
  --volt: #d4ff3a;
  --red: #ff3b3b;
  --hud-inset: max(14px, env(safe-area-inset-left));
  --display: "Arial Black", "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--ink); -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--paper);
  font-family: var(--body);
  line-height: 1.5;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgb(255 43 214 / 0.10), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 55%, rgb(25 240 255 / 0.08), transparent 70%),
    var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Background layers ---------- */

.warp {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgb(255 255 255 / 0.035) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

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

.viewfinder {
  position: fixed;
  inset: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
         max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  z-index: 2;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgb(242 243 247 / 0.7);
}

.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid rgb(242 243 247 / 0.55);
}
.corner-tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.corner-tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.corner-bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.corner-br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.hud { position: absolute; white-space: nowrap; }
.hud-tl { top: 8px; left: 36px; }
.hud-tr { top: 8px; right: 36px; }
.hud-bl { bottom: 8px; left: 36px; }
.hud-br { bottom: 8px; right: 36px; }

.rec-dot {
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  vertical-align: 0;
  animation: blink 1s steps(1) infinite;
}
.blink { animation: blink 1.6s steps(1) infinite; color: var(--volt); }
.hud-alert { color: var(--magenta); }

@keyframes blink { 50% { opacity: 0.15; } }

/* ---------- Stage ---------- */

.stage {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 20px 32px;
}

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before { content: "▶ "; color: var(--magenta); }

/* The logo is three stacked copies: the text itself plus magenta and cyan
   ghosts (::before/::after) that split apart during a glitch. */
.logo {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-style: italic;
  /* The wordmark is ~9.4em wide plus its speed trail; 8.4vw keeps it inside
     a phone's width with the stage padding. */
  font-size: clamp(1.7rem, 8.4vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  transform: skewX(-6deg);
  color: var(--paper);
  text-shadow:
    -6px 0 0 rgb(255 43 214 / 0.20),
    -14px 0 0 rgb(25 240 255 / 0.12),
    -26px 0 0 rgb(255 255 255 / 0.05);
  user-select: none;
}
.logo::before,
.logo::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  text-shadow: none;
  opacity: 0.85;
}
.logo::before {
  color: var(--magenta);
  mix-blend-mode: screen;
  animation: glitch-a 3.2s infinite steps(1);
}
.logo::after {
  color: var(--cyan);
  mix-blend-mode: screen;
  animation: glitch-b 3.2s infinite steps(1);
}

@keyframes glitch-a {
  0%, 86%, 100% { transform: translate(-2px, 0); clip-path: inset(0 0 0 0); }
  88% { transform: translate(-9px, 1px); clip-path: inset(12% 0 58% 0); }
  90% { transform: translate(7px, -1px); clip-path: inset(62% 0 8% 0); }
  92% { transform: translate(-5px, 0); clip-path: inset(34% 0 40% 0); }
  94% { transform: translate(-2px, 0); clip-path: inset(0 0 0 0); }
}
@keyframes glitch-b {
  0%, 86%, 100% { transform: translate(2px, 0); clip-path: inset(0 0 0 0); }
  88% { transform: translate(8px, -1px); clip-path: inset(55% 0 20% 0); }
  90% { transform: translate(-6px, 1px); clip-path: inset(5% 0 72% 0); }
  92% { transform: translate(4px, 0); clip-path: inset(44% 0 30% 0); }
  94% { transform: translate(2px, 0); clip-path: inset(0 0 0 0); }
}

.tagline {
  margin: 22px 0 0;
  font-size: clamp(1.15rem, 4.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tagline em {
  font-style: italic;
  background: linear-gradient(90deg, var(--volt), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.secret {
  max-width: 34em;
  margin: 14px 0 0;
  color: var(--dim);
  font-size: clamp(0.95rem, 3.4vw, 1.05rem);
}

/* A hidden sentence: every word is a bar until it is clicked. The word is
   in the button all along (transparent), so each bar is exactly its word's
   width and revealing it does not move anything. */
.redacted-line {
  max-width: 34em;
  margin: 12px 0 0;
  font-size: clamp(0.95rem, 3.4vw, 1.05rem);
  line-height: 1.9;
}

.redact {
  display: inline-block;
  margin: 0 2px;
  padding: 0 3px;
  border: 0;
  border-radius: 2px;
  background: rgb(242 243 247 / 0.82);
  color: transparent;
  font: inherit;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 0.15s;
}
.redact:hover, .redact:focus-visible { background: var(--magenta); }
.redact:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.redact.is-revealed {
  background: transparent;
  color: var(--volt);
  cursor: default;
  animation: reveal-flash 0.4s steps(1);
}

@keyframes reveal-flash {
  0% { color: var(--magenta); transform: translateX(-2px); }
  33% { color: var(--cyan); transform: translateX(2px); }
  66% { color: var(--volt); transform: translateX(0); }
}

/* ---------- Signup ---------- */

.signup {
  width: 100%;
  max-width: 520px;
  margin: 36px 0 0;
  padding: 24px 20px 20px;
  border: 1px solid rgb(242 243 247 / 0.12);
  border-radius: 16px;
  background: rgb(10 10 18 / 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgb(255 43 214 / 0.08), 0 20px 60px rgb(0 0 0 / 0.5);
}
.signup h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.signup-sub {
  margin: 4px 0 18px;
  font-size: 0.9rem;
  color: var(--dim);
}

.field-row {
  display: flex;
  gap: 10px;
}

.signup-form input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgb(242 243 247 / 0.2);
  border-radius: 10px;
  background: rgb(0 0 0 / 0.5);
  color: var(--paper);
  /* 16px or larger stops iOS Safari zooming into the field on focus. */
  font-size: 16px;
  font-family: var(--mono);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.signup-form input::placeholder { color: rgb(139 143 163 / 0.7); }
.signup-form input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgb(25 240 255 / 0.2);
}
.signup-form input[aria-invalid="true"] { border-color: var(--red); }

.go {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--volt);
  color: var(--ink);
  font: 800 1rem var(--body);
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s, box-shadow 0.2s;
  touch-action: manipulation;
}
.go::after {
  /* A light sweep that runs across the button on hover. */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 0.6) 50%, transparent 70%);
  transform: translateX(-120%);
}
.go:hover { box-shadow: 0 0 24px rgb(212 255 58 / 0.45); }
.go:hover::after { transform: translateX(120%); transition: transform 0.6s; }
.go:active { transform: scale(0.97); }
.go:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.go:disabled { cursor: progress; opacity: 0.7; }
.go-arrow { transition: transform 0.2s; }
.go:hover .go-arrow { transform: translateX(4px); }

.captcha {
  display: flex;
  justify-content: center;
  min-height: 65px;
  margin-top: 14px;
}

.status {
  min-height: 1.5em;
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.status.is-error { color: var(--red); }
.status.is-busy { color: var(--cyan); }

.locked { padding: 8px 0 4px; }
.locked-title {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--volt);
  text-shadow: 0 0 20px rgb(212 255 58 / 0.4);
}
.locked-sub { margin: 4px 0 0; color: var(--dim); }

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

.footer {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  padding: 12px 20px calc(44px + env(safe-area-inset-bottom));
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.footer-sep { color: var(--magenta); }

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

@media (max-width: 520px) {
  .field-row { flex-direction: column; }
  .signup-form input { flex: none; }
  .go { width: 100%; }
  .signup { padding: 20px 14px 16px; }
  .stage { padding: 64px 14px 24px; }
  .hud-tr, .hud-br { font-size: 10px; }
  .hud-bl { display: none; }
  .footer { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .hud-tr { display: none; }
  .eyebrow { letter-spacing: 0.16em; font-size: 11px; }
}

/* Short landscape phones: tighten vertical rhythm. */
@media (max-height: 520px) and (orientation: landscape) {
  .stage { padding-top: 48px; }
  .signup { margin-top: 20px; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .logo::before, .logo::after, .rec-dot, .blink, .redact.is-revealed { animation: none; }
  .go::after { display: none; }
  .go, .go-arrow { transition: none; }
}
