/* ============================================================
   BARZ 3D RAPID PROTOTYPING — styles.css
   Aesthetic: engineering drawing / shop floor.
   Sharp corners, 1.5px ink borders, hard offset shadows,
   FDM layer-line striations, mono micro-labels.
   ============================================================ */

:root {
  /* Palette */
  --ink:       #171B21;
  --steel:     #2A313B;
  --paper:     #EDEDE9;
  --hairline:  #D6D6CF;
  --orange:    #F04E23;
  --orange-dk: #C23A15;

  /* Type */
  --font-display: "Chakra Petch", sans-serif;
  --font-body:    "Inter", sans-serif;
  --font-mono:    "IBM Plex Mono", monospace;

  /* Shape language */
  --border: 1.5px solid var(--ink);
  --shadow-hard: 8px 8px 0 var(--ink);
  --shadow-hard-sm: 5px 5px 0 var(--ink);

  /* FDM layer-line striation texture */
  --striation: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 5px,
    rgba(23, 27, 33, 0.045) 5px,
    rgba(23, 27, 33, 0.045) 6px
  );
  --striation-dark: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 5px,
    rgba(237, 237, 233, 0.05) 5px,
    rgba(237, 237, 233, 0.05) 6px
  );

  --header-h: 64px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--striation);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* Visible focus — 2px orange outline everywhere */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 0.6em 1em;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.container { width: min(1180px, 100% - 3rem); margin-inline: auto; }
.container-wide { width: min(1400px, 100% - 3rem); margin-inline: auto; }
.container-narrow { width: min(760px, 100% - 3rem); margin-inline: auto; }

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }

.section-dark {
  background-color: var(--ink);
  background-image: var(--striation-dark);
  color: var(--paper);
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-dk);
  margin-bottom: 1rem;
}
.eyebrow-light { color: var(--orange); }

/* Full-width service-area banner strip under the header */
.hero-banner {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.6vw, 1.75rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--border);
  padding: 0.65em 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.hero-banner .accent { color: var(--orange); }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
}
.title-light { color: var(--paper); }
.accent { color: var(--orange); }

.section-sub {
  max-width: 56ch;
  color: var(--steel);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-dark .section-sub { color: var(--hairline); }

/* Outlined / stroke display text */
.stroke-text {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  text-stroke: 1.5px var(--ink);
}
.stroke-text-light {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--paper);
  text-stroke: 1.5px var(--paper);
}

/* ---------- Panels (title-block frames) ---------- */
.panel {
  background: var(--paper);
  border: var(--border);
  box-shadow: var(--shadow-hard);
}

.panel-dark {
  background: var(--steel);
  border: 1.5px solid var(--paper);
  box-shadow: 8px 8px 0 rgba(237, 237, 233, 0.18);
}

.panel-caption {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 0.9rem;
  border-top: var(--border);
  background: var(--paper);
  color: var(--steel);
}

.title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--ink);
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
}
.title-bar-meta { color: var(--hairline); font-weight: 400; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-align: center;
  padding: 0.85em 1.6em;
  border: var(--border);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.btn-primary {
  background: var(--orange);
  color: var(--paper);
  box-shadow: var(--shadow-hard-sm);
}
.btn-primary:hover {
  background: var(--orange-dk);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-block { display: block; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: var(--border);
}

.header-inner {
  width: min(1400px, 100% - 3rem);
  margin-inline: auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

/* Orange layer-line mark: three stacked filament lines */
.logo-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}
.logo-mark i {
  display: block;
  width: 22px;
  height: 4px;
  background: var(--orange);
}
.logo-mark i:nth-child(2) { width: 16px; }
.logo-mark i:nth-child(3) { width: 22px; }

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.logo-text em { font-style: normal; color: var(--orange); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 2rem);
}
.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.4em 0.2em;
}
.site-nav a:hover { color: var(--orange-dk); }

.nav-cta {
  border: var(--border);
  background: var(--ink);
  color: var(--paper);
  padding: 0.5em 1em !important;
}
.nav-cta:hover { background: var(--orange); color: var(--paper) !important; }

