/* Eigen Engine: one committed dark look. Tokens and rules: site/STYLE_GUIDE.md. */
:root {
  --ground: #0a0a12;
  --surface: #12121d;
  --line: #25253a;
  --text: #ecebf5;
  --soft: #a3a2bb;
  --amethyst: #9a7cff;
  --sapphire: #3f8cff;
  --garnet: #e8486a;
  --amber: #f2a33a;
  --jade: #2fc4a2;
  --orchid: #cf6fe0;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amethyst); outline-offset: 3px; border-radius: 2px; }
canvas { display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* header */
.top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding-block: 18px; position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
.top nav { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.top nav a { color: var(--soft); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }

/* hero */
.hero { position: relative; aspect-ratio: 16 / 8.5; }
.hero > canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.hero .copy { position: absolute; left: 0; bottom: 9%; max-width: 44%; display: grid; gap: 20px; pointer-events: none; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 5.4vw, 68px); line-height: 1; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.lede { font-size: 17px; line-height: 1.6; color: var(--soft); margin: 0; max-width: 44ch; }
.lede b { color: var(--text); font-weight: 600; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; pointer-events: auto; }
.cta a { font-size: 15px; font-weight: 600; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; }
.cta a.go { background: var(--text); color: var(--ground); border-color: var(--text); }
.cta a:not(.go):hover { border-color: var(--soft); }
.state { position: absolute; right: 0; top: 4px; text-align: right; max-width: 34ch; display: grid; gap: 4px; pointer-events: none; }
.state b { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.state span { font-size: 13px; line-height: 1.4; color: var(--soft); }
.hint { position: absolute; right: 0; bottom: 6px; font-family: var(--mono); font-size: 10px; color: var(--soft); opacity: .7; pointer-events: none; }

/* sections */
.sec { padding-block: 56px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.sec h2 { font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; margin: 0 0 24px; }
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.gcard .art { aspect-ratio: 16 / 10; }
.gcard .art canvas { width: 100%; height: 100%; }
.gcard .txt { padding: 18px 20px 22px; display: grid; gap: 6px; align-content: start; }
.gcard h3 { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; margin: 0; }
.gcard p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--soft); }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--amethyst); }
.gcard.dim .tag { color: var(--soft); }
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px 64px; }
.about p { margin: 0 0 14px; font-size: 17px; line-height: 1.65; color: var(--soft); max-width: 56ch; }
.about dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 12px 20px; font-size: 15px; align-content: start; }
.about dt { font-family: var(--mono); font-size: 11px; color: var(--soft); text-transform: uppercase; letter-spacing: .06em; padding-top: 3px; }
.about dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.foot { border-top: 1px solid var(--line); padding-block: 24px 36px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 14px; color: var(--soft); }
.foot a { text-decoration: none; } .foot a:hover { color: var(--text); }

/* text pages: a quiet field behind the words */
.textpage { position: relative; min-height: 100vh; }
.textpage > canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.textpage > .wrap { position: relative; z-index: 1; }
.doc { max-width: 64ch; margin: 0 auto; padding-block: 32px 72px; }
.doc h1 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5vw, 50px); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 8px; }
.doc .upd { font-family: var(--mono); font-size: 11px; color: var(--soft); margin: 0 0 32px; }
.doc h2 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 36px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { font-size: 16px; line-height: 1.7; color: var(--soft); }
.doc p { margin: 0 0 14px; }
.doc ul { padding-left: 20px; margin: 0 0 14px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--text); text-decoration-color: var(--amethyst); text-underline-offset: 3px; }
.doc .mail { font-family: var(--mono); font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: inline-block; user-select: all; }
.doc .draft { font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); border-radius: 6px; padding: 10px 12px; margin-bottom: 28px; }

@media (max-width: 760px) {
  .hero { aspect-ratio: auto; display: grid; }
  .hero > canvas { position: relative; aspect-ratio: 1; height: auto; }
  .hero .copy { position: static; max-width: none; padding-top: 8px; }
  .hint { bottom: auto; top: calc(100vw - 60px); }
  .games, .about { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .hint { display: none; } }
