/* Davey Audio site stylesheet. Tokens follow the design project's preview so the family look carries over. */
:root {
  --bg: #eceef0;
  --bg-2: #f6f7f8;
  --stage: #e1e4e8;
  --fg: #1a1c20;
  --muted: #5a6068;
  --line: #cdd1d7;
  --accent: #4a5566;
  --chip: #ffffff;
  --band: #4d5258;
  --ok: #2f6b3a;
  --font-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --radius: 10px;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131417; --bg-2: #191b1f; --stage: #1b1d21; --fg: #e7e8ea; --muted: #9aa0a8;
    --line: #2d3036; --accent: #a9b3c2; --chip: #23262b; --band: #8b929b; --ok: #7fc48d; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131417; --bg-2: #191b1f; --stage: #1b1d21; --fg: #e7e8ea; --muted: #9aa0a8;
  --line: #2d3036; --accent: #a9b3c2; --chip: #23262b; --band: #8b929b; --ok: #7fc48d; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the hidden attribute wins over component display rules (.step, .field) */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.55; overflow-x: hidden; }
img, svg, canvas { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 7vw, 56px); letter-spacing: -0.01em; }
h2 { font-size: clamp(22px, 4.5vw, 32px); }
h3 { font-size: 18px; }
p { margin: 0; }
.lede { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 60ch; }
.eyebrow { font-family: var(--font-data); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.data { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.small { font-size: 14px; }
code { font-family: var(--font-data); font-size: .92em; overflow-wrap: anywhere; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: var(--gutter); }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 6px; }
.stack-lg { display: grid; gap: 28px; }
section.block { padding-block: 40px; }
@media (min-width: 760px) { section.block { padding-block: 64px; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 14px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 17px; white-space: nowrap; }
.brand .mark { width: 26px; height: 25px; background: currentColor; -webkit-mask: url(/assets/davey-audio-logo.svg) center / contain no-repeat; mask: url(/assets/davey-audio-logo.svg) center / contain no-repeat; }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 10px; border-radius: 999px; white-space: nowrap; }
.nav a[aria-current="page"], .nav a:hover { color: var(--fg); background: var(--chip); }
.theme-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--chip); color: var(--fg); cursor: pointer; display: grid; place-items: center; }
.theme-btn svg { width: 18px; height: 18px; }
.nav-short { display: none; }
/* Phones: brand and theme button on one row, the links on a full-width row below */
@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0 10px; min-height: 0; padding-top: 6px; }
  .brand { min-height: 40px; }
  .theme-btn { margin-left: auto; width: 34px; height: 34px; }
  .nav { order: 3; flex: 1 0 100%; margin: 0 -8px; padding-bottom: 4px; justify-content: space-between; }
  .nav a { padding: 7px 8px; font-size: 14px; }
  .nav-long { display: none; } .nav-short { display: inline; }
}

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 15px var(--font-body); color: var(--fg); background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn:focus-visible, .chip:focus-visible, .card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 14px var(--font-body); color: var(--fg); background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; gap: 7px; }
.chip[aria-pressed="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.chip[disabled] { opacity: .45; cursor: not-allowed; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); flex: none; }
.tag { display: inline-block; font: 500 11px var(--font-data); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; vertical-align: middle; white-space: nowrap; }
.tag.draft { color: #8a5a00; border-color: #c9a35a; }
.tag.soon { color: var(--accent); border-color: currentColor; }
:root[data-theme="dark"] .tag.draft { color: #e3b96a; border-color: #8a6a2a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.draft { color: #e3b96a; border-color: #8a6a2a; } }

/* Cards */
.card { background: var(--chip); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 8px; min-width: 0; }
.card.link { text-decoration: none; }
.card.link:hover { border-color: var(--accent); }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Spec lists */
dl.spec { margin: 0; display: grid; grid-template-columns: 1fr; }
dl.spec dt, dl.spec dd { margin: 0; min-width: 0; }
dl.spec dt { color: var(--muted); font-size: 13px; padding: 8px 0 1px; border-top: 1px solid var(--line); }
dl.spec dd { font-family: var(--font-data); font-size: 13.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; padding: 0 0 8px; line-height: 1.45; }
@media (min-width: 560px) {
  dl.spec { grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 0 14px; }
  dl.spec dt, dl.spec dd { padding: 7px 0; border-top: 1px solid var(--line); }
  dl.spec dt { font-size: inherit; }
}

/* 3D stage */
.stage { position: relative; width: 100%; background: var(--stage); border-radius: var(--radius); overflow: hidden; }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.stage .hint { position: absolute; left: 12px; bottom: 10px; font-family: var(--font-data); font-size: 11px; color: var(--muted); pointer-events: none; }
.stage .badge { position: absolute; left: 12px; top: 10px; font: 500 11px var(--font-data); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: color-mix(in srgb, var(--bg) 80%, transparent); border-radius: 4px; padding: 3px 7px; pointer-events: none; }
.stage .fail { position: absolute; inset: 0; display: grid; align-items: end; padding: 12px 12px 34px; text-align: center; color: var(--muted); font-size: 13px; }
.stage .fail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage .fail p { position: relative; }
.stage-tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; }
.stage-tools .chip { padding: 6px 10px; min-height: 32px; font-size: 12.5px; }

/* Home hero */
.hero { padding-block: 28px 40px; display: grid; gap: 22px; }
.hero .stage { height: min(62vh, 620px); min-height: 360px; }
.hero .copy { display: grid; gap: 14px; }
/* Phones: headline, then the live 3D view, then the words, so the turntable is above the fold */
@media (max-width: 899px) {
  .hero { gap: 14px; padding-top: 18px; }
  .hero .copy { display: contents; }
  .hero .eyebrow, .hero h1 { order: 1; }
  .hero .stage { order: 2; height: min(58vh, 560px); min-height: 340px; margin-block: 4px 8px; }
  .hero .lede, .hero .btn-row { order: 3; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; align-items: center; padding-block: 48px 64px; }
  .hero .stage { height: min(72vh, 680px); }
}
.lines { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.lines .card h3 { font-size: 20px; }

/* Lineup */
.tier { display: grid; gap: 14px; }
.tier .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.tier .price { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.tier .grid { display: grid; gap: 12px 24px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .tier .grid { grid-template-columns: 1fr 1fr; } }

/* Builder */
.builder { display: grid; gap: 18px; padding-block: 18px 110px; }
.builder .stage { height: min(48vh, 520px); min-height: 300px; position: sticky; top: 64px; z-index: 5; }
/* Phones: the two-row header is about 86 px tall; a shorter pinned stage leaves room for the choices below it */
@media (max-width: 640px) { .builder .stage { top: 92px; height: clamp(220px, 36vh, 340px); min-height: 0; box-shadow: 0 -6px 0 var(--bg); } }
.builder .steps { display: grid; gap: 26px; }
.step { display: grid; gap: 10px; scroll-margin-top: calc(48vh + 80px); }
.step .step-head { display: flex; align-items: baseline; gap: 10px; }
.step .num { font-family: var(--font-data); font-size: 12px; color: var(--muted); }
.step .note { color: var(--muted); font-size: 14.5px; max-width: 62ch; min-height: 1.4em; }
.step .note b { color: var(--fg); font-weight: 500; }
.model-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.model-card { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.model-card[aria-pressed="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.model-card .name { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.model-card .from { font-family: var(--font-data); font-size: 13px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--chip); cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--fg); }
.check .t { display: grid; gap: 2px; }
.check .p { font-family: var(--font-data); font-size: 13px; color: var(--muted); }
.checks { display: grid; gap: 8px; }
.pricebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.pricebar .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; padding-block: 8px; }
.pricebar .p { display: grid; gap: 1px; min-width: 0; }
.pricebar .p .v { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.1; }
.pricebar .p .l { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pricebar .btn { margin-left: auto; flex: none; }
.summary { display: grid; gap: 16px; }
.summary .code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.summary .code code { font-size: 18px; padding: 8px 12px; background: var(--chip); border: 1px solid var(--line); border-radius: 8px; }
@media (min-width: 900px) {
  .builder { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 28px; padding-top: 28px; }
  .builder .stage { height: calc(100vh - 92px); max-height: 820px; min-height: 480px; top: 72px; }
  .step { scroll-margin-top: 80px; }
}

/* Made / about */
.steps-made { display: grid; gap: 22px; }
.figure { display: grid; gap: 8px; }
.figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); background: #2b3140; }
.figure figcaption { font-size: 13.5px; color: var(--muted); }
.two { display: grid; gap: 22px; }
@media (min-width: 800px) { .two { grid-template-columns: 1fr 1fr; align-items: center; } }
ul.plain { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Forms */
form.inquiry { display: grid; gap: 14px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field textarea, .field select { font: 15px var(--font-body); color: var(--fg); background: var(--chip); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; width: 100%; min-height: 44px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.notice { border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding-block: 28px 40px; color: var(--muted); font-size: 13.5px; }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer a { color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
html { scroll-behavior: smooth; }
