:root {
  --ink: #050505;
  --ink-soft: #0b0b0b;
  --paper: #f4f0eb;
  --muted: #77716f;
  --line: rgba(244, 240, 235, 0.16);
  --line-strong: rgba(244, 240, 235, 0.32);
  --accent: #ff4fa3;
  --danger: #ff2d55;
  --success-paper: #23091c;
  --mono: "DM Mono", "Courier New", monospace;
  --display: "Space Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html { width: 100%; height: 100%; min-width: 320px; overflow: hidden; background: var(--ink); }

body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-width: 320px;
  min-height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
}

button, input { font: inherit; }
button { cursor: pointer; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  position: relative;
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at 50% 50%, #0d0d0d 0, var(--ink) 50%, #000 100%);
}

.pixel-canvas, .grain { position: absolute; inset: 0; pointer-events: none; }
.pixel-canvas { z-index: -3; opacity: 0.82; }
.grain {
  z-index: -2;
  opacity: 0.085;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.top-line {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 50%;
  width: min(100% - 48px, 1360px);
  height: 5px;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
}
.top-line span { height: 100%; background: var(--accent); }
.top-line span:nth-child(1) { width: 9%; opacity: .3; }
.top-line span:nth-child(2) { width: 63%; opacity: .86; }
.top-line span:nth-child(3) { flex: 1; opacity: .16; }

.gate-view, .success-view {
  position: relative;
  min-height: 100svh;
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 28px clamp(24px, 5vw, 76px) 24px;
}

.site-header, .site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.site-header { min-height: 36px; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-decoration: none;
}
.wordmark-mark { display: grid; grid-template-columns: repeat(2, 5px); gap: 2px; width: 12px; height: 12px; }
.wordmark-mark i { display: block; width: 5px; height: 5px; background: var(--accent); }
.wordmark-mark i:nth-child(2) { opacity: .62; }
.wordmark-mark i:nth-child(3) { opacity: .32; }
.wordmark-mark i:nth-child(4) { opacity: .1; }
.signal-readout { margin: 0; white-space: nowrap; }
.status-dot { display: inline-block; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blink 1.8s ease-in-out infinite; }
.readout-divider { padding: 0 10px; color: #3b3a3a; }

.gate-content {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  margin: clamp(88px, 17vh, 190px) auto 10vh;
  text-align: center;
}
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--accent); font-size: 10px; letter-spacing: .25em; }
.eyebrow-rule { width: 32px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow-rule--short { width: 10px; opacity: .35; }

h1 {
  max-width: 970px;
  margin: 25px auto 21px;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(42px, 8.5vw, 112px);
  font-weight: 700;
  letter-spacing: -.09em;
  line-height: .89;
  text-indent: -.08em;
}
h1 em { color: var(--accent); font-style: normal; }
.intro { margin: 0 auto; color: #8c8785; font-size: 12px; line-height: 1.75; letter-spacing: .03em; }
.intro-accent { color: #ff4fa3 !important; font-weight: 700; text-shadow: 0 0 10px rgba(255, 79, 163, .42); }

.answer-form { display: flex; width: min(630px, 100%); margin: 48px auto 0; text-align: left; }
.input-frame {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid #343132;
  background: rgba(5, 5, 5, .66);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.input-frame:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 79, 163, .09); }
.input-prefix { margin-right: 12px; color: var(--accent); font-size: 12px; }
.input-frame input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--paper); font-size: 13px; letter-spacing: .04em; }
.input-frame input::placeholder { color: #514e4d; }
.input-caret { width: 7px; height: 16px; margin-left: 7px; background: var(--accent); opacity: 0; animation: cursor 1s steps(1) infinite; }
.input-frame:focus-within .input-caret { opacity: .8; }
.submit-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 146px;
  border: 1px solid var(--accent);
  border-left: 0;
  padding: 0 17px;
  background: var(--accent);
  color: #17010d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.submit-button:hover { background: #ff8ac2; }
.submit-button:active { transform: translateY(2px); }
.button-arrow { font-size: 18px; line-height: 1; }

.form-message { min-height: 42px; margin: 18px 0 0; color: var(--danger); font-size: 12px; letter-spacing: .03em; }
.form-message.wrong { animation: wrongVibration .33s linear both; }
.form-message strong { display: block; color: var(--danger); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.form-message span { display: block; margin-top: 6px; color: #b75c6c; font-size: 10px; }
.form-message .hint-two { margin-top: 5px; color: #d38b98; font-size: 9px; line-height: 1.5; }

.hint-card { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 31px; color: #5e5958; font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.hint-label { color: #797170; }
.hint-text { color: #aaa1a0; }
.hint-code { color: #4f4b4a; }

.site-footer { position: absolute; right: clamp(24px, 5vw, 76px); bottom: 24px; left: clamp(24px, 5vw, 76px); }
.footer-center { position: absolute; left: 50%; transform: translateX(-50%); color: #4d4948; }

/* Unlocked page */
.success-view { display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #ff86c1 0%, var(--accent) 25%, #c82078 68%, #83154d 100%); color: var(--success-paper); }
.success-view::before { content: ""; position: absolute; inset: 0; opacity: .2; background: linear-gradient(135deg, transparent 0 48%, rgba(255,255,255,.27) 49%, transparent 50%), linear-gradient(45deg, transparent 0 48%, rgba(35,9,28,.18) 49%, transparent 50%); background-size: 34px 34px; mix-blend-mode: overlay; }
.success-scanline { position: absolute; inset: 0; opacity: .2; background: repeating-linear-gradient(0deg, transparent 0, transparent 4px, rgba(35,9,28,.32) 5px, transparent 6px); pointer-events: none; }
.success-content { position: relative; z-index: 2; width: min(760px, 100%); text-align: center; animation: bloomIn .8s cubic-bezier(.16, 1, .3, 1) both; }
.success-stamp { display: inline-flex; align-items: center; gap: 10px; padding: 9px 13px; border: 1px solid rgba(35,9,28,.5); color: var(--success-paper); font-size: 10px; font-weight: 700; letter-spacing: .2em; }
.success-stamp span { font-size: 15px; }
.success-kicker { max-width: 720px; margin: 44px auto 18px; font-size: clamp(10px, 1.2vw, 13px); letter-spacing: .18em; line-height: 1.5; }
.success-content h2 { margin: 0; font-family: var(--display); font-size: clamp(56px, 10vw, 144px); line-height: .81; letter-spacing: -.11em; }
.success-content h2 span { color: #ffcae4; }
.success-copy { margin: 32px 0 35px; font-size: 12px; line-height: 1.8; }
.success-copy--bold { max-width: 620px; margin-right: auto; margin-left: auto; font-size: clamp(12px, 1.5vw, 16px); line-height: 1.55; }
.success-copy--bold strong { font-weight: 700; }
.reset-button { border: 1px solid rgba(35,9,28,.55); padding: 14px 18px; background: transparent; color: var(--success-paper); font-size: 10px; font-weight: 700; letter-spacing: .18em; transition: background .25s ease, color .25s ease; }
.reset-button:hover { background: var(--success-paper); color: var(--accent); }
.success-orbit { position: absolute; border: 1px solid rgba(35,9,28,.25); border-radius: 50%; pointer-events: none; }
.orbit-one { width: min(74vw, 900px); aspect-ratio: 1; animation: spin 28s linear infinite; }
.orbit-two { width: min(52vw, 640px); aspect-ratio: 1; border-color: rgba(255, 202, 228, .45); animation: spinReverse 19s linear infinite; }
.success-corner { position: absolute; z-index: 2; bottom: 28px; color: rgba(35,9,28,.72); font-size: 9px; line-height: 1.55; letter-spacing: .15em; }
.success-corner--left { left: clamp(24px, 5vw, 76px); }
.success-corner--right { right: clamp(24px, 5vw, 76px); text-align: right; }

/* Stage two */
.stage-two-view {
  position: relative;
  display: grid;
  min-height: 100svh;
  width: 100%;
  place-items: center;
  padding: 48px clamp(24px, 9vw, 160px);
  background: #000;
  color: #fff;
  text-align: center;
}
.stage-two-view h1,
.stage-two-view h2 {
  max-width: 1080px;
  margin: 0;
  font-family: "Baloo 2", "Arial Rounded MT Bold", sans-serif;
  font-size: clamp(42px, 7.4vw, 112px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .94;
  text-wrap: balance;
}

.standalone-page {
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
}

@keyframes blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes cursor { 0%, 45% { opacity: .8; } 46%, 100% { opacity: 0; } }
@keyframes wrongVibration { 0% { transform: translateX(0); } 15% { transform: translateX(-5px) rotate(-.5deg); } 30% { transform: translateX(5px) rotate(.5deg); } 45% { transform: translateX(-4px); } 60% { transform: translateX(3px); } 75% { transform: translateX(-2px); } 100% { transform: translateX(0); } }
@keyframes bloomIn { from { opacity: 0; transform: scale(.9); filter: blur(15px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }

@media (max-width: 620px) {
  .gate-view, .success-view { padding-top: 21px; }
  .signal-readout { font-size: 9px; }
  .readout-divider { padding: 0 5px; }
  .gate-content { margin-top: 17vh; }
  .answer-form { flex-direction: column; gap: 10px; }
  .submit-button { min-height: 52px; border-left: 1px solid var(--accent); }
  .hint-card { flex-wrap: wrap; gap: 8px 12px; }
  .hint-code { width: 100%; }
  .footer-center { display: none; }
  .site-footer { font-size: 9px; }
  .success-corner { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
