/* =============================================================
   HyperPrints — styles.css
   v0.2 · Dark by default with a working light theme
   Colour tokens live in :root — change them here, nowhere else.
   Sections 1–17 are shared; 18+ are v0.2 additions.
   ============================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  /* brand */
  --accent:        #22e0ff;   /* graphics, fills, glows */
  --accent-ink:    #22e0ff;   /* the same accent used as small TEXT — see light theme */
  --accent-2:      #7c5cff;
  --accent-warm:   #ff8a3d;
  --accent-ok:     #3ddc97;
  --brand-nozzle:  #fe993a;   /* the logo's hot end — a fixed brand colour */

  /* dark surfaces (default) */
  --bg:            #07090d;
  --bg-alt:        #0b0f15;
  --surface:       #0f141c;
  --surface-2:     #141b25;
  --line:          #1e2833;
  --line-soft:     #18202a;
  --line-strong:   #2a3644;   /* form controls — a touch firmer than --line */

  /* dark type */
  --text:          #e8eef7;
  --text-dim:      #9aa8bb;
  --text-faint:    #7a8699;   /* tuned for WCAG AA at small sizes — don't darken */

  --shadow:        0 18px 50px -20px rgba(0,0,0,.85);
  --glow:          0 0 40px -6px rgba(34,224,255,.35);

  /* type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* layout */
  --wrap:   1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.22,.8,.3,1);
}

:root[data-theme="light"] {
  --bg:         #f6f8fb;
  --bg-alt:     #eef2f7;
  --surface:    #ffffff;
  --surface-2:  #f4f7fb;
  /* Light borders were 1.1-1.3:1 against their backgrounds, so cards on the
     tinted sections all but vanished. Now 1.5-1.7:1 for edges, and 3:1 for
     anything you type into (WCAG 1.4.11, non-text contrast). */
  --line:        #bcc7d5;
  --line-soft:   #d3dbe6;
  --line-strong: #7d8a9e;
  --shadow-card: 0 1px 2px rgba(16,32,56,.05), 0 8px 22px -14px rgba(16,32,56,.22);

  --text:       #0d1620;
  --text-dim:   #4e5d73;
  --text-faint: #5f6c80;   /* tuned for WCAG AA at small sizes — don't lighten */

  --accent:     #0091b5;
  --accent-ink: #00768c;   /* darker so small accent text stays legible on white */
  --accent-2:   #6142e0;
  /* status colours also need darkening for white backgrounds */
  --accent-warm: #a34c00;
  --accent-ok:   #0b7a53;
  --brand-nozzle: #e07a16;   /* a shade deeper so the hot end holds on white */

  --shadow:     0 16px 40px -22px rgba(15,30,55,.35);
  --glow:       0 0 34px -10px rgba(0,145,181,.35);
}

/* ---------- 1b. MATERIAL HUES ----------
   One hue per filament, used for the card's rail, bars and line art (--mat)
   and for its name in text (--mat-ink). These were inline colours in v0.2 and
   the dark-theme values washed out to ~1.7:1 on a white card, so the light
   theme now darkens them. Every pair clears 4.5:1 against its own surface. */
