/* ==================================================================
   LUMEN & CO · 04 SERIES
   A light gallery studio. Warm white field, ink type, one brass accent.
   The palette lives in registered custom properties so the whole page
   can cross-fade from day to night in a single transition.
   ================================================================== */

@property --paper   { syntax: '<color>'; inherits: true; initial-value: #f7f5f1; }
@property --paper-2 { syntax: '<color>'; inherits: true; initial-value: #f1eee7; }
@property --paper-3 { syntax: '<color>'; inherits: true; initial-value: #eae6dc; }
@property --ink     { syntax: '<color>'; inherits: true; initial-value: #1a1917; }
@property --ink-2   { syntax: '<color>'; inherits: true; initial-value: #55514a; }
@property --ink-3   { syntax: '<color>'; inherits: true; initial-value: #6b665d; }
@property --rule    { syntax: '<color>'; inherits: true; initial-value: rgba(26,25,23,.15); }
@property --rule-2  { syntax: '<color>'; inherits: true; initial-value: rgba(26,25,23,.075); }
@property --brass   { syntax: '<color>'; inherits: true; initial-value: #a9803f; }
@property --brass-t { syntax: '<color>'; inherits: true; initial-value: #8a6528; }

:root {
  --paper:   #f7f5f1;
  --paper-2: #f1eee7;
  --paper-3: #eae6dc;
  --ink:     #1a1917;
  --ink-2:   #55514a;
  --ink-3:   #6b665d;
  --rule:    rgba(26,25,23,.15);
  --rule-2:  rgba(26,25,23,.075);
  --brass:   #a9803f;
  --brass-t: #8a6528;

  --serif: 'Fraunces', 'Newsreader', Georgia, serif;
  --read:  'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --hdr: 60px;
  --gut: clamp(1.15rem, 3.6vw, 3.4rem);
  --band: 44vh;

  --d1: clamp(2.9rem, 8vw, 8.4rem);
  --d2: clamp(2.05rem, 4.4vw, 4.1rem);
  --d3: clamp(1.6rem, 2.35vw, 2.35rem);

  --ease: cubic-bezier(.22,.78,.2,1);
}

html.night {
  --paper:   #0a0908;
  --paper-2: #100f0d;
  --paper-3: #16130f;
  --ink:     #f4efe6;
  --ink-2:   #bcb3a7;
  --ink-3:   #a79e91;
  --rule:    rgba(244,239,230,.17);
  --rule-2:  rgba(244,239,230,.08);
  --brass:   #d3a35d;
  --brass-t: #d9ac67;
  color-scheme: dark;
}

html {
  transition: --paper 1100ms var(--ease), --paper-2 1100ms var(--ease),
              --paper-3 1100ms var(--ease), --ink 1100ms var(--ease),
              --ink-2 1100ms var(--ease), --ink-3 1100ms var(--ease),
              --rule 1100ms var(--ease), --rule-2 1100ms var(--ease),
              --brass 1100ms var(--ease), --brass-t 1100ms var(--ease);
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--read);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: inherit; }

::selection { background: var(--brass); color: #fff; }

/* ---------- type primitives --------------------------------------- */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: .93;
  letter-spacing: -.022em;
  margin: 0;
  text-wrap: balance;
}
.display em { font-style: italic; font-weight: 300; }
.d1 { font-size: var(--d1); }
.d2 { font-size: var(--d2); }
.d3 { font-size: var(--d3); line-height: 1.02; letter-spacing: -.015em; }

.caps, .eyebrow, legend.caps {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .175em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
  line-height: 1.5;
}
.eyebrow { color: var(--brass-t); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

.lede {
  font-family: var(--read);
  font-weight: 300;
  font-size: clamp(1.02rem, 1.25vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 34ch;
}
.prose p {
  margin: 0 0 1.15em;
  max-width: 44ch;
  color: var(--ink-2);
}
.prose p:last-child { margin-bottom: 0; }
.prose.big p { font-size: clamp(1.06rem, 1.35vw, 1.32rem); line-height: 1.66; color: var(--ink); max-width: 48ch; }
.small { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.dim { color: var(--ink-3); }
.narrow { max-width: 40ch; }
.hairline { display: block; width: 3rem; height: 1px; background: var(--rule); }

/* ---------- veil --------------------------------------------------- */

#veil {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: grid; place-items: center;
  transition: opacity .9s var(--ease), visibility .9s;
}
#veil.gone { opacity: 0; visibility: hidden; }
.veil-inner { display: grid; justify-items: center; gap: 1.4rem; }
.veil-mark { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 2.4rem); letter-spacing: .06em; }
.veil-mark .amp { color: var(--brass); font-style: italic; margin: 0 .12em; }
.veil-line { display: block; width: min(38vw, 260px); height: 1px; background: var(--rule); overflow: hidden; }
.veil-line i { display: block; height: 100%; width: 30%; background: var(--brass); animation: sweep 1.4s var(--ease) infinite; }
@keyframes sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }
.veil-note { font-family: var(--sans); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- studio stage ------------------------------------------ */

#stage {
  position: fixed; inset: 0; z-index: 0;
  transition: opacity .7s var(--ease);
}
#stage.hidden { opacity: 0; pointer-events: none; }
#glass { display: block; width: 100%; height: 100%; }
#overlay {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
}

#pad {
  position: fixed; z-index: 1;
  left: 32%; right: 0; top: var(--hdr); bottom: 0;
  cursor: default;
  outline: none;
}
#pad.is-live { cursor: grab; }
#pad.is-live:active { cursor: grabbing; }
#pad:focus-visible { outline: 1px solid var(--brass); outline-offset: -12px; }
#pad:not(.is-live) { pointer-events: none; }

#padhint {
  position: fixed; z-index: 3; left: 0; right: 0;
  bottom: 8.5rem; margin: 0; text-align: center;
  pointer-events: none; opacity: 0;
  transition: opacity .6s var(--ease);
}
#padhint.on { opacity: 1; }
#padhint span {
  font-family: var(--sans); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3);
  padding-left: 2.1rem; position: relative;
}
#padhint span::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 1.5rem; height: 1px;
  background: var(--brass); transform-origin: left;
  animation: nudge 2.4s var(--ease) infinite;
}
@keyframes nudge { 0%,100% { transform: scaleX(.4); } 50% { transform: scaleX(1); } }

/* overlay drawing language */
#overlay .lead { stroke: var(--brass); stroke-width: 1; fill: none; }
#overlay .node { fill: none; stroke: var(--brass); stroke-width: 1; }
#overlay .no { font-family: var(--mono); font-size: 10px; fill: var(--brass-t); letter-spacing: .04em; }
#overlay .nm { font-family: var(--sans); font-size: 11px; font-weight: 500; fill: var(--ink); letter-spacing: .06em; }
#overlay .sub { font-family: var(--mono); font-size: 9.5px; fill: var(--ink-3); }
#overlay .dim-line { stroke: var(--ink); stroke-width: .75; fill: none; opacity: .55; }
#overlay .dim-tick { stroke: var(--ink); stroke-width: .75; opacity: .55; }
#overlay .dim-ext { stroke: var(--ink); stroke-width: .5; opacity: .3; stroke-dasharray: 2 3; }
#overlay .dim-txt { font-family: var(--mono); font-size: 10px; fill: var(--ink); letter-spacing: .02em; }
#overlay .dim-bg { fill: var(--paper); opacity: .82; }
#overlay .ex-axis { stroke: var(--brass); stroke-width: .7; fill: none; opacity: .42; stroke-dasharray: 14 4 2 4; }
#overlay .g-callouts, #overlay .g-dims { opacity: 0; transition: opacity .45s var(--ease); }
#overlay .g-callouts.on, #overlay .g-dims.on { opacity: 1; }
#overlay .co { transition: opacity .3s var(--ease); }

/* ---------- masthead ---------------------------------------------- */

#masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: var(--hdr);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 var(--gut);
  border-bottom: 1px solid var(--rule-2);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(9px) saturate(1.05);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
}
.mark {
  font-family: var(--serif); font-size: 15px; font-weight: 500;
  letter-spacing: .1em; text-decoration: none; white-space: nowrap;
}
.mark .amp { color: var(--brass); font-style: italic; margin: 0 .18em; font-weight: 400; }
#masthead nav { margin-left: auto; display: flex; gap: 1.7rem; }
#masthead nav a {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .155em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-2);
  padding: .5rem 0; position: relative;
  transition: color .3s;
}
#masthead nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: .25rem;
  height: 1px; background: var(--brass); transition: right .4s var(--ease);
}
#masthead nav a:hover, #masthead nav a:focus-visible { color: var(--ink); }
#masthead nav a:hover::after, #masthead nav a:focus-visible::after { right: 0; }

