/* daylight noise: every module page's skin. Served at /module.css; a module page links it as ../module.css before its
   own style.css, which keeps only what its stage needs. Black like the panels and the home page (style.css here),
   with the same type: Poppins, and the names in the mark's font, Space Mono Bold Italic. No sky and no blips: those
   are the home page's. A page's character is its own module, playing on its stage.

   Every page has the same order: the breadcrumb, the home page's card for the module (name, HP · kind, blurb), the
   stage, a few plain sections, Inside (the 3D model), Specs, and "Nothing's for sale yet." No eyebrows, slogans,
   buttons that sell, stat strips, FAQ or section links (the user, 6 Oct 2026: describe, don't sell). */

:root {
  --bg: rgb(12, 11, 9);
  --ink: rgb(238, 236, 228);
  --dim: rgb(163, 160, 148);
  --hair: rgb(42, 38, 30);
  --nav: rgba(12, 11, 9, 0.88);
  --screen: #0c0b09;
  --gold: #d4af37;
  --gold-hi: #f0d878;
  --gold-line: rgba(212, 175, 55, 0.45);
  --accent: var(--gold);           /* a page may set its module's own colour (its style.css :root) */
  --accent-hi: var(--gold-hi);
  --maxw: 1080px;
  --gutter: clamp(1rem, 4vw, 2rem);
  /* the names the stages were written with, when they were the one dark band on a cream page */
  --text: var(--ink);
  --text-dim: var(--dim);
  --hairline: var(--hair);
  --s-ink: var(--ink);
  --s-dim: var(--dim);
  --s-line: rgb(52, 48, 40);
  color-scheme: dark;
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--gold); color: var(--screen); }

h1, h2, h3 { font-weight: 500; line-height: 1.25; letter-spacing: 0; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-bottom: 1.2rem; }
h3 { font-size: 1rem; font-weight: 600; color: var(--ink); }
em, i, cite { font-style: italic; color: inherit; }
strong, b { font-weight: 600; color: var(--ink); }
a { color: var(--ink); }
a:hover { font-style: italic; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
code { font: 0.9em "Space Mono", ui-monospace, monospace; }

.nav-parent, .nav-logo, .hero-name, .hello-link {
  font-family: "Space Mono", ui-monospace, monospace; font-style: italic; font-weight: 700;
}

/* ---------- nav: the breadcrumb back to the brand home, nothing else ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.6rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: var(--nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--hair);
}
.nav-crumbs { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.nav-parent { font-size: 0.9rem; color: var(--dim); text-decoration: none; white-space: nowrap; }
.nav-parent:hover { color: var(--gold); font-style: italic; }
.nav-sep { color: var(--dim); opacity: 0.6; font-size: 0.9rem; }
.nav-logo { font-size: 1.15rem; color: var(--gold); white-space: nowrap; text-decoration: none; }
.nav-logo:hover { font-style: italic; color: var(--gold-hi); }

/* ---------- hero: the home page's card for the module ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 8vh, 6rem) var(--gutter) clamp(2rem, 5vh, 3rem);
  text-align: center;
}
.hero-name { font-size: clamp(2.4rem, 7vw, 4.2rem); color: var(--gold); line-height: 1.1; }
.hero-kind { margin-top: 0.6rem; color: var(--dim); }
.hero-kind b { color: var(--ink); }
.hero-sub { max-width: 620px; margin: 1.6rem auto 0; font-size: 1.05rem; color: var(--dim); text-wrap: pretty; }

/* ---------- the stage: the panel and its engine, straight on the page's black (each page's style.css lays it out) ---------- */
.stage { color: var(--ink); scroll-margin-top: 3.6rem; }
.stage-note, .stage-hint { font-size: 0.8rem; color: var(--dim); }

/* the stage's own controls: Listen, the example patches, the 3D model's buttons */
.listen {
  font: 600 0.95rem/1 "Poppins", system-ui, sans-serif; color: var(--screen);
  background: var(--accent); border: 1px solid var(--accent); border-radius: 0;
  padding: 0.8rem 1.3rem; cursor: pointer;
}
.listen:hover { background: var(--accent-hi); font-style: italic; }
.listen[aria-pressed="true"] { background: transparent; color: var(--accent); }
.listen:disabled { opacity: 0.6; cursor: progress; }   /* while its AudioContext starts */
.patches-label { font-size: 0.78rem; font-weight: 600; color: var(--ink); margin-bottom: 0.55rem; }
.patches-label span { font-weight: 400; color: var(--dim); }
.patches button, .view-bar button {
  position: relative; font: 600 0.82rem/1 "Poppins", system-ui, sans-serif; color: var(--ink);
  background: rgba(12, 11, 9, 0.82); border: 1px solid var(--s-line); border-radius: 0;
  padding: 0.55rem 0.9rem; cursor: pointer;
}
.patches button:hover, .view-bar button:hover { border-color: var(--accent); font-style: italic; }
.patches button[aria-pressed="true"], .view-bar button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* ---------- sections ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6.5rem) var(--gutter);
  border-top: 2px solid var(--hair);
}
.stage + .section { margin-top: clamp(2rem, 5vh, 3.5rem); }
.section-sub { max-width: 640px; color: var(--dim); margin-bottom: 2rem; }
.prose { max-width: 680px; }
.prose p { color: var(--dim); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 1rem; }
.figure { margin-top: 2rem; }
.figure img, .figure canvas, .figure svg { display: block; max-width: 100%; height: auto; border: 1px solid var(--s-line); }
.figure figcaption, .model-hint { font-size: 0.8rem; color: var(--dim); margin-top: 0.7rem; }

