/* =====================================================================
   TOKENS - change colors, type and radii here.
   ===================================================================== */
:root {
  color-scheme: dark;
  --bg: #0A0C0F;          /* near-black base */
  --bg-2: #12151A;        /* graphite */
  --panel: #171B21;       /* raised graphite */
  --line: #262B33;        /* hairlines */
  --line-2: #363C47;      /* control borders */
  --text: #ECEAE4;        /* off-white */
  --muted: #979DA7;
  --accent: #2F6BEF;      /* electric blue, fills */
  --accent-hover: #4A80F5;
  --accent-text: #7AA3FF; /* electric blue, text and lines on dark */
  --grid: rgba(236, 234, 228, 0.035);

  --r-s: 6px;
  --r: 10px;
  --r-l: 14px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --motion-fast: 160ms;
  --motion-ui: 240ms;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html:has(.drawer[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { margin: 0; font-stretch: 125%; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 5.2rem); font-weight: 780; line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 720; }
h3 { font-size: 1.125rem; font-weight: 650; font-stretch: 110%; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--text); }
svg { display: block; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: var(--r-s); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 136px); border-top: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { margin-top: 16px; color: var(--muted); }
.lede { color: var(--muted); font-size: 1.125rem; max-width: 52ch; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--r);
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast) var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: var(--panel); color: var(--text); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; }
.btn-block { width: 100%; }
.btn-label { display: inline-flex; align-items: center; gap: 10px; }
.btn-total { font-weight: 500; opacity: .8; }
.btn-total::before { content: ""; display: inline-block; width: 1px; height: 14px; margin-right: 10px; background: currentColor; opacity: .5; vertical-align: -2px; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn-label { visibility: hidden; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px;
  border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tag {
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); font-size: .75rem; font-weight: 600;
}
.link-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--muted); font-size: .875rem; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--text); }
.icon-btn, .cart-btn, .menu-btn {
  display: inline-grid; place-items: center; position: relative;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--r);
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.icon-btn:hover, .cart-btn:hover, .menu-btn:hover { border-color: var(--text); background: var(--panel); }
.icon-btn svg, .cart-btn svg, .menu-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 12, 15, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.logo {
  display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--text); text-decoration: none;
  font-weight: 760; font-stretch: 125%; font-size: 1.2rem; letter-spacing: -0.02em;
}
.logo:hover { color: var(--text); }
.logo-mark { width: 28px; height: 28px; }
.nav ul { display: flex; gap: 2px; }
.nav a {
  display: block; padding: 10px 14px; border-radius: var(--r-s);
  color: var(--muted); text-decoration: none; font-weight: 500;
  transition: color .15s, background-color .15s;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: .75rem; font-weight: 700; line-height: 1;
}
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(40px, 6vw, 88px) clamp(40px, 5vw, 64px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "title title" "copy media";
  gap: clamp(28px, 4vw, 48px) clamp(32px, 5vw, 64px); align-items: start;
}
.hero h1 { grid-area: title; }
.hero-copy { grid-area: copy; padding-top: 8px; }
.hero-media { grid-area: media; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-media {
  position: relative; margin: 0; aspect-ratio: 16 / 11;
  border-radius: var(--r-l); overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(100deg, var(--bg-2) 30%, var(--panel) 50%, var(--bg-2) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.hero-media.is-loaded { animation: none; background: var(--bg-2); }
.hero-media > svg, .hero-media > img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.hero-media.is-loaded > svg, .hero-media.is-loaded > img { opacity: 1; }
@keyframes shimmer { to { background-position: -300% 0; } }
.placeholder-chip {
  position: absolute; left: 14px; bottom: 14px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(10, 12, 15, .7); border: 1px solid var(--line-2);
  color: var(--muted); font-size: .75rem;
}
.benefit-row {
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(40px, 5vw, 64px);
}
.benefit-row li {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 0; border-top: 1px solid var(--line);
  color: var(--text); font-weight: 500; font-size: .9375rem;
}
.benefit-row li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.benefit-row svg, .benefits svg, .delivery svg, .floor-note svg {
  flex: none; width: 22px; height: 22px;
  fill: none; stroke: var(--accent-text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Configurator ---------- */
.configure { background: var(--bg-2); }
.config-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.preview-panel { position: sticky; top: calc(var(--header-h) + 24px); }
.preview {
  aspect-ratio: 196 / 170;
  padding: 2%;
  border: 1px solid var(--line); border-radius: var(--r-l);
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 5.1% 5.9%;
  color: var(--muted);
}
.preview svg { width: 100%; height: 100%; overflow: visible; }
.preview .dim-text { font-weight: 500; font-stretch: 100%; }
.preview .mat-g { transform-origin: 0 0; }
.preview [data-chair] { transition: color var(--motion-ui); }
.preview-caption { margin-top: 14px; color: var(--muted); font-size: .875rem; }

.config h2 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); }
.config-sub { margin-top: 8px; color: var(--muted); }
.price { margin-top: 24px; font-size: 2rem; font-weight: 700; font-stretch: 115%; letter-spacing: -0.02em; line-height: 1.1; }
.price-note { margin-top: 4px; color: var(--muted); font-size: .8125rem; }
.config fieldset { margin: 32px 0 0; padding: 0; border: 0; min-width: 0; }
.config legend { padding: 0; margin-bottom: 12px; font-weight: 600; }

.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.swatch { cursor: pointer; }
.swatch-art {
  display: block; aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-2);
  transition: box-shadow var(--motion-ui), transform var(--motion-ui) var(--ease);
}
.swatch-art svg { width: 100%; height: 100%; }
.swatch:hover .swatch-art { box-shadow: 0 0 0 1px var(--text); }
.swatch:active .swatch-art { transform: scale(.96); }
.swatch input:checked + .swatch-art { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--accent); }
.swatch input:focus-visible + .swatch-art { outline: 2px solid var(--accent-text); outline-offset: 6px; }

.sizes { display: grid; gap: 8px; }
.size-opt {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 16px;
  padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color var(--motion-ui), background-color var(--motion-ui), transform var(--motion-fast) var(--ease);
}
.size-opt:hover { border-color: var(--muted); }
.size-opt:active { transform: scale(.99); }
.size-opt:has(input:checked) { border-color: var(--accent); background: rgba(47, 107, 239, .08); }
.size-dims::before {
  content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 10px;
  border: 1px solid var(--muted); border-radius: 50%; vertical-align: -1px;
  transition: border-color var(--motion-ui), background-color var(--motion-ui), box-shadow var(--motion-ui);
}
.size-opt:has(input:checked) .size-dims::before {
  border-color: var(--accent-text); background: var(--accent-text); box-shadow: inset 0 0 0 3px var(--bg-2);
}
.size-opt:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.size-dims { font-weight: 650; }
.size-price { font-weight: 600; text-align: right; }
.size-fit { grid-column: 1 / -1; color: var(--muted); font-size: .875rem; }

.buy-row { display: flex; gap: 12px; margin-top: 32px; }
.btn-add { flex: 1; }
.qty {
  display: inline-flex; align-items: center; flex: none;
  height: 52px; border: 1px solid var(--line-2); border-radius: var(--r);
}
.qty button {
  width: 44px; height: 100%; border: 0; background: none; cursor: pointer;
  font-size: 1.25rem; border-radius: var(--r);
  transition: background-color .15s;
}
.qty button:hover:not(:disabled) { background: var(--panel); }
.qty button:disabled { color: var(--line-2); cursor: default; }
.qty input, .qty output {
  width: 36px; border: 0; background: none; color: inherit; font: inherit; font-weight: 600;
  text-align: center; -moz-appearance: textfield; appearance: textfield;
}
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 36px; }
.qty-sm button { width: 34px; font-size: 1.05rem; }
.qty-sm output { width: 26px; font-size: .9375rem; }

