/* ─────────────────────────────────────────────────────────
   CatalogPlayer — Design tokens (LIGHT / CORPORATE theme)
   Warm off-white base, dark text, teal + amber accents.
   Use .section-dark on sections that need dark background.
   ───────────────────────────────────────────────────────── */

:root {
  /* ── Foundations — warm off-white ── */
  --ink:         #fafafa;
  --ink-2:       #f2f2f2;
  --ink-3:       #e8e8e8;
  --ink-4:       #dcdcdc;
  --line:        rgba(24, 25, 27, 0.09);
  --line-2:      rgba(24, 25, 27, 0.16);
  --line-3:      rgba(24, 25, 27, 0.30);

  --bone:        #0f1012;
  --bone-dim:    #2a2c30;
  --bone-2:      #4a4c52;
  --mute:        #76766d;
  --mute-2:      #9a9a8f;

  /* Brand — brighter teal matching catalogplayer.com identity */
  --cp-teal:     #1ab5ad;
  --cp-teal-hi:  #2ac4bc;
  --cp-teal-lo:  #b8eeeb;
  --cp-mint:     #e0f8f6;

  /* Caitium / AI accent — deeper for light bg */
  --ai-amber:    oklch(0.68 0.15 58);
  --ai-amber-hi: oklch(0.78 0.15 65);
  --ai-amber-lo: oklch(0.90 0.08 72);

  /* Semantic */
  --bg:          var(--ink);
  --surface:     var(--ink-2);
  --surface-2:   var(--ink-3);
  --text:        var(--bone);
  --text-dim:    var(--bone-2);
  --text-mute:   var(--mute);

  /* Type */
  --font-sans:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-display: 'Instrument Serif', 'Georgia', ui-serif, serif;

  /* Scale */
  --step-0: 13px; --step-1: 14px; --step-2: 16px; --step-3: 18px;
  --step-4: 22px; --step-5: 28px; --step-6: 36px; --step-7: 48px;
  --step-8: 64px; --step-9: 84px; --step-10: 112px;

  /* Layout */
  --gutter: clamp(20px, 3vw, 40px);
  --max-w:  1440px;
  --nav-h:  64px;

  /* Radii */
  --r-0: 0; --r-1: 2px; --r-2: 6px; --r-3: 12px; --r-pill: 999px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-2);
  line-height: 1.5;
  font-feature-settings: 'ss01','cv11';
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--cp-teal-hi); color: #fff; }

/* ── Utilities ── */
.mono  { font-family: var(--font-mono); letter-spacing: 0.02em; }
.serif { font-family: var(--font-display); font-feature-settings: 'liga','onum'; }
.tag-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.hair { height: 1px; background: var(--line); border: 0; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line-3);
  border-radius: var(--r-1);
  transition: all 160ms ease;
  white-space: nowrap;
  color: var(--bone);
}
.btn:hover { border-color: var(--bone); }
.btn--primary {
  background: var(--cp-teal-hi);
  color: #fff;
  border-color: var(--cp-teal-hi);
}
.btn--primary:hover { background: var(--cp-teal); border-color: var(--cp-teal); color: #fff; }
.btn--ghost { background: transparent; }
.btn--ai {
  background: var(--ai-amber);
  color: #fff;
  border-color: var(--ai-amber);
}
.btn--ai:hover { background: var(--ai-amber-hi); border-color: var(--ai-amber-hi); }
.btn .arrow { transition: transform 160ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ── Labels ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cp-teal-hi);
}
.eyebrow::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--cp-teal-hi);
  border-radius: 0;
}
.eyebrow--ai { color: var(--ai-amber); }
.eyebrow--ai::before { background: var(--ai-amber); width: 6px; height: 6px; border-radius: 50%; }

/* ── Grid background — light lines on off-white ── */
.grid-bg {
  background-image:
    linear-gradient(to right, rgba(24,25,27,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24,25,27,0.07) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ── Section chrome ── */
section { position: relative; }
.section-rule {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px var(--gutter);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ── Headings — serif display ── */
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.05; }
h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 108px);
  font-weight: 350;
  letter-spacing: -0.03em;
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 380;
  letter-spacing: -0.025em;
}
h3 { font-size: clamp(22px, 2.5vw, 32px); font-weight: 500; letter-spacing: -0.015em; }
h4 { font-size: clamp(16px, 1.5vw, 22px); font-weight: 500; }

/* ── Frame ── */
.frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--ink-2);
}
.frame::before, .frame::after,
.frame > .c-tl, .frame > .c-tr, .frame > .c-bl, .frame > .c-br {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--line-3);
}
.frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.frame::after  { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.frame > .c-bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.frame > .c-br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ── Nav links — hardcoded for light nav so they're always dark ── */
.nav-link {
  position: relative;
  padding: 6px 0;
  font-size: 13px;
  color: #4a4c52;
  transition: color 160ms;
}
.nav-link:hover { color: #0f1012; }
.nav-link[aria-current="page"] { color: #0f1012; font-weight: 500; }
.nav-link[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--cp-teal-hi);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--mute-2); }

/* ════════════════════════════════════════════════════════════
   DARK SECTION — override CSS custom properties so all
   var(--ink/bone/text…) children flip to dark automatically.
   ════════════════════════════════════════════════════════════ */
.section-dark {
  --ink:       #0a0b0c;
  --ink-2:     #111315;
  --ink-3:     #17191c;
  --ink-4:     #1f2328;
  --line:      rgba(242, 240, 234, 0.09);
  --line-2:    rgba(242, 240, 234, 0.16);
  --line-3:    rgba(242, 240, 234, 0.28);
  --bone:      #f2f0ea;
  --bone-dim:  #d8d4c8;
  --bone-2:    #b6b1a1;
  --mute:      #7f7b6f;
  --mute-2:    #5a574e;
  --text:      #f2f0ea;
  --text-dim:  #b6b1a1;
  --text-mute: #7f7b6f;
  --bg:        #0a0b0c;
  /* Teal stays vivid on dark backgrounds */
  --cp-teal:    #2abdb6;
  --cp-teal-hi: #3dd6ce;
  --cp-teal-lo: rgba(42,189,182,0.18);
  --cp-mint:    rgba(42,189,182,0.08);
  background:  #0a0b0c;
  color:       #f2f0ea;
}
.section-dark .grid-bg {
  background-image:
    linear-gradient(to right, rgba(242,240,234,0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(242,240,234,0.09) 1px, transparent 1px);
}
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 { color: #f2f0ea; }

/* ── Legacy alias — kept for backwards compat ── */
.section-light {
  /* No-op: off-white is now the default */
}
