/* Dynamics of an Asteroid — site stylesheet.
   One file, no framework. Pixel art is always drawn at integer scale with
   image-rendering: pixelated; panels use the game's own dialog-box frame. */

@font-face {
  font-family: "Undervolt";
  src: url("../assets/fonts/Undervolt.ttf") format("truetype");
  font-display: swap;
}
@font-face {   /* C-Dawg's handwriting (OFL, assets/fonts/CDawg-OFL.txt): review quotes only */
  font-family: "C-Dawg";
  src: url("../assets/fonts/CDawg-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #000;
  --panel: rgba(4, 6, 14, 0.94);
  --frame: #5d85d2;
  --frame-dark: #103885;
  --red: #d8283c;
  --red-hi: #ff5c6c;
  --gold: #e8b830;
  --text: #e9eaf2;
  --muted: #9ba4ba;
  --line: rgba(93, 133, 210, 0.28);
  --pixel: "Undervolt", "Courier New", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --col: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg) url("../assets/bg/aquarius.png");
  background-size: 2048px auto;           /* Aquarius map slab, 1024px native -> exactly 2x */
  background-attachment: fixed;
  background-position: center top;
  image-rendering: pixelated;
  color: var(--text);
  font: 17px/1.6 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--red-hi); }
a:hover { color: #fff; }

/* ---------- pixel type ---------- */
h1, h2, h3, .pixel, .btn, .nav a, .chip, .kicker {
  font-family: var(--pixel);
  font-weight: normal;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: none;
  font-smooth: never;
}
h1 { font-size: 32px; line-height: 1.25; margin: 0 0 16px; }
h2 { font-size: 24px; line-height: 1.3; margin: 0 0 20px; color: #fff; }
h2::before { content: "\25B6\00A0"; color: var(--red); }
h3 { font-size: 16px; margin: 0 0 8px; color: var(--gold); }
.kicker { font-size: 16px; color: var(--gold); text-transform: uppercase; margin: 0 0 8px; }

/* ---------- layout ---------- */
.wrap { max-width: var(--col); margin: 0 auto; padding: 0 16px; }
main { max-width: var(--col); margin: 0 auto; background: var(--panel); box-shadow: 0 0 0 1px #000, 0 0 60px #000; }
section { padding: 56px 40px; border-top: 1px solid var(--line); }
section:first-child { border-top: 0; }
.lede { font-size: 19px; color: #fff; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h2.plain::before { content: none; }
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  section { padding: 40px 16px; }
}
@media (max-width: 560px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  h2 { font-size: 18px; }
}

/* ---------- header / nav ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--frame-dark);
}
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; margin-right: auto; }
.brand img { height: 48px; width: auto; }
.brand span { font-family: var(--pixel); font-size: 16px; -webkit-font-smoothing: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; font-size: 16px; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::before { content: "\25B6"; color: var(--red); margin-right: 4px; }
@media (max-width: 560px) {
  .site-head { position: static; }
  .site-head .wrap { min-height: 52px; gap: 8px; }
  .brand span { display: none; }
  .nav a { padding: 6px 5px; font-size: 13px; }
}

/* ---------- dialog-box frame (9-slice of the in-game text box) ---------- */
.box {
  border: 16px solid transparent;
  border-image: url("../assets/art/frame.png") 8 fill / 16px round;
  image-rendering: pixelated;
  padding: 8px 12px;
  background: transparent;
}
.box p:first-child { margin-top: 0; }
.box p:last-child { margin-bottom: 0; }
.dialog {
  font-family: var(--pixel); font-size: 16px; line-height: 1.6; color: #fff;
  -webkit-font-smoothing: none; min-height: 3.2em;
  text-shadow: 2px 2px 0 #2a2a55;
}
.dialog .caret { display: inline-block; width: 0.6em; color: var(--gold); animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- buttons / chips ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; font-size: 16px; text-decoration: none; color: #fff;
  background: var(--red); border: 0; cursor: pointer;
  box-shadow: inset -4px -4px 0 #7a0f1c, inset 4px 4px 0 #ff7a86, 0 0 0 2px #000, 4px 4px 0 2px #000;
}
.btn:hover { background: #ec3a4d; color: #fff; }
.btn:active { transform: translate(2px, 2px); box-shadow: inset -4px -4px 0 #7a0f1c, inset 4px 4px 0 #ff7a86, 0 0 0 2px #000, 2px 2px 0 2px #000; }
.btn.alt { background: var(--frame-dark); box-shadow: inset -4px -4px 0 #06183d, inset 4px 4px 0 var(--frame), 0 0 0 2px #000, 4px 4px 0 2px #000; }
.btn.alt:hover { background: #1b4aa6; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font-size: 14px; padding: 4px 10px; border: 2px solid var(--frame); color: var(--frame); background: #000; }
.chip.warn { border-color: var(--gold); color: var(--gold); }

/* ---------- "to be decided" markers — visible on purpose during review ---------- */
.tbd {
  display: inline-block; padding: 0 6px; margin: 0 2px;
  color: #000; background: var(--gold);
  font: 13px/1.6 var(--sans); font-weight: 600; letter-spacing: 0;
  outline: 2px dashed #000; outline-offset: -4px;
}
body.final .tbd { display: none; }   /* flip on for a launch build */

/* ---------- hero (game page) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: #000;
  padding: 0;
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 70%, var(--panel) 100%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero .capsule { width: 100%; max-width: 1232px; margin: 0 auto; image-rendering: auto; }
.hero .pitch { padding: 8px 40px 48px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 860px) { .hero .pitch { grid-template-columns: 1fr; padding: 8px 16px 32px; } }

/* ---------- trailer (click-to-load: no YouTube bytes until the visitor asks) ---------- */
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border: 2px solid var(--frame-dark); cursor: pointer; overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity 0.2s; }
.video:hover img { opacity: 0.95; }
.video .play {
  position: absolute; inset: 0; margin: auto; width: 96px; height: 96px;
  display: grid; place-items: center; font-size: 40px; color: #fff;
  background: var(--red); box-shadow: inset -6px -6px 0 #7a0f1c, inset 6px 6px 0 #ff7a86, 0 0 0 3px #000;
}
.video .label { position: absolute; left: 12px; bottom: 10px; font-family: var(--pixel); font-size: 14px; color: #fff; text-shadow: 2px 2px 0 #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- feature panels: inked like the EULA comic, yellow caption boxes ---------- */
.panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .panels { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .panels { grid-template-columns: 1fr; } }
.panel { margin: 0; }
.panel .art { position: relative; border: 4px solid #000; outline: 3px solid #fff; outline-offset: 0; background: #000; }
.panel .art img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.panel .cap {
  position: absolute; left: -3px; top: -3px; max-width: 78%;
  padding: 5px 8px; background: #fff3c4; color: #000; border: 2px solid #000;
  font: 17px/1.2 "C-Dawg", var(--sans); text-transform: uppercase;   /* comic lettering, like the EULA comic */
}
.panel figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* ---------- art + music celebration ---------- */
.craft { align-items: stretch; }
.craft-art img { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border: 4px solid #000; outline: 3px solid #fff; margin-bottom: 16px; }
.craft-music { display: flex; flex-direction: column; }
.craft-music .note { font-size: 64px; line-height: 1; color: var(--gold); margin: 0 0 8px; }
.craft p { color: var(--muted); }

/* ---------- strategy guide link ---------- */
.guide-card { display: grid; grid-template-columns: 128px 1fr; gap: 24px; align-items: center; }
.guide-card > img { width: 128px; image-rendering: pixelated; border: 2px solid var(--frame-dark); background: #000; }
@media (max-width: 480px) { .guide-card { grid-template-columns: 1fr; } .guide-card > img { width: 96px; } }

/* ---------- store cards + Android notice ---------- */
.store-name { font-size: 20px; color: #fff; margin-bottom: 4px !important; }
.store-plat { margin: 0 0 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.store .btns { margin-top: 12px; }
.platforms .notice { margin-top: 0; }
.store-name:first-child { margin-top: 0; }
.notice { margin-top: 24px; padding: 20px 24px; border: 3px solid var(--gold); background: rgba(232, 184, 48, 0.08); }
.notice-h { margin: 0 0 8px; font-family: var(--pixel); font-size: 16px; color: var(--gold); -webkit-font-smoothing: none; }
.notice ul { margin: 8px 0 12px; padding-left: 22px; }
.notice li { margin: 4px 0; }

/* ---------- review quotes ---------- */
.quote { margin: 0; padding: 20px 24px; background: #fff; color: #000; border: 4px solid #000; outline: 3px solid #fff; }
.quote { display: flex; flex-direction: column; justify-content: space-between; }
.quote p { margin: 0 0 12px; font: 21px/1.35 "C-Dawg", var(--sans); }
.quote cite { font-style: normal; font-size: 14px; }
.quote a { color: #000; }

/* ---------- press kit quotes ---------- */
.press-quote { margin: 0 0 16px; padding: 4px 0 4px 16px; border-left: 4px solid var(--gold); color: var(--text); }
.press-quote cite { display: block; margin-top: 4px; font-style: normal; font-size: 14px; color: var(--muted); }

/* ---------- EULA comic pages ---------- */
.comic { display: grid; gap: 24px; justify-items: center; }
.comic img { width: 100%; max-width: 760px; outline: 3px solid #fff; }

/* ---------- screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .shots { grid-template-columns: repeat(2, 1fr); } }
.shots button { padding: 0; border: 2px solid var(--frame-dark); background: #000; cursor: zoom-in; }
.shots button:hover { border-color: var(--frame); }
.shots img { width: 100%; image-rendering: pixelated; }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.9); }
dialog.lightbox img { width: min(768px, 92vw); image-rendering: pixelated; border: 2px solid var(--frame); }
dialog.lightbox p { text-align: center; color: var(--muted); font-size: 14px; margin: 8px 0 0; }

/* ---------- spec table ---------- */
.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 34%; font-family: var(--pixel); font-weight: normal; color: var(--frame); font-size: 15px; -webkit-font-smoothing: none; }

/* ---------- FAQ ---------- */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; color: #fff; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+ "; font-family: var(--pixel); color: var(--red); }
details[open] summary::before { content: "- "; }
details p { color: var(--muted); margin: 10px 0 0; }

/* ---------- studio home ---------- */
.studio-hero { text-align: center; padding: 64px 16px 40px; }
.studio-hero .lede { margin: 24px auto 0; }
/* Asteroid pixel art at an integer scale (--s), outlined logo laid over the rock body. */
.studio-mark { --s: 1; position: relative; width: calc(272px * var(--s)); height: calc(232px * var(--s)); margin: 0 auto; }
.asteroid { position: absolute; inset: 0; background: url("../assets/art/asteroid.png") no-repeat 0 0 / 100% 100%; image-rendering: pixelated; }
.studio-logo { position: absolute; left: 50%; top: 58%; height: calc(180px * var(--s)); width: auto; max-width: none;
  transform: translate(-50%, -50%); image-rendering: auto; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7)); }
@media (min-width: 700px) { .studio-mark { --s: 2; } }

.game-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; background: #000; border: 2px solid var(--frame-dark); text-decoration: none; color: inherit; }
.game-card:hover { border-color: var(--frame); color: inherit; }
.game-card img { width: 100%; height: 100%; object-fit: cover; }
.game-card .body { padding: 28px; }
.game-card h2 { font-size: 22px; }
.game-card .btn { margin-top: 12px; }
@media (max-width: 760px) { .game-card { grid-template-columns: 1fr; } }
/* ---------- press kit ---------- */
.dl { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dl span { color: var(--muted); font-size: 14px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.thumbs a { display: block; border: 2px solid var(--frame-dark); background: #000; }
.thumbs a:hover { border-color: var(--frame); }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.thumbs img.px { aspect-ratio: auto; }

/* ---------- footer ---------- */
.site-foot { max-width: var(--col); margin: 0 auto 40px; background: #000; border-top: 2px solid var(--frame-dark); padding: 32px 40px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.site-foot nav { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
@media (max-width: 560px) { .site-foot { padding: 24px 16px; } .site-foot nav { margin-left: 0; } }

@media (prefers-reduced-motion: reduce) {
  .dialog .caret { animation: none; }
  html { scroll-behavior: auto; }
}
