/* Astrabyss META v2 – black and white, mobile-first.
   Base styles target ~390px; layers up at 720px and 1080px. */

/* fonts: self-hosted (was Google Fonts), latin + latin-ext subsets */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #050607;
  --bg-raised: #0d0e10;
  --bg-panel: #121316;
  --line: #2b2e32;
  /* decorative strokes (corner ticks, node outlines, octagon), kept at their
     original values so the text colours below can rise independently */
  --tick: #9a9a98;
  --tick-faint: #66686a;
  --text: #f2f2f0;
  --text-muted: #bdbdbb;
  --text-faint: #909294;
  --white: #ffffff;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --font-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --z-grain: 3;
  --z-gauge: 8;
  --z-nav: 10;
  --z-menu: 30;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--white); color: var(--bg); }

img { max-width: 100%; height: auto; display: block; }

/* grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-grain);
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--white);
  color: var(--bg);
  padding: 0.6rem 1rem;
  font-weight: 500;
}
.skip-link:focus { left: 0; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ---------- typography ---------- */

h1, h2, h3 { font-weight: 500; text-wrap: balance; }

h2 {
  font-size: clamp(1.9rem, 6.5vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: clamp(1.8rem, 5vw, 3.5rem);
}

h3 {
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

p { max-width: 62ch; }

.depth-mark {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.2rem;
}

.depth-mark-key {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  color: var(--text-muted);
}
.depth-key {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--white);
}

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.lede {
  font-size: clamp(1.25rem, 5vw, 1.7rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1.4rem;
  text-wrap: pretty;
}

/* ---------- buttons and links ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 1.7rem;
  min-height: 44px;
  background: var(--white);
  color: var(--bg);
  font-weight: 500;
  border: 1px solid var(--white);
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}
.btn:hover { background: transparent; color: var(--white); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

.ref-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0 0.4rem;
  margin-top: auto;
  align-self: flex-start;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.ref-link::after { content: " ↓"; color: var(--text-faint); }
.ref-link:hover { border-color: var(--white); }
.ref-link:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

/* ---------- depth gauge ---------- */

.depth-gauge {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2.6rem;
  z-index: var(--z-gauge);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gauge-rail {
  position: absolute;
  top: 12vh;
  bottom: 12vh;
  right: calc(1.3rem - 1px);
  width: 2px;
  background: var(--line);
  overflow: hidden;
}

.gauge-fill {
  position: absolute;
  inset: 0;
  background: var(--white);
  transform-origin: top;
  transform: scaleY(0);
  will-change: transform;
}

.gauge-readout {
  position: absolute;
  bottom: 6vh;
  right: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  writing-mode: vertical-rl;
}

html:not(.js) .depth-gauge { display: none; }

/* ---------- nav ---------- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-height: 44px;
}
.nav-brand img { height: 24px; width: auto; }
.nav-brand .wordmark { height: 13px; }

.nav-links { display: none; }

/* burger: opens the site menu; hidden when scripting is off (the nav links show instead) */
.nav-burger, .site-menu-close {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0 0.1rem 0 0.5rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-burger:hover, .site-menu-close:hover { color: var(--text); }
.nav-burger:focus-visible, .site-menu-close:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.nav-burger-icon {
  width: 20px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.site-menu-x { position: relative; width: 14px; height: 14px; }
.site-menu-x::before, .site-menu-x::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 6.5px;
  height: 1px;
  background: currentColor;
  transform: rotate(45deg);
}
.site-menu-x::after { transform: rotate(-45deg); }

@media (scripting: none) {
  .nav-burger { display: none; }
  .nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 1rem; }
  .nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.78rem; padding: 0.6rem 0; }
}

/* site menu overlay */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: menu-in 0.2s ease;
}
.site-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }
html.menu-open, html.menu-open body { overflow: hidden; }

