/* ==========================================================================
   phonics.dev — 2026 redesign ("the listening lab")
   Original design, no framework. One stylesheet, mobile-first media queries.
   Named phonics.css (not style.css) on purpose: OVH caches assets 180 days
   and the old site shipped css/style.css — a new filename dodges stale cache.
   ========================================================================== */

/* ---------- fonts ---------- */

/* Self-hosted copies of the Google Fonts files (SIL Open Font License 1.1,
   licences in fonts/OFL-*.txt), so pages make no requests to Google.
   Split the way Google splits them: "latin", plus "latin-ext" for Polish
   letters (ą ć ę ł ń ś ź ż); a browser downloads a file only when the page
   uses a character in its unicode-range. Space Grotesk is a variable font,
   so one file per range covers every weight from 300 to 700. */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../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 700;
  font-display: swap;
  src: url("../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;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../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("../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("../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("../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;
}

:root {
  --bg0: #0b0c0e;            /* page */
  --bg1: #101216;            /* panels */
  --bg2: #15171c;            /* raised panels */
  --line: #22252b;           /* hairlines */
  --line2: #343841;          /* stronger lines / borders */
  --grid: #171a1f;           /* blueprint grid */
  --txt: #eae7df;            /* warm off-white */
  --muted: #a49e91;          /* secondary text */
  --dim: #8a857b;            /* tertiary text (5.3:1 on --bg0, WCAG AA) */
  --red: #e8442e;            /* Neutrik red */
  --champ: #e9e2d2;          /* champagne aluminium */
  --disp: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 48px);
  --headH: 64px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--bg0);
  color: var(--txt);
  font: 300 16.5px/1.65 var(--disp);
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-style: normal; font-weight: 400; color: var(--champ); }

::selection { background: var(--red); color: #0b0c0e; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

[id] { scroll-margin-top: calc(var(--headH) + 20px); }

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: .04;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- helpers ---------- */

.wrap {
  width: min(var(--wrap), 100%);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 400;
  padding: 12px 18px;
  background: var(--red);
  color: #0b0c0e;
  font: 500 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  transition: top .2s;
}
.skip:focus { top: 12px; }

.lab {
  font: 400 11px/1.6 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.red { color: var(--red); }
.nocaps { text-transform: none; } /* keeps unit symbols (dB, mW) correct inside uppercase labels */

.metal {
  background: linear-gradient(180deg, #f7f4ed 0%, #d5cfc0 52%, #949082 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* reveal-on-scroll (JS adds .in; without JS everything stays visible) */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 80ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
  border: 1px solid var(--line2);
  border-radius: 2px;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--txt);
  transition: border-color .25s, color .25s, background .25s;
}
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover { border-color: var(--red); color: var(--red); }
.btn:hover .arr { transform: translateX(4px); }

.btn.solid {
  background: var(--champ);
  border-color: var(--champ);
  color: #101114;
}
.btn.solid:hover { background: #fff; border-color: #fff; color: #101114; }

.btn.ghosted {
  color: var(--dim);
  border-style: dashed;
  cursor: default;
}

/* ---------- header ---------- */

.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--headH);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.site-head.scrolled {
  background: rgba(11, 12, 14, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border-bottom-color: var(--line);
}

.head-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  padding: 12px 0; /* ~40px tap target */
  font: 500 17px/1 var(--disp);
  letter-spacing: -.01em;
}
.brand .tld { color: var(--red); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
}
.site-nav a {
  font: 400 11px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 0; /* ~40px tap target */
  white-space: nowrap;
  transition: color .2s;
}
.site-nav a:hover { color: var(--red); }

/* ---------- dB ruler ---------- */

.scale { user-select: none; }
.scale .ticks {
  height: 16px;
  background-image:
    repeating-linear-gradient(90deg, var(--line2) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 16px);
  background-size: auto 100%, auto 55%;
  background-position: 0 0, 0 100%;
  background-repeat: repeat-x, repeat-x;
}
.scale .marks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font: 400 10px/1 var(--mono);
  letter-spacing: .1em;
  color: var(--dim);
}
.scale .marks .zero { color: var(--red); }

/* ---------- hero (index) ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--headH) + 40px) 0 110px;
  overflow: hidden;
}

.wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-in { position: relative; z-index: 1; }
.hero-in::before {
  /* legibility scrim between the oscilloscope trace and the text */
  content: "";
  position: absolute;
  z-index: -1;
  top: -14%;
  bottom: -14%;
  left: -18%;
  right: 24%;
  background: radial-gradient(ellipse 62% 58% at 34% 52%, rgba(11, 12, 14, .85), transparent 72%);
}

