@font-face { font-family: "Anton"; src: url("/fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/CourierPrime-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/CourierPrime-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --ground: #051105;
  --panel: #0B1C0B;
  --text: #E4EFE2;
  --muted: #7F977E;
  --faint: #3A4E39;
  --neon: #39FF14;
  --line: rgba(228, 239, 226, 0.12);
  --display: "Anton", "Arial Narrow", sans-serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --tagcol: 8.5rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--faint) var(--ground); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 1.125rem/1.6 var(--mono);
  caret-color: var(--neon);
}
::selection { background: var(--neon); color: var(--ground); }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-color: var(--muted); }
a:hover { text-decoration-color: var(--neon); }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 2px; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--neon); color: var(--ground); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Top bar */
.bar {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 20px var(--gutter);
  max-width: 1280px; margin: 0 auto;
}
.mark { font: 400 1.75rem/1 var(--display); letter-spacing: 0.01em; text-decoration: none; }
.bar-link { font-size: 1rem; color: var(--neon); text-decoration: none; }
.bar-link:hover { text-decoration: underline; }

/* The sheet: a left gutter for section tags, like a lyric sheet margin */
.sheet { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.part {
  position: relative;
  padding: clamp(48px, 7vw, 88px) 0 0 var(--tagcol);
  display: grid; gap: 28px;
}
.part + .part { border-top: 1px solid var(--line); margin-top: clamp(48px, 7vw, 88px); }
.tag {
  position: absolute; left: 0; width: var(--tagcol);
  font: 700 1rem/1 var(--mono); color: var(--muted); letter-spacing: 0;
  padding-top: 0.55em;
}

h1, h2 { margin: 0; font-family: var(--display); font-weight: 400; text-wrap: balance; }
h1 .line, h2 .line { display: block; }
h1 {
  font-size: clamp(3.25rem, 10vw, 6rem);
  line-height: 1.32; letter-spacing: -0.005em;
}
h2 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); line-height: 1.05; }
.chorus h2, .outro h2 { font-size: clamp(2.75rem, 7.5vw, 5rem); line-height: 1.08; }
h1 .tag { top: clamp(48px, 7vw, 88px); }

/* Chords over syllables */
.c { position: relative; display: inline-block; }
.chord {
  position: absolute; left: 0; bottom: 84%;
  font: 700 clamp(1rem, 2.2vw, 1.5rem)/1 var(--mono);
  color: var(--neon);
  background: none; border: 0; padding: 4px 6px 4px 0; margin: 0;
  cursor: pointer;
  transition: color 0.35s var(--ease), transform 0.35s var(--ease);
}
.chord:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.intro.counting .chord { color: var(--faint); }
.intro.counting .chord.lit { color: var(--neon); transform: translateY(-2px); }

/* Count-in dots (the app's metronome) */
.count { position: absolute; right: 0; top: clamp(54px, 7.5vw, 96px); display: flex; gap: 8px; }
.count i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--muted); transition: background 0.12s; }
.count i.on { background: var(--neon); border-color: var(--neon); }
.count i:first-child.on { background: var(--text); border-color: var(--text); }
.count.done { opacity: 0; transition: opacity 0.6s; }

.lede { max-width: 34em; color: var(--text); font-size: clamp(1.125rem, 1.8vw, 1.3rem); }
.copy { max-width: 36em; display: grid; gap: 1em; color: var(--muted); }
.copy p:first-child { color: var(--text); }

/* A sung line with its chord line, aligned by the monospace grid */
.lyric {
  white-space: pre; overflow-x: auto;
  font-size: clamp(1rem, 2vw, 1.375rem); line-height: 1.5; color: var(--text);
}
.lyric .chords { color: var(--neon); font-weight: 700; }

/* Signup */
.signup { display: flex; flex-wrap: wrap; gap: 10px; max-width: 40rem; margin-top: 8px; }
.signup input[type=email] {
  flex: 1 1 16rem; min-width: 0;
  font: inherit; font-size: 1.0625rem; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px;
}
.signup input[type=email]::placeholder { color: var(--muted); }
.signup input[type=email]:hover { border-color: var(--faint); }
.signup input[aria-invalid=true] { border-color: var(--text); border-width: 2px; padding: 13px 15px; }
.signup button {
  font: 700 1.0625rem/1 var(--mono); color: var(--ground);
  background: var(--neon); border: 0; border-radius: 8px;
  padding: 14px 20px; cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.2s;
}
.signup button:hover { filter: brightness(1.08); }
.signup button:active { transform: translateY(1px); }
.signup button[disabled] { filter: saturate(0.4); cursor: progress; }
.signup .note { flex-basis: 100%; font-size: 0.9375rem; color: var(--muted); }
.signup .note.ok { color: var(--neon); }
.signup .note.err { color: var(--text); }
.signup.sent input, .signup.sent button { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Screenshots */
.shot { margin: 12px 0 0; }
.shot img { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7); background: var(--panel); }
.hero-shot { margin-top: clamp(40px, 6vw, 72px); }
.shot.wide { margin-right: calc(-1 * min(var(--gutter), 48px)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(28px, 5vw, 72px); align-items: start; }
.shot.phone img { border-radius: 28px; }

/* Chord shape pop-up */
.shape {
  position: absolute; z-index: 5;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px 10px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8);
  color: var(--text); font: 700 0.95rem/1 var(--mono);
  opacity: 0; transform: translateY(4px); transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.shape.open { opacity: 1; transform: none; }
.shape svg { display: block; margin-top: 8px; }

.foot {
  max-width: 1280px; margin: clamp(80px, 12vw, 160px) auto 0; padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font: 0.9375rem/1.5 var(--sans); color: var(--muted);
}

@media (max-width: 760px) {
  :root { --tagcol: 0px; }
  .tag { position: static; display: inline; width: auto; padding: 0 0.4em 0 0; font-size: 0.9375rem; vertical-align: 0.5em; }
  h2 .tag + .line { display: inline; }
  h2 .tag + .line::after { content: "\A"; white-space: pre; }
  h1 .tag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .count { top: clamp(56px, 9vw, 120px); }
  .split { grid-template-columns: 1fr; }
  .shot.phone { max-width: 18rem; }
.shot.wide { margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Plain reading pages (privacy) */
.prose { max-width: 44rem; padding-top: clamp(40px, 7vw, 88px); display: grid; gap: 1em; }
.prose h1 { font-size: clamp(2.75rem, 7vw, 4.5rem); line-height: 1.05; }
.prose h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); margin-top: 1.4em; }
.prose p { color: var(--muted); }
.prose .updated { font-size: 0.9375rem; }