.delivery, .floor-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; font-size: .9375rem; color: var(--muted); }
.floor-note {
  margin-top: 12px; padding: 14px 16px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  color: var(--text);
}
.specs { margin-top: 24px; border-top: 1px solid var(--line); }
.specs summary { padding: 16px 0 4px; cursor: pointer; font-weight: 600; }
.specs ul { display: grid; gap: 6px; padding: 10px 0 0; color: var(--muted); font-size: .9375rem; }
.specs li { padding-left: 16px; position: relative; }
.specs li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 1px; background: var(--accent-text); }

/* ---------- Design gallery ---------- */
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l);
  overflow: hidden; transition: border-color .15s;
}
.card:hover { border-color: var(--line-2); }
.card.is-selected { border-color: var(--accent); }
.card-art { aspect-ratio: 90 / 112; }
.card-art svg { width: 100%; height: 100%; }
.card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 16px 16px; }
.card-body > p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.card-body > p:first-of-type { flex: 1; }
.card-body .btn { width: 100%; margin-top: 8px; }
.card-current { visibility: hidden; opacity: 0; transition: opacity var(--motion-ui); color: var(--accent-text) !important; font-size: .8125rem !important; font-weight: 600; }
.card.is-selected .card-current { visibility: visible; opacity: 1; }