/* ---------- 1. Hero ---------- */
.hero { padding-block: 0 clamp(3.5rem, 8vw, 7rem); border-bottom: var(--border); }

.hero-inner {
  width: min(1400px, 100% - 3rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6.2vw, 4.75rem);
  line-height: 1.04;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--steel);
  max-width: 54ch;
  margin-bottom: 2rem;
}

.spec-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: var(--border);
  background: var(--paper);
  box-shadow: var(--shadow-hard-sm);
  margin-bottom: 2rem;
  max-width: 560px;
}
.spec-cell {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.spec-cell + .spec-cell { border-left: var(--border); }
.spec-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1;
}
.spec-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--steel);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- 2. Showcase ---------- */
.master-shot { margin-bottom: clamp(2rem, 4vw, 3rem); }
.master-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* Hover-preview stack: variant image fades in over the master shot */
.master-stack { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.master-stack .master-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 350ms ease;
}
.master-stack .master-img.is-active { opacity: 1; }

.variant-card { cursor: pointer; transition: transform 150ms ease, box-shadow 150ms ease; }
.variant-card:hover, .variant-card:focus-visible, .variant-card.is-previewing {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--ink);
}
.variant-card.is-previewing { border-color: var(--orange); }
.variant-card.is-previewing .variant-name { color: var(--orange-dk); }

/* Carousel arrows + counter on the big shot */
.stack-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--paper);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.stack-nav:hover { background: var(--orange); }
.stack-nav:active { background: var(--orange-dk); }
.stack-prev { left: 16px; }
.stack-next { right: 16px; }

.stack-counter {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  background: var(--ink);
  color: var(--orange);
  border: 1.5px solid var(--paper);
  padding: 0.35em 0.7em;
}

@media (max-width: 720px) {
  .stack-nav { width: 44px; height: 44px; font-size: 1.3rem; }
  .stack-prev { left: 10px; }
  .stack-next { right: 10px; }
  .stack-counter { right: 10px; top: 10px; }
}

.variant-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.variant-card { box-shadow: var(--shadow-hard-sm); }
.variant-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: var(--border); }

.variant-info { padding: 0.7rem 0.8rem; display: flex; flex-direction: column; gap: 0.15rem; }
.variant-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
}
.variant-tag, .variant-rate {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ---------- 3. Video reveal ---------- */
.video-frame video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink); }

/* ---------- 4. Materials table ---------- */
.table-wrap { overflow-x: auto; }

.materials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.materials-table th, .materials-table td {
  text-align: left;
  padding: 1rem 1.25rem;
  border-bottom: 1.5px solid var(--hairline);
}
.materials-table thead th {
  background: var(--ink);
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: var(--border);
}
.materials-table tbody th {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
}
.materials-table tbody tr:last-child th,
.materials-table tbody tr:last-child td { border-bottom: none; }
.materials-table tbody tr:hover { background: rgba(240, 78, 35, 0.06); }
.materials-table .rate {
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 5. Story ---------- */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.story-copy p { margin-bottom: 1.25rem; color: var(--hairline); max-width: 60ch; }
.story-copy p:first-child {
  color: var(--paper);
  font-size: 1.1rem;
}

/* ---------- 6. Morph (signature section) ---------- */
.morph { border-block: var(--border); background-color: var(--paper); background-image: var(--striation); }

.morph-pin { min-height: 100vh; display: flex; align-items: center; padding-block: 3rem; }

.morph-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  grid-template-areas:
    "header header rail"
    "stage  meta   rail";
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  width: min(1180px, 100% - 3rem);
}

.morph-header { grid-area: header; }
.morph-header .section-title { margin-bottom: 0; }

.morph-stage {
  grid-area: stage;
  position: relative;
  aspect-ratio: 1;
  max-height: 62vh;
  overflow: hidden;
}
.morph-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  will-change: opacity, transform;
}
.morph-img.is-active { opacity: 1; }