.nightbtn {
  margin-left: 1.6rem;
  display: inline-flex; align-items: center; gap: .55rem;
  height: 30px; padding: 0 .85rem 0 .6rem;
  border: 1px solid var(--rule); border-radius: 30px;
  background: transparent; color: var(--ink-2);
  font-family: var(--sans); font-size: 10px; letter-spacing: .17em;
  text-transform: uppercase; cursor: pointer;
  transition: border-color .35s, color .35s, background-color .35s;
}
.nightbtn:hover, .nightbtn:focus-visible { border-color: var(--brass); color: var(--ink); }
.nb-ico { width: 16px; height: 16px; display: block; color: var(--brass); }
.nb-ico svg { width: 16px; height: 16px; display: block; }
.nb-moon { opacity: 0; transform-origin: 50% 50%; transition: opacity .5s var(--ease); }
.nb-sun, .nb-rays { transition: opacity .5s var(--ease), transform .6s var(--ease); }
.nightbtn[aria-pressed="true"] .nb-sun, .nightbtn[aria-pressed="true"] .nb-rays { opacity: 0; transform: scale(.4); }
.nightbtn[aria-pressed="true"] .nb-moon { opacity: 1; }

/* ---------- shared section frame ---------------------------------- */

.stage-sec { position: relative; z-index: 4; pointer-events: none; }
.stage-sec a, .stage-sec button, .stage-sec label, .stage-sec input,
.stage-sec .cfg-readout, .stage-sec .parts { pointer-events: auto; }