/* ---------- Construction ---------- */
.construction-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
/* The drawing is pinned while its track scrolls past; scroll position drives the layers. */
.js .explode-track { height: 190vh; }
.js .explode {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: grid; place-items: center; padding-block: 24px;
}
.explode svg { width: 100%; height: auto; max-height: 100%; overflow: visible; }
.js .construction-copy { position: sticky; top: calc(var(--header-h) + 32px); }
.js .explode .layer { transform: translateY(calc(var(--c) * (1 - var(--p, 1)))); will-change: transform; }
.callout path { fill: none; stroke: var(--muted); stroke-width: 1; }
.callout circle { fill: var(--muted); }
.callout text { fill: var(--text); font-size: 19px; font-weight: 600; }
.callout text.sub { fill: var(--muted); font-size: 15px; font-weight: 400; }
.js .explode .callout { opacity: calc((var(--p, 1) - .6) * 2.5); }
.construction-copy .lede { margin-top: 20px; }
.layer-list { margin: 32px 0 0; display: grid; gap: 0; }
.layer-list div { padding: 18px 0; border-top: 1px solid var(--line); }
.layer-list dt { font-weight: 650; }
.layer-list dd { margin: 6px 0 0; color: var(--muted); font-size: .9375rem; }

/* ---------- Benefits ---------- */
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.benefits li { padding: 28px 0 36px; border-top: 1px solid var(--line); }
.benefits svg { width: 28px; height: 28px; margin-bottom: 20px; }
.benefits p { margin-top: 10px; color: var(--muted); max-width: 40ch; }

/* ---------- Size comparison ---------- */
.sizes-section { background: var(--bg-2); }
.size-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.size-fig {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
  background: var(--bg); transition: border-color .15s;
}
.size-fig.is-selected { border-color: var(--accent); }
.size-svg {
  padding: 20px 16px 8px;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.size-svg svg { width: 100%; height: auto; }
.size-svg .desk { fill: rgba(23, 27, 33, .88); stroke: var(--line-2); stroke-width: .4; }
.size-svg .desk-label { fill: var(--muted); }
.size-svg .dim-label { fill: var(--text); font-weight: 600; }
.size-fig-text { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px; border-top: 1px solid var(--line); }
.size-fig-text > p:nth-child(2) { flex: 1; color: var(--muted); font-size: .9375rem; }
.size-fig-head { display: flex; justify-content: space-between; gap: 12px; font-size: 1.0625rem; }
.size-fig-head span { color: var(--muted); }
.size-fig .btn { align-self: flex-start; margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.0625rem;
  transition: color .15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-text); }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--muted); max-width: 64ch; }