.morph-meta { grid-area: meta; display: flex; flex-direction: column; gap: 0.5rem; }
.morph-index {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--steel);
}
.morph-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 1;
  text-transform: uppercase;
}
.morph-rate {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--orange-dk);
}
.morph-desc { color: var(--steel); max-width: 34ch; }

.morph-rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
}
.rail-tick {
  width: 18px;
  height: 4px;
  background: var(--hairline);
  border: 1px solid var(--ink);
  transition: background-color 150ms ease, width 150ms ease;
}
.rail-tick.is-active { background: var(--orange); width: 28px; }

/* Fallback list — hidden when JS pin is active */
.morph-fallback { padding-block: clamp(3rem, 6vw, 5rem); }
.fallback-list {
  list-style: none;
  display: grid;
  gap: 1.5rem;
}
.fallback-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  box-shadow: var(--shadow-hard-sm);
}
.fallback-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border: var(--border); }
.fallback-card .variant-name { font-size: 1.3rem; display: block; }
.fallback-card .variant-rate { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; }
.fallback-card p { color: var(--steel); font-size: 1.05rem; }

/* State switching: .morph-enhanced set by JS when pinning is active */
.js .morph.morph-enhanced .morph-fallback { display: none; }
.morph:not(.morph-enhanced) .morph-pin { display: none; }
.no-js .morph-pin { display: none; }

/* ---------- 7. Calculator ---------- */
.calc { box-shadow: var(--shadow-hard); }

.calc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.calc-field { display: flex; flex-direction: column; gap: 0.5rem; }
.calc-field-wide { grid-column: 1 / -1; }

.calc-field label, .form-field label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

/* Live readouts: fixed-width mono + reserved space = no layout shift */
.readout {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--orange-dk);
  font-variant-numeric: tabular-nums;
  min-width: 7ch;
  text-align: right;
}

select, input[type="number"], input[type="text"], input[type="email"], textarea {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  border-radius: 0;
  padding: 0.7em 0.8em;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2em;
}

/* Range sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--ink);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  background: var(--orange);
  border: var(--border);
}
input[type="range"]::-moz-range-track { height: 4px; background: var(--ink); }
input[type="range"]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  background: var(--orange);
  border: var(--border);
  border-radius: 0;
}

.calc-total {
  grid-column: 1 / -1;
  border: var(--border);
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.calc-total-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--orange);
}
.calc-total-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  min-height: 1.1em; /* reserve space — no layout shift */
}
.calc-total-note {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--hairline);
}

/* ---------- 8. Contact ---------- */
.contact { padding-bottom: 0; }

/* Full-width banner across the top of the contact section */
.contact-banner {
  text-align: center;
  border-block: var(--border);
  padding: clamp(1.75rem, 5vw, 3rem) 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.contact-banner-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
}
.contact-banner-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--paper);
}
.contact-banner-title .accent { color: var(--orange); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.contact-form { display: grid; gap: 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
.section-dark .form-field label { color: var(--hairline); }

.section-dark input, .section-dark textarea {
  background: var(--steel);
  color: var(--paper);
  border-color: var(--paper);
}
.section-dark input::placeholder, .section-dark textarea::placeholder { color: #8b95a3; }

.form-note {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--hairline);
}

.contact-info { position: sticky; top: calc(var(--header-h) + 24px); }

/* Big bold, centered company name in the info card header */
.contact-info .title-bar { padding: 0.9rem 1.25rem; justify-content: center; text-align: center; }
.contact-info .title-bar-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
}
.info-body { padding: 1.5rem; }
.info-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}
.info-list { display: grid; gap: 1.4rem; }
.info-list dt {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-bottom: 0.4rem;
}
.info-list dd { color: var(--paper); font-size: 1.2rem; font-weight: 600; line-height: 1.4; }
.info-list a { color: var(--paper); text-decoration-color: var(--orange); }
.info-list a:hover { color: var(--orange); }

