/* Campfire Chords — campfirechords.app
   Neutral near-black ground with the product's own chord green as the accent
   (matches the overlay's rendering in the screenshots); warm-paper light
   theme with a darker green for contrast. All colors flow through tokens. */

:root {
  --bg: #131211;
  --bg-raised: #1c1a18;
  --bg-inset: #0d0c0b;
  --ink: #f2efea;
  --muted: #a49e94;
  --accent: #1ed760;
  --accent-strong: #3be477;
  --accent-ink: #05230f;
  --line: rgba(242, 239, 234, 0.14);
  --line-soft: rgba(242, 239, 234, 0.07);
  --glow: rgba(30, 215, 96, 0.12);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Noto Sans TC", "Noto Sans JP", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f6f2;
    --bg-raised: #fffefb;
    --bg-inset: #edeae4;
    --ink: #191713;
    --muted: #6f6a60;
    --accent: #128a3e;
    --accent-strong: #0d6e30;
    --accent-ink: #f2fff7;
    --line: rgba(25, 23, 19, 0.16);
    --line-soft: rgba(25, 23, 19, 0.08);
    --glow: rgba(18, 138, 62, 0.1);
  }
}
:root[data-theme="dark"] {
  --bg: #131211;
  --bg-raised: #1c1a18;
  --bg-inset: #0d0c0b;
  --ink: #f2efea;
  --muted: #a49e94;
  --accent: #1ed760;
  --accent-strong: #3be477;
  --accent-ink: #05230f;
  --line: rgba(242, 239, 234, 0.14);
  --line-soft: rgba(242, 239, 234, 0.07);
  --glow: rgba(30, 215, 96, 0.12);
}
:root[data-theme="light"] {
  --bg: #f8f6f2;
  --bg-raised: #fffefb;
  --bg-inset: #edeae4;
  --ink: #191713;
  --muted: #6f6a60;
  --accent: #128a3e;
  --accent-strong: #0d6e30;
  --accent-ink: #f2fff7;
  --line: rgba(25, 23, 19, 0.16);
  --line-soft: rgba(25, 23, 19, 0.08);
  --glow: rgba(18, 138, 62, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent-strong); text-decoration: underline; }
a:focus-visible, button:focus-visible,
[data-frets]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- header ---------- */
header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 0; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .flame { font-size: 1.2rem; line-height: 1; }
nav.top { display: flex; gap: 22px; font-size: 0.92rem; flex-wrap: wrap; }
nav.top a { color: var(--muted); }
nav.top a:hover { color: var(--ink); text-decoration: none; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 48px; align-items: center; padding: 72px 0 64px;
}
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; padding-top: 48px; } }

/* the headline set exactly the way the product sets chords over lyrics */
.chordline { margin: 0 0 8px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; }
.chordline .w {
  display: inline-block; position: relative;
  margin-right: 0.26em; padding-top: 0.62em;
  font-size: clamp(2.2rem, 4.6vw, 3.1rem);
}
.chordline .ch {
  position: absolute; top: 0.06em; left: 0.02em;
  font-family: var(--mono); font-weight: 700;
  font-size: 0.4em; letter-spacing: 0;
  color: var(--accent); cursor: default;
}
@media (prefers-reduced-motion: no-preference) {
  .chordline .ch { opacity: 0; transform: translateY(6px); animation: settle 0.5s ease-out forwards; }
  .chordline .w:nth-child(1) .ch { animation-delay: 0.15s; }
  .chordline .w:nth-child(2) .ch { animation-delay: 0.3s; }
  .chordline .w:nth-child(3) .ch { animation-delay: 0.45s; }
  .chordline .w:nth-child(4) .ch { animation-delay: 0.6s; }
  @keyframes settle { to { opacity: 1; transform: none; } }
}

.hero p.lede { font-size: 1.16rem; color: var(--muted); max-width: 34em; margin: 18px 0 30px; }
.hero p.lede strong { color: var(--ink); font-weight: 600; }
.hero p.lede strong.free { color: var(--accent); font-weight: 700; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; border: 1px solid transparent;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); text-decoration: none; }
.btn.ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn.ghost:hover { border-color: var(--accent); text-decoration: none; }
.cta-note { width: 100%; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* screenshots + demo framed as player cards */
.shot {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--bg-inset); margin: 0;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55), 0 0 80px var(--glow);
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  padding: 10px 14px; font-size: 0.82rem; color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