.site-menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.site-menu-body {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.2rem;
  padding-top: clamp(2rem, 6vw, 4rem);
  padding-bottom: 3rem;
}
.site-menu-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}
.site-menu-head {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}
.site-menu-group a:not(.btn) {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.05rem;
  padding: 0.55rem 0;
  transition: color 0.2s ease;
}
.site-menu-sections a:not(.btn) {
  color: var(--text);
  font-size: clamp(1.8rem, 7vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  padding: 0.3rem 0;
}
.site-menu-group a:not(.btn):hover { color: var(--white); }
.site-menu-group a[aria-current] { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.35em; }
.site-menu-group a:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.site-menu-cta { border-top: 0; padding-top: 0.4rem; }

@media (min-width: 900px) {
  .site-menu-body { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 5rem); align-content: start; }
  .site-menu-sections { grid-row: span 2; }
}

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

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  padding: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 70% 30%, rgba(5, 6, 7, 0.25) 30%, rgba(5, 6, 7, 0.7) 72%),
    linear-gradient(to top, var(--bg) 8%, rgba(5, 6, 7, 0.72) 45%, rgba(5, 6, 7, 0.45) 100%);
}

.hero-inner {
  padding: 0 clamp(1.25rem, 5vw, 4.5rem);
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

.hero .depth-mark {
  color: var(--text-muted);
  text-shadow: 0 1px 8px rgba(5, 6, 7, 0.9);
}

.hero-brand {
  margin-bottom: 1.3rem;
}
.hero-brand img {
  width: min(46vw, 540px);
  height: auto;
  display: block;
}

.hero-sub {
  font-size: clamp(1.02rem, 4vw, 1.3rem);
  color: var(--text-muted);
  max-width: 40ch;
  text-wrap: pretty;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0 clamp(1.25rem, 5vw, 4.5rem) 2.2rem;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
  transition: color 0.25s ease;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

.cue-line {
  width: 1px;
  height: 44px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  margin-left: 2px;
}
.cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--white);
  animation: cue-drop 2.2s ease-in-out infinite;
}
@keyframes cue-drop {
  0% { top: -100%; }
  55% { top: 100%; }
  100% { top: 100%; }
}

/* ---------- sections ---------- */

section { padding: clamp(4.5rem, 14vw, 9rem) 0; }
.hero { padding: 0; }

.idea-body p + p { margin-top: 1.2rem; }
.idea-body p:not(.lede) { color: var(--text-muted); }
/* v6: the D.A.T. claim reads in white, not muted */
.idea-body p.dat-note { color: var(--white); }
.idea-body p.dat-note strong { color: var(--white); }

/* lab teaser */

.lab-teaser { background: var(--bg-raised); }
.lab-teaser .lede { max-width: 46ch; margin-bottom: 1.8rem; }

/* the model */

.model-title {
  font-size: clamp(4rem, 18vw, 10rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 0.95;
  margin-left: -0.04em;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.model-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 6vw, 5rem);
}
.model-grid .idea-body .ref-link { margin-top: 1.6rem; display: inline-block; }

.model-media { max-width: 420px; }
.model-media-wide { max-width: none; }
.model-video {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}

/* gallery */

.gallery {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 860px;
  background: var(--bg);
}
.gal-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.gal-slide.is-active { opacity: 1; }
.gal-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gal-counter {
  position: absolute;
  left: 0;
  bottom: -2rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

/* geometry */

.geometry { background: var(--bg-raised); }

.geometry-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 6vw, 4rem);
}

.octagon-wrap { max-width: 560px; margin: 0 auto; width: 100%; }

#octagon { width: 100%; height: auto; display: block; }

#octagon .oct-draw > * {
  stroke: var(--tick);
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s ease, stroke 0.3s ease, opacity 0.3s ease;
}
#octagon .oct-draw .oct-case { transition-delay: 0.1s; }
#octagon .oct-draw .oct-serration { transition-delay: 0.3s; stroke-width: 0.9; }
#octagon .oct-draw .oct-bezel { transition-delay: 0.45s; }
#octagon .oct-draw .oct-rehaut { transition-delay: 0.65s; }
#octagon .oct-draw .oct-crown { transition-delay: 0.9s; }
.octagon-wrap.is-drawn #octagon .oct-draw > * { stroke-dashoffset: 0; }
html:not(.js) #octagon .oct-draw > * { stroke-dasharray: none; stroke-dashoffset: 0; }

#octagon .oct-mark {
  opacity: 0;
  transition: opacity 0.9s ease 2.4s;
}
.octagon-wrap.is-drawn #octagon .oct-mark { opacity: 1; }
html:not(.js) #octagon .oct-mark { opacity: 1; }
#octagon.dim-active .oct-mark { opacity: 0.35; transition-delay: 0s; }

