/* Car Sounds — car-sounds.tech
   Palette: mist page, green-slate ink, verdigris (sound below 8 kHz), brass (sound above 8 kHz). */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/schibsted-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: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/schibsted-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: #E8ECE9;          /* mist: the page */
  --surface: #F1F3F0;     /* raised panels */
  --ink: #26322F;         /* body + headings */
  --ink-2: #56635F;       /* secondary text */
  --rule: #CBD2CD;        /* dividers */
  --patina: #5E8C86;      /* sound below 8 kHz, quiet accents */
  --patina-deep: #2E5250; /* links, buttons */
  --patina-soft: #D3DDD9;
  --brass: #A9844A;       /* sound above 8 kHz */
  --brass-deep: #7A5C2C;
  --brass-soft: #E6DDCB;

  --measure: 62ch;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--patina-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--patina-deep); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 20; background: var(--surface); padding: 8px 12px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.wordmark svg { display: block; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--patina-deep); color: var(--surface);
  font: 500 15px/1 "Schibsted Grotesk", system-ui, sans-serif;
  padding: 12px 18px; border-radius: 8px; text-decoration: none;
}
.btn:hover { background: #24423F; }
.site-nav .btn { color: var(--surface); padding: 10px 14px; }
.btn[hidden] { display: none; }
@media (max-width: 860px) { .site-nav a:not(.btn) { display: none; } }
@media (max-width: 420px) { .site-nav .btn { font-size: 14px; padding: 9px 12px; } }

/* ---------- hero ---------- */
.hero { padding-block: 88px 40px; }
.hero h1 {
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.02; font-weight: 600; letter-spacing: -0.03em;
  margin: 0; max-width: 21ch;
}
@media (max-width: 640px) { .br-wide { display: none; } }
.hero .lede { margin: 28px 0 0; max-width: 46ch; font-size: 21px; line-height: 1.5; color: var(--ink-2); }

.spectro {
  margin: 56px 0 0;
  background: var(--surface);
  border-radius: 14px;
  padding: 20px 20px 16px 64px;
}
.spectro-plot { position: relative; height: 340px; }
.spectro-img { display: block; width: 100%; height: 100%; border-radius: 4px; }
/* The page's one motion: the real spectrogram draws in left to right, once, like a recording. */
@media (prefers-reduced-motion: no-preference) {
  .spectro-img { animation: record-in 2.4s cubic-bezier(.33, 0, .2, 1) .2s both; }
  @keyframes record-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
}
.y-axis, .x-axis, .timeline time { font-variant-numeric: tabular-nums; }
.y-axis { position: absolute; left: -52px; top: 0; bottom: 0; width: 46px; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.y-axis span { position: absolute; right: 0; transform: translateY(-50%); }
.y-axis span:nth-child(1) { top: 0%; }
.y-axis span:nth-child(2) { top: 20%; }
.y-axis span:nth-child(3) { top: 40%; }
.y-axis span:nth-child(4) { top: 60%; }
.y-axis span:nth-child(5) { top: 80%; }
.y-axis span:nth-child(6) { top: 100%; }
.x-axis { position: relative; height: 1.4em; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.x-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.x-axis .x0 { left: 0; transform: none; }
.x-axis .x2 { left: 21.05%; }   /* 2 / 9.5 s */
.x-axis .x4 { left: 42.11%; }
.x-axis .x6 { left: 63.16%; }
.x-axis .x8 { left: 84.21%; }
.x-axis .xend { left: 100%; transform: translateX(-100%); }
.cutoff { position: absolute; left: 0; right: 0; top: 60%; border-top: 1.5px dashed var(--ink); opacity: .7; pointer-events: none; }
.cutoff-label {
  position: absolute; right: 12px; transform: translateY(-100%); margin-top: -6px;
  font-size: 14px; color: var(--ink); background: color-mix(in srgb, var(--surface) 88%, transparent);
  padding: 2px 8px; border-radius: 4px; max-width: 70%; text-align: right; line-height: 1.35; text-wrap: balance;
}
.band-key { position: absolute; left: 12px; font-size: 13px; padding: 2px 8px; border-radius: 4px; background: color-mix(in srgb, var(--surface) 85%, transparent); }
.band-key.hi { top: 10px; color: var(--brass-deep); }
.band-key.lo { bottom: 10px; color: var(--patina-deep); }
.spectro-caption { max-width: var(--measure); margin: 18px 0 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 640px) {
  .spectro { padding: 14px 12px 12px 44px; }
  .spectro-plot { height: 230px; }
  .y-axis { left: -36px; width: 32px; font-size: 12px; }
  .cutoff-label { font-size: 12px; max-width: 86%; }
}

/* ---------- sections ---------- */
.section { padding-block: 96px 0; }
.section-grid { display: grid; grid-template-columns: 1fr; gap: 20px 48px; }
@media (min-width: 900px) { .section-grid { grid-template-columns: 4fr 8fr; } }
.section h2 { font-size: 36px; line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; margin: 0; max-width: 16ch; }
.section h3 { font-size: 21px; line-height: 1.3; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 18px; max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }
.aside { margin: 14px 0 0; max-width: 30ch; font-size: 16px; color: var(--ink-2); }

/* matched set */
.matched { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 40px; }
@media (min-width: 720px) { .matched { grid-template-columns: repeat(3, 1fr); } }
.matched figure { margin: 0; }
.matched img { display: block; width: 100%; height: 150px; border-radius: 8px; background: var(--surface); }
.matched-note { margin: 18px 0 0; max-width: var(--measure); font-size: 15px; color: var(--ink-2); }
.matched figcaption { margin-top: 10px; font-size: 16px; line-height: 1.45; }
.matched figcaption b { display: block; font-weight: 600; }
.matched figcaption span { color: var(--ink-2); font-size: 15px; }

/* recorder */
.recorder { display: grid; gap: 32px; grid-template-columns: 1fr; margin-top: 64px; align-items: start; }
@media (min-width: 900px) { .recorder { grid-template-columns: 5fr 7fr; gap: 48px; } }
.diagram { margin: 0; background: var(--surface); border-radius: 14px; padding: 20px 16px 16px; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram svg text { font-family: "Schibsted Grotesk", system-ui, sans-serif; font-size: 16.5px; fill: var(--ink); }
.diagram svg text.inside { fill: var(--patina-deep); font-size: 15px; }
.diagram figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.recorder-intro { margin: 0 0 20px; max-width: var(--measure); color: var(--ink-2); }
.specs { margin: 0; }
.specs div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); }
.specs div:last-child { border-bottom: 1px solid var(--rule); }
.specs dt { font-weight: 600; }
.specs dd { margin: 0; color: var(--ink-2); }
@media (max-width: 520px) { .specs div { grid-template-columns: 1fr; gap: 2px; } }

/* process steps (a real sequence, so numbered) */
.steps { list-style: none; margin: 64px 0 0; padding: 0; display: grid; gap: 28px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; margin-bottom: 14px;
  border: 1.5px solid var(--patina); color: var(--patina-deep); font-weight: 600; font-size: 15px;
}
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.principle {
  margin: 48px 0 0; padding: 22px 26px; background: var(--surface); border-radius: 14px;
  font-size: 21px; line-height: 1.45; max-width: 44ch; border-left: 3px solid var(--patina);
}

/* directions */
.directions { list-style: none; margin: 0; padding: 0; }
.directions li { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 20px 0; border-top: 1px solid var(--rule); }
.directions li:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 640px) { .directions li { grid-template-columns: 11rem 1fr; gap: 24px; } }
.directions b { font-weight: 600; }
.directions span { color: var(--ink-2); max-width: var(--measure); }
.directions .later b { color: var(--ink-2); font-weight: 500; }

/* timeline */
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 26px 30px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: -10px; width: 1.5px; background: var(--rule); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--patina); }
.timeline li.ahead::after { background: var(--bg); border: 1.5px solid var(--patina); }
.timeline li.now-marker::after { background: var(--brass); }
.timeline li.now-marker time { color: var(--brass-deep); }
.timeline time { display: block; font-weight: 600; }
.timeline span { color: var(--ink-2); }