.mat-pla    { --mat: #22e0ff; --mat-ink: #22e0ff; }
.mat-petg   { --mat: #7c5cff; --mat-ink: #9b83ff; }
.mat-tpu    { --mat: #ff8a3d; --mat-ink: #ff8a3d; }
.mat-placf  { --mat: #3ddc97; --mat-ink: #3ddc97; }
.mat-petgcf { --mat: #ff5d8f; --mat-ink: #ff5d8f; }
.mat-abs    { --mat: #ffd166; --mat-ink: #ffd166; }
.mat-asa    { --mat: #5cc8ff; --mat-ink: #5cc8ff; }
.mat-pc     { --mat: #b28dff; --mat-ink: #b28dff; }
.mat-pa     { --mat: #4ade80; --mat-ink: #4ade80; }

:root[data-theme="light"] .mat-pla    { --mat: #00768c; --mat-ink: #00768c; }
:root[data-theme="light"] .mat-petg   { --mat: #5b3cd4; --mat-ink: #5b3cd4; }
:root[data-theme="light"] .mat-tpu    { --mat: #a34c00; --mat-ink: #a34c00; }
:root[data-theme="light"] .mat-placf  { --mat: #0b7a53; --mat-ink: #0b7a53; }
:root[data-theme="light"] .mat-petgcf { --mat: #b81d54; --mat-ink: #b81d54; }
:root[data-theme="light"] .mat-abs    { --mat: #845200; --mat-ink: #845200; }
:root[data-theme="light"] .mat-asa    { --mat: #0069a8; --mat-ink: #0069a8; }
:root[data-theme="light"] .mat-pc     { --mat: #6636cc; --mat-ink: #6636cc; }
:root[data-theme="light"] .mat-pa     { --mat: #12703c; --mat-ink: #12703c; }

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s var(--ease), color .35s var(--ease);
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.02em; font-weight: 600; }

::selection { background: var(--accent); color: #06121a; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: #06121a; padding: 10px 16px; border-radius: 8px; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- 3. LAYOUT PRIMITIVES ---------- */
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.section { padding: clamp(72px, 9vw, 130px) 0; position: relative; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }

.sec-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 46px); margin-block: 10px 14px; }
.sec-head__sub { color: var(--text-dim); font-size: 17px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .45; transform: scale(.8);} }

.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* The headline's gradient line catches a single sweep of light as the page
   lands, in step with the print starting behind it. Once, not a loop: a
   looping shimmer is a repaint every frame for the life of the page. */
.hero__title .grad {
  background:
    linear-gradient(100deg, transparent 38%, rgba(255,255,255,.85) 50%, transparent 62%) 150% 0 / 250% 100% no-repeat,
    linear-gradient(100deg, var(--accent), var(--accent-2) 70%);
  -webkit-background-clip: text; background-clip: text;
  animation: title-sweep 1.8s .5s var(--ease) both;
}
@keyframes title-sweep { from { background-position: 150% 0, 0 0; } to { background-position: -60% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .hero__title .grad { animation: none; background-position: -60% 0, 0 0; } }

/* Page to page, the browser cross-fades instead of flashing white-then-page.
   Chrome, Edge and Safari 18+; everywhere else it is simply ignored. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- 4. BUTTONS ---------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  border: 1px solid var(--line);
  background: var(--btn-bg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
  will-change: transform;
}
.btn--lg { padding: 15px 30px; font-size: 16px; }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--block { width: 100%; }

.btn--primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #04121a; border-color: transparent;
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn__arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- 5. NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);   /* clear the notch on phones */
  /* backdrop-filter is not transitioned: animating a blur radius re-renders it
     every frame of the fade. The colour fades; the blur just switches on. */
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
/* On a phone the bar sits over the hero animation, and a live blur re-renders
   on every frame it draws. Nearly opaque looks the same at that size. */
@media (max-width: 760px) {
  .nav.is-stuck { background: color-mix(in srgb, var(--bg) 95%, transparent); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 70px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
/* The mark's ink is wider than it is tall (48 x 44 on a 64 grid), so it needs
   a slightly bigger box than a square glyph would to read at the same weight. */
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__accent { color: var(--accent-ink); }

/* ---------- inline page links (wide screens) ----------
   The burger stays at every width; these are the shortcut, not the only way in. */
.nav__pages { display: none; align-items: center; gap: 4px; }
.nav__link {
  position: relative; padding: 8px 13px; border-radius: 9px;
  font-size: 14.5px; font-weight: 500; color: var(--text-dim);
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav__link:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nav__link::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

@media (min-width: 820px) { .nav__pages { display: flex; } }

/* Driven by transform, not width: a width change re-lays-out the header on
   every scroll frame; a transform is composited and costs nothing. */
.nav__progress { height: 2px; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---------- 6. HERO ---------- */
.hero { position: relative; padding: clamp(110px, 14vw, 170px) 0 clamp(60px, 7vw, 90px); overflow: hidden; }

.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 85% 62% at 50% 22%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 62% at 50% 22%, #000 25%, transparent 78%);
  opacity: .8;
}
.hero__glow {
  position: absolute; top: -18%; left: 50%; translate: -50% 0;
  width: 900px; height: 620px; pointer-events: none;
  background:
    radial-gradient(circle at 30% 40%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(circle at 72% 30%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 62%);
}

.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 64px); align-items: center;
}

.hero__title {
  font-size: clamp(36px, 5.3vw, 58px); font-weight: 700; margin: 16px 0 20px;
  letter-spacing: -.035em; text-wrap: balance;
}
.hero__sub { color: var(--text-dim); font-size: clamp(16px, 1.5vw, 18.5px); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero__pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin-top: 36px; }
.hero__pills li {
  display: flex; flex-direction: column; gap: 1px;
  padding: 11px 17px; border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.hero__pills strong { font-family: var(--font-mono); font-size: 14px; color: var(--text); font-weight: 500; }
.hero__pills span { font-size: 12px; color: var(--text-faint); letter-spacing: .02em; }

/* --- "Filament to form" stage (hero.js) ---
   The canvas is full-bleed behind the whole hero; the printed part is
   centred on .hero__stage, wherever the layout puts it. Nothing here uses
   backdrop-filter: the animation redraws every frame, and a blur over it
   would be recomputed every frame too. */
.hero { min-height: min(100svh, 1000px); display: flex; flex-direction: column; justify-content: center; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 0; }
.hero__inner, .hero__foot { position: relative; z-index: 1; }
.hero__copy { position: relative; }
.hero__stage { position: relative; min-height: clamp(380px, 56vh, 600px); display: grid; align-items: end; cursor: crosshair; }
.hero__static { display: none; width: min(62%, 300px); align-self: center; justify-self: center;
  filter: drop-shadow(0 18px 40px color-mix(in srgb, var(--accent) 30%, transparent)); }
.hero--static .hero__static { display: block; }

.hero-hud {
  justify-self: end; display: grid; gap: 7px; min-width: 250px;
  padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--text-faint);
}
.hero-hud__top { display: flex; justify-content: space-between; gap: 14px; }
.hero-hud__status { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-ok); }
.hero-hud__name { color: var(--text); }
.hero-hud__layer { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.hero-hud__bar { height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.hero-hud__bar i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-ok); box-shadow: 0 0 8px var(--accent-ok); animation: pulse 1.6s infinite; }

.hero__foot { display: grid; gap: 10px; margin-top: 22px; }
.hero-models { display: flex; flex-wrap: wrap; gap: 6px; }
.hero-chip {
  display: grid; gap: 1px; padding: 8px 13px; border-radius: 10px; text-align: left;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 72%, transparent);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.hero-chip:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-1px); }
.hero-chip.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.hero-chip b { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; }
.hero-chip span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.hero-chip.is-active span { color: var(--accent-ink); }
.hero__caption { font-size: 13.5px; color: var(--text-dim); max-width: 78ch; min-height: 2.6em; }
.hero__caption b { color: var(--text); font-weight: 600; }
.hero__caption span { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }
.hero__hint { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--text-faint); }
.hint-coarse { display: none; }
@media (pointer: coarse) { .hint-fine { display: none; } .hint-coarse { display: inline; } }

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: 10px; }
  /* v0.2 put the copy first on a phone because the old printer widget filled
     the whole first screen. The new stage is a short band above the
     headline, so both land in the first screen: the hook, then the words. */
  .hero__stage { order: -1; min-height: 42svh; }
  .hero-hud { justify-self: stretch; min-width: 0; }
  .hero { justify-content: flex-start; }
}
/* ---------- 7. TICKER ---------- */
.ticker {
  border-block: 1px solid var(--line-soft);
  background: var(--bg-alt);
  overflow: hidden; padding: 13px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: flex; align-items: center; gap: 22px; white-space: nowrap; width: max-content;
  animation: slide 38s linear infinite;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; color: var(--text-faint);
}
.ticker__track i { color: var(--accent); font-style: normal; font-size: 8px; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 8. CARDS (services) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 20px; }

.card {
  position: relative; padding: 28px 26px 26px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 62%);
  transition: opacity .35s var(--ease);
}
.card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }

.card__icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  margin-bottom: 18px;
}
.card__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 19px; margin-bottom: 9px; }
.card p { color: var(--text-dim); font-size: 14.8px; }
.card__list { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 7px; }
.card__list li { position: relative; padding-left: 18px; font-size: 13.4px; color: var(--text-faint); font-family: var(--font-mono); }
.card__list li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }

/* "What to send" on the creative services */
.card--custom { display: flex; flex-direction: column; }
.needs {
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line);
  display: grid; gap: 6px; flex: 1; align-content: start;
}
.needs__head { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.needs__req { font-size: 13px; color: var(--text); margin-top: 4px; }
.needs__req b { font-weight: 600; }
.needs__list { list-style: none; padding: 0; display: grid; gap: 4px; }
.needs__list li { position: relative; padding-left: 16px; font-size: 13.2px; color: var(--text-dim); }
.needs__list li::before { content: '+'; position: absolute; left: 0; color: var(--text-faint); font-family: var(--font-mono); }
.needs__list--req li::before { content: '●'; font-size: 8px; top: 5px; color: var(--accent); }
.needs__cta { justify-self: start; margin-top: 12px; }

/* ---------- 9. PRODUCT GRID ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(218px, 1fr)); gap: 16px; }

.prod {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  padding: 22px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); width: 100%;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.prod:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--surface-2); }
.prod__top { display: flex; align-items: center; justify-content: space-between; }
.prod__tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--accent-ink); text-transform: uppercase; }
.prod__plus { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-faint); font-size: 14px; line-height: 1; transition: all .3s var(--ease); }
.prod:hover .prod__plus { background: var(--accent); border-color: var(--accent); color: #04121a; transform: rotate(90deg); }
.prod h3 { font-size: 16.5px; }
.prod p { font-size: 13.6px; color: var(--text-dim); }
.prod__price { margin-top: auto; padding-top: 12px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
.prod__price b { color: var(--text); font-weight: 500; }

/* ---------- 10. GALLERY ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.chip {
  padding: 8px 17px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 13.5px; color: var(--text-dim); background: var(--surface);
  transition: all .25s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #04121a; font-weight: 600; }

.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }

.gal {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
  aspect-ratio: 4 / 3;
  transition: transform .4s var(--ease), border-color .4s var(--ease), opacity .3s var(--ease);
}
.gal.is-hidden { display: none; }
.gal:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.gal__media { position: absolute; inset: 0; }
/* .photo is an <img>, or a <picture> wrapping one. A picture is inline by
   default, so it has to be told to fill the tile the way the img would. */
.gal__media .photo { position: absolute; inset: 0; display: block; }
.gal__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gal:hover .gal__media img { transform: scale(1.06); }
/* The photo sits on top of the placeholder while it loads, so nothing shifts
   when it arrives and nothing flashes when the file is not there yet. */
.photo { opacity: 0; transition: opacity .35s var(--ease); }
.photo.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .photo { transition: none; } }

.gal__ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 55%),
    repeating-linear-gradient(0deg, var(--line-soft) 0 1px, transparent 1px 13px),
    var(--surface-2);
}
.gal__ph svg { width: 58%; height: 58%; opacity: .5; }
/* Placeholder and label share the centre cell; the label sits just above the
   caption scrim so it is never covered by a two-line title. */
.gal__ph > * { grid-area: 1 / 1; }
.gal__ph svg { align-self: center; }
.gal__soon {
  align-self: start; margin-top: 14%;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-ink);
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.lb__stage .gal__soon { margin-top: 10%; font-size: 13px; }

.gal__cap {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px;
  /* The scrim has to stay solid for the whole height of the text, not just the
     first line — a two-line title used to run off the top of it and sit
     directly on the photo. */
  background: linear-gradient(to top,
    color-mix(in srgb, var(--bg) 94%, transparent) 0 52%,
    color-mix(in srgb, var(--bg) 62%, transparent) 74%,
    transparent);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.gal__cap > div { min-width: 0; }
.gal__cap h3 { font-size: 15.5px; }
.gal__cap p { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: .05em; margin-top: 3px; }
.gal__badge {
  flex: none; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.gal-note { margin-top: 30px; text-align: center; color: var(--text-dim); font-size: 15px; }
.gal-note a { color: var(--accent-ink); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---------- 11. ESTIMATOR ---------- */
.est {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.est__controls { padding: clamp(24px, 3.5vw, 38px); display: grid; gap: 28px; align-content: start; }
.est__out {
  padding: clamp(24px, 3.5vw, 38px);
  background: linear-gradient(165deg, var(--surface-2), var(--bg-alt));
  border-left: 1px solid var(--line);
  display: grid; gap: 20px; align-content: start;
}

.field label { display: flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.field__hint { font-size: 12px; color: var(--text-faint); font-weight: 400; }
.field label b { font-family: var(--font-mono); color: var(--accent-ink); font-weight: 500; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.dims { display: grid; gap: 13px; }
.dim { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; }
.dim__val { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); min-width: 58px; text-align: right; }
.dim__val b { color: var(--text); font-weight: 500; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 3px;
  background: var(--line); cursor: pointer; outline-offset: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 8px rgba(0,0,0,.4);
  transition: transform .2s var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.18); }
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: var(--accent);
  border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); cursor: pointer;
}

.seg { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-alt); }
.seg__btn {
  flex: 1; padding: 9px 4px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-dim);
  font-family: var(--font-mono); letter-spacing: .04em;
  transition: all .25s var(--ease);
}
.seg__btn:hover { color: var(--text); }
.seg__btn.is-active { background: var(--accent); color: #04121a; font-weight: 600; }
.mat-note { margin-top: 11px; font-size: 13px; color: var(--text-faint); min-height: 2.6em; }

.est__price { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.est__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.est__amount { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; font-family: var(--font-display); }
.est__amount .cur { font-size: 26px; color: var(--accent-ink); }
.est__amount #estPrice { font-size: clamp(42px, 5.5vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.est__amount .cad { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-left: 6px; }
.est__range { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

.est__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.est__stats > div { display: flex; flex-direction: column; gap: 2px; }
.est__stats span { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: .07em; }
.est__stats b { font-size: 16px; font-weight: 500; font-family: var(--font-display); }

.est__viz {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 10px 0 2px;
}
.est__plate {
  position: relative; width: 132px; height: 132px; padding: 5px;
  display: flex; align-items: flex-end; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px;
  background:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px) 0 0 / 22px 22px;
}
.est__box {
  border: 1.5px solid color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: 0 0 14px -4px color-mix(in srgb, var(--accent) 65%, transparent);
  transition: width .25s var(--ease), height .25s var(--ease);
}
.est__vizhint {
  font-size: 10.5px; color: var(--text-faint); font-family: var(--font-mono);
  letter-spacing: .03em;
}
.est__boxlabel {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent-ink);
  white-space: nowrap; letter-spacing: .04em;
}

.est__disclaimer { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }

@media (max-width: 860px) {
  .est { grid-template-columns: 1fr; }
  .est__out { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- 12. MATERIALS ---------- */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.mat {
  padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.mat::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--mat); opacity: .8; }
.mat:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--mat) 50%, var(--line)); }
.mat h3 { font-size: 22px; color: var(--mat-ink, var(--mat)); font-family: var(--font-mono); letter-spacing: .02em; }
.mat__for { font-size: 13.4px; color: var(--text-dim); margin-top: 6px; min-height: 3em; }
.mat__specs { margin: 18px 0 14px; display: grid; gap: 9px; }
.mat__specs > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mat__specs dt { font-size: 12.5px; color: var(--text-faint); }
.mat__specs dd { margin: 0; }
.bars { display: flex; gap: 3px; }
.bars span { width: 13px; height: 5px; border-radius: 2px; background: var(--line); }
.bars span.on { background: var(--mat); }
.mat__warn { font-size: 12.3px; color: var(--text-faint); border-top: 1px solid var(--line-soft); padding-top: 12px; line-height: 1.55; }

/* ---------- 13. PROCESS ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; counter-reset: s; }
.step { position: relative; padding-top: 26px; border-top: 1px solid var(--line); }
.step::before {
  content: ''; position: absolute; top: -1px; left: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .9s var(--ease) .15s;
}
.step.is-in::before { width: 100%; }
.step__num { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); letter-spacing: .12em; }
.step h3 { font-size: 18px; margin: 10px 0 8px; }
.step p { font-size: 14.4px; color: var(--text-dim); }

/* ---------- 14. QUOTE ---------- */
.quote { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.quote__intro h2 { font-size: clamp(30px, 4.2vw, 44px); margin-block: 10px 14px; }
.quote__intro > p { color: var(--text-dim); }
.quote__points { list-style: none; padding: 0; margin-top: 26px; display: grid; gap: 12px; }
.quote__points li { display: flex; align-items: flex-start; gap: 11px; font-size: 14.6px; color: var(--text-dim); }
.quote__points svg { flex: none; width: 19px; height: 19px; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.quote__social { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.quote__social p { font-size: 13px; color: var(--text-faint); margin-bottom: 12px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.social {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--text-dim);
  transition: all .25s var(--ease);
}
.social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.socials--sm .social { width: 42px; height: 42px; padding: 0; justify-content: center; }
.quote__soon {
  font-size: 13.5px; color: var(--text-dim); text-transform: none !important;
  letter-spacing: 0 !important; font-family: var(--font-body) !important; max-width: 40ch;
}

.quote__form {
  padding: clamp(24px, 3.4vw, 36px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow);
  display: grid; gap: 18px;
}
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f-field { display: grid; gap: 7px; align-content: start; }   /* fields without an error line were stretching taller than their neighbours */
.f-field label { font-size: 13.6px; font-weight: 500; display: flex; align-items: baseline; gap: 7px; }
.req { color: var(--accent-ink); }

.f-field input, .f-field select, .f-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: var(--bg-alt); color: var(--text);
  font-size: 14.6px; font-family: var(--font-body);
  transition: border-color .22s var(--ease), background .22s var(--ease), box-shadow .22s var(--ease);
}
.f-field textarea { resize: vertical; min-height: 110px; }
.f-field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b8aa0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 17px; padding-right: 38px;
}
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.f-field input::placeholder, .f-field textarea::placeholder { color: var(--text-faint); }

.f-field.has-err input, .f-field.has-err select, .f-field.has-err textarea { border-color: #ff6b6b; }

/* flash when a catalogue card drops its product into the form */
.is-flash { animation: flash 1.5s var(--ease); }
@keyframes flash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; border-color: var(--line-strong); }
  15%, 65% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 24%, transparent); border-color: var(--accent); }
}
.f-err { font-size: 12.2px; color: #ff8080; min-height: 0; }

.custom-needs {
  padding: 12px 15px; border-radius: 12px; font-size: 13.5px; color: var(--text-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.custom-needs b { color: var(--text); font-weight: 600; }
.custom-needs[hidden] { display: none; }
.f-status { font-size: 14px; text-align: center; min-height: 1.2em; }
.f-status.is-ok { color: var(--accent-ok); }
.f-status.is-bad { color: #ff8080; }
.f-fineprint { font-size: 11.8px; color: var(--text-faint); text-align: center; }

.quote__sent { text-align: center; display: grid; gap: 14px; place-items: center; padding: 26px 0; }
.quote__sent .tick {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent-ok) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-ok) 45%, transparent);
}
.quote__sent .tick svg { width: 28px; height: 28px; fill: none; stroke: var(--accent-ok); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.quote__sent h3 { font-size: 24px; }
.quote__sent p { color: var(--text-dim); max-width: 38ch; }

@media (max-width: 880px) {
  .quote { grid-template-columns: 1fr; }
  .f-row, .field--row { grid-template-columns: 1fr; }
}

/* ---------- 14b. QUOTE PAGE (quote.html) ----------
   The form got a page of its own in v0.2.1: every CTA on the site leads here,
   and it is one URL that can go in a social bio. Form first on the page grid
   (it is why people came), reassurance beside it. */
.section--tight { padding-top: clamp(28px, 4vw, 48px); }
.phead--short { padding-bottom: clamp(18px, 3vw, 30px); }
.quote--page { grid-template-columns: 1.2fr .8fr; }
.quote--page .quote__form { order: -1; }
.quote__steps { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 14px; counter-reset: step; }
.quote__steps li {
  position: relative; padding-left: 42px; font-size: 14.6px; color: var(--text-dim); line-height: 1.55;
  counter-increment: step;
}
.quote__steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.quote__steps b { color: var(--text); font-weight: 600; }
.quote--page .quote__points { margin-top: 14px; }
@media (max-width: 880px) {
  .quote--page { grid-template-columns: 1fr; }
}

/* the quote band that closes the home page — the one CTA that matters most,
   so it carries an accent edge the learn band above it doesn't */
.band + .band { margin-top: 18px; }
.band--quote { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.band--quote .eyebrow { margin-bottom: 8px; }

/* the header CTA doubles as the "you are here" marker on the quote page */
.nav__cta[aria-current="page"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* ---------- 15. FOOTER ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding-top: clamp(48px, 6vw, 72px); }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 46px; }
.footer__brand p { color: var(--text-dim); font-size: 14px; margin: 14px 0 18px; max-width: 34ch; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { font-size: 12px; font-family: var(--font-mono); letter-spacing: .13em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px; }
.footer__col a { font-size: 14.4px; color: var(--text-dim); transition: color .2s var(--ease); width: fit-content; }
.footer__col a:hover { color: var(--accent); }
.footer__loc { font-size: 13px; color: var(--text-faint); margin-top: 6px; line-height: 1.6; }

.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  padding: 20px 0 26px; border-top: 1px solid var(--line-soft);
  font-size: 12.8px; color: var(--text-faint);
}
.footer__made { font-family: var(--font-mono); letter-spacing: .06em; }

@media (max-width: 800px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__inner { grid-template-columns: 1fr; } }

/* ---------- 16. BACK TO TOP ---------- */
.to-top {
  position: fixed; right: 22px; z-index: 90;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-dim);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.to-top.is-on { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { color: var(--accent); border-color: var(--accent); }
.to-top svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 17. SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* =============================================================
   18. OVERLAY MENU (v0.2)
   One menu on every page, opened by the button in the header.
   ============================================================= */
.nav__links { display: flex; align-items: center; gap: 10px; }   /* header right side */
.nav__cta { color: #04121a !important; }

.icon-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--text);
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }
.icon-btn svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
/* The icon shows what the button DOES, not what the theme currently is.
   It used to show a moon while already dark, which reads as "click for dark
   mode" — so people clicked it expecting dark and got light. In dark you now
   see a sun (click for light); in light you see a moon (click for dark). The
   aria-label and tooltip say it in words, and are kept in step by script.js. */
:root[data-theme="dark"] .icon-moon,
:root:not([data-theme="light"]) .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }

/* .icon-btn centres with grid/place-items; overriding display here drops that,
   so the bars have to be re-centred explicitly or they sit top-left in the box. */
.nav__burger { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav__burger span {
  width: 17px; height: 1.8px; background: currentColor; border-radius: 2px;
  transition: transform .28s var(--ease), opacity .2s;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 150;
  display: grid; grid-template-rows: auto 1fr;
  /* Solid, no backdrop-filter: at 97% opacity the blur was invisible, but it
     still made the GPU re-blur the whole screen on every frame of the fade —
     and on the home page that was over a live animation. */
  background: var(--bg);
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
  padding-top: env(safe-area-inset-top, 0px);
}
.menu.is-open {
  opacity: 1; pointer-events: auto; visibility: visible;
  transition: opacity .3s var(--ease), visibility 0s;
}
.menu:focus { outline: none; }   /* it takes focus as a dialog, not as a control */
.menu__head { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.menu__body { overflow-y: auto; padding-bottom: 40px; }
.menu__inner { display: grid; gap: 34px; padding-top: clamp(20px, 5vh, 54px); }

.menu__list { list-style: none; padding: 0; display: grid; gap: 2px; }
.menu__link {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 16px;
  padding: 16px 4px; border-bottom: 1px solid var(--line-soft);
  transition: padding-left .3s var(--ease), border-color .3s var(--ease);
}
.menu__link:hover, .menu__link:focus-visible { padding-left: 14px; border-color: var(--accent); }
.menu__num {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent-ink);
  letter-spacing: .1em; width: 24px;
}
.menu__name {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.025em;
  font-size: clamp(26px, 5vw, 44px); line-height: 1.05;
}
.menu__blurb { font-size: 13.5px; color: var(--text-faint); justify-self: end; text-align: right; max-width: 30ch; }
.menu__link[aria-current="page"] .menu__name { color: var(--accent-ink); }
.menu__link[aria-current="page"] { border-color: var(--accent); }
/* the last item's rule and the footer's rule were stacking into a double line */
.menu__list li:last-child .menu__link:not([aria-current="page"]) { border-bottom-color: transparent; }

.menu__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.menu__contact { display: grid; gap: 4px; font-size: 14px; color: var(--text-dim); }
.menu__contact a:hover { color: var(--accent-ink); }

@media (max-width: 720px) {
  .menu__link { grid-template-columns: auto 1fr; }
  .menu__blurb { grid-column: 2; justify-self: start; text-align: left; font-size: 12.5px; }
}

/* =============================================================
   19. PAGE HEADERS (inner pages)
   ============================================================= */
.phead { position: relative; padding: clamp(104px, 13vw, 150px) 0 clamp(34px, 5vw, 56px); overflow: hidden; }
.phead__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 80% 90% at 30% 0%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 30% 0%, #000 10%, transparent 72%);
}
/* The header column used to be the .wrap itself capped at 760px, which
   centred it — so every inner page's title sat indented from the content
   below it. Keep the reading measure, but on the children, so the header
   lines up with the page grid. */
.phead__inner { position: relative; }
.phead__inner > * { max-width: 760px; }
.phead h1 { font-size: clamp(34px, 5.4vw, 58px); margin-block: 14px 16px; letter-spacing: -.035em; text-wrap: balance; }
.phead p { color: var(--text-dim); font-size: clamp(16px, 1.5vw, 18px); max-width: 60ch; }
.crumb { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; color: var(--text-faint); text-transform: uppercase; }
.crumb a:hover { color: var(--accent-ink); }

/* =============================================================
   21. LIGHTBOX
   ============================================================= */
.gal { cursor: zoom-in; }
.gal__zoom {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  /* eight of these on the gallery page — eight backdrop roots for a 30px circle */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border: 1px solid var(--line-soft); color: var(--text);
  opacity: 0; transform: scale(.85); transition: all .3s var(--ease);
}
.gal:hover .gal__zoom, .gal:focus-within .gal__zoom { opacity: 1; transform: scale(1); }
.gal__zoom svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.lb {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: clamp(14px, 4vw, 44px);
  /* No backdrop-filter. A full-screen blur is re-computed on every frame that
     anything underneath changes, and it was the main cost of opening a photo.
     A dense scrim reads the same with the panel on top of it. */
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity .28s var(--ease), visibility 0s linear .28s;
}
.lb.is-open { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity .28s var(--ease), visibility 0s; }

.lb__panel {
  position: relative; width: min(100%, 980px); max-height: 100%;
  display: grid; grid-template-rows: 1fr auto;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: 0 40px 90px -30px rgba(0,0,0,.7);
  overflow: hidden;
  transform: scale(.94) translateY(10px); opacity: .6;
  transition: transform .34s var(--ease), opacity .34s var(--ease);
}
.lb.is-open .lb__panel { transform: none; opacity: 1; }

.lb__stage {
  position: relative; display: grid; place-items: center;
  background: var(--bg-alt); min-height: min(52vh, 420px); max-height: 66vh; overflow: hidden;
}
/* Placeholder and photo share one grid cell so the photo fades in over it
   rather than landing underneath it. */
.lb__stage > * { grid-area: 1 / 1; }
.lb__stage .photo { display: block; width: 100%; }
.lb__stage img { width: 100%; height: 100%; max-height: 66vh; object-fit: contain; }
.lb__stage .gal__ph { position: static; width: 100%; min-height: min(52vh, 420px); }

.lb__meta { display: grid; gap: 8px; padding: 20px clamp(18px, 3vw, 28px) 22px; border-top: 1px solid var(--line); }
.lb__meta h3 { font-size: clamp(19px, 2.4vw, 24px); }
.lb__spec { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .07em; color: var(--accent-ink); }
.lb__story { font-size: 14.5px; color: var(--text-dim); max-width: 68ch; }
.lb__count { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* These sit ON TOP of the blurred overlay. A backdrop-filter here is a second
   blur of an already-blurred layer — invisible, and one more backdrop root for
   the compositor. An opaque background gives the same look for nothing.
   `transition: all` also animated the filter on every hover; name the
   properties instead. */
.lb__x, .lb__nav {
  position: absolute; z-index: 3; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  transition: border-color .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}
.lb__x { top: 12px; right: 12px; width: 40px; height: 40px; }
.lb__nav { top: calc(min(52vh, 420px) / 2); translate: 0 -50%; width: 44px; height: 44px; }
.lb__nav--prev { left: 12px; }
.lb__nav--next { right: 12px; }
/* The arrows are centred with the `translate` property, not `transform`, so a
   hover rule that re-applied translateY(-50%) in `transform` stacked on top of
   it and threw them half their height up the screen — then back down on
   unhover. Hover only scales; the centring is left alone. */
.lb__x:hover, .lb__nav:hover { border-color: var(--accent); color: var(--accent-ink); transform: scale(1.06); }
.lb__x svg, .lb__nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Scroll lock for the menu and the lightbox. overflow:hidden on the root, not
   position:fixed on body: pinning body re-lays-out the whole page on every
   open and close, which was the stall people felt on a phone. */
html.is-locked, body.is-locked { overflow: hidden; }
html.is-locked { overscroll-behavior: none; }

@media (max-width: 560px) {
  .lb__nav { width: 38px; height: 38px; }
  .lb__nav--prev { left: 6px; } .lb__nav--next { right: 6px; }
}

/* =============================================================
   22. MATERIALS PAGE
   ============================================================= */
.matx-grid { display: grid; gap: 20px; }
.matx {
  display: grid; grid-template-columns: 250px 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden;
  transition: border-color .35s var(--ease);
}
.matx:hover { border-color: color-mix(in srgb, var(--mat) 45%, var(--line)); }
.matx__art {
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--mat) 14%, transparent), transparent 68%),
    var(--bg-alt);
  border-right: 1px solid var(--line);
}
.matx__art svg { width: 100%; max-width: 210px; height: auto; overflow: visible; }