#octagon .oct-ticks line {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

#octagon .dim {
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
#octagon .dim line, #octagon .dim rect {
  stroke: var(--white);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
#octagon .dim text {
  fill: var(--white);
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.08em;
}
#octagon.dim-active .dim.is-active { opacity: 1; }
#octagon.dim-active .oct-draw > * { stroke: var(--tick-faint); }
#octagon.dim-active[data-active="depth"] .oct-bezel { stroke: var(--white); }
#octagon.dim-active[data-active="width"] .oct-case { stroke: var(--white); }
#octagon.dim-active[data-active="diagonal"] .oct-case { stroke: var(--white); }
#octagon.dim-active[data-active="lug"] .oct-case { stroke: var(--white); }

.dim-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 1.6rem 0 1.4rem;
}

.dim-btn {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-align: left;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  min-height: 44px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dim-btn small {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  text-transform: none;
  margin-top: 0.15rem;
}
.dim-btn:hover { border-color: var(--tick); }
.dim-btn[aria-pressed="true"] { border-color: var(--white); background: var(--bg-panel); }
.dim-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

.geometry-copy p { color: var(--text-muted); }
.geometry-copy p + p { margin-top: 1rem; }
.geometry-note {
  font-size: 0.95rem;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

/* engineering */

.feature-row {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-bottom: clamp(3.5rem, 10vw, 6.5rem);
}

/* technical plate frames */

.plate {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  padding: clamp(0.6rem, 2vw, 1rem);
}
.plate::before, .plate::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
}
.plate::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--tick);
  border-left: 1px solid var(--tick);
}
.plate::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid var(--tick);
  border-right: 1px solid var(--tick);
}
.plate img { width: 100%; height: auto; display: block; }
.plate figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  margin-top: clamp(0.6rem, 2vw, 1rem);
  padding-top: 0.7rem;
}

.feature-copy { color: var(--text-muted); }
.feature-copy p + p { margin-top: 1rem; }

.plate-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  margin-top: 1rem;
}
.plate-strip .plate img { aspect-ratio: 4 / 3; object-fit: cover; }

/* specs */

.spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.spec {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 1.4rem 1.6rem;
  transition: background 0.25s ease;
}
.spec:hover { background: var(--bg-raised); }

.spec dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.7rem;
}
.spec dd { color: var(--text); font-size: 0.98rem; }
.spec .num { color: var(--white); font-size: 0.92em; }

/* references */

.references { background: var(--bg-raised); }

.model-intro { max-width: 62ch; }
.ref-block {
  margin-top: clamp(4rem, 10vw, 7rem);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}
.ref-head h3 {
  font-size: clamp(1.9rem, 6.5vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 0;
}

/* model cards: swipeable photos per model */
.ref-slides { position: relative; margin: 0; }
.ref-track {
  display: flex;
  aspect-ratio: 4 / 5;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: var(--bg);
}
.ref-track::-webkit-scrollbar { display: none; }
.ref-track:focus-visible { outline: 2px solid var(--white); outline-offset: -2px; }
.ref-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}
.ref-track img.is-contain { object-fit: contain; padding: 4% 0; }
.ref-arrow {
  position: absolute;
  top: calc(50% - 1.6rem);
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: rgba(5, 6, 7, 0.6);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, border-color 0.2s ease;
}
.ref-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.5rem;
  height: 0.5rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}
.ref-prev { left: 0.6rem; }
.ref-prev::before { transform: translateX(15%) rotate(-135deg); }
.ref-next { right: 0.6rem; }
.ref-next::before { transform: translateX(-15%) rotate(45deg); }
.ref-slides:hover .ref-arrow, .ref-arrow:focus-visible { opacity: 1; }
.ref-arrow:hover { border-color: var(--tick); }
.ref-arrow:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.ref-arrow[disabled] { opacity: 0 !important; pointer-events: none; }
@media (hover: none) { .ref-arrow { display: none; } }
.ref-dots {
  display: flex;
  justify-content: center;
  gap: 0.15rem;
  padding-top: 0.5rem;
}
.ref-dot {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.ref-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background 0.2s ease, transform 0.2s ease;
}
.ref-dot[aria-current="true"]::before { background: var(--white); transform: scale(1.3); }
.ref-dot:focus-visible { outline: 2px solid var(--white); outline-offset: -4px; }