/* the hero demo — a lyrics panel in miniature (fixed dark, like the player) */
.demo .demo-stage {
  height: 350px; overflow: hidden; position: relative;
  background: #23332b; padding: 26px 26px 0;
}
.demo .demo-lines { transition: transform 0.55s cubic-bezier(0.3, 0, 0.2, 1); will-change: transform; }
.demo .dl {
  margin: 0 0 18px; font-weight: 800; font-size: 1.28rem; line-height: 1.15;
  color: rgba(255, 255, 255, 0.45); letter-spacing: -0.01em;
  transition: color 0.4s ease;
}
.demo .dl.active { color: #fff; }
.demo .dw { display: inline-block; position: relative; padding-top: 0.95em; margin-right: 0.26em; }
.demo .dch {
  position: absolute; top: 0; left: 0.02em;
  font-family: var(--mono); font-weight: 700; font-size: 0.68em;
  color: #1ed760; cursor: default;
}
/* "more below" fade: STICKY, not absolute — an absolute bottom-anchored
   overlay scrolls away with the content and ends up dimming a mid-list
   line once the user scrolls. Sticky clamps to the visible bottom edge. */
.demo .demo-stage::after {
  content: ""; display: block; position: sticky; bottom: 0; height: 56px;
  margin-top: -56px;
  background: linear-gradient(transparent, #23332b);
  pointer-events: none;
}
.demo .demo-ytm::after { background: linear-gradient(transparent, #050505); }
.demo figcaption .demo-song { color: var(--ink); opacity: 0.75; float: right; }

/* fretboard tooltip (page-side; only the shapes hardcoded in the markup) */
.sitetip {
  position: fixed; z-index: 60; pointer-events: none;
  background: rgba(18, 18, 18, 0.96); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px; padding: 6px 10px 4px; color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); text-align: left;
}
.sitetip .t-head { font: 700 20px var(--mono); color: #1ed760; text-align: center; }
.sitetip .t-line { stroke: rgba(255, 255, 255, 0.45); stroke-width: 1; }
.sitetip .t-nut { stroke-width: 3; }
.sitetip .t-dot { fill: #fff; }
.sitetip .t-xo { fill: rgba(255, 255, 255, 0.8); font: 14px var(--sans); }
.chords-sample [data-frets] { cursor: default; }

/* ---------- sections ---------- */
section { padding: 56px 0; border-top: 1px solid var(--line-soft); }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 10px;
}
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.015em; margin: 0 0 14px; text-wrap: balance; }
.section-lede { color: var(--muted); max-width: 44em; margin: 0 0 36px; }
#pricing .section-lede { margin-bottom: 0; }

/* how it works — a real sequence */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: step; padding: 22px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--bg-raised); }
.step::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--mono); font-weight: 700; font-size: 0.9rem; margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* features */
/* minmax(0,…): a 1fr track refuses to shrink below its content's min width,
   so one nowrap line (the YTM demo) silently unbalances the two columns. */
.features { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
.feature {
  padding: 24px; border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--bg-raised); display: flex; flex-direction: column; gap: 10px;
}
.feature h3 { margin: 0; font-size: 1.1rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.feature .shot { margin-top: 8px; box-shadow: none; }
/* side-by-side feature screenshots: same aspect box for both, pinned to the
   card bottom, so the pair's top and bottom edges align. Ratio = the tooltip
   shot's native 574x461 (it shows uncropped); the taller zh shot crops its
   bottom (just the player bar). */
.feature .shot-pair { margin-top: auto; aspect-ratio: 574 / 558; }
.feature .shot-pair img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.feature .chords-sample { font-family: var(--mono); color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.feature .chords-sample [data-frets] { color: var(--accent); font-weight: 700; }

/* get it */
.get { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .get { grid-template-columns: 1fr; } }
.get .card {
  padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raised);
  display: flex; flex-direction: column; gap: 12px;
}
.get .card h3 { margin: 0; font-size: 1.2rem; }
.get .card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.get .card .spacer { flex: 1; }
.cmd-wrap { position: relative; margin-top: 12px; }
pre.cmd {
  margin: 0; padding: 14px 44px 14px 16px; border-radius: 10px;
  background: var(--bg-inset); border: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 0.82rem; color: var(--ink);
  overflow-x: auto; white-space: pre;
}
button.copy-icon {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-raised); color: var(--muted); cursor: pointer;
}
button.copy-icon:hover { color: var(--ink); border-color: var(--accent); }
button.copy-icon.done { color: var(--accent); border-color: var(--accent); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  border: 1px solid var(--line); color: var(--muted); width: fit-content;
}
.badge.live { border-color: var(--accent); color: var(--accent); }

