@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --ink: #111315;
  --muted: #6e7478;
  --line: #dfe2e3;
  --soft: #f5f6f5;
  --acid: #c7ff3d;
  --acid-dark: #9fd500;
  --violet: #795cf5;
  --danger: #ed6d5a;
  --white: #ffffff;
  --mono: 'DM Mono', 'SFMono-Regular', Consolas, monospace;
  --sans: 'Space Grotesk', 'Avenir Next', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--white); }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--sans); }
button, input { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

.page-shell { width: min(100%, 1440px); min-height: 100vh; margin: 0 auto; padding: 0 5.2vw; display: flex; flex-direction: column; overflow: hidden; }
.site-header { min-height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.wordmark-mark { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 17px; font-weight: 500; letter-spacing: -0.1em; }
.wordmark-mark span { color: var(--violet); margin: 0 2px; font-size: 23px; line-height: 0; transform: rotate(18deg); }
.wordmark-name { font-size: 14px; font-weight: 700; letter-spacing: .18em; }
.header-status, .site-footer { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.header-status { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acid-dark); box-shadow: 0 0 0 4px rgba(199,255,61,.22); }

main { flex: 1; display: flex; flex-direction: column; }
.hero-stage { position: relative; min-height: calc(100vh - 142px); display: grid; grid-template-columns: .86fr 1.14fr; align-items: center; gap: 5vw; padding: 7vh 0 9vh; }
.hero-copy { position: relative; z-index: 1; max-width: 585px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.eyebrow-line { display: inline-block; width: 30px; height: 1px; background: var(--violet); }
h1, h2, p { margin-top: 0; }
h1 { max-width: 640px; margin-bottom: 27px; font-size: clamp(52px, 7.2vw, 104px); line-height: .89; letter-spacing: -.075em; font-weight: 600; }
h1 em { color: var(--violet); font-style: normal; }
.hero-description { max-width: 370px; margin-bottom: 34px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 46px; min-width: 162px; padding: 16px 17px 16px 20px; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.primary-button { background: var(--acid); box-shadow: 5px 5px 0 var(--ink); }
.primary-button:hover, .secondary-button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.primary-button:focus-visible, .secondary-button:focus-visible, input:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
.secondary-button { background: var(--white); box-shadow: 4px 4px 0 var(--violet); }
.button-arrow { font-size: 18px; font-weight: 400; line-height: .7; }
.microcopy { margin: 19px 0 0 2px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.keycap { display: inline-block; margin-right: 6px; padding: 2px 5px; border: 1px solid var(--line); border-bottom: 2px solid #c9cccd; border-radius: 3px; color: var(--ink); font-size: 9px; }

.hero-visual { position: relative; min-height: min(62vh, 545px); display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--line); }
.hero-grid { position: absolute; inset: 9% 3% 8% 14%; opacity: .55; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(90deg, transparent, black 23%, black 78%, transparent); }
.hero-word { position: relative; z-index: 2; margin-left: 8%; color: var(--ink); font-family: var(--mono); font-size: clamp(40px, 7.3vw, 105px); font-weight: 500; letter-spacing: -.12em; transform: rotate(-8deg); }
.hero-cursor { display: inline-block; margin-left: 10px; color: var(--violet); animation: blink 1s steps(2, start) infinite; }
.hero-card { position: absolute; z-index: 3; display: flex; flex-direction: column; gap: 7px; padding: 13px 17px 12px; border: 1px solid var(--ink); background: rgba(255,255,255,.92); box-shadow: 5px 5px 0 var(--acid); }
.hero-card-top { top: 12%; right: 10%; transform: rotate(4deg); }
.hero-card-bottom { bottom: 14%; left: 16%; box-shadow: 5px 5px 0 var(--violet); transform: rotate(-4deg); }
.card-label { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .13em; }
.hero-card strong { font-size: 22px; letter-spacing: -.05em; }
.crosshair { position: absolute; z-index: 1; width: 142px; height: 142px; border: 1px solid rgba(121,92,245,.34); border-radius: 50%; }
.crosshair::before, .crosshair::after, .crosshair span::before, .crosshair span::after { position: absolute; display: block; content: ''; background: var(--violet); }
.crosshair::before { width: 1px; height: 194px; top: -27px; left: 70px; opacity: .4; }
.crosshair::after { width: 194px; height: 1px; top: 70px; left: -27px; opacity: .4; }
.crosshair span::before, .crosshair span::after { width: 9px; height: 9px; border-radius: 50%; top: 65px; left: 65px; }
.crosshair span::after { background: var(--acid); width: 5px; height: 5px; top: 67px; left: 67px; }

.game-stage, .result-stage { padding: 7vh 0 8vh; }
.game-topbar { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 7vh; }
.game-caption { margin: -10px 0 0 40px; color: var(--muted); font-size: 14px; }
.timer-box { min-width: 142px; padding: 14px 18px 12px; border: 1px solid var(--ink); background: var(--acid); box-shadow: 5px 5px 0 var(--ink); transform: rotate(2deg); }
.timer-label { display: block; margin-bottom: 7px; color: #4f620d; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.timer-box strong { display: block; font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: -.08em; }
.game-panel { position: relative; max-width: 850px; margin: 0 auto; padding: 0 5vw 6vh; border-bottom: 1px solid var(--ink); }
.game-panel::before, .game-panel::after { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); content: ''; }
.game-panel::before { left: 0; } .game-panel::after { right: 0; }
.game-meta, .game-footer, .result-list-heading { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; }
.game-meta { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.word-area { padding: 8vh 0 5vh; text-align: center; }
.word-label { margin-bottom: 19px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; }
.target-word { min-height: 1em; font-family: var(--mono); font-size: clamp(42px, 8vw, 102px); font-weight: 500; letter-spacing: -.12em; line-height: 1; animation: word-in .24s ease-out; }
.target-underline { width: 62px; height: 4px; margin: 22px auto 0; background: var(--violet); }
.input-label { display: block; margin-bottom: 10px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.input-wrap { position: relative; }
input { width: 100%; padding: 17px 70px 17px 17px; border: 1px solid var(--ink); border-radius: 0; background: var(--soft); color: var(--ink); font-family: var(--mono); font-size: 16px; outline: none; transition: background .2s, border-color .2s, box-shadow .2s; }
input:focus { border-color: var(--violet); background: var(--white); box-shadow: 4px 4px 0 var(--violet); }
input::placeholder { color: #a4a9ab; }
.input-hint { position: absolute; top: 50%; right: 16px; padding: 4px 6px; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 8px; transform: translateY(-50%); }
.input-feedback { min-height: 17px; margin: 13px 0 0; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.input-feedback.good { color: var(--acid-dark); } .input-feedback.warn { color: var(--danger); }
.game-footer { margin-top: 18px; } .footer-symbol { margin-right: 5px; color: var(--violet); font-size: 15px; }

.countdown-stage, .start-flash { position: relative; min-height: calc(100vh - 142px); flex: 1; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.countdown-stage { display: flex; } .start-flash { display: flex; }
.countdown-stage .eyebrow, .start-flash .eyebrow { position: relative; z-index: 2; }
.countdown-stage h2 { position: relative; z-index: 2; margin-bottom: 6px; font-size: clamp(36px, 5vw, 68px); letter-spacing: -.06em; }
.countdown-number { position: relative; z-index: 2; min-height: 1em; color: var(--violet); font-family: var(--mono); font-size: clamp(150px, 25vw, 330px); font-weight: 500; line-height: .85; letter-spacing: -.15em; }
.countdown-note { position: relative; z-index: 2; margin-top: 26px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.countdown-orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbit-one { width: 58vw; height: 58vw; max-width: 750px; max-height: 750px; animation: spin 24s linear infinite; } .orbit-two { width: 33vw; height: 33vw; max-width: 430px; max-height: 430px; border-color: rgba(121,92,245,.25); animation: spin-reverse 19s linear infinite; }
.start-flash h2 { position: relative; z-index: 2; margin: 0; font-size: clamp(78px, 16vw, 220px); line-height: .8; letter-spacing: -.1em; animation: flash-in .5s ease-out both; }
.accent-dot { color: var(--violet); }

.result-stage { max-width: 940px; width: 100%; margin: auto; }
.result-heading { display: flex; flex-direction: column; align-items: center; text-align: center; }
.result-heading .eyebrow { margin-bottom: 20px; }
.result-heading h2 { margin-bottom: 16px; font-size: clamp(52px, 8vw, 110px); line-height: .9; letter-spacing: -.08em; }
.result-summary { max-width: 420px; margin-bottom: 44px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.result-stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.result-stat { padding: 20px; } .result-stat + .result-stat { border-left: 1px solid var(--line); }
.result-stat span { display: block; margin-bottom: 10px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; }
.result-stat strong { font-family: var(--mono); font-size: 35px; font-weight: 500; letter-spacing: -.1em; }
.result-words-wrap { margin: 34px 0 31px; padding: 20px 0 21px; border-bottom: 1px solid var(--line); }
.result-words { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; margin-top: 20px; }
.result-word { padding: 8px 10px; background: var(--soft); border-left: 3px solid var(--acid); font-family: var(--mono); font-size: 11px; }
.empty-result { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.result-stage .secondary-button { display: flex; margin: 0 auto; }

.site-footer { display: flex; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line); }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }
@keyframes word-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flash-in { from { opacity: 0; transform: scale(.76); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 760px) {
  .page-shell { padding: 0 22px; }
  .site-header { min-height: 70px; }
  .hero-stage { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 5vh; padding: 8vh 0 7vh; }
  h1 { font-size: clamp(54px, 18vw, 92px); }
  .hero-description { font-size: 14px; }
  .hero-visual { min-height: 270px; border-left: 0; border-top: 1px solid var(--line); }
  .hero-grid { inset: 10% 3% 5% 3%; background-size: 28px 28px; }
  .hero-word { margin-left: 0; font-size: clamp(45px, 15vw, 88px); }
  .hero-card-top { top: 10%; right: 4%; } .hero-card-bottom { bottom: 6%; left: 5%; }
  .crosshair { width: 100px; height: 100px; } .crosshair::before { height: 150px; top: -25px; left: 49px; } .crosshair::after { width: 150px; top: 49px; left: -25px; } .crosshair span::before { top: 45px; left: 45px; } .crosshair span::after { top: 47px; left: 47px; }
  .game-stage, .result-stage { padding: 6vh 0 7vh; }
  .game-topbar { margin-bottom: 6vh; } .game-caption { margin-left: 0; font-size: 12px; }
  .timer-box { min-width: 116px; padding: 10px 12px; } .timer-box strong { font-size: 22px; }
  .game-panel { padding: 0 6vw 6vh; }
  .word-area { padding: 7vh 0 5vh; } .target-word { font-size: clamp(37px, 13vw, 75px); }
  .game-footer { align-items: flex-start; gap: 15px; flex-direction: column; }
  .countdown-stage, .start-flash { min-height: calc(100vh - 122px); } .orbit-one { width: 100vw; height: 100vw; } .orbit-two { width: 60vw; height: 60vw; }
  .result-heading h2 { font-size: clamp(54px, 16vw, 92px); }
  .site-footer { font-size: 8px; }
}

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