.ref-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ref-price {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.ref-price .num { font-size: 1.5rem; color: var(--white); white-space: nowrap; }
.ref-price span + span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.ref-assure {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  margin: calc(clamp(2rem, 5vw, 3.5rem) * -0.5) 0 clamp(2rem, 5vw, 3.5rem);
}
.ref-assure li { border-bottom: 1px solid var(--line); }
.ref-assure a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 0;
  text-decoration: none;
  color: var(--text);
}
.ref-assure strong { font-weight: 500; }
.ref-assure span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.ref-assure a:hover strong { color: var(--white); }
.ref-assure .ref-assure-more a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  justify-content: flex-start;
}
.field[hidden] { display: none; }

.ref-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.ref-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.ref-card:hover { transform: translateY(-3px); }

.swap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  cursor: pointer;
}
.swap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.45s ease;
}
.swap-front { object-fit: cover; }
.swap-back { object-fit: cover; opacity: 0; }
.swap:hover .swap-back,
.swap:focus-visible .swap-back,
.swap.is-flipped .swap-back { opacity: 1; }
.swap:focus-visible { outline: 2px solid var(--white); outline-offset: -2px; }

.ref-meta {
  padding: 1.1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.ref-meta h3 { margin-bottom: 0; font-size: 1.15rem; }
.ref-meta .num { color: var(--text-faint); font-size: 0.8rem; letter-spacing: 0.12em; }

/* booking */

.split {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 6vw, 6rem);
}

.reserve-note { color: var(--text-muted); margin-top: 1rem; max-width: 40ch; }

.pay-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.6rem;
}
.pay-list li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--line);
  padding: 0.35rem 0.7rem;
}

.booking-form {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: clamp(1.4rem, 5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.field { display: flex; flex-direction: column; gap: 0.45rem; }

.field label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input, .field select, .field textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  padding: 0.9rem 1rem;
  min-height: 44px;
  transition: border-color 0.2s ease;
  border-radius: 0;
  width: 100%;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%), linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--white);
}
.field.has-error input, .field.has-error select { border-color: var(--text); border-style: dashed; }
.field-error { color: var(--text-muted); font-size: 0.85rem; }
.field-error::before { content: "Error: "; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }

.form-alt { font-size: 0.9rem; color: var(--text-faint); }
.form-alt a { color: var(--text-muted); }
.form-alt a:hover { color: var(--white); }
.form-success { color: var(--text); font-size: 0.95rem; border-left: 1px solid var(--white); padding-left: 1rem; }

/* footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 8vw, 5rem) 0 2.5rem;
}

.footer-inner { display: flex; flex-direction: column; gap: 2.5rem; }

.footer-logo { width: 128px; height: auto; }

.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 720px;
}
.footer-cols h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.footer-cols a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.45rem 0;
  transition: color 0.2s ease;
}
.footer-cols a:hover { color: var(--text); }

.footer-legal {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.footer-legal a { color: var(--text-faint); }
.footer-legal a:hover { color: var(--text-muted); }

/* ---------- reveal animation ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .ref-card img { transition: opacity 0.2s ease; }
  .cue-line::after { animation: none; top: 0; }
  .site-menu { animation: none; }
  .gauge-fill { transition: none; }
  #octagon .oct-draw > * { stroke-dasharray: none; stroke-dashoffset: 0; transition: stroke 0.3s ease, opacity 0.3s ease; }
  #octagon .oct-mark { opacity: 1; transition: none; }
}

/* ---------- 720px and up ---------- */