.paper {
  position: relative; z-index: 5;
  background: var(--paper);
  border-top: 1px solid var(--rule-2);
}
.paper.alt { background: var(--paper-2); }
.wrap { max-width: 1360px; margin: 0 auto; padding: clamp(4rem, 9vh, 8rem) var(--gut); }

.col-copy {
  width: min(38ch, 34vw);
  margin-left: var(--gut);
}

/* ---------- hero -------------------------------------------------- */

#hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; }
.grid-lines { position: absolute; inset: 0; display: flex; justify-content: space-evenly; pointer-events: none; }
.grid-lines i { width: 1px; background: var(--rule-2); }
.hero-grid {
  margin: auto 0 0 var(--gut);
  padding-top: calc(var(--hdr) + 2rem);
  width: min(640px, 46vw);
  display: grid; gap: 1.5rem;
  align-content: center;
  min-height: calc(100vh - 6rem);
}
.hero-eb { margin-bottom: -.4rem; }
/* the three lines are authored, not wrapped: at any width the break
   lands in the same place and the column keeps its shape */
.hero-h1 { font-size: clamp(2.75rem, 7.1vw, 7.4rem); }
.hero-h1 .l { display: block; white-space: nowrap; }
.hero-h1 em { color: var(--brass); }
.hero-lede { max-width: 33ch; }
.hero-meta { display: flex; align-items: center; gap: 1.1rem; font-size: 10.5px; letter-spacing: .18em; color: var(--ink-3); }
.hero-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1.1rem var(--gut) 1.4rem;
  border-top: 1px solid var(--rule-2);
}
.scrollcue { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink-2); }
.scrollcue i { display: block; width: 1px; height: 22px; background: var(--brass); animation: drop 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

.skip {
  position: fixed; top: 0; left: 50%; transform: translate(-50%, -110%);
  z-index: 60; background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; text-decoration: none; padding: .8rem 1.2rem;
  transition: transform .3s var(--ease);
}
.skip:focus { transform: translate(-50%, 0); }

#progress {
  position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: var(--brass); transform: scaleX(0); transform-origin: left;
}

/* ---------- statement -------------------------------------------- */

/* the wall label: a museum caption, set from live configuration data */
.objlabel {
  position: absolute; right: var(--gut); bottom: 16vh;
  width: 250px; margin: 0; padding: 1rem 1.1rem 1.05rem;
  background: var(--paper); border: 1px solid var(--rule);
  display: grid; gap: .25rem;
}
.ol-no { color: var(--brass-t); margin-bottom: .35rem; }
.ol-title { font-family: var(--serif); font-size: 1.02rem; line-height: 1.15; margin: 0 0 .3rem; letter-spacing: -.01em; }
.ol-line { margin: 0; font-size: 13px; line-height: 1.42; color: var(--ink-2); }
.ol-foot { margin-top: .7rem; padding-top: .55rem; border-top: 1px solid var(--rule-2); font-size: 9px; }