/* Native disclosures remain usable in browsers without intrinsic-size animation. */
@supports (interpolate-size: allow-keywords) {
  .faq details, .specs { interpolate-size: allow-keywords; }
  .faq details::details-content, .specs::details-content {
    block-size: 0; opacity: 0; overflow: clip;
    transition: block-size var(--motion-ui) var(--ease), opacity var(--motion-ui), content-visibility var(--motion-ui) allow-discrete;
  }
  .faq details[open]::details-content, .specs[open]::details-content { block-size: auto; opacity: 1; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: 64px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p:last-child { margin-top: 12px; color: var(--muted); max-width: 32ch; }
.site-footer h2 { font-size: .9375rem; font-weight: 600; font-stretch: 100%; letter-spacing: 0; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 8px; }
.site-footer nav a { color: var(--text); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent-text); text-decoration: underline; }
.footer-base { margin-top: 56px; padding-block: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }

/* ---------- Cart drawer ---------- */
.drawer {
  margin: 0 0 0 auto; padding: 0; border: 0;
  width: min(440px, 100vw); height: 100dvh; max-height: none; max-width: none;
  background: var(--bg-2); color: var(--text);
  border-left: 1px solid var(--line);
}
.drawer[open] { animation: drawer-in .28s var(--ease); }
.drawer::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); animation: backdrop-in .24s ease-out; }
.drawer.is-closing::backdrop { animation: backdrop-out .18s ease-in forwards; }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { to { opacity: 0; } }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.375rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 20px; }
.cart-empty { padding: 40px 0; display: grid; gap: 20px; justify-items: start; color: var(--muted); }
.line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.line-art { width: 76px; height: 76px; border-radius: var(--r-s); overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); }
.line-art svg { width: 100%; height: 100%; }
.line-title { font-weight: 600; }
.line-meta { margin: 6px 0 0; display: grid; gap: 2px; font-size: .875rem; }
.line-meta div { display: flex; gap: 8px; }
.line-meta dt { color: var(--muted); min-width: 48px; }
.line-meta dd { margin: 0; font-weight: 600; }
.line-actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.line-price { font-weight: 650; white-space: nowrap; }
.drawer-foot { padding: 20px; border-top: 1px solid var(--line); background: var(--bg); }
.subtotal { display: flex; justify-content: space-between; font-size: 1.125rem; font-weight: 650; }
.drawer-note { margin: 4px 0 16px; color: var(--muted); font-size: .875rem; }
.checkout-msg {
  margin-top: 12px; padding: 12px 14px;
  border: 1px dashed var(--line-2); border-radius: var(--r);
  color: var(--text); font-size: .875rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero-grid, .config-grid, .construction-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { grid-template-areas: "title" "copy" "media"; }
  .preview-panel { position: static; }
  .js .explode-track { height: 170svh; }
  .js .explode { height: calc(100svh - var(--header-h)); }
  .js .construction-copy { position: static; }
  .benefit-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefit-row li:nth-child(3) { padding-left: 0; border-left: 0; }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .size-figs { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; background: var(--bg-2); border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: block; animation: menu-in var(--motion-ui) var(--ease); }
  .nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .nav a { padding: 14px 0; font-size: 1.125rem; color: var(--text); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav li:last-child a { border-bottom: 0; }
  .cards {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 72%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .card { scroll-snap-align: start; }
  .benefits { grid-template-columns: minmax(0, 1fr); }
  .swatches { gap: 8px; }
}
/* Keep the response to a size choice visible on taller phones and tablets. */
@media (max-width: 960px) and (min-height: 700px) {
  .preview-panel {
    position: sticky; top: var(--header-h); z-index: 5;
    padding-block: 10px; background: var(--bg-2);
  }
  .preview { height: clamp(180px, 28svh, 260px); aspect-ratio: auto; padding: 4px; }
  .preview .dim-text { font-size: 9px; }
  .preview-caption { display: none; }
  .config :is(button, input, summary, .size-opt, .swatch) {
    scroll-margin-top: calc(var(--header-h) + clamp(180px, 28svh, 260px) + 24px);
    scroll-margin-bottom: 16px;
  }
}
@media (max-width: 440px) {
  .actions .btn { flex: 1 1 100%; }
  .benefit-row li { font-size: .875rem; gap: 10px; }
  .buy-row { flex-wrap: wrap; }
  .btn-add { flex: 1 1 100%; }
}

@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .drawer::backdrop { backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .explode .layer { transform: none; }
  .js .explode-track { height: auto; }
  .js .explode, .js .construction-copy { position: static; height: auto; }
  .js .explode .callout { opacity: 1; }
}