/* team */
.team { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 640px) { .team { grid-template-columns: repeat(3, 1fr); } }
.person .photo {
  aspect-ratio: 4 / 5; border-radius: 14px; background: var(--patina-soft); overflow: hidden;
  display: grid; place-items: center; font-size: 34px; font-weight: 600; color: var(--patina-deep); letter-spacing: .02em;
}
.person .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person h3 { margin: 16px 0 2px; }
.person p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.person .place { margin-top: 6px; font-size: 15px; color: var(--ink); }
@media (max-width: 639px) {
  .person { display: grid; grid-template-columns: 96px 1fr; gap: 0 16px; align-items: start; }
  .person .photo { grid-row: span 3; font-size: 22px; border-radius: 10px; }
  .person h3 { margin-top: 2px; }
}

.meridian { display: flex; gap: 20px; align-items: stretch; margin-top: 40px; padding: 22px 24px; background: var(--surface); border-radius: 14px; max-width: 560px; }
.meridian svg { flex: none; }
.meridian p { margin: 0; font-size: 16px; color: var(--ink-2); }
.meridian .ends { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.meridian .ends b { color: var(--ink); font-weight: 600; display: block; }

/* affiliation */
.affiliation { margin: 112px 0 0; padding: 48px; background: var(--surface); border-radius: 18px; display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .affiliation { grid-template-columns: 1fr auto; padding: 56px; } }
.affiliation h2 { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 10px; max-width: 24ch; }
.affiliation p { margin: 0; color: var(--ink-2); max-width: 54ch; }
@media (max-width: 640px) { .affiliation { padding: 28px 22px; } }

.site-footer { padding: 48px 0 56px; font-size: 14px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 404 */
.lost { padding-block: 120px 80px; }
.lost h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 16px; }
.lost p { margin: 0 0 28px; color: var(--ink-2); max-width: 46ch; }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .hero { padding-block-start: 56px; }
  .hero .lede { font-size: 19px; }
  .section { padding-block-start: 72px; }
  .section h2 { font-size: 30px; }
  .principle { font-size: 19px; }
}
