:root {
  --bg: #f7f4ee; /* warm paper white */
  --fg: #1a1815; /* soft ink */
  --font-display: "Inter", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
}

/* Scratchy grain overlay. Multiply makes it read as paper specks on light bg. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -0.5'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Taped-on label: black tag hanging slightly off the top-left corner */
h1 {
  position: fixed;
  top: 1rem;
  left: 1rem;
  margin: 0;
  padding: 0.75rem 1rem 0.5rem;
  background: #1a1815;
  color: #f7f4ee;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
/*  transform: rotate(-1.5deg); */
}

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

main {
  max-width: 40rem;
  padding: 6rem 1.5rem 2rem;
}

nav {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

nav a {
  color: var(--fg);
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Intro line at the top of the wip page.
   Bottom margin matches the gap between song cards. */
.intro {
  margin: 0 0 2.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Songs */
/* Card look is driven by variables. Default is filled (ink background, paper text).
   Switch with <main data-song-card="outline"> in wip.html. Children use currentColor. */
.song {
  --card-bg: var(--fg);
  --card-fg: var(--bg);
  --card-border: var(--fg);
  --card-hover-fg: var(--fg); /* text color on a hovered (filled) button */
  --wave-muted: #6b665c;
  --wave-played: #f7f4ee;

  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--card-bg);
  color: var(--card-fg);
  border: 1px solid var(--card-border);
}

main[data-song-card="outline"] .song {
  --card-bg: transparent;
  --card-fg: var(--fg);
  --card-border: var(--fg);
  --card-hover-fg: var(--bg);
  --wave-muted: #b9b3a6;
  --wave-played: #1a1815;
}

.song-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.song h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.badge {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 0.1rem 0.4rem;
}

.song .text {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.wave {
  margin: 0.75rem 0;
  cursor: pointer;
}

.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.controls button,
.controls select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}

.controls button:hover {
  background: var(--card-fg);
  color: var(--card-hover-fg);
}

/* The dropdown list is drawn by the browser, so give it its own readable colors. */
.controls select option {
  background: var(--bg);
  color: var(--fg);
}

.controls select {
  margin-left: auto;
}

.note {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  opacity: 0.7;
}
