/* ===========================================================
   CLAUDERS — Coming Soon
   Inspired by the Chrome dino page, dressed in Anthropic warmth.
   =========================================================== */

/* Self-hosted fonts (no Google CDN dependency) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/press-start-2p.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #FAF9F5;
  --bg-2: #F2EFE6;
  --ink: #1A1A1A;
  --ink-2: #3D3D3A;
  --muted: #6E6E68;
  --line: #D9D5C7;
  --accent: #CC785C;
  --accent-2: #E89A7C;
  --accent-ink: #6E2E1A;
  --good: #4A8A5C;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pixel: "Press Start 2P", "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.5;
}

img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ----- Subtle grain + dotted background ----- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  background-image:
    radial-gradient(rgba(0,0,0,.05) 1px, transparent 1px);
  background-size: 14px 14px;
  background-position: 0 0;
  mix-blend-mode: multiply;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* =======================================================
   Header
   ======================================================= */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(20px, 5vw, 56px);
  border-bottom: 1px dashed var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: .14em;
  font-weight: 700;
  font-size: 14px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: block;
  flex-shrink: 0;
}

.site-nav { display: flex; gap: clamp(14px, 3vw, 30px); font-size: 12px; letter-spacing: .12em; }
.site-nav a { color: var(--muted); transition: color .2s; }
.site-nav a:hover { color: var(--ink); }

/* Header X link */
.header-x {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink);
  background: transparent;
  transition: transform .15s, background .15s, color .15s;
}
.header-x svg { display: block; }
.header-x:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }

/* =======================================================
   Hero
   ======================================================= */
main { padding: 0 clamp(20px, 5vw, 56px) 80px; max-width: 1200px; margin: 0 auto; }

.hero {
  text-align: center;
  padding: clamp(40px, 7vw, 80px) 0 24px;
}
.coming {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  font-size: 11px;
  letter-spacing: .32em;
  color: var(--muted);
}
.coming .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
}

.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.5);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
  margin-bottom: 28px;
}

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(74,138,92,.6);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,138,92,.5); }
  70%  { box-shadow: 0 0 0 10px rgba(74,138,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,138,92,0); }
}

/* Big title with stacked outline */
.title {
  position: relative;
  font-family: var(--pixel);
  font-size: clamp(44px, 11vw, 132px);
  letter-spacing: .04em;
  line-height: .95;
  margin: 0 0 18px;
  user-select: none;
}
.title-bg, .title-fg {
  display: block;
  position: absolute; inset: 0;
}
.title-bg {
  -webkit-text-stroke: 2px var(--ink);
  color: transparent;
  transform: translate(6px, 6px);
  opacity: .25;
}
.title-fg {
  position: relative;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.title { height: clamp(56px, 13vw, 150px); }

.tagline {
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 500;
  margin: 14px auto 8px;
  color: var(--ink);
}
.sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 32px;
}
.d-only { display: none; }
@media (min-width: 700px) { .d-only { display: inline; } }

.cta-row {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-sm);
  font-size: 12px;
  letter-spacing: .16em;
  font-weight: 700;
  border: 1px solid var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-transform: uppercase;
}
.btn.primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 4px 4px 0 0 var(--accent);
}
.btn.primary:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 0 var(--accent); }
.btn.primary:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 0 var(--accent); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: 4px 4px 0 0 var(--ink);
}
.btn.ghost:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 0 var(--ink); background: var(--bg-2); }
.btn.ghost:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 0 var(--ink); }

/* =======================================================
   Game
   ======================================================= */
.game-section {
  margin: 30px auto 60px;
  max-width: 920px;
}

.game-frame {
  position: relative;
  background: #FFFDF7;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 8px 8px 0 0 var(--ink);
  overflow: hidden;
}