#statement { min-height: 150vh; padding: 14vh 0 16vh; }
#statement .col-copy { display: grid; gap: 1.6rem; }
.pull {
  margin: 1.5rem 0 0; padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
}
.pull p {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.3rem, 1.8vw, 1.75rem);
  line-height: 1.24; letter-spacing: -.012em; margin: 0 0 .8rem; max-width: 26ch;
}
.pull cite { font-family: var(--sans); font-style: normal; font-size: 10.5px; letter-spacing: .17em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- configurator ----------------------------------------- */

#configure { min-height: 240vh; }
.cfg-sticky { position: sticky; top: 0; height: 100vh; }

.cfg-panel {
  position: absolute; left: var(--gut); top: calc(var(--hdr) + clamp(1rem, 3.4vh, 2.6rem));
  width: min(30vw, 380px);
  display: grid; gap: clamp(1rem, 2.2vh, 1.7rem);
}
.cfg-intro { display: grid; gap: .7rem; }
.cfg-intro .small { max-width: 36ch; }
.cfg-form { display: grid; gap: clamp(.9rem, 2vh, 1.5rem); margin: 0; }
.grp { border: 0; padding: 0; margin: 0; display: grid; gap: .6rem; }
.grp legend { padding: 0; margin-bottom: .1rem; }
.grp-note { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin: 0; letter-spacing: .01em; min-height: 1.3em; }
.grp-row { display: grid; grid-template-columns: 1fr auto; gap: clamp(1rem, 2.4vw, 2rem); }

.seg { display: flex; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; width: fit-content; }
.seg label { position: relative; display: block; }
.seg label + label { border-left: 1px solid var(--rule); }
.seg input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span {
  display: grid; place-items: center; min-width: 44px; height: 34px; padding: 0 .55rem;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  transition: background-color .35s var(--ease), color .35s;
}
.seg label:hover span { background: var(--rule-2); color: var(--ink); }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 1px solid var(--brass); outline-offset: -3px; }
.seg-num span { min-width: 36px; }
.seg-chip span { min-width: 38px; }
.seg-chip span::after {
  content: ''; width: 15px; height: 15px; border-radius: 50%;
  background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
}
.seg-chip input:checked + span { background: var(--ink); }
.seg-chip input:checked + span::after { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 0 0 2px var(--paper); }

.swatches { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.sw { position: relative; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: .7rem;
      padding: .5rem .7rem; background: var(--paper); cursor: pointer;
      transition: background-color .35s var(--ease); }
.sw:hover { background: var(--paper-2); }
.sw input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw-chip { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--r), inset -3px -4px 7px rgba(0,0,0,.18), inset 2px 3px 6px rgba(255,255,255,.28); }
.sw-name { font-family: var(--sans); font-size: 12px; letter-spacing: .02em; color: var(--ink-2); transition: color .3s; }
.sw-add { font-size: 10.5px; color: var(--ink-3); }
.sw input:checked ~ .sw-name { color: var(--ink); font-weight: 500; }
.sw:has(input:checked) { background: var(--paper-2); }
.sw:has(input:checked)::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brass);
}
.sw input:focus-visible ~ .sw-name { outline: 1px solid var(--brass); outline-offset: 3px; }

.cfg-readout {
  position: absolute; right: var(--gut); bottom: clamp(1.6rem, 4vh, 3rem);
  width: 226px; text-align: right;
  display: grid; gap: .55rem;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  padding: .8rem .95rem 1rem;
  box-shadow: 0 0 0 1px var(--rule-2);
}
.ro-label { color: var(--ink); }
.ro-price { margin: 0; font-family: var(--mono); font-size: clamp(1.5rem, 2.1vw, 2rem); line-height: 1; letter-spacing: -.02em; display: flex; justify-content: flex-end; align-items: baseline; gap: .3rem; }
.ro-price .cur { font-size: .5em; color: var(--brass); letter-spacing: 0; }
.ro-sub { color: var(--ink-3); }
.ro-rows { display: grid; gap: 0; margin: .5rem 0 0; font-size: 11px; }
.ro-rows > div { display: flex; justify-content: space-between; gap: .8rem; padding: .3rem 0; border-top: 1px solid var(--rule-2); }
.ro-rows dt { color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; font-size: 9.5px; align-self: center; }
.ro-rows dd { margin: 0; color: var(--ink); }
.cfg-readout.tick { animation: tick 1.1s var(--ease); }
@keyframes tick {
  0% { border-top-color: var(--brass); }
  30% { border-top-color: var(--brass); }
  100% { border-top-color: var(--ink); }
}
.ro-code { font-size: 10.5px; color: var(--brass-t); letter-spacing: .06em; margin: .3rem 0 0; padding-top: .55rem; border-top: 1px solid var(--rule-2); }