/* Isometric part illustrations (isoArt in script.js). Three tones of the
   material colour: top faces catch the light, left faces are the true
   colour, right faces are in shade. Edges get a thin darker line so the
   form still reads when two faces are close in tone. */
.matx__art svg * { stroke-linejoin: round; }
.iso-t, .iso-l, .iso-m, .iso-r, .iso-c, .iso-f {
  stroke: color-mix(in srgb, var(--mat) 40%, #05070b); stroke-width: .7; vector-effect: non-scaling-stroke;
}
.iso-t { fill: color-mix(in srgb, var(--mat) 72%, #fff); }
.iso-l, .iso-c { fill: var(--mat); }
.iso-m { fill: color-mix(in srgb, var(--mat) 82%, #05070b); }
.iso-r { fill: color-mix(in srgb, var(--mat) 58%, #05070b); }
.iso-f { fill: color-mix(in srgb, var(--mat) 45%, #05070b); }            /* a floor in shadow */
.iso-dim { fill: color-mix(in srgb, var(--mat) 38%, #05070b); }          /* far inner walls */
.iso-h { fill: color-mix(in srgb, var(--mat) 14%, #05070b); stroke: none; }  /* holes */
.iso-w { fill: color-mix(in srgb, var(--mat) 40%, #05070b); stroke: none; }  /* inside a hole */
.iso-rib { stroke: color-mix(in srgb, var(--mat) 45%, #05070b); stroke-width: .9; vector-effect: non-scaling-stroke; }
.iso-txt { fill: color-mix(in srgb, var(--mat) 35%, #05070b); font-family: var(--font-mono); font-weight: 500; }
/* things that are not printed: steel bushings and shafts, rubber grips, the machine */
.iso-steel.iso-t { fill: #d9dfe6; } .iso-steel.iso-l, .iso-steel.iso-c { fill: #9aa4b0; } .iso-steel.iso-r { fill: #6b7580; }
.iso-steel { stroke: #3a424c; }
.iso-grip.iso-t { fill: #3b4552; } .iso-grip.iso-c { fill: #242b34; }
.iso-grip { stroke: #11161c; }
.iso-machine.iso-t { fill: #3a4450; } .iso-machine.iso-l { fill: #2a323c; } .iso-machine.iso-r { fill: #1d242c; }
.iso-machine { stroke: #11161c; }
.iso-led { fill: #3ddc97; }
/* the sign's raised border and numerals, with a darker copy behind as their depth */
.iso-raise { stroke: color-mix(in srgb, var(--mat) 72%, #fff); }
.iso-raise-lo { stroke: color-mix(in srgb, var(--mat) 50%, #05070b); }
.iso-raise-txt { fill: color-mix(in srgb, var(--mat) 72%, #fff); font-family: var(--font-display); font-weight: 700; }
.iso-raise-lo-txt { fill: color-mix(in srgb, var(--mat) 50%, #05070b); font-family: var(--font-display); font-weight: 700; }
/* the guard's polycarbonate window */
.iso-glass { fill: color-mix(in srgb, var(--mat) 22%, transparent); stroke: color-mix(in srgb, var(--mat) 70%, #fff); stroke-width: .8; vector-effect: non-scaling-stroke; }
.iso-glint { fill: rgba(255,255,255,.16); }
.iso-warn { fill: #f5c542; stroke: #6b4e00; stroke-width: .6; vector-effect: non-scaling-stroke; }
.iso-warn-txt { fill: #3a2a00; font-weight: 700; font-family: var(--font-display); }
.matx__body { padding: clamp(20px, 3vw, 28px); display: grid; gap: 14px; align-content: start; }

.matx__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.matx__name { font-family: var(--font-mono); font-size: 26px; color: var(--mat-ink, var(--mat)); letter-spacing: .01em; }
.matx__full { font-size: 13px; color: var(--text-faint); }
.pill {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor;
}
.pill--ok   { color: var(--accent-ok); }
.pill--warn { color: var(--accent-warm); }
.pill--soon { color: var(--accent-ink); }

.matx__best { font-size: 15px; }
.matx__best b { color: var(--text); }
.matx__why, .matx__watch { font-size: 14px; color: var(--text-dim); }
.matx__watch { padding-left: 14px; border-left: 2px solid color-mix(in srgb, var(--accent-warm) 55%, transparent); }

.matx__specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 20px; }
.matx__specs > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.matx__specs dt, .matx__specs .k { font-size: 12.5px; color: var(--text-faint); }
.matx__specs dd, .matx__specs .v { margin: 0; font-family: var(--font-mono); font-size: 12px; }

.matx__foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 4px; }

@media (max-width: 760px) {
  .matx { grid-template-columns: 1fr; }
  .matx__art { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
  .matx__art svg { max-width: 150px; }
}

/* learn blocks */
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 18px; }
.learn {
  padding: 22px 20px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface);
}
.learn h3 { font-size: 16px; margin-bottom: 8px; }
.learn p { font-size: 14px; color: var(--text-dim); }

/* =============================================================
   23. LASER SECTION
   ============================================================= */
.laser {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 60% 100% at 85% 0%, color-mix(in srgb, var(--accent-warm) 12%, transparent), transparent 70%),
    var(--surface);
  padding: clamp(24px, 4vw, 40px);
  display: grid; gap: 26px;
}
.laser__top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.laser__top h2 { font-size: clamp(26px, 3.4vw, 38px); }
.badge-soon {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px;
  color: var(--accent-warm); border: 1px solid color-mix(in srgb, var(--accent-warm) 45%, transparent);
  background: color-mix(in srgb, var(--accent-warm) 10%, transparent);
}
.badge-soon::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-warm);
  animation: pulse 2.4s var(--ease) infinite;
}
.laser__intro { color: var(--text-dim); max-width: 62ch; font-size: 16px; }

.laser__specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.laser__spec {
  display: grid; gap: 3px; padding: 15px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg-alt);
}
.laser__spec span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.laser__spec b { font-size: 15px; font-weight: 500; font-family: var(--font-display); }

.laser__mats { display: flex; flex-wrap: wrap; gap: 8px; }
.laser__mats span {
  font-size: 13px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-dim); background: var(--bg-alt);
}
.laser__jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.laser__job { padding-top: 16px; border-top: 1px solid var(--line); }
.laser__job h3 { font-size: 16px; margin-bottom: 6px; }
.laser__job p { font-size: 13.8px; color: var(--text-dim); }
.laser__note { font-size: 13px; color: var(--text-faint); }

/* =============================================================
   24. FAQ
   ============================================================= */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 4px; text-align: left; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(16px, 2vw, 18px); transition: color .22s var(--ease);
}
.faq__q:hover { color: var(--accent-ink); }
.faq__sign { flex: none; width: 22px; height: 22px; position: relative; }
.faq__sign::before, .faq__sign::after {
  content: ''; position: absolute; inset: 50% 0 auto 0; height: 1.6px; background: currentColor;
  transition: transform .3s var(--ease);
}
.faq__sign::after { transform: rotate(90deg); }
.faq__item.is-open .faq__sign::after { transform: rotate(0deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s var(--ease); }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding: 0 4px 22px; color: var(--text-dim); font-size: 15px; max-width: 70ch; }

/* =============================================================
   25. CTA BAND + MISC
   ============================================================= */
.band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 70% 130% at 100% 50%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--surface);
}
.band h2 { font-size: clamp(23px, 3vw, 30px); margin-bottom: 6px; }
/* About's "At a glance" card. .band's space-between shrank the list to its
   content width, leaving the values stranded mid-card; stretch it instead. */
.band--facts { display: grid; gap: 14px; justify-content: stretch; }
.band p { color: var(--text-dim); font-size: 15px; max-width: 52ch; }

.feature-row { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.link-more { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-ink); font-size: 14.5px; font-weight: 500; }
.link-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.link-more:hover svg { transform: translateX(4px); }

.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.mini {
  display: grid; gap: 9px; padding: 24px 22px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  transition: transform .32s var(--ease), border-color .32s var(--ease);
}
.mini:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mini__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.mini__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mini h3 { font-size: 17.5px; }
.mini p { font-size: 14px; color: var(--text-dim); }

/* machines list (about page) */
.machines { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.machine {
  padding: 24px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); display: grid; gap: 12px; align-content: start;
}
.machine__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.machine h3 { font-size: 18px; }
.machine__list { list-style: none; padding: 0; display: grid; gap: 7px; }
.machine__list li { display: flex; justify-content: space-between; gap: 14px; font-size: 13.4px; }
.machine__list span { color: var(--text-faint); }
.machine__list b { font-family: var(--font-mono); font-size: 12.2px; font-weight: 500; }

/* prose (about story) */
.prose { max-width: 66ch; display: grid; gap: 16px; }
.prose p { color: var(--text-dim); font-size: 16px; }
.prose strong { color: var(--text); font-weight: 600; }

/* about page split */
.about-split {
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: clamp(30px, 5vw, 60px); align-items: start;
}
@media (max-width: 860px) { .about-split { grid-template-columns: 1fr; } }


/* =============================================================
   26. TOUCH & SMALL-SCREEN CORRECTIONS
   ============================================================= */

/* iOS Safari zooms in on focus when a form control is under 16px.
   Bumping these to 16px on touch devices stops the page jumping. */
@media (max-width: 900px), (pointer: coarse) {
  .f-field input, .f-field select, .f-field textarea { font-size: 16px; }
}

/* Hover effects are meaningless on touch and leave elements stuck in a
   hovered state after a tap, so they only apply to real pointers. */
@media (hover: none) {
  .card:hover, .prod:hover, .mini:hover, .mat:hover, .gal:hover { transform: none; }
  .gal__zoom { opacity: 1; transform: scale(1); }
}

/* Narrow phones: the header row (brand + CTA + theme + menu) does not fit
   below ~440px, and body overflow-x:hidden was quietly clipping the menu
   button off the right edge. The theme switch now has to survive here — it is
   the only one on the page — so the CTA shortens and everything tightens
   instead. Below 370px the wordmark steps aside and the mark carries it. */
.cta-short { display: none; }
.nav__cta { white-space: nowrap; }
/* The page links join the header at 820px. Until there is room for both,
   the CTA uses its short label rather than wrapping onto two lines. */
@media (min-width: 820px) and (max-width: 999px) {
  .cta-long  { display: none; }
  .cta-short { display: inline; }
}
@media (max-width: 440px) {
  .nav__inner { gap: 8px; }
  .nav__links { gap: 6px; }
  .cta-long  { display: none; }
  .cta-short { display: inline; }
  .nav__cta { padding: 9px 14px; }
  .brand { gap: 8px; }
  .brand__text { font-size: 16.5px; }
  .brand__mark { width: 29px; height: 29px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 17px; height: 17px; }
}
@media (max-width: 370px) {
  .brand__text { display: none; }
}

/* Phone in landscape: the hero would otherwise be taller than the screen. */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-block: 92px 40px; }
  .hero__stage { max-width: 420px; }
  .menu__inner { padding-top: 14px; gap: 18px; }
  .menu__link { padding-block: 10px; }
  .menu__name { font-size: clamp(20px, 3.4vw, 28px); }
}

/* Foldable inner screens and small tablets land in an awkward middle
   width — give the print bay and the lightbox room there. */
@media (min-width: 620px) and (max-width: 900px) {
  .hero__stage { max-width: 560px; }
  .lb__panel { width: min(100%, 620px); }
}


/* =============================================================
   27. LIGHT THEME — EDGES AND ELEVATION
   On white, a hairline alone doesn't separate a white card from a
   near-white page. Every surface block gets a soft two-layer shadow
   under its border. :where() keeps this at zero specificity so hover
   states and components with their own shadow still win.
   ============================================================= */
:where(:root[data-theme="light"]) :where(
  .card, .prod, .gal, .mat, .matx, .learn, .mini, .machine, .laser, .band,
  .hero-chip, .hero-hud, .hero__pills li, .laser__spec, .chip, .seg,
  .glance, .lb__panel, .est, .quote__form
) { box-shadow: var(--shadow-card); }

/* the tinted sections get a firm edge top and bottom, not just a tint */
:root[data-theme="light"] .section--alt { border-block-color: var(--line); }

/* the "this is a solid brick" warning on oversized estimator boxes */
.est__big {
  border-left: 2px solid var(--accent-warm);
  padding-left: 10px; margin-bottom: 8px;
}
.est__big b { color: var(--text); }

/* ---------- CONTACT ROUTES (v0.2.2) ----------
   A quote form is a commitment. Some people just have a question, and if the
   only thing on the page is a form they leave instead of asking. */
.band__aside { font-size: 13.5px; color: var(--text-faint); margin-top: 10px; }
.band__aside a { color: var(--accent-ink); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }

.ask-first {
  margin-top: 30px; padding: 20px 20px 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.ask-first h3 { font-size: 16.5px; margin-bottom: 8px; }
.ask-first p { font-size: 14.2px; color: var(--text-dim); line-height: 1.6; }
.ask-first__alt { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 13.6px; }
.ask-first a { color: var(--accent-ink); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---------- SHOP (Shopify Buy Button) ---------- */
.shop__lede { color: var(--text-dim); max-width: 60ch; margin-bottom: 26px; }
.shop__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.shop__item {
  display: grid; gap: 8px; align-content: start;
  padding: 22px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.shop__item h3 { font-size: 16px; }
.shop__item p { font-size: 14px; color: var(--text-dim); }
.shop__buy { margin-top: 8px; }
/* the Buy Button renders un-iframed so it can inherit the site's buttons */
.shopify-buy__product__variant-selectors { margin-bottom: 10px; }
.shopify-buy__btn, .shopify-buy__btn--cart-checkout {
  font-family: var(--font-body); font-weight: 600; border-radius: 999px;
  padding: 11px 20px; border: 0; cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #04121a;
}
.shopify-buy__btn:hover { filter: brightness(1.06); }
.shopify-buy__product__price { color: var(--text); font-family: var(--font-mono); }

/* ---------- LEGAL PAGES ---------- */
.legal { max-width: 74ch; display: grid; gap: 14px; }
.legal__meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); letter-spacing: .04em; }
.legal h2 { font-size: clamp(19px, 2.4vw, 23px); margin-top: 22px; }
.legal p, .legal li { color: var(--text-dim); font-size: 15.2px; line-height: 1.7; }
.legal ul { display: grid; gap: 8px; padding-left: 20px; }
.legal b { color: var(--text); }
.legal a { color: var(--accent-ink); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.footer__legal a { color: var(--text-faint); }
.footer__legal a:hover { color: var(--accent-ink); }

/* ---------- LEGAL PAGES: summary box, tables, sub-headings ---------- */
.legal h3 { font-size: 16.5px; margin-top: 16px; color: var(--text); }
.legal__tldr {
  margin: 8px 0 14px; padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.legal__tldr h2 { margin-top: 0; font-size: 17px; }
.legal__tldr ul { margin-top: 10px; }
.legal__table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14.6px; }
.legal__table th, .legal__table td {
  text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft);
  color: var(--text-dim); vertical-align: top;
}
.legal__table th { color: var(--text); font-weight: 600; border-bottom-color: var(--line); }
.legal__table td:first-child { color: var(--text); width: 42%; }
.legal__foot {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--text-faint);
}
@media (max-width: 560px) {
  .legal__table, .legal__table tbody, .legal__table tr, .legal__table td { display: block; width: 100%; }
  .legal__table thead { display: none; }
  .legal__table tr { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
  .legal__table td { border: 0; padding: 2px 0; }
  .legal__table td:first-child { font-weight: 600; width: auto; }
}

/* ---------- 28. BLUR BUDGET ----------
   Each backdrop-filter makes the compositor snapshot and blur everything behind
   it. Stacked, full-screen, on a desktop-sized window, that is what made the
   gallery lightbox drag on a PC while staying smooth on a phone (fewer pixels).
   The site now keeps at most two live at a time, and none behind an open
   overlay, where nobody can see through to them anyway. */
body.is-locked .nav,
body.is-locked .nav.is-stuck {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Some machines and settings ask for cheaper compositing outright. */
@media (prefers-reduced-transparency: reduce) {
  .lb, .menu, .nav.is-stuck {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .lb   { background: color-mix(in srgb, var(--bg) 97%, transparent); }
  .menu { background: var(--bg); }
  .nav.is-stuck { background: var(--bg); }
}