.game-topbar, .game-bottombar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 11px;
  letter-spacing: .15em;
  background: var(--bg-2);
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
}
.game-bottombar {
  border-bottom: 0;
  border-top: 1px dashed var(--line);
}
.game-bottombar .hint {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-bottombar .speed { white-space: nowrap; }
@media (max-width: 560px) {
  .game-bottombar .hint::after { content: ""; }
  .game-bottombar .hint { font-size: 10px; }
}

.game-meta { display: flex; gap: 8px; align-items: baseline; }
.game-meta .label { opacity: .7; }
.game-meta .val { font-family: var(--pixel); font-size: 13px; color: var(--ink); letter-spacing: 0; }
.game-meta.right { text-align: right; }

#game {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 240;
  display: block;
  background: #FFFDF7;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: pointer;
}

.game-overlay {
  position: absolute;
  inset: 38px 0 36px 0; /* between top and bottom bars */
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  background: rgba(255,253,247,.78);
  backdrop-filter: blur(2px);
  transition: opacity .25s ease;
}
.game-overlay.hide { opacity: 0; }

.overlay-content { text-align: center; padding: 0 16px; }
.overlay-title {
  font-family: var(--pixel);
  font-size: clamp(11px, 1.6vw, 14px);
  letter-spacing: .04em;
  margin: 0 0 10px;
}
.overlay-sub { font-size: 13px; color: var(--muted); margin: 0; }
kbd {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 2px;
  background: var(--bg);
  border: 1px solid var(--ink);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
}

.hint, .speed { font-size: 11px; }

/* =======================================================
   Info grid (countdown + signup)
   ======================================================= */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 60px auto;
  max-width: 920px;
}
@media (max-width: 720px) {
  .info-grid { grid-template-columns: 1fr; }
}

.card {
  background: #FFFDF7;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  padding: 22px;
  box-shadow: 6px 6px 0 0 var(--ink);
}

.card-label {
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--muted);
  margin: 0 0 14px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.countdown > div {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
}
.countdown span {
  display: block;
  font-family: var(--pixel);
  font-size: clamp(20px, 4vw, 28px);
  color: var(--ink);
  margin-bottom: 6px;
}
.countdown label {
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}

.signup {
  display: flex; gap: 0;
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg);
}
.signup input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 14px 16px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.signup input::placeholder { color: var(--muted); }
.signup button {
  border: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  border-left: 1px solid var(--ink);
}
.signup button:hover { background: var(--accent); color: var(--bg); }

.counter {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.counter strong { color: var(--ink); font-weight: 700; }
.pulse {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: .6; }
}

.signup-msg {
  margin: 8px 0 0;
  font-size: 12px;
  min-height: 16px;
  color: var(--good);
}
.signup-msg.error { color: #B5403A; }

/* =======================================================
   About
   ======================================================= */
.about {
  margin: 80px auto;
  max-width: 920px;
}
.kicker {
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--accent);
  margin: 0 0 14px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
}
.about-grid h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.about-body p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
.about-body ul { margin: 0 0 14px; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.about-body li { margin-bottom: 6px; }
.dim { color: var(--muted) !important; }
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* =======================================================
   Social
   ======================================================= */
.social {
  margin: 80px auto;
  max-width: 920px;
}
.social-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .social-row { grid-template-columns: 1fr; }
}
.social-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background: #FFFDF7;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.social-link:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 0 var(--accent);
}
.social-link .net {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--muted);
}
.social-link .handle {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

/* =======================================================
   Footer
   ======================================================= */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(20px, 5vw, 56px);
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .12em;
}
@media (max-width: 600px) {
  .site-footer { flex-direction: column; gap: 6px; text-align: center; }
}

/* =======================================================
   Reduce motion
   ======================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =======================================================
   No-JS fallback (covers the canvas overlay area)
   ======================================================= */
.no-js {
  position: absolute;
  inset: 38px 0 36px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
  background: var(--bg-2);
  color: var(--ink);
}
.no-js p { margin: 4px 0; font-size: 14px; }
.no-js strong { font-family: var(--pixel); font-size: 13px; letter-spacing: .04em; }