/* faq */
.faq details {
  border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--bg-raised); margin-bottom: 10px; padding: 0 18px;
}
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 600; list-style-position: inside; }
.faq details p { margin: 0 0 16px; color: var(--muted); font-size: 0.95rem; max-width: 60em; }

/* footer */
footer.site {
  border-top: 1px solid var(--line-soft); padding: 36px 0 48px;
  color: var(--muted); font-size: 0.85rem;
}
footer.site .links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }
footer.site p { margin: 6px 0; max-width: 62em; }

/* ---------- legal doc pages ---------- */
main.doc { max-width: 720px; margin: 0 auto; padding: 40px 24px 80px; }
main.doc h1 { font-size: 1.9rem; letter-spacing: -0.015em; margin: 28px 0 6px; }
main.doc .updated { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 30px; }
main.doc h2 { font-size: 1.2rem; margin: 34px 0 10px; }
main.doc p, main.doc li { color: var(--ink); font-size: 0.98rem; }
main.doc ul { padding-left: 1.2em; }

/* header language switcher */
.lang { margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(0,0,0,.15); white-space: nowrap; }
.lang a { margin-right: 8px; opacity: .65; }
.lang a.on { opacity: 1; font-weight: 700; }

/* YTM demo embedded in a feature card — real YT Music is plain black */
.demo-card { margin-top: 12px; }
.demo.demo-card .demo-stage { height: 300px; background: #050505; }
.demo.demo-card .demo-stage::after { background: linear-gradient(transparent, #050505); }

/* YTM static-sheet demo variant: the full lyric sheet, scrollable like the
   real YT Music lyrics tab (no highlight — every line equally bright) */
.demo .demo-ytm { overflow-y: auto; padding-bottom: 40px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; }
.demo .demo-ytm::-webkit-scrollbar { width: 8px; }
.demo .demo-ytm::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 4px; }
.demo-static .dsl { margin: 0 0 16px; font-weight: 650; font-size: 0.92rem; line-height: 1.2; color: #f4f2ea; letter-spacing: -0.005em; white-space: nowrap; }
/* preGap room: like the real overlay, a chord that rings BEFORE a line's
   first word floats ~1.7em left of it — the lines are indented to give the
   float space (mirrors the product's lines-container left padding). */
.demo .demo-static { padding-left: 2.1em; }
.demo .dch.dpre { left: -2.5em; } /* 1.7 lyric-em ÷ 0.68 chord-em */

/* player-brand highlights in the hero lede */
.brand-spotify, .brand-ytm { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

.brand .brand-mark { vertical-align: -4px; border-radius: 5px; }

/* browser-card install steps + desktop mac note */
.card .install-steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 0.95rem; }
.card .install-steps li { margin: 6px 0; }
/* desktop card OS toggle: pill tabs; only the active OS block renders */
.os-toggle { display: inline-flex; gap: 6px; margin: 2px 0 0; }
.os-tab {
  font: inherit; font-size: 0.85rem; font-weight: 600; padding: 4px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer;
}
.os-tab.active { border-color: var(--accent); color: var(--accent); }
.os-block { display: none; }
.os-block.active { display: block; }

/* FAQ bullet lists — match .faq details p typography */
.faq details ul { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 0.95rem; max-width: 60em; }
.faq details li { margin: 6px 0; }

/* syllable groups: chords anchored mid-word, but the WORD wraps as one unit */
.demo .dwg { display: inline-block; white-space: nowrap; margin-right: 0.26em; }
.demo .dwg .dw { margin-right: 0; }

/* hero demo: a lyric line never wraps (words like "you" stay on their line);
   slightly smaller than the original 1.28rem to buy the horizontal room */
.demo .dl { white-space: nowrap; font-size: 1.16rem; }
@media (max-width: 640px) { .demo .dl { white-space: normal; font-size: 1.02rem; } }

/* ring-out chords (chord over no lyric): an invisible ghost of the chord
   name sizes the chunk to exactly the chord's width — no overlap */
.demo .dghost { visibility: hidden; font-family: var(--mono); font-weight: 700; font-size: 0.68em; }

/* min-width ghost: a zero-height block copy of the chord widens the chunk
   to max(text, chord) when the chord is wider than its syllable (Cadd9/ow) */
.demo .dgmin { display: block; height: 0; overflow: hidden; visibility: hidden; font-family: var(--mono); font-weight: 700; font-size: 0.68em; }
