/* Aftergrowth — pl0xuee.com/aftergrowth
 *
 * Every colour here is lifted from the game's own locked palette, tools/art/palette.json,
 * whose note reads: "Every value is drawn from the ramps above rather than invented, so UI
 * cannot drift away from the art." The site is held to the same rule. The typeface is the
 * one the game itself ships and draws its interface in.
 */

/* ---- The game's palette, by its own role names ------------------------------ */

:root {
  --ink:        #0e1013;  /* panel      — the ground everything sits on */
  --slate:      #22262c;  /* track/ink  — a step up from the ground */
  --edge:       #2e3238;  /* panel_edge — every hairline on the page */
  --bone:       #c4bfae;  /* text */
  --bone-dim:   #8a8574;  /* text_dim */
  --ember:      #a86238;  /* accent/warn */
  --warmth:     #c8823c;  /* warmth     — headings, the lit things */
  --firelight:  #ffc27a;  /* firelight  — the brightest thing here, used barely */
  --moss:       #5f8148;  /* stamina    — the growth in Aftergrowth */

  --panel:      #14171b;
  --measure:    68ch;
  --gutter:     clamp(1.25rem, 4vw, 3rem);

  --display: "DejaVu Condensed", ui-sans-serif, system-ui, sans-serif;
  --body:    "DejaVu Condensed", ui-sans-serif, system-ui, sans-serif;
  --utility: "DejaVu Mono", ui-monospace, "Cascadia Mono", monospace;
}

@font-face {
  font-family: "DejaVu Condensed";
  src: url("./fonts/dejavu-condensed.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DejaVu Condensed";
  src: url("./fonts/dejavu-condensed-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DejaVu Mono";
  src: url("./fonts/dejavu-mono.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---- Ground ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 clamp(1rem, 0.96rem + 0.2vw, 1.0625rem)/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--warmth); text-decoration-color: color-mix(in srgb, var(--warmth) 45%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--firelight); }

:focus-visible { outline: 2px solid var(--firelight); outline-offset: 3px; }

.wrap { width: min(72rem, 100%); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 10;
  background: var(--panel); color: var(--bone); padding: 0.6rem 1rem; border: 1px solid var(--edge);
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

/* ---- The hero: a pool of firelight in the dark ------------------------------ */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: min(86svh, 44rem);
  padding: clamp(3.5rem, 10vh, 7rem) 0 clamp(2.5rem, 6vh, 4rem);
  text-align: center;
  overflow: hidden;
}

/* The game's own key art, sunk into the dark it was photographed in. */
.hero-art {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  opacity: 0.42;
  filter: saturate(0.82);
}

.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(52% 42% at 50% 44%, rgba(14,16,19,0.72), transparent 72%),
    radial-gradient(58% 48% at 50% 46%, rgba(255, 194, 122, 0.17), transparent 68%),
    linear-gradient(to bottom, rgba(14,16,19,0.78) 0%, rgba(14,16,19,0.52) 38%, var(--ink) 97%);
}

/* THE SIGNATURE, AND THE ONLY ANIMATION ON THE PAGE. A fire that nobody feeds goes out —
 * so the light the page opens in is not static. Four percent, six seconds, and off entirely
 * for anyone who has asked for less motion. */
.firelight {
  position: absolute; z-index: -1;
  left: 50%; top: 46%;
  width: min(70rem, 120vw); aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255,194,122,0.13), rgba(200,130,60,0.05) 42%, transparent 68%);
  animation: breathe 6.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.88; scale: 1; }
  50%      { opacity: 1;    scale: 1.035; }
}

.wordmark {
  width: min(525px, 82vw);
  margin-inline: auto;
  image-rendering: pixelated;
}

.hero-tagline {
  margin: clamp(1.25rem, 3vh, 1.75rem) 0 0;
  font: 400 clamp(0.8125rem, 0.78rem + 0.2vw, 0.9375rem)/1 var(--utility);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--warmth);
}

.hero-strap {
  margin: clamp(1rem, 2.5vh, 1.5rem) auto 0;
  max-width: 46ch;
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.6;
  color: var(--bone);
  text-wrap: balance;
}