.hero h1 {
  margin: 22px 0 26px;
  font-size: clamp(44px, 11.5vw, 148px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: .95;
}
.hero h1 .dot { -webkit-text-fill-color: var(--red); color: var(--red); }

.lede {
  max-width: 46ch;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--muted);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.hero-scale {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 1;
  width: min(var(--wrap), 100%);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- sections ---------- */

.sec { padding-block: clamp(76px, 12vh, 140px); border-top: 1px solid var(--line); }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.idx { font: 400 11px var(--mono); letter-spacing: .2em; color: var(--red); }
.sec-lab {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 400;
  letter-spacing: -.01em;
}
.sec-head .rule { flex: 1; height: 1px; background: var(--line); align-self: center; }

.big {
  max-width: 32ch;
  font-size: clamp(21px, 3.2vw, 33px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -.01em;
}
.big + .big { margin-top: 1.2em; }
.big.dim { color: var(--muted); }

/* ---------- devices ---------- */

.device {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(28px, 4.5vw, 60px);
  align-items: center;
  padding-block: clamp(40px, 7vh, 72px);
  border-top: 1px solid var(--line);
}
.device:first-of-type { border-top: 0; padding-top: 0; }
.device.flip .dev-media { order: 2; }

.dev-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg1);
}
.dev-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
a.dev-media:hover img { transform: scale(1.04); }

.dev-no, .tag {
  position: absolute;
  top: 14px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: .2em;
  padding: 7px 10px;
  border-radius: 2px;
  background: rgba(11, 12, 14, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.dev-no { left: 14px; color: var(--champ); border: 1px solid var(--line2); }
.tag { right: 14px; color: var(--red); border: 1px solid rgba(232, 68, 46, .5); text-transform: uppercase; }

.dev-media.schematic {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6%;
  background-color: var(--bg1);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px;
}
.dev-media.schematic svg { width: 100%; height: auto; }

.dev-name {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 600;
  letter-spacing: .015em;
  line-height: 1.05;
}
.dev-kind { margin-top: 8px; color: var(--muted); font-size: 17px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 30px;
}
.chips li {
  font: 400 11px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

.device.soon .dev-name { color: var(--muted); }

/* ---------- initiative ---------- */

.init-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.init-side { display: grid; gap: 22px; justify-items: start; }
.init-side .dim { color: var(--muted); font-size: 18px; }
.loc { color: var(--dim); }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
}
.foot-scale { margin-bottom: clamp(40px, 7vh, 64px); }

.foot-mail {
  display: inline-block;
  font-size: clamp(25px, 4.5vw, 44px);
  font-weight: 500;
  letter-spacing: -.02em;
  transition: color .25s;
}
.foot-mail:hover { color: var(--red); }

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  margin-top: 34px;
  font: 400 11px/1.8 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}
.foot-meta a { display: inline-block; padding: 10px 0; margin: -10px 0; transition: color .2s; }
.foot-meta a:hover { color: var(--red); }

/* ---------- product page: hero ---------- */

.p-hero {
  padding: calc(var(--headH) + clamp(32px, 6vh, 96px)) 0 clamp(56px, 9vh, 96px);
}

/* padding + equal negative margin: bigger tap target, unchanged layout */
.crumb a { display: inline-block; padding: 10px 0; margin: -10px 0; transition: color .2s; }
.crumb a:hover { color: var(--red); }

.p-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 10vw, 126px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: .95;
  text-transform: uppercase;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 22px;
  margin-top: clamp(28px, 4vh, 56px);
}
.stats li { border-left: 1px solid var(--line2); padding-left: 18px; }
.stats .num {
  display: block;
  font-size: clamp(21px, 2.6vw, 29px);
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--champ);
  white-space: nowrap;
}
.stats .unit {
  display: block;
  margin-top: 6px;
  font: 400 10.5px/1.5 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: clamp(24px, 4vh, 56px);
  padding-top: 10px; /* + the links' 14px padding = text 24px below the rule */
  border-top: 1px solid var(--line);
}
.subnav a {
  font: 400 11px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 0; /* ~40px tap target */
  transition: color .2s;
}
.subnav a::before { content: "▸ "; color: var(--red); opacity: 0; transition: opacity .2s; }
.subnav a:hover { color: var(--txt); }
.subnav a:hover::before { opacity: 1; }

.p-photo { margin-top: clamp(28px, 4vh, 72px); }
.p-photo img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.p-photo .cap { margin-top: 12px; color: var(--dim); }

