/* Glitch Wars — marketing site. Mirrors the game's palette (#07080c ground,
   cyan #00e5ff, pink #ff4081, green #76ff03, yellow #ffea00). Mobile-first. */
:root {
  --bg: #07080c;
  --bg-2: #0c111b;
  --line: #1c2a40;
  --text: #e6f2ff;
  --muted: #7d96b0;
  --cyan: #00e5ff;
  --pink: #ff4081;
  --green: #76ff03;
  --yellow: #ffea00;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", "Liberation Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  /* faint CRT scan lines, like the game */
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 2px, transparent 2px 4px);
}
a { color: var(--cyan); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.wrap { position: relative; z-index: 1; width: min(1100px, 100% - 2rem); margin: 0 auto; }

/* ---- nav ---- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.brand { font-weight: 700; letter-spacing: .12em; color: var(--cyan); text-shadow: 0 0 12px rgba(0,229,255,.55); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }
.nav a:hover { color: var(--text); }

/* ---- hero ---- */
.hero { padding: 3rem 0 2rem; text-align: center; }
.hero h1 {
  font-size: clamp(2.4rem, 9vw, 5.5rem);
  letter-spacing: .08em; margin: 0 0 .4rem; line-height: 1.05;
  color: var(--cyan);
  text-shadow: 0 0 6px rgba(0,229,255,.8), 0 0 28px rgba(0,229,255,.45), 3px 0 0 rgba(255,64,129,.35), -3px 0 0 rgba(118,255,3,.25);
}
.hero .sub { color: var(--pink); letter-spacing: .25em; font-size: .85rem; text-transform: uppercase; opacity: .85; margin: 0 0 1.2rem; }
.hero p.lead { max-width: 46ch; margin: 0 auto 1.8rem; color: var(--text); font-size: 1.05rem; }
.cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .9rem 1.5rem; border: 1px solid var(--cyan); color: var(--cyan);
  letter-spacing: .12em; text-transform: uppercase; font-weight: 700; font-size: .9rem;
  background: rgba(0,229,255,.06); box-shadow: 0 0 14px rgba(0,229,255,.2) inset, 0 0 18px rgba(0,229,255,.15);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover, .btn:focus-visible { text-decoration: none; transform: translateY(-1px); box-shadow: 0 0 18px rgba(0,229,255,.35) inset, 0 0 26px rgba(0,229,255,.35); }
.btn.alt { border-color: var(--green); color: var(--green); background: rgba(118,255,3,.06); box-shadow: 0 0 14px rgba(118,255,3,.15) inset, 0 0 18px rgba(118,255,3,.12); }
.btn.alt:hover, .btn.alt:focus-visible { box-shadow: 0 0 18px rgba(118,255,3,.3) inset, 0 0 26px rgba(118,255,3,.3); }
.btn small { display: block; font-weight: 400; letter-spacing: .04em; text-transform: none; opacity: .75; font-size: .75rem; }
.hero-shot { margin: 2.2rem auto 0; border: 1px solid var(--line); box-shadow: 0 0 40px rgba(0,229,255,.12); }

/* ---- sections ---- */
section { padding: 2.5rem 0; border-top: 1px solid var(--line); }
h2 { font-size: 1.1rem; letter-spacing: .25em; text-transform: uppercase; color: var(--yellow); margin: 0 0 1.4rem; }
h2::before { content: "// "; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { border: 1px solid var(--line); background: var(--bg-2); padding: 1.1rem 1.2rem; }
.card h3 { margin: 0 0 .4rem; font-size: 1rem; letter-spacing: .08em; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.c-cyan h3 { color: var(--cyan); } .c-pink h3 { color: var(--pink); } .c-green h3 { color: var(--green); } .c-yellow h3 { color: var(--yellow); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.shots figure { margin: 0; border: 1px solid var(--line); background: var(--bg-2); }
.shots figcaption { padding: .5rem .8rem; color: var(--muted); font-size: .85rem; }
.controls table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.controls th, .controls td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.controls th { color: var(--muted); font-weight: 400; white-space: nowrap; }
kbd { border: 1px solid var(--line); background: #05070b; padding: .05rem .4rem; font-family: inherit; font-size: .85em; color: var(--cyan); }
.note { color: var(--muted); font-size: .88rem; }

/* ---- legal pages ---- */
.legal { max-width: 74ch; }
.legal h1 { color: var(--cyan); font-size: 1.8rem; letter-spacing: .1em; margin: 1.5rem 0 .3rem; }
.legal .updated { color: var(--muted); font-size: .85rem; margin: 0 0 2rem; }
.legal h2 { margin-top: 2.2rem; }
.legal h3 { color: var(--text); font-size: 1rem; margin: 1.4rem 0 .4rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .8rem 0 1.2rem; }
.legal th, .legal td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 400; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: .3rem 0; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); padding: 1.6rem 0 2.4rem; color: var(--muted); font-size: .85rem; }
footer .row { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; justify-content: space-between; align-items: center; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; }

@media (max-width: 600px) {
  .nav { flex-direction: column; align-items: flex-start; }
  .hero { padding-top: 2rem; }
  .btn { width: 100%; text-align: center; }
  .controls th { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* ================= multi-page chrome (generated + info pages) ================= */
a.brand { text-decoration: none; }
a.brand:hover { text-decoration: none; }

/* breadcrumbs */
.crumbs { font-size: .8rem; color: var(--muted); letter-spacing: .04em; margin: .4rem 0 0; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--cyan); }
.crumbs .sep { opacity: .5; margin: 0 .1rem; }
.crumbs span:last-child { color: var(--text); }

/* page hero (content pages) */
.phero { padding: 2.2rem 0 1.4rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.phero .kicker { color: var(--pink); letter-spacing: .22em; font-size: .72rem; text-transform: uppercase; margin: 0 0 .5rem; }
.phero h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: .04em; margin: 0; color: var(--cyan);
  text-shadow: 0 0 8px rgba(0,229,255,.5), 0 0 26px rgba(0,229,255,.28); }
.phero .lead { color: var(--text); max-width: 60ch; margin: .9rem 0 0; }

/* card grid of tiles (index pages) */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin: 0 0 2.4rem; }
.tile { display: block; border: 1px solid var(--line); background: var(--bg-2); padding: 1.1rem 1.2rem;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.tile:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--cyan); box-shadow: 0 0 22px rgba(0,229,255,.18); }
.tile h3 { margin: 0 0 .35rem; color: var(--text); letter-spacing: .04em; font-size: 1.05rem; }
.tile p { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.tile.t-cyan { border-left: 3px solid var(--cyan); } .tile.t-cyan:hover { border-color: var(--cyan); }
.tile.t-pink { border-left: 3px solid var(--pink); } .tile.t-pink:hover { border-color: var(--pink); }
.tile.t-green { border-left: 3px solid var(--green); } .tile.t-green:hover { border-color: var(--green); }
.tile.t-yellow { border-left: 3px solid var(--yellow); } .tile.t-yellow:hover { border-color: var(--yellow); }

/* detail page: main + side */
.detail { display: grid; grid-template-columns: 1fr; gap: 1.6rem; margin-bottom: 2rem; }
@media (min-width: 720px) { .detail { grid-template-columns: 2fr 1fr; } }
.detail-main > p { font-size: 1.05rem; }
.detail-main h3, .detail-side h3 { color: var(--yellow); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; margin: 1.6rem 0 .6rem; }
.detail-side { border: 1px solid var(--line); background: var(--bg-2); padding: 1.1rem 1.2rem; align-self: start; }
.detail-side h3:first-child { margin-top: 0; }
.side-note { font-size: .8rem; color: var(--muted); margin: .8rem 0 0; }

/* stat tables */
table.stats { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.stats th { text-align: left; color: var(--muted); font-weight: 400; padding: .35rem .6rem .35rem 0; white-space: nowrap; vertical-align: top; }
table.stats td { text-align: right; color: var(--text); padding: .35rem 0; border-bottom: 1px solid var(--line); }
table.stats tr:last-child td, table.stats tr:last-child th { border-bottom: 0; }

/* branch/category reference sections (upgrades, dock) */
.branch { border-top: 1px solid var(--line); padding: 1.4rem 0; }
.branch h2 { font-size: 1.2rem; letter-spacing: .06em; text-transform: none; margin: 0 0 .3rem; }
.branch h2::before { content: none; }
.branch .abbr { font-size: .7rem; color: var(--muted); letter-spacing: .12em; }
.branch .blurb { color: var(--muted); max-width: 62ch; margin: 0 0 .8rem; }
.nodes { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.nodes li { border: 1px solid var(--line); background: var(--bg-2); padding: .35rem .7rem; font-size: .82rem; color: var(--text); }

/* FAQ + glossary */
.qalist { margin-bottom: 2rem; }
.qa { border-top: 1px solid var(--line); padding: 1.2rem 0; }
.qa h3 { margin: 0 0 .4rem; color: var(--cyan); font-size: 1.05rem; letter-spacing: .02em; }
.qa p { margin: 0; color: var(--text); max-width: 66ch; }
.glossary { margin-bottom: 2rem; }
.glossary .term { border-top: 1px solid var(--line); padding: .9rem 0; }
dl.glossary dt { color: var(--yellow); font-weight: 700; letter-spacing: .04em; }
dl.glossary dd { margin: .3rem 0 0; color: var(--muted); max-width: 66ch; }

/* backline / cta row */
.backline { margin: 2.4rem 0 1rem; color: var(--muted); }
.backline a { margin-right: .4rem; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.4rem 0 3rem; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.4rem; }
.foot-cols h4 { color: var(--muted); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 .7rem; }
.foot-cols a { display: block; color: var(--text); font-size: .88rem; padding: .18rem 0; }
.foot-cols a:hover { color: var(--cyan); text-decoration: none; }
.foot-tag { color: var(--muted); font-size: .82rem; margin: 1.8rem 0 0; border-top: 1px solid var(--line); padding-top: 1.2rem; }

/* generic prose page (about, terms, etc.) */
.prose { max-width: 68ch; }
.prose h2 { color: var(--yellow); font-size: .95rem; letter-spacing: .16em; text-transform: uppercase; margin: 2rem 0 .6rem; }
.prose h2::before { content: none; }
.prose p, .prose li { color: var(--text); }
.prose a { color: var(--cyan); }
