/* phantomburn.net: one page, the news, and a 404.
   The colors are the game's palette roles (topics/stealth-game-design §6,
   Crash's roles): violet-black is the dark, cyan the building's own systems
   (a badge reader: the BADGE IN button), magenta the city's neon and the
   burn through the title, orange human light. The face is JetBrains Mono
   2.304 (OFL 1.1, fonts/OFL.txt), the same subset Crash The Stack's site
   serves, so the two sites read as siblings. */
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/JetBrainsMono-Bold.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: italic; font-weight: 400; font-display: swap; src: url("/fonts/JetBrainsMono-Italic.woff2") format("woff2"); }

:root {
  --dark: #0d0a1a;      /* C-BG: darkness */
  --dark-2: #17122e;    /* C-BAR-A */
  --line: #2e1c4d;      /* C-BAR-C: rules and borders */
  --ink: #cce6ff;       /* C-TEXT */
  --ink-dim: #8a93b8;   /* C-TEXT-DIM, lifted a step for body text on the dark */
  --cyan: #4df2d9;      /* C-SELECTED: the building's systems */
  --magenta: #ff59d9;   /* C-HIGHLIGHT: the city's neon, the burn */
  --orange: #f2731a;    /* C-HOT: human light */
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--dark); }
body {
  margin: 0;
  background: var(--dark);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--cyan); }
a:hover { color: var(--magenta); }

main, footer { max-width: 992px; margin: 0 auto; padding: 0 16px; }

/* The logo: the game's own title screen, captured at 2x with the room's
   lights off (scripts/site-shots: title=1&on=none&fog=0.01, the dark keyed
   to transparent). Drawn at 2x like the pictures, the column's width on a
   phone. */
h1.logo { margin: 0; line-height: 0; }
h1.logo img {
  display: block;
  width: min(950px, 100%);
  height: auto;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* The 404's number, burned in (the title screen's D36, in CSS): italic block
   letters, cyan fading to white, with a magenta line through their top
   third (40% of the line box: the caps start about 20% down). */
header { text-align: center; padding: 4rem 0 2rem; }
h1.name {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0 0.2em;
  font-family: var(--mono);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.3rem, 10vw, 6rem);
  line-height: 1;
  letter-spacing: 0.04em;
  transform: skewX(-8deg);
  background: linear-gradient(#4df2d9 0%, #4df2d9 30%, #dbe0e6 70%, #f0f0fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h1.name::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 40%;
  height: 0.07em;
  background: var(--magenta);
  box-shadow: 0 0 0.25em var(--magenta);
  mix-blend-mode: screen;
}
.tagline { margin: 1.2rem 0 0; color: var(--ink-dim); font-style: italic; }

/* The pictures: 480x270 frames, drawn crisp at a whole scale where the
   width allows (2x from 992 CSS px, 1x from 512), and the column's width on
   a narrower screen. */
.carousel { margin: 0 auto; width: 100%; }
@media (min-width: 512px) { .carousel { width: 480px; } }
@media (min-width: 992px) { .carousel { width: 960px; } }
.carousel .frames { position: relative; aspect-ratio: 480 / 270; background: #000; }
.shot {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.carousel .frames .shot { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.carousel .frames .shot.shown { opacity: 1; }
.carousel .caption { min-height: 1.7em; margin: 0.6rem 0 0; text-align: center; font-size: 0.85rem; color: var(--ink-dim); }
.carousel .dots { display: none; justify-content: center; gap: 0.2rem; margin-top: 0.3rem; }
.carousel.live .dots { display: flex; }
.carousel .dots button { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel .dots button::before { content: ""; display: block; width: 8px; height: 8px; margin: auto; background: var(--line); }
.carousel .dots button[aria-current="true"]::before { background: var(--cyan); }
.carousel .dots button:hover::before { background: var(--magenta); }
.carousel .dots button:focus-visible { outline: 2px solid var(--cyan); outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) { .carousel .frames .shot { transition: none; } }

.pitch, .controls, .made, .early { max-width: 40em; margin-left: auto; margin-right: auto; }
.pitch { margin-top: 2.5rem; }
.pitch p { margin: 0 0 1em; }

/* BADGE IN: the badge reader's cyan. The dark text holds in every state
   (Harkfell's lesson: a site-wide a:hover must not reach the button). */
.play { text-align: center; margin: 2.5rem 0 3rem; }
.play a {
  display: inline-block;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.14em;
  color: var(--dark);
  background: var(--cyan);
  padding: 0.45em 1.4em 0.45em 1.54em;
  text-decoration: none;
}
.play a:hover, .play a:focus-visible, .play a:active { color: var(--dark); }
.play a:hover { box-shadow: 0 0 0 3px var(--dark), 0 0 0 5px var(--magenta); }
.play a:active { background: var(--magenta); }
.play a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.play .how { display: block; margin-top: 0.8rem; font-size: 0.9rem; font-style: italic; color: var(--ink-dim); }

h2 {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 0.6rem;
}
.controls { margin-bottom: 3rem; }
.controls dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1.2rem; margin: 0 0 0.8rem; }
.controls dt { color: var(--orange); }
.controls dd { margin: 0; color: var(--ink-dim); }
.controls p { margin: 0; color: var(--ink-dim); }
@media (max-width: 420px) { .controls dl { grid-template-columns: 1fr; } .controls dd { margin-bottom: 0.4rem; } }

.news-line { text-align: center; margin: 0 0 3rem; color: var(--ink-dim); }
.early { margin-bottom: 3rem; color: var(--ink-dim); }
.made { margin-bottom: 4rem; color: var(--ink-dim); }
.made p { margin: 0; }

footer {
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
footer .mark { display: inline-block; margin-bottom: 1.5rem; }
footer .mark img { display: block; width: 190px; height: auto; }
footer p { margin: 0 0 0.6em; }
/* The "Created with Sigil" badge (usesigil.org/badge/), as on tesserawm.org:
   centered on its own row at the bottom of the footer, at its real size of
   78x51, with its 13 px of clear space as padding. */
footer .foot-badge { display: flex; justify-content: center; padding: 13px; margin-top: 1rem; }
footer .created-with-sigil { display: block; flex: none; line-height: 0; }
footer .created-with-sigil img { display: block; width: 78px; height: 51px; }

/* /news/ (generated by scripts/build-news.mjs) */
main.news { max-width: 44em; padding-top: 3rem; padding-bottom: 4rem; }
.news .back { font-size: 0.9rem; margin: 0 0 2.5rem; }
.news h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); font-style: italic; letter-spacing: 0.04em; margin: 0 0 0.4em; color: var(--ink); }
.news h2 { margin: 2em 0 0.5em; }
.news .feeds { color: var(--ink-dim); font-size: 0.9rem; margin: 0 0 2.5rem; }
.news .date, .news time { color: var(--ink-dim); font-size: 0.9rem; }
.news .post-list { list-style: none; padding: 0; }
.news .post-list li { margin: 0 0 2rem; }
.news .post-list li > a { font-size: 1.3rem; }
.news .post-list time { display: block; }
.news .post-list p { margin: 0.4em 0 0; }
.news li { margin-bottom: 0.4em; }

/* 404 */
.lost { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.lost h1.name { align-self: center; font-size: clamp(3rem, 12vw, 5rem); margin-bottom: 1.5rem; }
.lost p { color: var(--ink-dim); }