.cfg-views {
  position: absolute; bottom: clamp(1.6rem, 4vh, 2.6rem);
  left: calc(min(30vw, 380px) + var(--gut) + clamp(1.5rem, 4vw, 3.5rem));
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  background: var(--paper); padding: .62rem .95rem;
  border: 1px solid var(--rule-2);
}
.tog { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; position: relative; }
.tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tog-box {
  width: 30px; height: 16px; border: 1px solid var(--rule); border-radius: 16px;
  display: block; position: relative; transition: border-color .35s, background-color .35s;
}
.tog-box i { position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); transition: transform .4s var(--ease), background-color .35s; }
.tog input:checked + .tog-box { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 16%, transparent); }
.tog input:checked + .tog-box i { transform: translateX(14px); background: var(--brass); }
.tog input:focus-visible + .tog-box { outline: 1px solid var(--brass); outline-offset: 3px; }
.tog-txt { font-family: var(--sans); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); transition: color .3s; }
.tog:hover .tog-txt, .tog input:checked ~ .tog-txt { color: var(--ink); }

/* ---------- buttons ---------------------------------------------- */

.btn {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .17em;
  text-transform: uppercase; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-line {
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  padding: .72rem 1.1rem; margin-top: .2rem;
  position: relative; overflow: hidden;
  transition: color .4s var(--ease), border-color .4s;
}
.btn-line::before {
  content: ''; position: absolute; inset: 0; background: var(--ink);
  transform: scaleY(0); transform-origin: bottom; transition: transform .42s var(--ease);
}
.btn-line span, .btn-line { position: relative; }
.btn-line:hover, .btn-line:focus-visible { color: var(--paper); }
.btn-line:hover::before, .btn-line:focus-visible::before { transform: scaleY(1); }
.btn-line > * { position: relative; z-index: 1; }

.btn-big {
  margin-top: .6rem;
  border: 1px solid var(--rule); background: transparent; color: var(--ink);
  padding: 1.05rem 1.7rem 1.05rem 1.35rem; gap: .9rem;
  border-radius: 2px; position: relative; overflow: hidden;
  transition: border-color .5s, color .4s;
}
.btn-big .bb-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brass); position: relative; z-index: 1;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brass) 60%, transparent);
  animation: halo 2.6s var(--ease) infinite;
}
@keyframes halo {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brass) 55%, transparent); }
  70% { box-shadow: 0 0 0 13px rgba(169,128,63,0); }
  100% { box-shadow: 0 0 0 0 rgba(169,128,63,0); }
}
.btn-big .bb-txt { position: relative; z-index: 1; }
.btn-big::before {
  content: ''; position: absolute; inset: 0;
  background: color-mix(in srgb, var(--brass) 12%, transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.btn-big:hover, .btn-big:focus-visible { border-color: var(--brass); }
.btn-big:hover::before, .btn-big:focus-visible::before { transform: scaleX(1); }

/* ---------- engineering ------------------------------------------ */

#engineering { min-height: 210vh; padding: 12vh 0 14vh; }
.eng-copy { position: sticky; top: calc(var(--hdr) + 4vh); display: grid; gap: 1.3rem; width: min(40ch, 33vw); }
.parts { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; }
.parts li {
  display: grid; grid-template-columns: 62px 1fr auto; gap: .2rem .8rem; align-items: baseline;
  padding: .48rem 0; border-top: 1px solid var(--rule-2);
  font-size: 11px; letter-spacing: .01em;
  outline: none; cursor: default;
  transition: color .3s, background-color .35s var(--ease);
}
.parts li .pno { color: var(--brass-t); transition: color .3s; }
.parts li .pnm { font-family: var(--sans); font-size: 11.5px; color: var(--ink); letter-spacing: .03em; }
.parts li .pdm { color: var(--ink-3); white-space: nowrap; }
/* the note is held back until the row is asked about */
.parts li .pnt {
  grid-column: 2 / -1; font-family: var(--read); font-size: 13px; line-height: 1.4;
  color: var(--ink-3); max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .45s var(--ease), opacity .35s var(--ease), margin-top .45s var(--ease);
}
.parts li.hot { background: linear-gradient(90deg, var(--rule-2), transparent 78%); }
.parts li.hot .pnm { font-weight: 600; }
.parts li.hot .pno { color: var(--brass); }
.parts li.hot .pnt { max-height: 4.4em; opacity: 1; margin-top: .3rem; }
.parts li:focus-visible { box-shadow: inset 2px 0 0 var(--brass); }
#overlay .co.hot .node { fill: var(--brass); }

/* ---------- materials -------------------------------------------- */

#materials { padding: 12vh 0 8vh; }
.mat-head { margin-bottom: 8vh; display: grid; gap: 1rem; }
.mat {
  width: min(40ch, 33vw); margin-left: var(--gut);
  min-height: 86vh; display: grid; align-content: center; gap: .9rem;
  padding: 4vh 0;
}
.mat-no { font-size: 10.5px; color: var(--brass); letter-spacing: .2em; margin: 0; }
.mat-h { font-family: var(--serif); font-weight: 400; font-size: clamp(1.65rem, 2.7vw, 2.6rem); line-height: 1; letter-spacing: -.02em; margin: 0; }
.mat-spec { font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; margin: 0; padding-bottom: .9rem; border-bottom: 1px solid var(--rule); }
.mat > p:last-child { margin: 0; color: var(--ink-2); max-width: 42ch; }

/* ---------- the night moment ------------------------------------- */

#night { min-height: 250vh; padding: 14vh 0 24vh; }
.night-grid {
  position: sticky; top: calc(var(--hdr) + 8vh);
  width: min(44ch, 38vw); margin-left: var(--gut);
  display: grid; gap: 1.35rem; justify-items: start;
}
.night-grid .d1 { font-size: clamp(2.5rem, 5.4vw, 5.1rem); }
.night-grid .d1 em { color: var(--brass); }
.night-lamp { font-size: 10px; letter-spacing: .18em; color: var(--ink-3); margin: .2rem 0 0; }

/* the dimmer: a real continuous control on the same state as the tap */
.dimmer { width: min(100%, 340px); display: grid; gap: .55rem; }
.dimmer label { cursor: pointer; }
#dimmer {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; cursor: ew-resize; margin: 0;
}
#dimmer::-webkit-slider-runnable-track {
  height: 1px; background: var(--rule);
  border-top: 0; box-shadow: 0 6px 0 -5.5px var(--rule-2);
}
#dimmer::-moz-range-track { height: 1px; background: var(--rule); }
#dimmer::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--brass); border: 0; margin-top: -6px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brass) 18%, transparent);
  transition: box-shadow .3s;
}
#dimmer::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; border: 0; background: var(--brass);
}
#dimmer:hover::-webkit-slider-thumb { box-shadow: 0 0 0 7px color-mix(in srgb, var(--brass) 20%, transparent); }
#dimmer:focus-visible { outline: none; }
#dimmer:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--brass); }
.dim-ends { display: flex; justify-content: space-between; gap: .8rem; font-size: 9.5px; letter-spacing: .16em; color: var(--ink-3); }
.dim-ends #dimval { color: var(--brass-t); }

