/* Data Kingdom landing — pixel look matched to the game (apps/web/src/styles.css). Self-hosted only: CSP is style-src 'self'. */
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/press-start-2p-latin-400-normal.woff2") format("woff2");
}

:root {
  --ink: #1a1626;
  --bg: #120f1c;
  --panel: #241f36;
  --panel-2: #2e2846;
  --line: #4a4170;
  --text: #ece8f6;
  --muted: #b3acd0;
  --gold: #f5d547;
  --green: #3fd18a;
  --red: #ff8886;
  --blue: #7bbcf0;
  --pix: "Press Start 2P", "Leelawadee UI", "Thonburi", "Noto Sans Thai", system-ui, sans-serif;
  --body: "Leelawadee UI", "Thonburi", "Noto Sans Thai", "Sarabun", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: break-word;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: #fff; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--panel-2); padding: 1px 6px; border: 1px solid var(--line); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: clamp(32px, 7vw, 56px); line-height: 1.2; }
h2 { font-size: clamp(24px, 4.5vw, 34px); }
h3 { font-size: 20px; }
.pixel { font-family: var(--pix); letter-spacing: 0.5px; line-height: 1.6; font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { text-align: center; }

/* focus: visible everywhere */
a:focus-visible, summary:focus-visible, video:focus-visible, pre:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--gold); color: var(--ink); padding: 10px 14px; z-index: 100; font-weight: 700; }
.skip-link:focus { top: 8px; }

/* pixel frame (same recipe as the game) */
.frame { border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--line), 5px 5px 0 0 #000a; background: var(--panel); padding: 8px; margin: 0; }
.frame img, .frame video { width: 100%; }
figcaption { color: var(--muted); font-size: 15px; padding: 8px 4px 2px; line-height: 1.6; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: #1b1729; border-bottom: 3px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { color: var(--gold); text-decoration: none; font-size: 13px; }
.brand:hover { color: #fff; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--body); font-weight: 700; font-size: 17px; line-height: 1.3;
  min-height: 48px; padding: 10px 20px; text-decoration: none; cursor: pointer;
  color: var(--text); background: var(--panel-2);
  border: 3px solid var(--ink);
  box-shadow: inset -3px -3px 0 0 #00000055, inset 3px 3px 0 0 #ffffff22, 3px 3px 0 0 #000a;
}
.btn:hover { filter: brightness(1.18); color: var(--text); }
.btn:active { transform: translate(1px, 1px); }
.btn-primary { background: var(--green); color: var(--ink); }
.btn-primary:hover { color: var(--ink); }
.btn-ghost { background: var(--panel-2); border-color: var(--line); }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: 16px; }
.btn-lg { min-height: 56px; padding: 12px 26px; font-size: 19px; }

/* sections */
.section { padding: 56px 0; scroll-margin-top: 64px; }
.section.alt { background: #181327; border-block: 3px solid #241f36; }
.eyebrow { color: var(--gold); font-size: 11px; margin: 0 0 14px; }
.lead { font-size: 20px; }
.two-col { display: grid; gap: 24px; grid-template-columns: 1fr; margin-bottom: 1.4em; align-items: start; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; gap: 36px; } }

/* hero */
.hero { padding: 36px 0 56px; background: linear-gradient(#120f1c, #1a1530); }
.hero-grid { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hl { color: var(--gold); display: inline-block; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 24px 0 14px; }
.center-row { justify-content: center; }
.note { color: var(--muted); font-size: 15px; border-left: 3px solid var(--line); padding-left: 12px; }
.hero-shot { background: var(--panel); }

/* code samples */
.code-label { font-weight: 700; margin: 0 0 6px; }
.code-label.bad { color: var(--red); }
.code-label.good { color: var(--green); }
.code {
  margin: 0 0 18px; padding: 14px; background: #0b0912; color: #d6f5e4;
  border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--line);
  overflow-x: auto; font-family: var(--mono); font-size: 15px; line-height: 1.6;
}
.code code { background: none; border: 0; padding: 0; font-size: inherit; }
.code-col { min-width: 0; }

/* quest list */
.quests { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .quests { grid-template-columns: 1fr 1fr; } }
.quests li {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: baseline;
  background: var(--panel); border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--line); padding: 10px 14px;
}
.quests .boss { box-shadow: inset 0 0 0 3px var(--red); }
.qn { color: var(--gold); font-size: 12px; grid-row: span 2; align-self: center; }
.qt { font-weight: 700; line-height: 1.4; }
.qs { color: var(--muted); font-size: 15px; font-family: var(--mono); line-height: 1.5; }
.boss-tag { font-size: 9px; background: var(--red); color: var(--ink); padding: 3px 6px; margin-left: 6px; vertical-align: middle; }

.feature-row { margin-top: 1.4em; }
.ticks, .crosses { list-style: none; padding: 0; }
.ticks li, .crosses li { position: relative; padding-left: 28px; margin-bottom: 0.7em; }
.ticks li::before { content: "\25B6"; position: absolute; left: 0; top: 0.1em; color: var(--green); font-size: 0.8em; }
.crosses li::before { content: "\2715"; position: absolute; left: 2px; color: var(--red); font-weight: 700; }
.callout { background: var(--panel); border-left: 5px solid var(--gold); padding: 14px 16px; }

/* cards */
.cards { display: grid; gap: 22px; grid-template-columns: 1fr; margin: 24px 0; }
@media (min-width: 820px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--panel); border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--line), 5px 5px 0 0 #000a; padding: 22px 22px 8px; }
.card-demo { box-shadow: inset 0 0 0 3px var(--green), 5px 5px 0 0 #000a; }
.card-full { box-shadow: inset 0 0 0 3px var(--gold), 5px 5px 0 0 #000a; }
.card-not { box-shadow: inset 0 0 0 3px #7a3a42, 5px 5px 0 0 #000a; }
.tag { font-size: 10px; background: var(--green); color: var(--ink); padding: 4px 8px; margin-left: 8px; vertical-align: middle; }
.tag-gold { background: var(--gold); }
.video-box { max-width: 520px; margin: 32px auto 0; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 0.7em; padding-left: 4px; }

/* FAQ */
details { background: var(--panel); border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--line); margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--pix); color: var(--gold); font-size: 14px; flex: none; }
details[open] summary::after { content: "\2212"; }
details p { padding: 0 18px; margin: 0 0 1em; }

.final { text-align: center; background: linear-gradient(#120f1c, #1a1530); }

/* footer */
.footer { background: #0d0a15; border-top: 3px solid var(--line); padding: 40px 0 56px; font-size: 15.5px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1fr 1.4fr 1.2fr; } }
.foot-h { font-size: 11px; color: var(--gold); margin: 0 0 12px; }
.legal p { color: var(--muted); }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .btn-lg { width: 100%; }
  .card { padding: 18px 16px 6px; }
  .topbar-in .btn { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
