/* Chord Lens — design tokens, reset, shell chrome.
   Dark-committed: the product lives on YouTube and every screenshot is dark. */

:root {
  color-scheme: dark;

  --ink-900: #05060a;
  --ink-850: #08090e;
  --ink-800: #0d0f16;
  --ink-700: #12151e;
  --ink-600: #191d28;
  --line: #232936;
  --line-soft: #1b202b;

  --text: #eef0f5;
  --text-dim: #a4adbe;
  --text-faint: #778093;   /* 4.8:1 on --ink-800, 4.6:1 on --ink-700 (axe AA, P57) */

  --accent: #e01432;
  --accent-hot: #ff2a45;
  --accent-soft: rgba(224, 20, 50, 0.14);
  --accent-line: rgba(224, 20, 50, 0.42);

  --amber: #ffdd00;
  /* Chord labels above lyrics: warm enough to read as annotation,
     not as another line of words. */
  --chord-ink: #f2b25c;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shell: min(1160px, 100% - 3rem);
  --gap: clamp(1rem, 2.5vw, 1.75rem);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);

  /* Named so a theme can restate them: a hover border and a popover shadow
     both have to change when the page stops being dark. */
  --line-strong: #313a4c;
  --shadow-pop: 0 24px 48px -16px rgb(0 0 0 / 0.7);

  /* The song section: its own meaning, so its own green, never the brand red. */
  --sect-text: #3ddc97;
  --sect-bg: #102219;
  --sect-line: #2f6b4f;

  /* The extension's panel. It draws in neutral greys rather than the site's
     blue inks, because it sits on YouTube, not on this page. */
  --panel-glass: rgb(10 10 12 / 0.91);
  --panel-edge: rgb(255 255 255 / 0.1);
  --panel-raised: #17171c;
  --panel-chip: #1c1c21;
  --panel-line: #34343e;
  --panel-rail: #3a3a44;
  --panel-text: #e9e9ec;
  --panel-dim: #8a8a93;
  --panel-faint: #6a6a74;
  --panel-red: #ff3b54;
  --amber-edge: #e4c600;
  --amber-ink: #4a3b00;

  /* Chord diagrams: the playing chord is lit, everything else steps back. */
  --grid-active: #c9c9d0;
  --grid-idle: #5e5e68;
  --dot: #ffffff;
  --dot-idle: #9ea0aa;
  --dot-ink: #101014;

  /* One hue per stem, shared by its chip, lane, waveform and fader. */
  --stem-vocals: #ff3b6b;
  --stem-drums: #ffa62b;
  --stem-bass: #8b5cf6;
  --stem-piano: #2dd4bf;
  --stem-guitar: #3b9bff;
  --stem-other: #a3e635;
  --stem-click: #a78bfa;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink-850);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 4.4vw, 3.35rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.85rem, 4vw, 2.85rem); letter-spacing: -0.03em; }
h3 { font-size: 1.16rem; }

p { margin: 0; text-wrap: pretty; }

/* The UA default of `margin: 1em 40px` on figure silently inflates every
   card built from one. */
figure, figcaption, blockquote { margin: 0; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent-hot);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell { width: var(--shell); margin-inline: auto; }

.eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-hot);
}

.lede {
  font-size: clamp(1.02rem, 1.9vw, 1.22rem);
  color: var(--text-dim);
  max-width: 60ch;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1.15rem;
  background: var(--accent);
  color: #fff;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* Read by screen readers, never seen: for the sentence that stands in for
   something drawn. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- Pill: a small status tag, for what is new or still in beta -------- */

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffc9d0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill--muted {
  border-color: var(--line);
  background: var(--ink-700);
  color: var(--text-dim);
}

/* ---- Brand mark ------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 22%;
  flex: none;
}

/* ---- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(180deg, var(--accent-hot), var(--accent));
  color: #fff;
  box-shadow: 0 8px 24px -10px var(--accent-hot);
}
.btn--primary:hover { box-shadow: 0 12px 30px -10px var(--accent-hot); }

.btn--ghost {
  background: var(--ink-700);
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--line-strong); background: var(--ink-600); }

/* Buy Me a Coffee's own button asset, self-hosted and unmodified. Only its
   rendered size is set, so the artwork itself is never altered. */
.bmc {
  display: inline-flex;
  transition: transform 0.18s var(--ease);
}
.bmc:hover { transform: translateY(-1px); }

.bmc img {
  display: block;
  height: 47px;
  width: auto;
}

.btn[aria-disabled="true"] {
  cursor: default;
  opacity: 1;
}

.btn__note {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-faint);
  margin-top: 0.6rem;
}

/* ---- Header ----------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink-850) 82%, transparent);
  border-bottom: 1px solid var(--line-soft);
}

@supports (backdrop-filter: blur(1px)) {
  .nav { backdrop-filter: blur(14px) saturate(1.4); }
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 62px;
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.nav__links a { transition: color 0.15s; }
.nav__links a:hover { color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--text); font-weight: 600; }

.nav__cta { flex: none; display: flex; align-items: center; gap: 0.75rem; }
.nav .btn { padding: 0.5rem 1rem; font-size: 0.86rem; }

/* A plain link rather than a second button: it sits beside the primary CTA on
   every width, including the phone widths where .nav__links is hidden, so a
   button's padding would be what pushes the header into a horizontal scroll. */
.nav__login {
  color: var(--text-dim);
  font-size: 0.86rem;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav__login:hover { color: var(--text); }

/* .btn sets display, which outranks the user agent's [hidden] rule, so
   hiding the install button needs saying here. */
.nav__install[hidden] { display: none; }

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}

/* ---- Footer ----------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--ink-900);
  padding: 3.5rem 0 2.5rem;
  margin-top: 5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 2.5rem;
}

.footer h4 {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.9rem;
}

.footer__list {
  display: grid;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.footer__list a:hover { color: var(--text); }

.footer__blurb {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-top: 0.9rem;
  max-width: 38ch;
}

.footer__base {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-faint);
}

@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---- Motion ----------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