/* the parts section swaps its own label as the choreography moves on */
#eng-head { position: relative; display: inline-grid; }
#eng-head span { transition: opacity .5s var(--ease); }
#eng-head .eh-b { position: absolute; inset: 0; opacity: 0; }
#eng-head.measured .eh-a { opacity: 0; }
#eng-head.measured .eh-b { opacity: 1; }

/* ---------- designer note ---------------------------------------- */

.note-grid { display: grid; grid-template-columns: minmax(180px, 22%) 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.note-side { display: grid; gap: 1.6rem; }
.sig { width: 100%; max-width: 210px; color: var(--brass); }

/* ---------- atelier ---------------------------------------------- */

.atl-head { display: grid; gap: 1.1rem; max-width: 60ch; margin-bottom: clamp(2.5rem, 6vh, 5rem); }
.atl-grid { display: grid; grid-template-columns: minmax(280px, 42%) 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.atl-draw { display: grid; gap: 1.1rem; }
.drw-cap { color: var(--ink-3); }
#elevation { border: 1px solid var(--rule); background: var(--paper); padding: 1.2rem; }
#elevation svg { display: block; width: 100%; height: auto; }
#elevation .ln { stroke: var(--ink); fill: none; stroke-width: 1.1; }
#elevation .ln-2 { stroke: var(--ink); fill: none; stroke-width: .7; opacity: .55; }
#elevation .fill { fill: var(--rule-2); stroke: var(--ink); stroke-width: 1.1; }
#elevation .hid { stroke: var(--ink); fill: none; stroke-width: .6; stroke-dasharray: 4 3; opacity: .45; }
#elevation .dm { stroke: var(--brass); stroke-width: .7; fill: none; }
#elevation .dtx { font-family: var(--mono); font-size: 11px; fill: var(--brass-t); }
#elevation .ctr { stroke: var(--brass); stroke-width: .6; stroke-dasharray: 10 3 2 3; opacity: .8; }
#elevation .lbl { font-family: var(--sans); font-size: 10px; font-weight: 500; letter-spacing: .12em; fill: var(--ink-3); text-transform: uppercase; }

.atl-prov { display: grid; gap: 2rem; }
.atl-proc { display: grid; gap: .8rem; }
.proc { list-style: none; margin: 0; padding: 0; display: grid; }
.proc li { display: grid; grid-template-columns: 40px 1fr; gap: .8rem; padding: .62rem 0; border-top: 1px solid var(--rule-2); font-size: 14.5px; color: var(--ink-2); }
.proc .pn { color: var(--brass); font-size: 11px; padding-top: .28em; }
.prov { margin: 0; display: grid; }
.prov > div { display: grid; grid-template-columns: minmax(110px, 26%) 1fr; gap: 1rem; padding: .62rem 0; border-top: 1px solid var(--rule); }
.prov dt { font-family: var(--sans); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); align-self: center; }
.prov dd { margin: 0; font-size: 15px; color: var(--ink); }
.figs { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1.4rem 1rem; }
.figs li { display: grid; gap: .3rem; }
.fig { font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1; color: var(--brass); letter-spacing: -.02em; }

/* ---------- specs ------------------------------------------------ */

#specs .eyebrow { margin-bottom: 1rem; }

/* what you built, carried down the page and kept live */
.asbuilt {
  margin: clamp(2rem, 4.5vh, 3rem) 0 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: 1.1rem 0 1.2rem;
  display: grid; grid-template-columns: 1fr auto; gap: .6rem 2rem; align-items: end;
}
.ab-label { grid-column: 1 / -1; color: var(--brass-t); }
.ab-rows { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 2.6rem; }
.ab-rows > div { display: grid; gap: .15rem; }
.ab-rows dt { color: var(--ink-3); font-size: 9.5px; }
.ab-rows dd { margin: 0; font-size: 15px; color: var(--ink); }
.ab-rows dd.mono { font-size: 14px; }
.ab-edit {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .17em; text-transform: uppercase;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--brass);
  padding-bottom: 3px; white-space: nowrap; transition: color .3s;
}
.ab-edit:hover { color: var(--brass); }
.spec { width: 100%; border-collapse: collapse; margin: clamp(2rem, 5vh, 3.5rem) 0 0; text-align: left; }
.spec caption { text-align: left; padding-bottom: 1rem; color: var(--ink-3); }
.spec th, .spec td { padding: .78rem 1rem .78rem 0; border-top: 1px solid var(--rule); vertical-align: baseline; }
.spec th {
  width: 22%; font-family: var(--sans); font-weight: 500; font-size: 10.5px;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3);
}
.spec td { font-size: 15.5px; color: var(--ink); }
.spec td .mono { font-size: 13.5px; }
.spec tr:hover td, .spec tr:hover th { color: var(--ink); }
.specs-foot { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.specs-foot .small { max-width: 52ch; }

/* ---------- footer ----------------------------------------------- */

footer.paper { border-top: 1px solid var(--rule); }
.foot-grid { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; padding-block: clamp(3rem, 7vh, 5rem); }
.foot-mark { font-size: clamp(1.2rem, 2vw, 1.6rem); margin: 0 0 .9rem; }
.foot-links, .foot-credit { display: grid; gap: .5rem; align-content: start; }
.foot-links a { font-size: 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--rule); width: fit-content; padding-bottom: 2px; transition: border-color .3s; }
.foot-links a:hover { border-color: var(--brass); }
.foot-credit p { margin: 0; font-size: 14px; }
.foot-credit strong { font-weight: 400; font-family: var(--serif); }
.fable { font-family: var(--sans); font-size: 10px; letter-spacing: .17em; text-transform: uppercase; color: var(--brass-t); text-decoration: none; margin-top: .7rem; border-bottom: 1px solid var(--rule); width: fit-content; padding-bottom: 3px; }
.fable:hover { color: var(--brass); }
.foot-links .caps, .foot-credit .caps { margin-bottom: .3rem; }

