/* BergenAudio — website
   Tokens and rules are copied from ../bergenaudio-assets/STYLESHEET.md (§20
   silver theme, §21 drop-in tokens) and mirrored in
   ../bergenaudio-assets/bergen-audio-lockup.html. Change one, change all three.

   FLAT BY CONSTRUCTION (§1.7): no shadows of any kind, no gradients, no blur,
   no bevel. Depth is the fill ramp (--well → --bg →
   --panel → --panel-raised) plus 1px hairlines, and nothing else. The CI
   `frontend` job greps this file for the forbidden properties — keep them out
   of the comments too, or write them the way this line does. */

:root {
  color-scheme: light;

  /* surfaces — a silver faceplate, never pure white */
  --bg: #D9DEE5;
  --bg-lift: #E7EBF0;
  --panel: #E7EBF0;
  --panel-raised: #EEF1F5;
  --well: #C9CFD7;
  --well-lift: #D1D7DE;
  --border: #C2C9D2;
  --border-strong: #A9B3BF;

  /* brand ink — dark blue on silver, 7.35:1 against --bg */
  --accent: #17456E;
  --accent-bright: #24618F;
  --accent-dim: #3E6B91;
  --accent-ghost: rgba(23, 69, 110, 0.10);

  /* type */
  --text: #14243A;
  --text-dim: #47586E;
  --text-faint: #6B7C91;
  --text-disabled: #97A3B2;

  /* interaction */
  --azure: #24618F;
  --azure-ghost: rgba(36, 97, 143, 0.16);
  --meter: #356B31;
  --clip: #A83A31;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 400ms;
  --dur-enter: 900ms;

  /* §8: radii come from the scale, spacing from 4/8/12/16/24/32/48/64 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --wrap: 60rem;
  --gutter: clamp(16px, 5vw, 32px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* The website uses the system stack so it matches the plugin UI (§7). */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: the page keeps its full height even with three lines on it. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-bright); }

/* §19: keyboard focus is never removed, only drawn — 1px azure, 2px offset. */
:focus-visible {
  outline: 1px solid var(--azure);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

/* The mark is 24px minimum (§23) and strokes with currentColor. */
.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
  color: var(--accent);
}

.brand-word {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.brand-word .audio { font-weight: 300; color: var(--text-dim); }

.site-nav {
  display: flex;
  gap: 4px;
}

/* 44px minimum hit area (§8) even though the text is small. */
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.site-nav a:hover { color: var(--accent); background: var(--accent-ghost); }

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 4vmin, 32px);
  text-align: center;
  padding: clamp(48px, 12vmin, 96px) var(--gutter) clamp(40px, 8vmin, 64px);
}

.hero-mark {
  width: clamp(96px, 22vmin, 168px);
  height: auto;
  display: block;
  color: var(--accent);
}

.wordmark {
  margin: 0;
  font-size: clamp(28px, 6vmin, 40px);   /* §7 display: 40px @1x */
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--text);
}

.wordmark .audio { font-weight: 300; color: var(--text-dim); }

.rule {
  width: clamp(28px, 6vmin, 46px);
  height: 1px;
  border: 0;
  margin: 0;
  background: rgba(23, 69, 110, 0.45); /* == color-mix fallback */
  background: color-mix(in srgb, var(--accent) 45%, transparent);
}

.tagline {
  margin: 0;
  font-size: clamp(11px, 1.6vmin, 13px);
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.lede {
  margin: 0;
  max-width: 34rem;
  font-size: 18px;
  color: var(--text-dim);
  text-wrap: balance;
}

.hero-actions { margin: 8px 0 0; }

/* ---------- bands ---------- */

.band {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding-block: clamp(32px, 6vmin, 48px);
}

/* The lift is a flat step, not a gradient (§2: full-width banding only). */
.band-alt { background: var(--bg-lift); }

.section-label {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.quiet {
  margin: 0;
  max-width: 40rem;
  color: var(--text-dim);
}

.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1px;                      /* hairline separators, drawn by the gap */
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.facts li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--panel);
}

.fact-k {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fact-v { color: var(--text); }

/* ---------- buttons (§14) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;              /* hit area (§8), drawn height is 40 (primary) */
  min-width: 72px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--panel-raised);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.btn:hover { background: var(--well-lift); border-color: var(--accent-dim); color: var(--text); }
.btn:active { background: var(--well); }

/* Primary: one per view — ghost fill, accent ink. */
.btn-primary {
  background: var(--accent-ghost);
  border-color: var(--accent-dim);
  color: var(--accent);
}
.btn-primary:hover {
  background: var(--azure-ghost);
  border-color: var(--azure);
  color: var(--accent);
}
.btn-primary:active { background: var(--well); }

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;              /* sticky footer */
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-dim);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 24px;
}

.site-footer p { margin: 0; }

.foot-note { color: var(--text-faint); }

/* ---------- motion ---------- */

/* Entrance motion is opt-in and never gates visibility: a t=0 screenshot must
   show the whole page (§23). */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.hero.animate > * { animation: rise var(--dur-enter) var(--ease) both; }
.hero.animate > *:nth-child(2) { animation-delay: 0.08s; }
.hero.animate > *:nth-child(3) { animation-delay: 0.18s; }
.hero.animate > *:nth-child(4) { animation-delay: 0.26s; }
.hero.animate > *:nth-child(5) { animation-delay: 0.34s; }
.hero.animate > *:nth-child(6) { animation-delay: 0.42s; }

@media (prefers-reduced-motion: reduce) {
  .hero.animate > * { animation: none; }
  .btn { transition: none; }
}