/* ---------- lists: the controls and jacks, one line each ---------- */
.feature-list { list-style: none; margin: 1.4rem 0; display: flex; flex-direction: column; gap: 0.7rem; max-width: 760px; }
.feature-list li { color: var(--dim); font-size: 0.95rem; padding-left: 1.1rem; position: relative; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 5px; height: 5px; background: var(--gold); border-radius: 50%;
}
.feature-list strong { color: var(--ink); font-size: 0.95em; letter-spacing: 0.02em; }

/* ---------- columns: a panel's lanes or sides, side by side ---------- */
.pillar-grid {
  display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 2px; background: var(--hair); border: 2px solid var(--hair);
}
.pillar { background: var(--bg); padding: 1.5rem 1.1rem 1.2rem; display: flex; flex-direction: column; }
.pillar h3 { text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.06em; margin-bottom: 0.7rem; }
.pillar p { font-size: 0.88rem; color: var(--dim); }
.pillar-hot h3 { color: var(--gold); }
.pillar-cv { margin-top: auto; padding-top: 1rem; font-size: 0.72rem !important; font-weight: 600; letter-spacing: 0.06em; }
.pillar .pillar-cv { color: var(--dim) !important; }
.pillar-hot .pillar-cv { color: var(--gold-hi) !important; }

/* ---------- inside: the 3D model ---------- */
.module-view {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 40% 35%, #1b1a16 0%, var(--screen) 70%);
  border: 1px solid var(--s-line);
}
#module { display: block; width: 100%; aspect-ratio: 16 / 9; cursor: grab; }
#module:active { cursor: grabbing; }
.stage-fallback { display: none; width: 100%; max-width: 420px; height: auto; margin: 0 auto; padding: 2rem 0; }
.module-view.no-webgl #module, .module-view.no-webgl .view-bar { display: none; }
.module-view.no-webgl .stage-fallback { display: block; }
.module-view.no-webgl + .model-hint { display: none; }   /* "drag to look around" means nothing under a picture */
.view-bar { position: absolute; inset: auto 12px 12px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.view-bar > * { pointer-events: auto; }

/* ---------- specs ---------- */
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.spec-col { border: 2px solid var(--hair); padding: 1.5rem 1.4rem; }
.spec-col h3 { margin-bottom: 1rem; }
.spec-col dl { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; }
.spec-col dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: var(--dim); padding-top: 0.15rem; }   /* no lowercasing: it made "+12 V" "+12 v" */
.spec-col dd { font-size: 0.92rem; color: var(--ink); }

/* ---------- hello: the home page's gold underlined address ---------- */
.hello-link { font-size: 1.1rem; margin-top: 1.2rem; }
.hello-link a { color: var(--gold); text-decoration: underline 2px var(--gold-line); text-underline-offset: 0.22em; }
.hello-link a:hover { color: var(--gold-hi); text-decoration-color: var(--gold-hi); }

/* ---------- the page lit by its own module (../lit.js): halftone dots behind everything, dark until a demo plays ---------- */
.lit { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
/* words over the light get a little of the page's black round them, as the home page's words over the sky do */
.hero, .section, .stage-side, .stage-note, .stage-hint { text-shadow: 0 0 2px var(--bg), 0 0 8px var(--bg); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  #module { aspect-ratio: 4 / 3; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .nav { gap: 0.75rem; }
  .nav-crumbs { gap: 0.35rem; }
  .nav-parent, .nav-sep { font-size: 0.78rem; }
  .nav-logo { font-size: 1rem; }
  .spec-grid, .pillar-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .nav-parent, .nav-sep { font-size: 0.72rem; }
  .nav-logo { font-size: 0.95rem; }
}