/* ---------- toast ------------------------------------------------ */

#toast {
  position: fixed; z-index: 40; left: 50%; bottom: 2.2rem; transform: translate(-50%, 1.2rem);
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  padding: .8rem 1.2rem; opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- guide ------------------------------------------------ */

.guide-body { background: var(--paper); }
.guide-wrap { max-width: 680px; margin: 0 auto; padding: calc(var(--hdr) + 12vh) var(--gut) 12vh; }
.guide-wrap h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: .98; letter-spacing: -.022em; margin: .8rem 0 1.6rem; }
.guide-wrap h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.1; letter-spacing: -.014em; margin: 3rem 0 .9rem; }
.guide-wrap p { color: var(--ink-2); margin: 0 0 1.15em; }
.guide-wrap p.lead-p { font-size: clamp(1.06rem, 1.4vw, 1.28rem); color: var(--ink); max-width: 46ch; }
.guide-wrap ul { margin: 0 0 1.3em; padding-left: 0; list-style: none; }
.guide-wrap li { position: relative; padding-left: 1.4rem; margin-bottom: .5em; color: var(--ink-2); }
.guide-wrap li::before { content: ''; position: absolute; left: 0; top: .72em; width: .7rem; height: 1px; background: var(--brass); }
.guide-wrap code { font-family: var(--mono); font-size: .86em; color: var(--brass-t); }
.guide-rule { border: 0; border-top: 1px solid var(--rule); margin: 3.2rem 0; }
.guide-back { display: inline-flex; gap: .6rem; align-items: center; font-family: var(--sans); font-size: 10.5px; letter-spacing: .17em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); }
.guide-back:hover { color: var(--brass); }
.guide-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.4rem; margin: 2rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.guide-meta div { display: grid; gap: .3rem; }
.guide-meta .caps { color: var(--ink-3); }
.guide-meta span.v { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }

