/* Public site styles: home, song directory, song pages, languages, privacy.
   One ground, one ink, one accent; surfaces are told apart by tone, never by
   lines or shadows. Everything downstream uses these tokens. */
:root {
  --bg: #ffffff;
  --surface: #f4f1ef;
  --surface-2: #e9e4e1;
  --ink: #1c1a1b;
  --muted: #5c5759;
  --accent: #ff385c;          /* the brand: logo, focus, selection, one field */
  --action: #d4103d;          /* button fill; white text passes 4.5:1 on it */
  --action-hover: #b30c33;
  --accent-ink: #ffffff;
  --night: #1c1a1b;
  --night-ink: #f6f2ef;
  --night-muted: #bdb5b7;
  --warning: #b3261e;
  --ok: #1d7a35;

  --font: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step-small: 0.875rem;                                  /* 14px */
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);  /* 17–19px */
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);     /* 20–24px */
  --step-head: clamp(2.25rem, 1.4rem + 3.4vw, 4.5rem);     /* 36–72px */
  --step-display: clamp(2.75rem, 1rem + 6.4vw, 6.75rem);   /* 44–108px */

  --margin: clamp(1rem, 2.4vw, 2.25rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(5rem, 3rem + 8vw, 10rem);
  --max: 1680px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 650; text-wrap: balance; hyphens: none; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 0.9em; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link {
  position: absolute; left: var(--margin); top: -100px; z-index: 10;
  padding: 10px 16px; background: var(--ink); color: var(--bg); text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* The frame: one pair of margins, one 12-column grid. */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }

/* ---- Navigation: wordmark, a few links, one action. No bar chrome. ---- */
.site-nav { padding-block: 18px; }
.site-nav .wrap { display: flex; align-items: center; gap: 28px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.01em; text-decoration: none;
}
.wordmark img { width: 40px; height: 40px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--muted); padding-block: 8px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.nav-menu { display: none; }
.nav-links .nav-account { color: var(--ink); font-weight: 600; }

/* ---- Buttons: flat, one fill, fully round, decided once. ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--action); color: var(--accent-ink);
  font: inherit; font-size: 1.0625rem; font-weight: 650; text-decoration: none;
  cursor: pointer; transition: background 160ms ease, transform 160ms var(--ease);
}
.button:hover { background: var(--action-hover); }
.button:active { transform: scale(0.97); }
.button-quiet { background: var(--ink); }
.button-quiet:hover { background: #000; }
.text-link { font-weight: 600; }
.text-link:hover { color: var(--action); }

/* ---- Sections ---- */
.section { padding-block: var(--section); }
.section-tight { padding-block: calc(var(--section) * 0.7); }
.field-night { background: var(--night); color: var(--night-ink); }
.field-night .muted { color: var(--night-muted); }
.field-accent { background: var(--accent); color: var(--ink); }
.field-surface { background: var(--surface); }
.heading { font-size: var(--step-head); line-height: 1; letter-spacing: -0.035em; }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; }
.muted { color: var(--muted); }
.measure { max-width: 62ch; }
.small { font-size: var(--step-small); line-height: 1.45; }

[hidden] { display: none !important; }

/* ---- Forms: filled fields, no outlines at rest. ---- */
.field label { display: block; margin-bottom: 6px; font-size: 0.9375rem; font-weight: 600; }
.field input {
  width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: 12px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 1.0625rem;
}
.field input::placeholder { color: #7a7476; opacity: 1; }
.field input:focus { outline: 3px solid var(--accent); outline-offset: 0; }
.field.has-error input { outline: 2px solid var(--warning); outline-offset: 0; }
.inline-error { display: block; min-height: 1.25em; margin-top: 6px; color: var(--warning); font-size: var(--step-small); font-weight: 600; }

/* ---- Footer: a designed close. The name returns. ---- */
.site-footer { background: var(--night); color: var(--night-ink); padding-block: clamp(4rem, 8vw, 7rem) 32px; }
.footer-name {
  font-size: clamp(2.5rem, 1rem + 6.6vw, 8rem); font-weight: 650;
  line-height: 0.95; letter-spacing: -0.045em; max-width: 12ch;
}
.footer-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 20px 40px; margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer-links a { color: var(--night-ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-note { color: var(--night-muted); font-size: var(--step-small); }

/* ---- Entrances: content is visible without script; .js opts in. ---- */
.js .rise { opacity: 0; transform: translateY(24px); }
.js .rise.is-in {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise, .js .rise.is-in { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-menu { display: inline-flex; align-items: center; margin-left: auto; }
  .nav-links.is-open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; left: 0; right: 0; top: 76px; z-index: 5;
    padding: 12px var(--margin) 20px; background: var(--bg);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.12);
  }
  .nav-links.is-open a { padding-block: 12px; font-size: 1.125rem; color: var(--ink); }
  .site-nav { position: relative; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Inner pages: a title block on the shared margins. ---- */
.page-head { padding-block: clamp(2rem, 4vw, 4rem) clamp(3rem, 6vw, 5rem); }
.page-title { font-size: clamp(2.75rem, 1rem + 5.4vw, 6rem); line-height: 0.96; letter-spacing: -0.035em; margin-left: -0.04em; max-width: 16ch; }
.page-head .lead { margin-top: 28px; max-width: 44ch; }

/* ---- Search and A–Z, shared by the home page and the directory. ---- */
.search-row { display: flex; gap: 12px; max-width: 560px; }
.search-row .field { flex: 1; }
.search-row input { background: var(--surface); }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.letters a { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 600; transition: background 160ms ease, color 160ms ease; }
.letters a:hover, .letters a:focus-visible { background: var(--surface-2); }
.letters a[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* ---- Song stills: the site's real output, 16:9, square corners. ---- */
.still { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); }
.still img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
a:hover .still img, a:focus-visible .still img { transform: scale(1.04); }
.song-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 36px var(--gutter); }
.song-grid a { display: block; text-decoration: none; }
.song-grid .song-name { display: block; margin-top: 12px; font-weight: 600; line-height: 1.3; }
.song-grid a:hover .song-name { text-decoration: underline; }
@media (max-width: 1100px) { .song-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .song-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .search-row { flex-direction: column; }
  .search-row .button { width: 100%; }
}

.nav-menu { background: transparent; color: var(--ink); border: 0; font: inherit; font-weight: 600; min-height: 44px; padding: 0 4px; cursor: pointer; text-decoration: underline; }
@media (min-width: 881px) { .nav-menu { display: none; } }
