/* ==========================================================================
   zannagames.com — style.css
   Dark-only. The logo's three colors carry the toolchain's three layers:
     green  #8cc63f — source languages
     steel  #a9b8bd — IL / compiler core
     teal   #2bc8c4 — runtime / output
   No webfonts: a zero-dependency project ships system faces.
   ========================================================================== */

:root {
  --bg: #0c1214;
  --bg-raised: #10181b;
  --surface: #131c20;
  --border: #24343a;
  --border-bright: #33474f;

  --text: #dde7e4;
  --text-dim: #9ab0ab;
  --text-faint: #6f827f;

  --green: #8cc63f;
  --green-dim: #6da230;
  --steel: #a9b8bd;
  --teal: #2bc8c4;
  --teal-deep: #189aa8;

  /* The triad has no warm tone, and form errors need one that is not just
     "not-green". Checked against --bg-raised for 4.5:1 body text contrast. */
  --alert: #e8845c;

  --font-mono: "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --measure: 66rem;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: inline-block; vertical-align: middle; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

/* Inside a code block the <code> is the content, not an inline pill. Without
   this its border draws around every wrapped line box. */
pre.code > code {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: inherit;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- The compile rail: the Z-mark's three bars as a page seam ------ */

.compile-rail {
  height: 4px;
  background: linear-gradient(90deg,
    var(--green) 0 33.3%,
    var(--steel) 33.3% 66.6%,
    var(--teal) 66.6% 100%);
}

/* ------------------------------- Navigation ------------------------------ */

.nav {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.nav-brand:hover { text-decoration: none; color: var(--teal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .nav-gh {
  color: var(--text);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
}
.nav-links .nav-gh:hover { border-color: var(--teal); color: var(--teal); }

/* --------------------------------- Hero ---------------------------------- */

.hero {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 5.5rem 1.5rem 4.5rem;
}

.hero h1 {
  font-family: var(--font-mono);
  /* Floor tracks viewport: the longest forced line, "A game development",
     is 18 mono chars and must fit a 320px screen. */
  font-size: clamp(1.55rem, 7vw, 3.6rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0.9rem 0 1.4rem;
}

.hl-teal { color: var(--teal); }

.hero-copy {
  max-width: 44rem;
  font-size: 1.12rem;
  color: var(--text-dim);
}

.hero-status {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(140, 198, 63, 0.7);
  flex-shrink: 0;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* -------------------------------- Buttons -------------------------------- */

.btn {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.65rem 1.3rem;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--teal-deep);
  color: #eafcfb;
}
.btn-primary:hover { background: var(--teal); color: #062a2c; }

.btn-ghost {
  border-color: var(--border-bright);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--steel); }

/* ------------------------------- Sections -------------------------------- */

.section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0.8rem 0 1rem;
}

.section-copy {
  max-width: 42rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}
.eyebrow-green { color: var(--green); }
.eyebrow-steel { color: var(--steel); }
.eyebrow-teal { color: var(--teal); }

/* ------------------------------- Pipeline --------------------------------- */

.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1.15fr auto 1fr;
  gap: 0.9rem;
  align-items: stretch;
}

.stage {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stage-source { border-top: 3px solid var(--green); }
.stage-il { border-top: 3px solid var(--steel); }
.stage-run { border-top: 3px solid var(--teal); }

.stage-arrow {
  align-self: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  user-select: none;
}

.stage-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.stage-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--steel);
  border-radius: 4px;
  padding: 0 0.42em;
}
.stage-source .stage-num { background: var(--green); }
.stage-run .stage-num { background: var(--teal); }

.stage-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.stage-note {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.stage-caption {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.stage-caption code { font-size: 0.95em; }

/* Code panels */

.code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
  flex-grow: 1;
}

.code-tall {
  max-height: 24rem;
  overflow-y: auto;
}

.code-term { color: var(--text); flex-grow: 0; }
.code-term .prompt { color: var(--teal); font-weight: 700; }

.hidden { display: none; }

/* Syntax roles */
.k { color: var(--green); }            /* keywords */
.s { color: #e0c580; }                 /* strings */
.n { color: #7fd4f0; }                 /* numbers */
.t { color: var(--teal); }             /* types */
.fn { color: #cfe3a8; }                /* function names */
.g { color: var(--teal); }             /* IL globals */
.v { color: #7fd4f0; }                 /* IL values */
.lbl { color: var(--steel); }          /* IL block labels */
.il-meta { color: var(--text-faint); }

/* Tabs */

.tabbar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.tab {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}
.tab:hover { color: var(--text); border-color: var(--border-bright); }
.tab.active {
  color: var(--green);
  border-color: var(--green-dim);
  background: rgba(140, 198, 63, 0.08);
}

/* Run targets */

.target-list {
  list-style: none;
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--text-dim);
}
.target-list li {
  border-left: 2px solid var(--teal-deep);
  padding-left: 0.7rem;
}
.target-list strong { color: var(--text); }

/* ------------------------------ In the tree ------------------------------- */

.tree-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.tree-col {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.1rem;
}
.tree-green { border-top: 3px solid var(--green); }
.tree-steel { border-top: 3px solid var(--steel); }
.tree-teal { border-top: 3px solid var(--teal); }

.tree-col h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.8rem;
}
.tree-green h3 { color: var(--green); }
.tree-steel h3 { color: var(--steel); }
.tree-teal h3 { color: var(--teal); }

.tree-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.tree-col li { padding-left: 0.9rem; position: relative; }
.tree-col li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--text-faint);
}
.tree-col strong { color: var(--text); }

/* Principles strip */

.principles {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.principle h4 {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}
.principle p {
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* -------------------------------- Status ---------------------------------- */

.status-copy {
  max-width: 44rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}
.status-copy em { color: var(--text); font-style: normal; font-weight: 600; }
.status-copy strong { color: var(--text); font-weight: 600; }

/* -------------------------------- Footer ----------------------------------- */

.footer { margin-top: 2rem; }

.footer-rail {
  height: 4px;
  background: linear-gradient(90deg,
    var(--green) 0 33.3%,
    var(--steel) 33.3% 66.6%,
    var(--teal) 66.6% 100%);
}

.footer-links {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.6rem 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.footer p {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.1rem 1.5rem 2.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--teal); }

/* ------------------------- Load-in choreography ---------------------------- */
/* One orchestrated moment: the hero settles in compile order. */

@media (prefers-reduced-motion: no-preference) {
  .load-1, .load-2, .load-3, .load-4 {
    opacity: 0;
    transform: translateY(10px);
    animation: settle 0.55s ease-out forwards;
  }
  .load-1 { animation-delay: 0.05s; }
  .load-2 { animation-delay: 0.15s; }
  .load-3 { animation-delay: 0.3s; }
  .load-4 { animation-delay: 0.45s; }
}

@keyframes settle {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ========================================================================== */
/*  Multi-page additions                                                       */
/*  Subject pages each take one colour from the triad so the system keeps      */
/*  meaning: platform = steel (compiler core), studio = green (authoring),     */
/*  engine = teal (runtime). One --accent hook drives every accented part.     */
/* ========================================================================== */

body { --accent: var(--teal); --accent-dim: var(--teal-deep); }
body.page-platform { --accent: var(--steel); --accent-dim: #7f9298; }
body.page-studio { --accent: var(--green); --accent-dim: var(--green-dim); }
body.page-engine { --accent: var(--teal); --accent-dim: var(--teal-deep); }
/* Games sit at the end of the pipeline — the thing the whole stack is for —
   so they take the runtime's teal. Download and contact are utility pages and
   take the neutral steel rather than claiming a layer they do not represent. */
body.page-games { --accent: var(--teal); --accent-dim: var(--teal-deep); }
body.page-download { --accent: var(--steel); --accent-dim: #7f9298; }
body.page-contact { --accent: var(--steel); --accent-dim: #7f9298; }

.eyebrow-accent { color: var(--accent); }
.hl-accent { color: var(--accent); }

/* Current page in the top nav. Colour alone will not carry it — steel sits
   almost exactly on --text-dim — so mark it with a rule as well. */
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* ------------------------------ Page hero --------------------------------- */
/* Lighter than the home hero: subject pages lead with content, not a pitch.   */

.page-hero {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.2rem 1.5rem 2.4rem;
}

.page-hero h1 {
  font-family: var(--font-mono);
  /* Same rule as the home hero: the floor must let the longest forced line
     fit a 320px screen. Keep forced lines to 18 mono characters or fewer. */
  font-size: clamp(1.5rem, 4.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0.7rem 0 1.1rem;
}

.page-hero p {
  max-width: 44rem;
  font-size: 1.06rem;
  color: var(--text-dim);
}

/* ------------------------------- Sub-nav ---------------------------------- */
/* Plain anchor list. No JS, no scroll spy — it just has to work.              */

.subnav {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.subnav a { color: var(--text-faint); }
.subnav a:hover { color: var(--accent); text-decoration: none; }

/* ------------------------------- Doorways --------------------------------- */
/* Home cards that open the three subject pages.                              */

/* Four doorways on a three-column grid left the fourth orphaned on its own
   row. Two columns keeps every row full and gives each card enough width for
   its thumbnail to read at a glance. */
.doorways {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.doorway {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
}
.doorway:hover { text-decoration: none; border-color: var(--border-bright); }
.doorway-steel { border-top: 3px solid var(--steel); }
.doorway-green { border-top: 3px solid var(--green); }
.doorway-teal { border-top: 3px solid var(--teal); }

.doorway-thumb {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border);
}

.doorway-body { padding: 1.1rem 1.2rem 1.2rem; }

.doorway h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}
.doorway-steel h3 { color: var(--steel); }
.doorway-green h3 { color: var(--green); }
.doorway-teal h3 { color: var(--teal); }

.doorway p { font-size: 0.9rem; color: var(--text-dim); }

.doorway ul {
  list-style: none;
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.doorway li { padding-left: 0.9rem; position: relative; }
.doorway li::before { content: "·"; position: absolute; left: 0; }

.doorway-more {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
}
.doorway-steel .doorway-more { color: var(--steel); }
.doorway-green .doorway-more { color: var(--green); }
.doorway-teal .doorway-more { color: var(--teal); }

/* ------------------------------- Figures ---------------------------------- */
/* Every screenshot is a real frame from a real build. The caption says what   */
/* is being looked at so the image cannot overclaim on its own.               */

.shot {
  margin: 1.6rem 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border);
}

.shot figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.shot figcaption strong { color: var(--text-dim); font-weight: 600; }

.shot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.6rem;
}
.shot-pair .shot { margin-top: 0; }

/* -------------------------------- Tables ---------------------------------- */

.table-wrap {
  overflow-x: auto;
  margin-top: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.spec-table th,
.spec-table td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.spec-table td.wrap { white-space: normal; min-width: 18rem; }
.spec-table tr:last-child td { border-bottom: none; }

.spec-table th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--surface);
}

.spec-table td { color: var(--text-dim); }
.spec-table td strong { color: var(--text); font-weight: 600; }
.spec-table td.num { text-align: right; font-family: var(--font-mono); }

/* -------------------------------- Blocks ---------------------------------- */

.block-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.block {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.block h3 {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.block p { font-size: 0.88rem; color: var(--text-dim); }
.block p + p { margin-top: 0.7rem; }

.block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.block li { padding-left: 0.9rem; position: relative; }
.block li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--text-faint);
}
.block strong { color: var(--text); font-weight: 600; }

/* --------------------------------- Gaps ----------------------------------- */
/* What a thing is not, stated plainly. Deliberately not given an accent       */
/* colour — this is information, not a warning.                                */

.gaps {
  margin-top: 1.4rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--border-bright);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 1.2rem 1.4rem;
}

.gaps h3 {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.7rem;
  color: var(--text-dim);
}

.gaps ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-faint);
}
.gaps li { padding-left: 1rem; position: relative; }
.gaps li::before { content: "—"; position: absolute; left: 0; }
.gaps strong { color: var(--text-dim); font-weight: 600; }

/* -------------------------------- Callout --------------------------------- */

.callout {
  margin-top: 1.4rem;
  font-size: 0.88rem;
  color: var(--text-faint);
  border-left: 2px solid var(--border-bright);
  padding-left: 0.9rem;
}

/* ------------------------------- Prose bits -------------------------------- */

.section h3.rule {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 2.4rem 0 0.9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}
.section h3.rule:first-of-type { margin-top: 1.6rem; }

.prose { max-width: 44rem; color: var(--text-dim); }
.prose p + p { margin-top: 0.9rem; }
.prose strong { color: var(--text); font-weight: 600; }

.code-block { margin-top: 1.4rem; }
.code-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 0.45rem;
}

/* Side-by-side code, used for before/after IL. */
.code-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.4rem;
  align-items: start;
}

/* ========================================================================== */
/*  Expansion components                                                       */
/*  Added for games / download / contact and the deeper subject pages.         */
/* ========================================================================== */

/* ------------------------------ Rail segment ------------------------------ */
/* The compile rail, cut down to a section marker. A page reads as a walk      */
/* along the pipeline: the same three bars that head the document also head    */
/* each section, weighted toward that page's own layer.                        */

.rail-seg {
  height: 3px;
  width: 4.5rem;
  border-radius: 2px;
  margin-bottom: 1.1rem;
  background: linear-gradient(90deg,
    var(--green) 0 33.3%,
    var(--steel) 33.3% 66.6%,
    var(--teal) 66.6% 100%);
}
/* On a subject page the section marker leans into that page's colour rather
   than repeating the full triad, so the accent still reads as meaningful. */
body.page-platform .rail-seg,
body.page-download .rail-seg,
body.page-contact .rail-seg {
  background: linear-gradient(90deg, var(--steel) 0 70%, var(--teal) 70% 100%);
}
body.page-studio .rail-seg {
  background: linear-gradient(90deg, var(--green) 0 70%, var(--steel) 70% 100%);
}
body.page-engine .rail-seg {
  background: linear-gradient(90deg, var(--teal) 0 70%, var(--steel) 70% 100%);
}

/* -------------------------------- Receipts -------------------------------- */
/* A claim, then the command that proves it and the output it produced. A      */
/* compiler can show its work; almost nothing else on a product page can.      */
/* Never hand-write the output panel — paste what the tool actually printed.   */

.receipt {
  margin-top: 1.4rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  border-radius: var(--radius);
  background: var(--bg-raised);
  overflow: hidden;
}

.receipt-claim {
  padding: 0.85rem 1rem 0;
  font-size: 0.95rem;
  color: var(--text);
}
.receipt-claim strong { color: var(--accent); font-weight: 600; }

.receipt pre.code {
  margin: 0.85rem 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
}

.receipt-note {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* --------------------------- Framed screenshots --------------------------- */
/* Captures wear a title strip in Studio's own palette so a 1440x900 frame     */
/* sits in the page as a window rather than floating as a bare rectangle.      */

.frame {
  margin: 1.6rem 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-faint);
}

.frame-dots {
  display: inline-flex;
  gap: 0.3rem;
  flex-shrink: 0;
}
.frame-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-bright);
}
.frame-dots i:first-child { background: var(--accent-dim); }

.frame-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame img {
  display: block;
  width: 100%;
  height: auto;
}

.frame figcaption {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
}
.frame figcaption strong { color: var(--text-dim); font-weight: 600; }

.frame-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.6rem;
}
.frame-grid .frame { margin-top: 0; }

/* --------------------------------- Metrics -------------------------------- */
/* Numbers with a stated source. Anything here must be re-derivable from the   */
/* toolchain; the note names the command that produced it.                     */

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  margin-top: 1.6rem;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.metric {
  background: var(--bg-raised);
  padding: 1.1rem 1rem;
}

.metric-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.metric-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.metrics-note {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ------------------------------ Featured game ----------------------------- */
/* Editorial treatment for the handful of games worth a real look. Media and   */
/* copy swap sides down the page so a run of them does not read as a table.    */

.feature {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.8rem;
  align-items: start;
  padding-top: 2.6rem;
  margin-top: 2.6rem;
  border-top: 1px solid var(--border);
}
.feature:first-of-type { border-top: 0; margin-top: 1.4rem; padding-top: 0; }

.feature:nth-of-type(even) .feature-media { order: 2; }

.feature-media .frame { margin-top: 0; }
.feature-media .frame + .frame { margin-top: 1rem; }

.feature-body h3 {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}

.feature-kind {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
}

.feature-body p { color: var(--text-dim); margin-top: 0.8rem; }

.feature-body ul {
  margin: 1rem 0 0 1.05rem;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.feature-body li { margin-bottom: 0.35rem; }

.feature-meta {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.feature-meta a { color: var(--accent); }

/* -------------------------------- Gallery --------------------------------- */
/* Everything else, at a glance. Cards are not links to detail pages that do   */
/* not exist — they link to source.                                            */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.gcard {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gcard img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.gcard-body { padding: 0.85rem 1rem 1rem; flex: 1; }

.gcard h4 {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}

.gcard .gcard-kind {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.gcard p {
  margin-top: 0.5rem;
  font-size: 0.87rem;
  color: var(--text-dim);
}

/* -------------------------------- Downloads ------------------------------- */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.dl-card {
  border: 1px solid var(--border);
  border-top: 3px solid var(--border-bright);
  border-radius: var(--radius);
  background: var(--bg-raised);
  padding: 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.dl-card h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.dl-arch {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

.dl-card dl {
  margin: 1rem 0 1.2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.dl-card dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.65rem;
}
.dl-card dd { margin-top: 0.15rem; }

/* Deliberately not a disabled button: nothing here is clickable yet, and a
   dead button invites the click anyway. It is a status chip. */
.dl-soon {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px dashed var(--border-bright);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
}

/* ---------------------------------- Forms --------------------------------- */

.form { max-width: 38rem; margin-top: 1.6rem; }

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.field label .req { color: var(--accent); }

.field input,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
}
.field textarea { min-height: 10rem; resize: vertical; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field-hint {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* Honeypot. Off-screen rather than display:none — some bots skip hidden
   fields, and a positioned field still gets filled. Hidden from assistive
   tech via aria-hidden and tabindex="-1" in the markup. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  margin-top: 1.4rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-bright);
  background: var(--bg-raised);
  font-size: 0.92rem;
}
.notice-ok { border-left-color: var(--green); }
.notice-ok strong { color: var(--green); }
.notice-err { border-left-color: var(--alert); }
.notice-err strong { color: var(--alert); }

/* ------------------------------- Responsive -------------------------------- */

@media (max-width: 960px) {
  .pipeline {
    grid-template-columns: 1fr;
  }
  .stage-arrow {
    transform: rotate(90deg);
    padding: 0.1rem 0;
  }
  .tree-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .doorways { grid-template-columns: 1fr; }
  .block-grid { grid-template-columns: 1fr; }
  .code-compare { grid-template-columns: 1fr; }
  .shot-pair { grid-template-columns: 1fr; }
  .frame-grid { grid-template-columns: 1fr; }
  /* Media back above copy, and drop the alternating order — reversed columns
     stacked vertically would put a caption before the thing it describes. */
  .feature { grid-template-columns: 1fr; gap: 1.4rem; }
  .feature:nth-of-type(even) .feature-media { order: 0; }
}

@media (max-width: 560px) {
  .hero { padding-top: 3.5rem; }
  .principles { grid-template-columns: 1fr; }
  .page-hero { padding-top: 2.4rem; }
  .section { padding: 3.2rem 1.5rem; }

  /* Seven nav items will not sit on one line at this width. Rather than a
     toggle — which needs JS or a browser-quirk-dependent CSS hack, and this
     site ships neither — the links wrap into a tidy block under the brand.
     Everything stays visible, focusable and one tap away. */
  .nav { align-items: flex-start; }
  .nav-links {
    width: 100%;
    gap: 0.55rem 1rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
  }
  .nav-links .nav-gh { margin-left: auto; }

  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { padding: 0.9rem 0.85rem; }
  .metric-num { font-size: 1.3rem; }
  .gallery { grid-template-columns: 1fr; }
}
