/* sitecxn — splash page
   Palette + layout ported from the Claude Design prototype. */

:root {
  color-scheme: dark;
  --bg: #0b0b0c; --fg: oklch(0.96 0.005 250); --dim: oklch(0.74 0.01 250);
  --faint: oklch(0.55 0.01 250); --mute: oklch(0.62 0.01 250);
  --line: oklch(1 0 0 / 0.12); --hair: oklch(1 0 0 / 0.1); --dot: oklch(1 0 0 / 0.055);
  --acc: oklch(0.82 0.15 148); --acc-hi: oklch(0.88 0.16 148); --acc-fg: #000;
  --court: #000; --veil: oklch(0 0 0 / 0.74); --scan: oklch(1 0 0 / 0.045);
  --c-paddle: #ffffff; --c-net: rgba(255,255,255,0.22); --c-ghost: rgba(255,255,255,0.05);
  --c-a: #63d996; --c-b: #e8c25a; --c-w: #e8735a; --c-spark: #ffffff;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: oklch(0.977 0.006 95); --fg: oklch(0.23 0.012 260); --dim: oklch(0.44 0.012 260);
    --faint: oklch(0.58 0.012 260); --mute: oklch(0.5 0.012 260);
    --line: oklch(0.23 0.012 260 / 0.16); --hair: oklch(0.23 0.012 260 / 0.12); --dot: oklch(0.23 0.012 260 / 0.07);
    --acc: oklch(0.55 0.15 148); --acc-hi: oklch(0.48 0.15 148); --acc-fg: oklch(0.99 0.004 95);
    --court: oklch(0.995 0.004 95); --veil: oklch(0.977 0.006 95 / 0.82); --scan: oklch(0.23 0.012 260 / 0.05);
    --c-paddle: #1a1a1c; --c-net: rgba(26,26,28,0.24); --c-ghost: rgba(26,26,28,0.07);
    --c-a: #1a8a5c; --c-b: #a8791a; --c-w: #b4472c; --c-spark: #1a1a1c;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: oklch(0.977 0.006 95); --fg: oklch(0.23 0.012 260); --dim: oklch(0.44 0.012 260);
  --faint: oklch(0.58 0.012 260); --mute: oklch(0.5 0.012 260);
  --line: oklch(0.23 0.012 260 / 0.16); --hair: oklch(0.23 0.012 260 / 0.12); --dot: oklch(0.23 0.012 260 / 0.07);
  --acc: oklch(0.55 0.15 148); --acc-hi: oklch(0.48 0.15 148); --acc-fg: oklch(0.99 0.004 95);
  --court: oklch(0.995 0.004 95); --veil: oklch(0.977 0.006 95 / 0.82); --scan: oklch(0.23 0.012 260 / 0.05);
  --c-paddle: #1a1a1c; --c-net: rgba(26,26,28,0.24); --c-ghost: rgba(26,26,28,0.07);
  --c-a: #1a8a5c; --c-b: #a8791a; --c-w: #b4472c; --c-spark: #1a1a1c;
}

html, body { margin: 0; padding: 0; background: var(--bg); transition: background 0.25s ease; }
* { box-sizing: border-box; }

a { color: var(--acc); text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--acc) 40%, transparent); }
a:hover { color: var(--acc-hi); border-bottom-color: var(--acc-hi); }

@keyframes cxn-blink { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0.15 } }
@keyframes cxn-drift { 0% { transform: translateY(0) } 50% { transform: translateY(-6px) } 100% { transform: translateY(0) } }

/* ---------- shell ---------- */

.page {
  min-height: 100vh;
  background: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--fg);
  font-family: 'Space Grotesk', Helvetica, sans-serif;
  padding: 28px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.bar, .hero, .card, .foot { width: 100%; max-width: 1040px; }

/* ---------- buttons ---------- */

.btn {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 11px;
  cursor: pointer;
}

.btn-ghost {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--acc); color: var(--acc); }

.btn-primary {
  background: var(--acc);
  color: var(--acc-fg);
  border: 1px solid var(--acc);
  padding: 7px 13px;
  font-weight: 500;
}
.btn-primary:hover { background: var(--acc-hi); border-color: var(--acc-hi); }

.btn-big {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.18em;
  border: none;
  padding: 12px 20px;
}
.btn-big:hover { background: var(--acc-hi); }

/* ---------- header ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.mark { display: flex; align-items: center; gap: 0; }
.mark-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--acc); }
.mark-bar { width: 20px; height: 3px; background: var(--acc); }
.mark-ring { width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--acc); }

.wordmark {
  font-family: 'DM Mono', monospace;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.bar-right { display: flex; align-items: center; gap: 14px; }

.rootline {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--mute);
  text-transform: uppercase;
}

.btn-theme { display: flex; align-items: center; gap: 8px; }

.theme-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: inset 0 0 0 2px var(--bg), 0 0 0 1px var(--fg);
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.hero-copy {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acc);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-copy p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 46ch;
  text-wrap: pretty;
}

.url {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 2px;
}
.url-block { color: var(--acc); }
.url-caret { animation: cxn-blink 1s steps(1) infinite; color: var(--acc); }

.aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  border-left: 1px solid var(--hair);
  padding-left: 18px;
}

.aside-head {
  font-size: 26px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

/* ---------- game card ---------- */

.card {
  border: 1px solid var(--line);
  background: var(--court);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: 'DM Mono', monospace;
  flex-wrap: wrap;
}

.scores { display: flex; align-items: baseline; gap: 22px; }
.score { display: flex; align-items: baseline; gap: 9px; }
.score-tag { font-size: 11px; letter-spacing: 0.2em; }
.score-tag-you { color: var(--acc); }
.score-tag-cpu { color: var(--mute); }
.score-num { font-size: 34px; font-weight: 500; line-height: 1; }
.score-num-cpu { color: var(--dim); }
.score-div { width: 1px; height: 24px; background: var(--line); }

.controls { display: flex; align-items: center; gap: 10px; }

.best {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
}
.best span { color: var(--fg); }

.court-wrap { position: relative; width: 100%; }

#court {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
  background: var(--court);
  touch-action: none;
  cursor: none;
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(var(--scan) 0 1px, transparent 1px 3px);
}
.scanlines[hidden] { display: none; }

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--veil);
  text-align: center;
  padding: 24px;
}
.overlay[hidden] { display: none; }

.overlay-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.overlay-sub {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--dim);
  max-width: 44ch;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  flex-wrap: wrap;
}

.taunt { color: var(--acc); min-height: 18px; letter-spacing: 0.02em; }

.hint { color: var(--faint); letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- footer ---------- */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--hair);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.foot-brand { display: flex; align-items: center; gap: 10px; }

.mark-sm { animation: cxn-drift 6s ease-in-out infinite; }
.mark-sm .mark-dot { width: 9px; height: 9px; background: var(--dim); }
.mark-sm .mark-bar { width: 14px; height: 2px; background: var(--dim); }
.mark-sm .mark-ring { width: 9px; height: 9px; border: 2px solid var(--dim); }

.foot-wordmark { letter-spacing: 0.26em; color: var(--dim); }