@media (min-width: 720px) {
  .nav-links { display: flex; gap: 1.6rem; margin-left: auto; }

  .footer-logo { width: 190px; }
  .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    padding: 0.6rem 0.1rem;
    transition: color 0.2s ease;
  }
  .nav-links a:hover, .nav-links a.is-active { color: var(--text); }
  .nav-links a:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

  .geometry-grid {
    flex-direction: row;
    align-items: center;
  }
  .octagon-wrap { flex: 1 1 52%; margin: 0; }
  .geometry-copy { flex: 1 1 48%; }

  .feature-row { flex-direction: row; align-items: center; gap: clamp(2rem, 5vw, 5rem); }
  .feature-row .plate { flex: 1 1 56%; }
  .feature-row .feature-copy { flex: 1 1 44%; }
  .feature-row.rev .plate { order: 2; }
  .feature-row.rev .feature-copy { order: 1; }

  .plate-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }

  .model-grid { flex-direction: row; align-items: center; }
  .model-grid .idea-body { flex: 1 1 55%; }
  .model-media { flex: 1 1 45%; max-width: 460px; margin-left: auto; }
  .model-grid:has(.model-media-wide) .idea-body { flex: 1 1 42%; }
  .model-media-wide { flex: 1 1 58%; max-width: 680px; }

  .gallery { aspect-ratio: 16 / 10; }

  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .ref-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 2rem; }
  .ref-head h3 { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
  .ref-price { flex-direction: column; align-items: flex-end; gap: 0; }
  .ref-assure { grid-template-columns: repeat(4, 1fr) auto; column-gap: 2rem; }
  .ref-assure .ref-assure-more a { height: 100%; justify-content: center; }
  .ref-grid { flex-direction: row; gap: 1.5rem; }
  .ref-card { flex: 1; }

  .split { flex-direction: row; align-items: flex-start; }
  .split-side { flex: 1 1 42%; }
  .booking-form { flex: 1 1 58%; }

  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .footer-cols a { padding: 0.2rem 0; }
}

/* ---------- 1080px and up ---------- */

@media (min-width: 1080px) {
  .spec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .spec { padding: 1.6rem 1.5rem 1.8rem; }
  .gauge-readout { font-size: 0.74rem; }
  .plate-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- article pages (/lab, /build) ---------- */

.page { padding-top: clamp(5.5rem, 14vw, 8rem); }

.page-head { margin-bottom: clamp(2rem, 6vw, 3.5rem); }
.page-head h1 {
  font-size: clamp(2.2rem, 8vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.page-intro { color: var(--text-muted); margin-top: 1rem; max-width: 50ch; }

.page-video video {
  width: 100%;
  height: auto;
  display: block;
  background: var(--bg);
  border: 1px solid var(--line);
}
.page-video figcaption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 0.7rem;
}

.page-body { margin: clamp(2.5rem, 7vw, 4rem) 0; }
.page-body p:not(.lede) { color: var(--text-muted); }
.page-body p + p { margin-top: 1.2rem; }
.page-body blockquote {
  margin-top: 2rem;
  border-left: 1px solid var(--white);
  padding-left: 1.2rem;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 400;
  max-width: 50ch;
  text-wrap: pretty;
}

/* origins: project label, omen line, founder credit (kept deliberately quiet) */
.page-body .project-tag {
  display: inline-block;
  margin-top: 2.4rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--tick-faint);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
}
.page-body .project-tag + p { margin-top: 1rem; }
.page-body .omen { max-width: 64ch; }
.page-body .omen .num { color: var(--text); }
.page-body .founder-credit {
  margin-top: 2.6rem;
  max-width: 62ch;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.founder-credit span {
  margin-right: 0.8em;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.fact-strip {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 7vw, 4rem);
}
.fact-strip > div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.3rem 1.4rem 1.5rem;
}
.fact-strip dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.6rem;
}
.fact-strip dd { font-size: 0.98rem; }

.page-links { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; padding-bottom: clamp(3rem, 8vw, 5rem); }
.page-links-wrap { padding-top: clamp(2rem, 6vw, 3.5rem); }

/* ---------- build page: the abyss line ---------- */

body[data-page="build"] .depth-gauge { display: none; }

.abyss-flow {
  --flow-pad: 2.4rem;
  position: relative;
  padding-left: var(--flow-pad);
}

.abyss-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(1.25rem, 4vw, 3rem);
  width: 2px;
  background: var(--line);
  overflow: hidden;
}
.abyss-fill {
  position: absolute;
  inset: 0;
  background: var(--white);
  transform-origin: top;
  transform: scaleY(0);
  will-change: transform;
}
html:not(.js) .abyss-fill { transform: none; }

.build-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding-top: 2.2rem;
  padding-bottom: clamp(3.5rem, 10vw, 6rem);
}
/* node diamond, centered on the rail */
.build-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--flow-pad) + 1px - 4.5px);
  top: 0.55rem;
  width: 9px;
  height: 9px;
  border: 1px solid var(--tick);
  background: var(--bg);
  transform: rotate(45deg);
  z-index: 1;
}
.build-item.is-passed::before {
  background: var(--white);
  border-color: var(--white);
}

