/* =========================================================================
   Blondie website - site.css
   Tokens lifted from images/logo/branding-kit.html. See web/SPEC.md.
   ========================================================================= */

/* ── 1. Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

/* ── 2. Root tokens (light mode default) ─────────────────────────────────── */
:root {
  /* Brand swatches */
  --gold-bright:   #FCDE25;
  --gold-sun:      #F9B521;
  --gold-amber:    #F8A21D;
  --gold-shadow:   #C97E0E;
  --white:         #FFFFFF;
  --graphite:      #383741;
  --charcoal:      #4A494A;
  --gray-soft:     #E8E8E8;

  /* Light mode surfaces */
  --bg:            #F5F5F7;
  --surface:       #FFFFFF;
  --surface-alt:   #F0F0F3;
  --border:        #DDDDE0;
  --text:          var(--graphite);
  --text-muted:    var(--charcoal);
  --accent:        var(--gold-sun);
  --accent-hover:  var(--gold-shadow);
  --shadow:        0 2px 8px rgba(0,0,0,.08);
  --radius:        0.5rem;

  /* SVG fill tokens - propagate through <use> shadow trees */
  --svg-glyph:     #383741;
  --svg-iris:      #ffffff;
  --svg-pupil:     #383741;

  /* Site layout tokens */
  --container-max: 1080px;
  --gutter:        1.5rem;
  --section-y:     4rem;
  --bp-sm:         560px;   /* (referenced in @media; kept here for the index) */
  --bp-md:         840px;
  --bp-lg:         1080px;
}

[data-theme="dark"] {
  --bg:            #1A1920;
  --surface:       #25242E;
  --surface-alt:   #2E2D38;
  --border:        #3A3944;
  --text:          #E4E4F0;
  --text-muted:    #9997AA;
  --accent:        var(--gold-bright);
  --accent-hover:  var(--gold-amber);

  --svg-glyph:     #E4E4F0;
  --svg-iris:      #25242E;
  --svg-pupil:     #E4E4F0;
}

@media (min-width: 840px) {
  :root { --section-y: 5.5rem; }
}

/* ── 3. Base ─────────────────────────────────────────────────────────────── */
html { color-scheme: light dark; }
body {
  font-family: Inter, "Open Sans", "Nunito Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  transition: background .25s, color .25s;
  -webkit-font-smoothing: antialiased;
}

/* Real links only - buttons (`a.btn`) keep the colour their .btn-* rule sets,
   which would otherwise lose to `[data-theme="dark"] a` on specificity. */
a:not(.btn)                           { color: var(--accent-hover); }
a:not(.btn):hover                     { color: var(--accent); }
[data-theme="dark"] a:not(.btn)       { color: var(--accent); }
[data-theme="dark"] a:not(.btn):hover { color: var(--accent-hover); }

/* ── 4. Typography ───────────────────────────────────────────────────────── */
h1, .t-h1 { font-size: 2rem;    font-weight: 700; letter-spacing: .04em; line-height: 1.2;  color: var(--text); }
h2, .t-h2 { font-size: 1.5rem;  font-weight: 600; letter-spacing: .02em; line-height: 1.25; color: var(--text); }
h3, .t-h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.3;     color: var(--text); }

.eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase;
  /* On light surfaces, --accent (Sunflower Gold) gives 1.8:1 against white
     - fails every contrast bar. Brand kit (branding-kit.md "Failing
     combinations to avoid") prescribes Warm Shadow #C97E0E for amber-tinted
     text on light: 3.2:1, clears the 3:1 graphic bar. In dark mode the
     override below restores the bright-gold pop. */
  color: var(--accent-hover);
  margin-bottom: .5rem;
}
[data-theme="dark"] .eyebrow { color: var(--accent); }
.lede {
  font-size: 1.1rem; line-height: 1.55;
  color: var(--text-muted);
}
p { color: var(--text-muted); }

/* ── 5. Layout primitives ────────────────────────────────────────────────── */
.container {
  width: min(100% - 2 * var(--gutter), var(--container-max));
  margin-inline: auto;
}
.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-alt); }
.stack > * + * { margin-top: 1rem; }

/* ── 6. Toolbar ──────────────────────────────────────────────────────────── */
.toolbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.toolbar-inner {
  display: flex; align-items: center; gap: 1rem;
  padding-block: .75rem;
}
.toolbar-brand {
  display: inline-flex; align-items: center;
  flex: 0 0 auto;
  height: 28px;
  text-decoration: none;
}
.toolbar-brand svg {
  height: 28px; width: auto; max-width: 220px;
}
/* logo-landscape viewBox is `0 -2 650.14 103.77`: content centers at viewBox
   y≈52 but the geometric center is y=49.88, so the lockup sits ~2 viewBox
   units below the element's geometric center. At 28px tall that's ~0.5px;
   counteract it so the visual center lands on the toolbar baseline. */