.chip {
  display: inline-block;
  margin-top: clamp(1.5rem, 4vh, 2.25rem);
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--ember);
  background: rgba(168, 98, 56, 0.1);
  color: var(--warmth);
  font: 400 0.8125rem/1 var(--utility);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.facts {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.5rem clamp(0.9rem, 2vw, 1.5rem);
  margin: clamp(1.75rem, 5vh, 2.75rem) 0 0;
  padding: 0;
  list-style: none;
  font: 400 0.8125rem/1.4 var(--utility);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.facts li + li::before {
  content: "·";
  margin-inline-end: clamp(0.9rem, 2vw, 1.5rem);
  color: var(--ember);
}

/* ---- Sections, built as the game's own interface panels --------------------- */

.band { padding-block: clamp(3.5rem, 9vh, 6rem); }
.band + .band { border-top: 1px solid var(--edge); }

.eyebrow {
  margin: 0 0 0.5rem;
  font: 400 0.75rem/1 var(--utility);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
}

.band-title {
  margin: 0 0 clamp(1.75rem, 4vh, 2.5rem);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--edge);
  font: 700 clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem)/1.1 var(--display);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--warmth);
}

/* ---- What the game is ------------------------------------------------------- */

.band-reading .wrap { width: min(47rem, 100%); }
.prose { max-width: var(--measure); margin-inline: auto; }
.prose p { margin: 0 0 1.35em; }
.prose p:last-child { margin-bottom: 0; }
.prose b { color: var(--bone); font-weight: 700; }

/* ---- What you can do -------------------------------------------------------- */

.panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
}

@media (min-width: 46rem) { .panels { grid-template-columns: repeat(2, 1fr); } }

.panel { background: var(--panel); padding: clamp(1.5rem, 3vw, 2rem); }

.panel h3 {
  margin: 0 0 1rem;
  font: 700 0.9375rem/1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warmth);
}

.panel ul { margin: 0; padding: 0; list-style: none; }
.panel li { position: relative; padding-left: 1.25rem; margin-bottom: 0.85rem; font-size: 0.9375rem; line-height: 1.6; }
.panel li:last-child { margin-bottom: 0; }
/* The sprout from the wordmark, reduced to a mark: something pushing up. */
.panel li::before {
  content: "";
  position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px;
  background: var(--moss);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* ---- Screenshots ------------------------------------------------------------ */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.shot { margin: 0; }
.shot-open { display: block; cursor: zoom-in; }
.shot img {
  width: 100%;
  border: 1px solid var(--edge);
  background: var(--slate);
  transition: border-color 140ms ease, filter 140ms ease;
}
.shot-open:hover img,
.shot-open:focus-visible img { border-color: var(--ember); filter: brightness(1.1); }

/* CLICK TO ENLARGE, WITH NO JAVASCRIPT. `:target` does the whole job, which is why the page
 * can still be served under a policy that forbids scripts outright — and why the privacy
 * page's "run no scripts" is a statement about this page rather than an aspiration. */
.lightbox { display: none; }

.lightbox:target {
  display: grid;
  position: fixed; inset: 0; z-index: 60;
  place-content: center; justify-items: center;
  gap: 0.9rem;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(8, 9, 11, 0.975);
}

.lightbox-shade { position: absolute; inset: 0; cursor: zoom-out; }

.lightbox img {
  position: relative;
  width: auto;
  max-width: min(1920px, 100%);
  max-height: 78vh;
  border: 1px solid var(--edge);
}

.lightbox-cap {
  position: relative;
  margin: 0;
  font: 400 0.8125rem/1.5 var(--utility);
  letter-spacing: 0.06em;
  color: var(--bone-dim);
}

.lightbox-x {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem); right: clamp(0.75rem, 2vw, 1.5rem);
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--edge);
  background: var(--panel);
  font: 400 0.75rem/1 var(--utility);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-dim);
  text-decoration: none;
}
.lightbox-x:hover { color: var(--firelight); border-color: var(--ember); }
.shot figcaption {
  margin-top: 0.7rem;
  font: 400 0.8125rem/1.5 var(--utility);
  letter-spacing: 0.04em;
  color: var(--bone-dim);
}

/* ---- What's coming ---------------------------------------------------------- */

.tier { margin-bottom: clamp(2rem, 5vh, 3rem); }
.tier:last-child { margin-bottom: 0; }