/* ---------- responsive ------------------------------------------- */

@media (max-width: 1180px) {
  .cfg-panel { width: min(34vw, 340px); }
  .cfg-views { left: calc(min(34vw, 340px) + var(--gut) + 2rem); }
}

@media (max-width: 900px) {
  :root { --hdr: 54px; --band: 43vh; }
  body { font-size: 16px; }

  /* inset must come first: as a shorthand it would otherwise reset top */
  #stage { inset: auto 0 auto 0; top: var(--hdr); height: var(--band); z-index: 6; border-bottom: 1px solid var(--rule); }
  #pad { position: fixed; z-index: 7; left: 0; right: 0; top: var(--hdr); height: var(--band); bottom: auto; }
  #padhint { bottom: auto; top: calc(var(--hdr) + var(--band) - 2.4rem); }

  #masthead nav { display: none; }
  .nightbtn { margin-left: auto; }

  .col-copy, .mat, .night-grid, .hero-grid { width: auto; margin-left: 0; padding-inline: var(--gut); }

  #hero { min-height: auto; padding-top: calc(var(--hdr) + var(--band)); background: var(--paper); z-index: 5; }
  .hero-grid { min-height: auto; margin: 0; padding-top: 2.1rem; padding-bottom: 2rem; gap: 1rem; }
  .hero-h1 { line-height: 1.0; }
  .hero-lede { max-width: none; }
  .grid-lines { display: none; }
  .hero-foot { flex-wrap: wrap; gap: .7rem 1.4rem; padding-bottom: 1.6rem; }
  .hero-foot .caps { font-size: 9.5px; }

  #statement { min-height: auto; padding: 3.5rem 0 4rem; background: var(--paper); z-index: 5; border-top: 1px solid var(--rule-2); }
  #statement .col-copy { padding-top: 1rem; }

  #configure { min-height: auto; background: var(--paper); z-index: 5; }
  .cfg-sticky { position: static; height: auto; display: grid; gap: 2rem; padding: 3rem var(--gut) 3.4rem; }
  .cfg-panel, .cfg-readout, .cfg-views { position: static; width: auto; left: auto; right: auto; bottom: auto; }
  .cfg-readout { text-align: left; width: 100%; }
  .ro-price { justify-content: flex-start; }
  .cfg-views { flex-direction: row; gap: 1.1rem 1.6rem; flex-wrap: wrap; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
  .swatches { grid-template-columns: 1fr 1fr; }
  .sw { grid-template-columns: 20px 1fr; }
  .sw-add { display: none; }
  .grp-row { grid-template-columns: 1fr; gap: 1.2rem; }

  #engineering { min-height: auto; padding: 3.4rem 0 3.8rem; background: var(--paper); z-index: 5; }
  .eng-copy { position: static; width: auto; }

  #materials { padding: 3rem 0 1rem; }
  .mat-head { margin-bottom: 2rem; padding-top: 1rem; }
  .mat { min-height: 68vh; padding: 3vh 0; }

  #night { min-height: auto; padding: 6vh 0 10vh; }
  .night-grid { position: static; }

  .note-grid, .atl-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .foot-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .spec th { width: 34%; }
  .specs-foot { gap: 1.4rem; }
}

@media (max-width: 560px) {
  :root { --band: 40vh; }
  .spec { display: block; }
  .spec caption { display: block; }
  .spec tbody, .spec tr, .spec th, .spec td { display: block; width: auto; }
  .spec tr { padding: .8rem 0; border-top: 1px solid var(--rule); }
  .spec th, .spec td { border: 0; padding: 0; }
  .spec th { margin-bottom: .25rem; }
  .parts li { grid-template-columns: 56px 1fr; }
  .parts li .pdm { grid-column: 2; color: var(--ink-3); }
  .ro-rows { font-size: 12px; }
  .figs { grid-template-columns: 1fr 1fr; }
}

/* ---------- reduced motion --------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html { transition: none; }
  .scrollcue i, .veil-line i, #padhint span::before, .btn-big .bb-dot { animation: none !important; }
  .scrollcue i { transform: none; }
}