/* depth label sits beside the node, clear of the rail */
.build-depth {
  position: absolute;
  top: 0.35rem;
  left: 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg);
  padding-right: 0.6rem;
}

.build-copy { color: var(--text-muted); }
.build-copy h2 { font-size: clamp(1.35rem, 5vw, 1.9rem); margin-bottom: 0.9rem; }

@media (min-width: 900px) {
  .abyss-flow { --flow-pad: 3.4rem; }

  .build-item {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
    padding-top: 2.6rem;
  }
  .build-item:nth-of-type(even) .plate { order: 2; }
  .build-item:nth-of-type(even) .build-copy { order: 1; }
  .build-item .plate + .plate { grid-column: 1; margin-top: 1.5rem; }
  /* 300 M: dive clasp beside the copy, the annotated deployante full width below */
  #clasp .plate-wide { grid-column: 1 / -1; order: 3; }

  .fact-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- expandable technical details ---------- */

.specs-fold {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border: 1px solid var(--line);
  background: var(--bg-panel);
}
.specs-fold summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 1.1rem 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.2s ease;
}
.specs-fold summary::-webkit-details-marker { display: none; }
.specs-fold summary:hover { background: var(--bg-raised); }
.specs-fold summary:focus-visible { outline: 2px solid var(--white); outline-offset: -2px; }

.fold-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
}
.fold-icon::before, .fold-icon::after {
  content: "";
  position: absolute;
  background: var(--tick);
  transition: transform 0.25s ease;
}
.fold-icon::before { left: 0; right: 0; top: 6px; height: 1px; }
.fold-icon::after { top: 0; bottom: 0; left: 6.5px; width: 1px; }
.specs-fold[open] .fold-icon::after { transform: scaleY(0); }

.specs-fold-body { padding: 0 1.3rem 1.5rem; }
.specs-fold-body .spec-grid { margin-bottom: 1.5rem; }
.specs-fold .spec { background: var(--bg-panel); }
.specs-fold .spec:hover { background: var(--bg-raised); }

.ref-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 1.1rem 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.2s ease;
}
.ref-box:hover { background: var(--bg-raised); border-color: var(--line); }
.ref-box:focus-visible { outline: 2px solid var(--white); outline-offset: -2px; }

/* ---------- payment strip ---------- */