.tier-name {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid currentColor;
  font: 400 0.75rem/1 var(--utility);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.tier-shipped     { color: var(--moss); }
.tier-building    { color: var(--warmth); }
.tier-planned     { color: var(--bone-dim); }
.tier-considering { color: var(--bone-dim); opacity: 0.75; }

.items { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem); margin: 0; padding: 0; list-style: none; }
.items li { border-left: 1px solid var(--edge); padding-left: 1.1rem; }
.tier-shipped-list li { border-left-color: color-mix(in srgb, var(--moss) 55%, transparent); }
.items h4 { margin: 0 0 0.35rem; font: 700 1rem/1.3 var(--display); color: var(--bone); letter-spacing: 0.02em; }
.items p { margin: 0; font-size: 0.9375rem; color: var(--bone-dim); line-height: 1.6; }

.note {
  margin: clamp(2rem, 5vh, 2.5rem) 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--edge);
  font: 400 0.875rem/1.6 var(--utility);
  color: var(--bone-dim);
  max-width: var(--measure);
}

/* ---- Foot ------------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--edge);
  padding-block: clamp(2.5rem, 6vh, 3.5rem);
  font: 400 0.8125rem/1.7 var(--utility);
  color: var(--bone-dim);
  letter-spacing: 0.04em;
}
.foot-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; align-items: baseline; justify-content: space-between; }
.foot a { color: var(--bone-dim); }
.foot a:hover { color: var(--firelight); }
.foot-mark { display: flex; align-items: center; gap: 0.7rem; color: var(--bone); }
/* 184px source at an exact 8:1, because a ratio that does not divide is what turns a small
   pixel mark to mush. */
.foot-mark img { width: 23px; height: 23px; }

/* ---- Contact, pinned where it can always be reached ------------------------- */

/* BELOW THE LIGHTBOX ON PURPOSE (z-index 30 against its 60), so opening a screenshot
 * covers this rather than floating it over the picture. */
.contact-tab {
  position: fixed;
  left: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  z-index: 30;
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--edge);
  background: var(--panel);
  color: var(--bone-dim);
  font: 400 0.75rem/1 var(--utility);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 140ms ease, border-color 140ms ease;
}
.contact-tab:hover,
.contact-tab:focus-visible { color: var(--firelight); border-color: var(--ember); }

/* The address itself is the hover state: the tab stays small until somebody wants it. */
.contact-tab-mail {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--warmth);
  transition: max-width 220ms ease;
}
.contact-tab:hover .contact-tab-mail,
.contact-tab:focus-visible .contact-tab-mail { max-width: 16rem; }

@media (max-width: 30rem) {
  .contact-tab { padding: 0.5rem 0.8rem; font-size: 0.6875rem; }
  .contact-tab-mail { display: none; }
}

/* ---- The legal page --------------------------------------------------------- */

.legal { padding-block: clamp(3rem, 8vh, 5rem); }
.legal .wrap { width: min(47rem, 100%); }
.legal-head { margin-bottom: clamp(2rem, 5vh, 3rem); padding-bottom: 1.25rem; border-bottom: 1px solid var(--edge); }
.legal-title { margin: 0 0 0.4rem; font: 700 clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem)/1.1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--warmth); }
.legal-stamp { margin: 0; font: 400 0.8125rem/1 var(--utility); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone-dim); }

.tldr {
  margin: 0 0 clamp(2rem, 5vh, 2.75rem);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--ember);
  border-left-width: 3px;
  background: rgba(168, 98, 56, 0.07);
  max-width: var(--measure);
}
.tldr p { margin: 0; }

.legal-body { max-width: var(--measure); }
.legal-body h2 {
  margin: clamp(2rem, 4vh, 2.5rem) 0 0.75rem;
  font: 700 1.0625rem/1.3 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warmth);
}
.legal-body p { margin: 0 0 1.1em; }
.legal-body ul { margin: 0 0 1.3em; padding-left: 1.2rem; }
.legal-body li { margin-bottom: 0.55em; }
.legal-body code { font: 400 0.875em/1 var(--utility); color: var(--bone); background: var(--slate); padding: 0.15em 0.4em; border: 1px solid var(--edge); }

.back {
  display: inline-block;
  margin-bottom: clamp(1.5rem, 4vh, 2rem);
  font: 400 0.8125rem/1 var(--utility);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
  text-decoration: none;
}
.back:hover { color: var(--firelight); }

/* ---- Quality floor ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .firelight { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 40rem) {
  .facts { flex-direction: column; align-items: center; gap: 0.35rem; }
  .facts li + li::before { content: none; }
}