.site-footer {
  border-top: 1.5px solid var(--steel);
  padding-block: 1.5rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--hairline);
}
.footer-fine { color: var(--orange); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 640px; }
  .variant-grid { grid-template-columns: repeat(3, 1fr); }
  .story-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { position: static; }
}

@media (max-width: 720px) {
  .variant-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-body { grid-template-columns: 1fr; }
  /* Hide "best for" column on mobile */
  .materials-table .col-bestfor { display: none; }
  .site-nav a:not(.nav-cta) { display: none; }
}

@media (max-width: 480px) {
  .container, .container-wide, .container-narrow, .header-inner, .hero-inner,
  .morph-layout { width: calc(100% - 2rem); }
  .spec-row { grid-template-columns: 1fr; max-width: none; }
  .spec-cell + .spec-cell { border-left: none; border-top: var(--border); }
  .variant-grid { grid-template-columns: 1fr 1fr; }
  .fallback-card { grid-template-columns: 90px 1fr; }
  .panel, .calc { box-shadow: var(--shadow-hard-sm); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   ANIMATION LAYER
   ============================================================ */

/* Ambient Three.js background — fixed, decorative, behind everything */
#ambient-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  display: none; /* enabled by JS when supported */
}
.js.fx-on #ambient-bg { display: block; }

/* Custom cursor — desktop fine-pointer only, enabled via .cursor-on */
.cursor-dot, .cursor-ring { display: none; }

.cursor-on { cursor: none; }
.cursor-on a, .cursor-on button, .cursor-on select,
.cursor-on input, .cursor-on textarea, .cursor-on label { cursor: none; }

.cursor-on .cursor-dot {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--orange);
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.cursor-on .cursor-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border: 1.5px solid var(--ink);
  z-index: 9998;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 200ms ease, height 200ms ease, border-color 200ms ease, background-color 200ms ease;
}
/* crosshair ticks inside the ring */
.cursor-on .cursor-ring span::before,
.cursor-on .cursor-ring span::after {
  content: "";
  position: absolute;
  background: var(--orange);
  opacity: 0.9;
}
.cursor-on .cursor-ring span::before {
  width: 8px; height: 1.5px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: none;
}
.cursor-ring.is-hover {
  width: 52px !important;
  height: 52px !important;
  border-color: var(--orange) !important;
  background: rgba(240, 78, 35, 0.08);
}
.cursor-ring.is-hover span::before { display: block !important; }
.cursor-ring.is-down { width: 24px !important; height: 24px !important; }

/* Hero headline line-mask reveal.
   IMPORTANT: content is only hidden when .anim-on is present —
   that class is added by script.js strictly after GSAP +
   ScrollTrigger have loaded successfully. If the CDN fails or
   anything throws, nothing is ever hidden. */
.line-mask { display: block; overflow: hidden; }
.line-mask .line { display: inline-block; }
.anim-on .line-mask .line { transform: translateY(110%); }

/* Scroll reveals: hidden only once the animation engine is live. */
.anim-on [data-reveal] { opacity: 0; }

/* Panel tilt (mouse tracking) */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}

/* REC dot pulse in video title bar */
.rec-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--orange);
  margin-right: 8px;
  animation: rec-pulse 1.4s steps(2, end) infinite;
}
@keyframes rec-pulse { 50% { opacity: 0.15; } }

/* Header shrink state applied on scroll */
.site-header { transition: box-shadow 200ms ease; }
.site-header.is-scrolled { box-shadow: 0 4px 0 rgba(23, 27, 33, 0.08); }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* Force the static fallback for the morph section */
  .morph .morph-pin { display: none !important; }
  .morph .morph-fallback { display: block !important; }
  /* Kill decorative layers */
  #ambient-bg { display: none !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  .cursor-on, .cursor-on a, .cursor-on button, .cursor-on select,
  .cursor-on input, .cursor-on textarea, .cursor-on label { cursor: auto; }
  [data-reveal] { opacity: 1 !important; }
  .line-mask .line { transform: none !important; }
}