.toolbar-brand-landscape { transform: translateY(-0.5px); }

/* Narrow viewports: swap the wide lockup for the square logo only.
   Both SVGs sit in the DOM; CSS toggles which is visible. */
.toolbar-brand-mark {
  display: none;
  height: 28px; width: 28px;
}
@media (max-width: 559px) {
  .toolbar-brand-landscape { display: none; }
  .toolbar-brand-mark      { display: block; }
}

.toolbar-nav {
  display: flex; gap: 1.25rem; flex: 1; align-items: center;
  margin-left: .5rem;
}
.toolbar-nav a {
  font-size: .9rem; font-weight: 500; line-height: 1;
  color: var(--text-muted); text-decoration: none;
  border-bottom: 2px solid transparent;
  /* Asymmetric padding nudges caps down 2px to align with BLONDIE wordmark.
     Pure cap-height fonts have visible mass in the upper ~73% of the em-box,
     so even at line-height:1 the optical center sits above the geometric one. */
  padding: 4px 0 0 0;
  transition: color .15s, border-color .15s;
}
.toolbar-nav a:hover { color: var(--text); }
.toolbar-nav a[aria-current="page"] {
  color: var(--text); border-bottom-color: var(--accent);
}
.theme-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 2rem; padding: .35rem .85rem;
  font-size: .85rem; font-weight: 500; line-height: 1; color: var(--text);
  font-family: inherit;
  cursor: pointer; transition: background .2s, border-color .2s;
  /* Shift the whole pill (outline + label together) 1px down so the label's
     caps align with BLONDIE while the border stays centered around the text. */
  transform: translateY(1px);
}
.theme-toggle:hover { background: var(--surface-alt); }
.theme-icon  { font-size: 1rem; line-height: 1; }
.theme-label { line-height: 1; }
@media (max-width: 559px) {
  .theme-label { display: none; }
}

/* ── 7. Hero ─────────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(2.5rem, 8vw, 5rem); }
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  justify-items: center;
  text-align: center;
}
.hero-lockup {
  /* Poster carries the embedded tagline; below ~340px wide its cap-height
     drops under the 8px legibility floor (branding-kit.md "Lockup usage
     rules" / minimum-size table for logo-poster.svg). The clamp here is
     sized to keep the tagline readable across viewport widths. */
  width: clamp(280px, 78vw, 360px);
  height: auto;
}
.hero-copy { max-width: 38rem; }
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--text);
}
.hero-lede {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: .75rem;
  justify-content: center;
}

@media (min-width: 840px) {
  .hero-grid {
    grid-template-columns: auto 1fr;
    text-align: left;
    justify-items: start;
    gap: 3.5rem;
  }
  .hero-lockup { width: 400px; }
  .hero-cta { justify-content: flex-start; }
}
@media (min-width: 1080px) {
  .hero-lockup { width: 480px; }
}

/* ── 8. Marketing sections ───────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}
@media (min-width: 560px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 840px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.feature h3 { margin-bottom: .5rem; }

/* About-page content column */
.prose {
  max-width: 38rem;
}
.prose h1 { margin-bottom: 1rem; }
.prose h2 { margin-top: 2.25rem; margin-bottom: .5rem; }
.prose h3 { margin-top: 1.5rem;  margin-bottom: .35rem; }
.prose p + p,
.prose h2 + p,
.prose h3 + p { margin-top: .25rem; }
.prose .lede { margin-bottom: 1.5rem; }

/* ── 9. Footer ───────────────────────────────────────────────────────────── */
.footer {
  margin-top: var(--section-y);
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .footer-inner {
    grid-template-columns: auto 1fr 1fr;
    gap: 3rem;
  }
}
.footer-brand {
  display: inline-flex; align-items: center;
  height: 28px;
}
.footer-brand svg { height: 28px; width: auto; max-width: 220px; }
.footer-col h4 {
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li + li { margin-top: .35rem; }
.footer-col a {
  color: var(--text); text-decoration: none; font-size: .9rem;
}
.footer-col a:hover { color: var(--accent-hover); }
[data-theme="dark"] .footer-col a:hover { color: var(--accent); }
.footer-legal {
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--text-muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}

/* ── 10. Buttons (lifted from brand kit) ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: inherit;
  font-size: .9rem; font-weight: 600;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary {
  background: var(--accent);
  color: var(--graphite);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--graphite);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); }
.btn-ghost {
  background: transparent;
  color: var(--accent-hover);
  border-color: transparent;
}
[data-theme="dark"] .btn-ghost { color: var(--accent); }
.btn-ghost:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.btn-lg { padding: .85rem 1.75rem; font-size: 1rem; }

/* ── 11. Utilities ───────────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.lockup { overflow: visible; }
