/* Formant 01 — product page */

@font-face {
  font-family: "Barlow Condensed";
  src: url("vendor/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("vendor/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("vendor/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations"),
       url("vendor/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a0d14;
  --ink-2: #0e131d;
  --ink-3: #151b27;
  --paper: #ece7dd;
  --paper-2: #c9c4b9;
  --muted: #a19d95;
  --copper: #c38d5e;
  --copper-hi: #d9a878;
  --line: rgba(236, 231, 221, 0.14);
  --line-strong: rgba(236, 231, 221, 0.28);

  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 80px);
  --max: 1440px;
  --section: clamp(88px, 12vw, 176px);
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --head-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--head-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--text);
  font-size: clamp(16px, 0.25vw + 15px, 18px);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }

::selection { background: var(--copper); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--copper-hi);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 18px;
  background: var(--paper); color: var(--ink);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--text);
  font-size: 14px;
  font-weight: 560;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-hi);
  margin-bottom: 20px;
}

.section__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 0.98;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0 0 24px;
  max-width: 16ch;
  text-wrap: balance;
}

.section__lede {
  color: var(--paper-2);
  max-width: 54ch;
  font-size: clamp(17px, 0.4vw + 15.5px, 20px);
  line-height: 1.55;
}

.section { padding-block: var(--section); position: relative; }
.section__head { margin-bottom: clamp(40px, 5vw, 72px); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn--solid { background: var(--copper); color: var(--ink); }
.btn--solid:hover { background: var(--copper-hi); }
.btn--line { border-color: var(--line-strong); color: var(--paper); background: rgba(10, 13, 20, 0.35); }
.btn--line:hover { border-color: var(--paper); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn__icon { width: 13px; height: 13px; }

/* ---------- Masthead ---------- */

.masthead {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--head-h);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.masthead.is-solid,
.masthead.is-open {
  background: rgba(10, 13, 20, 0.92);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.masthead__inner {
  height: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.34em;
  margin-right: -0.34em;
  text-decoration: none;
  color: var(--paper);
}

.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.nav__list { display: flex; gap: clamp(20px, 2.6vw, 40px); list-style: none; margin: 0; padding: 0; }
.nav__list a {
  font-size: 15px; font-weight: 500; letter-spacing: 0.06em;
  text-decoration: none; color: var(--paper-2);
  padding: 10px 0; position: relative;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
  background: var(--copper); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__list a:hover, .nav__list a[aria-current="true"] { color: var(--paper); }
.nav__list a:hover::after, .nav__list a[aria-current="true"]::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  align-items: center; gap: 12px;
  min-height: 44px; padding: 0 4px;
  background: none; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.menu-toggle__icon { width: 20px; height: 10px; position: relative; }
.menu-toggle__icon::before, .menu-toggle__icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.menu-toggle__icon::before { top: 0; }
.menu-toggle__icon::after { top: 8.5px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { top: 4.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { top: 4.25px; transform: rotate(-45deg); }

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed; top: var(--head-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 28px;
    background: rgba(10, 13, 20, 0.97);
    border-bottom: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .masthead.is-open .nav {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a {
    display: block; padding: 16px 0; font-size: 20px;
    font-family: var(--display); letter-spacing: 0.1em; text-transform: uppercase;
    border-bottom: 1px solid var(--line);
  }
  .nav__list a::after { display: none; }
  .nav .btn { margin-top: 24px; min-height: 52px; }
}

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

.hero {
  position: relative;
  min-height: max(640px, 100svh);
  display: flex; align-items: center;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 74% 52%, rgba(195, 141, 94, 0.10), transparent 70%),
    var(--ink);
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 70% 50%;
}
.hero__media::after {
  /* Guarantee legibility on the left regardless of the render's exposure. */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,13,20,0.88) 0%, rgba(10,13,20,0.55) 34%, rgba(10,13,20,0) 58%),
    linear-gradient(0deg, rgba(10,13,20,0.85) 0%, rgba(10,13,20,0) 22%);
}

.hero__body { padding-top: calc(var(--head-h) + 40px); padding-bottom: 72px; }
.hero__body > * { max-width: 34rem; }

.hero__title {
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  font-size: clamp(68px, 11vw, 168px);
  line-height: 0.86;
  letter-spacing: 0.01em;
  margin: 0 0 28px;
  max-width: none;
}
.hero__title span { color: var(--copper); }

.hero__lede {
  font-size: clamp(18px, 0.6vw + 15px, 22px);
  line-height: 1.5;
  color: var(--paper);
  max-width: 30rem;
  margin-bottom: 36px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero__note { font-size: 14px; color: var(--muted); letter-spacing: 0.02em; }

@media (max-width: 760px) {
  .hero { align-items: flex-end; min-height: max(620px, 100svh); }
  .hero__img { object-position: 76% 50%; }
  .hero__media { bottom: 34%; }
  .hero__media::after {
    background:
      linear-gradient(0deg, var(--ink) 0%, rgba(10,13,20,0) 34%),
      linear-gradient(180deg, rgba(10,13,20,0.7) 0%, rgba(10,13,20,0) 20%);
  }
  .hero__body { padding-bottom: 40px; padding-top: 0; }
  .hero__title { margin-bottom: 18px; }
  .hero__lede { margin-bottom: 26px; }
  .hero__actions .btn { flex: 1 1 100%; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .hero__media { bottom: 40%; }
}

/* ---------- Viewer ---------- */

.viewer { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); }
.viewer:focus { outline: none; }

.viewer__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.viewer__stage {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 50% 45%, #1a2131 0%, #0c1018 70%);
}

model-viewer {
  display: block;
  width: 100%;
  height: clamp(420px, 72vh, 780px);
  --poster-color: transparent;
  --progress-bar-color: transparent;
  background: transparent;
}
model-viewer:focus-visible { outline: 2px solid var(--copper-hi); outline-offset: -2px; }

.viewer__poster {
  position: absolute; inset: 0;
  background: url("assets/product-detail.webp") center / cover no-repeat;
  opacity: 0.85;
}
.viewer__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--line);
}
.viewer__progress span {
  display: block; height: 100%; width: 0; background: var(--copper);
  transition: width .2s linear;
}
.viewer__progress.is-done { opacity: 0; transition: opacity .4s; }

.viewer__fallback {
  position: absolute; inset: auto 0 0 0;
  padding: 18px 22px;
  background: rgba(10,13,20,0.88);
  border-top: 1px solid var(--line);
  color: var(--paper-2);
  font-size: 15px;
}
.viewer__fallback strong { color: var(--paper); font-weight: 600; }

.viewer__hint {
  position: absolute; left: 20px; bottom: 16px; right: 20px;
  font-size: 14px; color: var(--muted);
  pointer-events: none;
}
.viewer__stage.has-fallback .viewer__hint { display: none; }

.viewer__panel { display: grid; gap: 30px; }

.control { border: 0; padding: 0; margin: 0; min-width: 0; }
.control__label {
  padding: 0; margin-bottom: 12px;
  font-size: 14px; font-weight: 560; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

.segmented {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 3px; gap: 3px;
}
.segmented__btn {
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 1px; cursor: pointer;
  background: transparent; color: var(--paper-2);
  font-size: 15px; font-weight: 560; letter-spacing: 0.04em;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.segmented__btn:hover { color: var(--paper); }
.segmented__btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); }

.swatches { display: grid; gap: 8px; }
.swatch {
  display: flex; align-items: center; gap: 14px;
  min-height: 48px; padding: 0 14px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px; font-weight: 500; text-align: left; cursor: pointer;
  color: var(--paper-2);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.swatch:hover { border-color: var(--line-strong); color: var(--paper); }
.swatch[aria-pressed="true"] { border-color: var(--copper); color: var(--paper); }
.swatch[aria-pressed="true"]::after {
  content: "Selected"; margin-left: auto;
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper-hi);
}
.swatch__chip {
  width: 22px; height: 22px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25), 0 0 0 1px rgba(0,0,0,0.4);
}
.swatch__chip--champagne { background: radial-gradient(circle at 35% 30%, #f1dcb8, #b98f5f 60%, #7d5b38); }
.swatch__chip--silver { background: radial-gradient(circle at 35% 30%, #ffffff, #c4c7cb 55%, #7f8389); }
.swatch__chip--graphite { background: radial-gradient(circle at 35% 30%, #6a6d72, #2c2e32 60%, #17181a); }

.tools { display: flex; gap: 8px; }
.tool {
  min-width: 48px; min-height: 48px; padding: 0 14px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 18px; cursor: pointer; color: var(--paper);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.tool--wide { flex: 1; font-size: 15px; font-weight: 560; letter-spacing: 0.04em; }
.tool:hover { border-color: var(--paper); }
.tool:disabled, .segmented__btn:disabled, .swatch:disabled { opacity: 0.4; cursor: not-allowed; }

.viewer__status {
  font-size: 15px; color: var(--paper-2);
  padding-top: 18px; border-top: 1px solid var(--line);
  min-height: 3.2em;
}

.parts { margin: 0; display: grid; gap: 14px; }
.parts div { display: grid; grid-template-columns: 82px 1fr; gap: 12px; }
.parts dt { font-weight: 600; font-size: 15px; color: var(--paper); }
.parts dd { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }

@media (max-width: 980px) {
  .viewer__layout { grid-template-columns: 1fr; }
  .viewer__panel { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
  .viewer__status, .parts { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  model-viewer { height: min(118vw, 68svh); min-height: 360px; }
  .viewer__panel { grid-template-columns: 1fr; }
  .viewer__hint { font-size: 14px; left: 14px; right: 14px; bottom: 12px; }
}

/* ---------- Detail ---------- */

.detail { padding-top: 0; background: var(--ink-2); }
.detail__figure { margin: 0; }
.detail__zoom {
  display: block; width: 100%; padding: 0; border: 0; background: var(--ink-3); cursor: zoom-in;
}
.detail__zoom img {
  width: 100%; height: clamp(360px, 78vh, 900px); object-fit: cover;
}
.detail__text {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(24px, 6vw, 120px);
  padding-top: clamp(48px, 7vw, 104px);
  align-items: end;
}
.detail__text .eyebrow { grid-column: 1; }
.detail__text .section__title { grid-column: 1; margin-bottom: 0; }
.detail__text > p:last-child {
  grid-column: 2; grid-row: 2;
  color: var(--paper-2); max-width: 46ch;
  font-size: clamp(17px, 0.4vw + 15.5px, 20px);
}
@media (max-width: 760px) {
  .detail__zoom img { height: auto; aspect-ratio: 4 / 5; }
  .detail__text { grid-template-columns: 1fr; }
  .detail__text > p:last-child { grid-column: 1; grid-row: auto; margin-top: 24px; }
}

/* ---------- Fit ---------- */

.fit__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.fit__card {
  border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 44px);
  background: linear-gradient(180deg, rgba(236,231,221,0.025), transparent);
  display: flex; flex-direction: column; gap: 28px;
}
.fit__title {
  margin: 0;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(24px, 2vw, 30px); letter-spacing: 0.04em; text-transform: uppercase;
}

.fit__drawing { width: 100%; max-width: 440px; height: auto; }
.dwg-part path, .dwg-part rect { fill: rgba(236,231,221,0.06); stroke: var(--paper-2); stroke-width: 1.2; }
.dwg-dim path { fill: none; stroke: var(--copper); stroke-width: 1; }
.dwg-text text { fill: var(--paper-2); font-family: var(--text); font-size: 14px; }

.spec { margin: 0; display: grid; }
.spec div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.spec div:first-child { border-top: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; color: var(--paper); font-weight: 500; }

.fit__source { font-size: 15px; color: var(--muted); margin-top: auto; }
.fit__source a, .footer a { color: var(--paper-2); text-decoration-color: var(--copper); text-underline-offset: 3px; }
.fit__source a:hover, .footer a:hover { color: var(--paper); }

.pending { list-style: none; margin: 0; padding: 0; }
.pending li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px;
}
.pending li:first-child { border-top: 1px solid var(--line); }
.pending em {
  font-style: normal; font-size: 14px; color: var(--copper-hi); text-align: right;
}
.pending em::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px;
  border: 1px solid var(--copper); border-radius: 50%; vertical-align: 1px;
}

.fit__context { margin: auto 0 0; }
.fit__context-btn { display: block; width: 100%; padding: 0; border: 0; background: var(--ink-3); cursor: zoom-in; }
.fit__context img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.fit__context figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }

@media (max-width: 900px) {
  .fit__grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pending li { flex-direction: column; gap: 4px; }
  .pending em { text-align: left; }
}

/* ---------- Film + gallery ---------- */

.film { background: linear-gradient(180deg, var(--ink) 0%, #080a10 100%); }
.film:focus { outline: none; }
.film__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000 url("assets/launch-poster.jpg") center / cover no-repeat;
  border: 1px solid var(--line);
}
.film__video { width: 100%; height: 100%; object-fit: contain; background: transparent; }
.film__fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(8,10,16,0.75); color: var(--paper-2); text-align: center; padding: 24px;
}
.film__desc { margin-top: 16px; font-size: 15px; color: var(--muted); max-width: 70ch; }

.gallery__title {
  margin: clamp(72px, 9vw, 128px) 0 28px;
  font-family: var(--text); font-size: 14px; font-weight: 560;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper-hi);
}
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.gallery__item--wide { grid-column: 1 / -1; }
.gallery__item button {
  display: block; width: 100%; padding: 0; border: 0;
  background: var(--ink-3); cursor: zoom-in; overflow: hidden;
}
.gallery__item img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .8s var(--ease);
}
.gallery__item--wide img { aspect-ratio: 21 / 9; object-position: 50% 62%; }
.gallery__item button:hover img { transform: scale(1.02); }
.gallery__cap { margin-top: 12px; font-size: 15px; color: var(--muted); }

@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery__item--wide img { aspect-ratio: 16 / 10; object-position: 58% 60%; }
}

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

.footer { border-top: 1px solid var(--line); padding-block: clamp(56px, 7vw, 96px); }
.footer__inner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 72px); align-items: start;
}
.wordmark--footer { font-size: 20px; }
.footer__note { font-size: 15px; color: var(--muted); max-width: 70ch; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: clamp(16px, 3vw, 40px);
  border: 0; background: rgba(6, 8, 12, 0.97); color: var(--paper);
}
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; }
.lightbox::backdrop { background: rgba(6, 8, 12, 0.9); }
.lightbox__fig { margin: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; }
.lightbox__img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.lightbox__cap { font-size: 15px; color: var(--paper-2); text-align: center; }
.lightbox__bar { display: flex; justify-content: center; align-items: center; gap: 10px; }
.lightbox__bar .tool--wide { flex: 0 0 auto; padding: 0 22px; }
.lightbox__count { min-width: 64px; text-align: center; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Fallbacks ---------- */

.is-missing { visibility: hidden; }
.gallery__item.is-missing, .detail.is-missing .detail__figure { display: none; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .segmented__btn[aria-pressed="true"], .swatch[aria-pressed="true"] { outline: 2px solid Highlight; }
}

/* ---------- Layout refinements ---------- */

/* Viewer: compact two-column head so the model lands in view from "Explore in 3D". */
.viewer { padding-top: clamp(80px, 8vw, 120px); }
@media (min-width: 981px) {
  .viewer .section__head {
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    column-gap: clamp(32px, 5vw, 96px); align-items: end; margin-bottom: 40px;
  }
  .viewer .section__head .eyebrow { grid-column: 1 / -1; }
  .viewer .section__title { margin-bottom: 0; max-width: none; font-size: clamp(40px, 4.2vw, 64px); }
  model-viewer { height: clamp(440px, calc(100vh - 220px), 760px); }
}

/* Phones: image stacked above the copy, so text never sits on the product. */
@media (max-width: 760px) {
  .hero { display: block; min-height: 0; padding-top: var(--head-h); }
  .hero__media { position: relative; inset: auto; bottom: auto; height: min(94vw, 46svh); z-index: 0; }
  .hero__img { object-position: 87% 50%; }
  .hero__media::after {
    background:
      linear-gradient(0deg, var(--ink) 0%, rgba(10,13,20,0) 30%),
      linear-gradient(180deg, rgba(10,13,20,0.75) 0%, rgba(10,13,20,0) 26%);
  }
  .hero__body { position: relative; z-index: 1; margin-top: -40px; padding-top: 0; padding-bottom: 48px; }
  .hero__title { font-size: clamp(60px, 19vw, 92px); }
}

/* Keep the right-hand product in frame as desktop proportions change. */
@media (min-width: 761px) {
  .hero__img { object-position: 88% 50%; }
  .hero__title { font-size: clamp(64px, 8.4vw, 136px); }
  .hero__lede { max-width: 27rem; }
}
@media (max-width: 760px) {
  .hero { background: var(--ink); }
}

@media (max-width: 760px) {
  .viewer__stage .control--view {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    padding: 4px;
    border-radius: 6px;
    background: rgba(12, 16, 24, 0.94);
  }
  .viewer__stage .control--view legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .viewer__stage .control--view .tools { gap: 4px; }
  .viewer__stage .control--view .tool { min-width: 44px; min-height: 44px; }
  .viewer__stage .control--view .tool--wide { padding-inline: 10px; }
  .viewer__stage.has-fallback .control--view { display: none; }
}

/* Tall tablets need their own picture row so the whole pod fits above its description. */
@media (min-width: 761px) and (max-width: 1100px), (min-width: 761px) and (max-aspect-ratio: 6/5) {
  .hero {
    display: block;
    min-height: 0;
    padding-top: var(--head-h);
    background: var(--ink);
  }
  .hero__media {
    position: relative;
    inset: auto;
    z-index: 0;
    height: clamp(330px, 55vw, 520px);
  }
  .hero__img { object-fit: cover; object-position: 98% 50%; }
  .hero__media::after {
    background: linear-gradient(0deg, var(--ink) 0%, transparent 14%);
  }
  .hero__body {
    position: relative;
    padding-block: 22px 56px;
  }
  .hero__body > * { max-width: 38rem; }
  .hero__title { margin-bottom: 18px; font-size: clamp(62px, 8.5vw, 86px); }
  .hero__lede { max-width: 40rem; }
}