.pay-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.6rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.pay-strip img {
  height: 30px;
  width: auto;
  mix-blend-mode: screen;
  opacity: 0.45;
  transition: opacity 0.25s ease;
}
.pay-strip li:hover img { opacity: 0.8; }
.pay-text {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ---------- footer brand lockup ---------- */

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-brand img:first-child { width: 34px; height: auto; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  cursor: pointer;
  padding: 1.5rem 0.2rem;
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.faq-num { font-size: 0.78rem; letter-spacing: 0.2em; color: var(--text-faint); flex: none; }
.faq-title { flex: 1; font-size: clamp(1.15rem, 4.2vw, 1.5rem); font-weight: 400; color: var(--text); }
.faq-item summary .fold-icon { align-self: center; }
.faq-item[open] .fold-icon::after { transform: scaleY(0); }
.faq-item summary:hover .faq-title { color: var(--white); }
.faq-item:not([open]) summary:hover .fold-icon::before,
.faq-item:not([open]) summary:hover .fold-icon::after { background: var(--text); }

.faq-body {
  padding: 0 0.2rem 2.2rem calc(0.78rem * 2.6 + 1.2rem);
  max-width: calc(68ch + 3rem);
  color: var(--text-muted);
}
.faq-body p + p, .faq-body ul + p, .faq-body p + ul { margin-top: 0.9rem; }
.faq-body h3 {
  margin: 2rem 0 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
}
.faq-body h3:first-child { margin-top: 0.2rem; }
.faq-body h4 { margin: 1.4rem 0 0.4rem; font-weight: 500; font-size: 1rem; color: var(--text); }
.faq-body ul { list-style: none; border-left: 1px solid var(--line); padding-left: 1.1rem; }
.faq-body li + li { margin-top: 0.35rem; }
.faq-body a, .faq-contact a { color: var(--text); text-underline-offset: 3px; }
.faq-sign { margin-top: 1.6rem !important; color: var(--text); font-weight: 400; }
.faq-contact { margin: clamp(2.5rem, 6vw, 3.5rem) 0 clamp(3rem, 8vw, 5rem); color: var(--text-muted); }

@media (max-width: 719px) {
  .faq-body { padding-left: 0.2rem; }
}

/* nav links: keep them on one line between tablet and desktop */
.nav-links a { white-space: nowrap; }
@media (min-width: 720px) and (max-width: 1079px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.78rem; letter-spacing: 0.04em; }
}

html[lang="it"] .field-error::before { content: "Errore: "; }

/* ---------- v6: made-to-order item in the assurance list ---------- */
@media (min-width: 720px) {
  .ref-assure-order { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1080px) {
  .ref-assure-order { grid-template-columns: repeat(5, 1fr) auto; }
}

/* ---------- v6: footer with the Legal column ---------- */
@media (min-width: 720px) {
  .footer-cols-legal { grid-template-columns: repeat(4, auto); justify-content: start; column-gap: clamp(2rem, 5vw, 4rem); max-width: none; }
}

/* ---------- v6: mobile sticky bar, price + request ---------- */
.sticky-buy { display: none; }
@media (max-width: 719px) {
  .sticky-buy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1.25rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: rgba(5, 6, 7, 0.94);
    border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
  }
  .sticky-buy.is-shown {
    transform: none;
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s;
  }
  .sticky-buy-price .num { font-size: 1.2rem; color: var(--white); white-space: nowrap; }
  .sticky-buy-cta { padding: 0.75rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sticky-buy, .sticky-buy.is-shown { transition: none; }
}
@media print {
  .sticky-buy { display: none !important; }
}

/* ---------- v6: legal pages (privacy, cookies, terms) ---------- */
.legal-body { max-width: 72ch; margin-bottom: clamp(3rem, 8vw, 5rem); }
.legal-body h2 {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  margin: 2.6rem 0 0.8rem;
}
.legal-body h2:first-of-type { margin-top: 2rem; }
.legal-body p, .legal-body li { color: var(--text-muted); }
.legal-body p + p { margin-top: 0.9rem; }
.legal-body ul { list-style: none; border-left: 1px solid var(--line); padding-left: 1.1rem; margin: 0.9rem 0; }
.legal-body li + li { margin-top: 0.4rem; }
.legal-body strong { color: var(--text); font-weight: 500; }
.legal-body a { color: var(--text); text-underline-offset: 3px; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.92rem; }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem 0.6rem 0; border-bottom: 1px solid var(--line); color: var(--text-muted); }
.legal-body th { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); font-weight: 500; }
.legal-draft {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  border: 1px dashed var(--tick);
  padding: 0.9rem 1rem;
  color: var(--text) !important;
}
.legal-todo {
  background: #ffe14d;
  color: #050607;
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.05em 0.4em;
  font-weight: 500;
}
.legal-updated { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--text-faint) !important; margin-top: 2.6rem; }

/* ---------- v7: numbered caseback beside the META copy ---------- */
.model-caseback { margin: 0 auto; width: 100%; max-width: 360px; }
@media (min-width: 720px) and (max-width: 899px) {
  .model-intro-grid { flex-direction: column; }
}
@media (min-width: 900px) {
  .model-caseback { max-width: 400px; }
}

/* ---------- v7: cookie notice ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.9rem clamp(1.25rem, 5vw, 4.5rem);
  padding-bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px));
  background: rgba(5, 6, 7, 0.96);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.cookie-banner p { margin: 0; max-width: 78ch; font-size: 0.94rem; color: var(--text-muted); }
.cookie-banner a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner button {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 1.5rem;
  min-height: 44px;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.cookie-banner button:hover { background: var(--white); color: var(--bg); }
.cookie-banner button:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
@media (max-width: 719px) {
  .cookie-banner { gap: 0.9rem; padding-top: 0.6rem; padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px)); }
  .cookie-banner p { font-size: 0.8rem; line-height: 1.4; }
  .cookie-banner button { padding: 0.5rem 1rem; min-height: 40px; }
  .sticky-buy.is-shown ~ .cookie-banner { bottom: calc(3.4rem + env(safe-area-inset-bottom, 0px)); }
}
@media print { .cookie-banner { display: none !important; } }