@media (min-width: 921px) {
  /* title + stats on the left, the whole amp on the right, section links
     across the bottom: the device is fully visible on a laptop's first screen */
  .p-hero-in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "intro photo" "nav nav";
    column-gap: clamp(32px, 4.5vw, 64px);
    align-items: center;
  }
  .p-intro { grid-area: intro; }
  .p-photo { grid-area: photo; margin-top: 0; }
  .p-hero-in .subnav { grid-area: nav; }
  .p-hero h1 { font-size: clamp(56px, 5.6vw, 84px); }
  .p-hero .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- product page: spec sections ---------- */

.spec-grid {
  display: grid;
  grid-template-columns: minmax(190px, 300px) 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.sec-head-v .idx { display: block; margin-bottom: 12px; }
.sec-head-v .sec-lab { font-size: clamp(24px, 3.2vw, 32px); }

/* a photo under the section title (outside: rear panel, internals: inside) */
@media (min-width: 921px) {
  .spec-grid.has-photo { grid-template-columns: minmax(280px, 5fr) 7fr; }
}
.spec-photo { margin-top: 28px; }
.spec-photo a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg1);
  cursor: zoom-in;
}
.spec-photo img {
  width: 100%;
  height: auto;
  transition: transform .9s var(--ease);
}
.spec-photo a:hover img { transform: scale(1.04); }

.spec-list { counter-reset: spec; }
.spec-list li {
  counter-increment: spec;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 19px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(16px, 1.6vw, 18.5px);
  line-height: 1.55;
}
.spec-list li:last-child { border-bottom: 1px solid var(--line); }
.spec-list li::before {
  content: counter(spec, decimal-leading-zero);
  font: 400 11px var(--mono);
  letter-spacing: .12em;
  color: var(--dim);
}

.cap-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.cap-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg1);
  padding: clamp(24px, 3.5vw, 40px);
}
.cap-card .cap-num {
  display: block;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.cap-card p { margin-top: 14px; color: var(--muted); }

/* max output power: a full-width card under the two, load -> power readouts
   (3 per row on phones, all 6 in one row once the card is wide enough) */
.cap-power { grid-column: 1 / -1; container-type: inline-size; }
.cap-power .lab { margin-top: 0; }
.power {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 14px;
  margin: 22px 0 0;
}
.power div { border-left: 1px solid var(--line2); padding-left: 14px; }
.power dt {
  font: 400 10.5px/1.5 var(--mono);
  letter-spacing: .14em;
  color: var(--dim);
}
.power dd {
  margin: 4px 0 0;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--champ);
  white-space: nowrap;
}
@container (min-width: 600px) {
  .power { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- measurements ---------- */

.m-note { margin: -26px 0 40px; }
.m-note .zero { color: var(--red); }

/* readout: a table of results beside one spectrum; JS makes the rows tabs */
.mx {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}

.mx-head, .mx-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 17px 14px;
  border-left: 2px solid transparent;
  white-space: nowrap;
}
.mx-head {
  padding-block: 0 12px;
  font: 400 10.5px/1.5 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}
.mx-row {
  border-top: 1px solid var(--line);
  font: 400 13px/1.4 var(--mono);
  color: var(--muted);
  transition: background .2s, border-color .2s, color .2s;
}
.mx-row:last-child { border-bottom: 1px solid var(--line); }
.mx-row .mx-t {
  font: 500 clamp(17px, 1.6vw, 22px)/1.1 var(--disp);
  letter-spacing: -.01em;
  color: var(--txt);
}
.mx-row:hover { border-left-color: var(--line2); color: var(--txt); }
.mx-row:focus-visible { outline-offset: -2px; }
.js .mx-row.on { background: var(--bg1); border-left-color: var(--red); color: var(--txt); }
.mx-hint { margin-top: 18px; color: var(--dim); }

.js .mx-panel:not(.on) { display: none; }
html:not(.js) .mx-panel + .mx-panel { margin-top: 28px; } /* no JS: all four, stacked */
.mx-shot { display: block; cursor: zoom-in; }
.mx-screen {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: #000;
}
.mx-screen img,
.lb[data-group="measurements"] .lb-fig img {
  /* the analyser exports black on white; invert it into a dark scope screen
     (the PNGs stay as exported, print shows them that way) */
  filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(1.05);
}
.mx-screen img { width: 100%; height: auto; }
.mx-cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 12px;
  color: var(--dim);
}
.mx-zoom { transition: color .2s; }
.mx-shot:hover .mx-zoom { color: var(--red); }

/* ---------- gallery ---------- */

.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.g-grid a {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg1);
}
.g-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
}
.g-grid a:hover img { transform: scale(1.06); }

/* ---------- closing cta ---------- */

.cta-sec { text-align: center; }
.cta-sec .lab { margin-bottom: 18px; }
.cta-sec h2 {
  font-size: clamp(30px, 5.5vw, 58px);
  font-weight: 500;
  letter-spacing: -.02em;
  margin-bottom: 34px;
}

/* ---------- lightbox ---------- */

html.lb-open { overflow: hidden; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 350; /* above the film grain (300) so photos aren't overlaid with noise */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 10, 12, .93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  /* horizontal drags reach the swipe handler; vertical pan + pinch-zoom
     (needed to read the measurement graphs on phones) stay native */
  touch-action: pan-y pinch-zoom;
}
.lb[hidden] { display: none; }

.lb-fig {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: clamp(16px, 4vw, 56px);
}
.lb-fig img {
  max-width: min(1500px, 100%);
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px); /* follows the mobile browser bar */
  width: auto;
  height: auto;
  border: 1px solid var(--line2);
  border-radius: 4px;
  background: var(--bg1);
  opacity: 0;
  transition: opacity .35s;
}
.lb-fig img.ld { opacity: 1; }
/* measurement charts get the readout's invert filter (see .mx-screen img),
   which inverts the border too: this light grey ends up ≈ var(--line2) */
.lb[data-group="measurements"] .lb-fig img { border-color: #b9bdc7; }

.lb-fig figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  justify-content: center;
  gap: 22px;
  font: 400 11px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.lb-cnt { color: var(--dim); }

.lb-btn {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line2);
  border-radius: 3px;
  background: rgba(16, 18, 22, .65);
  color: var(--txt);
  transition: border-color .2s, color .2s;
}
.lb-btn:hover { border-color: var(--red); color: var(--red); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */

@media (max-width: 920px) {
  .device, .device.flip { grid-template-columns: 1fr; }
  .device.flip .dev-media { order: 0; }
  .init-cols { grid-template-columns: 1fr; }
  .mx { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; gap: 20px; }
  .sec-head-v .idx { margin-bottom: 6px; }
  .spec-photo { margin-top: 18px; }
}

@media (max-width: 560px) {
  .site-nav { gap: 14px; }
  .site-nav a { letter-spacing: .12em; }
  .scale .marks span:nth-child(2), .scale .marks span:nth-child(4) { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  /* section links: one swipeable row instead of three ragged ones */
  .subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(var(--pad) * -1);
    padding-inline: var(--pad);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--pad), #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--pad), #000 calc(100% - 40px), transparent);
  }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { flex: none; }
  .subnav a::before { content: none; } /* hover arrow: no hover on phones */
  .mx-head, .mx-row { gap: 6px; padding-inline: 10px; }
  .mx-row { font-size: 12px; }
  .g-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lb-prev, .lb-next { top: auto; bottom: 64px; transform: none; }
  .lb-fig figcaption { bottom: 130px; }
}

@media (max-width: 380px) {
  .mx-row { font-size: 11px; }
  .mx-row .mx-t { font-size: 15px; }
}

@media (max-width: 339px) {
  /* brand + 3 menu links need ~340px; on older 320px phones drop "about"
     (that section is one scroll away) */
  .site-nav a[href$="#initiative"] { display: none; }
}

/* ---------- motion preferences ---------- */

@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 .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */

@media print {
  :root {
    --bg0: #fff; --bg1: #fff; --bg2: #fff; --grid: #fff;
    --txt: #111; --muted: #444; --dim: #555; --champ: #111;
    --line: #ccc; --line2: #999;
  }
  @page { margin: 16mm 14mm; }
  html, body { background: #fff !important; color: #111; font-size: 11pt; }
  body { background-image: none !important; }
  .site-head, .skip, .wave, .hero-scale, .scale, .subnav, .cta, .lb,
  .btn, #gallery, .spec-photo, .mx-hint, .mx-zoom { display: none !important; }
  body::after, .hero-in::before { content: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .metal, .hero h1 .dot {
    background: none !important;
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
  }
  .hero { min-height: 0; padding: 0 0 12mm; }
  .p-hero { padding-top: 0; }
  .sec { padding-block: 8mm; }
  .device, .mx-table, .cap-card, .spec-list li, figure, img, .sec-head-v { break-inside: avoid; }
  .sec-head, .sec-head-v, h1, h2, h3 { break-after: avoid; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  img { max-width: 100% !important; }
  /* paper gets the table and all four charts, black on white as exported */
  .mx { grid-template-columns: 1fr; }
  .js .mx-row.on { background: none; border-left-color: transparent; }
  .js .mx-panel { display: block !important; }
  .mx-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
  html:not(.js) .mx-panel + .mx-panel { margin-top: 0; }
  .mx-screen { background: #fff; }
  .mx-screen img { filter: none !important; }
}
