/* Home page only. Shared tokens and components live in site.css.
   Layout: every section is a full-width band; its content sits in .wrap (gutters scale with the window,
   capped at --maxw). Running text keeps its own readable measure inside the band. */

/* Hero: short enough that the pillars below it show on the first screen (1280×720 and up; on phones the
   pillar headings start within the first screen). */
.hero { padding-block: clamp(1rem, 2.6vw, 2.25rem) clamp(1.25rem, 2.6vw, 2.25rem); background:
  radial-gradient(70rem 34rem at 85% -10%, var(--accent-soft), transparent 70%); }
.hero-grid { display: grid; gap: var(--space-4) var(--space-6); align-items: center; }
.hero-copy { min-width: 0; }
.hero-copy .eyebrow { margin-bottom: var(--space-2); }
.hero-copy .h1 { margin-bottom: var(--space-3); font-size: clamp(2rem, 7.4vw, 4.25rem); line-height: 1.06; }
.hero-copy .lede { max-width: 32rem; margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.hero-actions.center { justify-content: center; }

/* Mini-demo (hero-demo.js): title, follow-along score, five controls with level meters */
.hero-demo { --instrument: #826c9e; min-width: 0; padding: var(--space-3) var(--space-4) var(--space-4); border-radius: var(--radius-l);
  box-shadow: var(--shadow-2); position: relative; }
@media (prefers-color-scheme: dark) { .hero-demo { --instrument: #b7a3d4; } }
.hd-fallback p { color: var(--ink-soft); }
.hd-head { display: flex; align-items: center; gap: var(--space-3); min-height: 3rem; margin-bottom: var(--space-2); }
.hd-titles { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-3); min-width: 0; margin-right: auto; }
.hd-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.2;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-verse { margin: 0; font-size: .8125rem; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hd-transport { flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-raised);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.hd-transport svg { width: 1.1rem; height: 1.1rem; }
.hd-transport:focus-visible, .hd-part:focus-visible, .hd-sound:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The sheet is always light paper with dark ink, on a light or dark page: a framed card inside the card. */
.hd-stage { position: relative; height: clamp(9.5rem, 30vw, 14rem); border-radius: var(--radius-m); background: #fbf8ef;
  color: #1d1b18; border: 1px solid rgba(60, 50, 30, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 1px 3px rgba(0, 0, 0, .12); overflow: hidden; }
.hd-score { height: 100%; }
/* No scroll bars in the mini-demo: the score still scrolls itself to follow the singing. */
.hd-score, .hd-score * { scrollbar-width: none; -ms-overflow-style: none; }
.hd-score *::-webkit-scrollbar, .hd-score::-webkit-scrollbar { display: none; width: 0; height: 0; }
.hd-over-end { background: rgba(251, 248, 239, .88) !important; color: #1d1b18; }
.hd-score .line-view-notation-wrap { padding: 6px 0; border-radius: var(--radius-m); }
.hd-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: var(--space-3);
  padding: var(--space-3); pointer-events: none; }
.hd-over-sound { flex: none; }
.hd-over > * { pointer-events: auto; }
.hd-over-end { align-items: center; flex-wrap: wrap; background: color-mix(in srgb, var(--bg-raised) 82%, transparent);
  border-radius: var(--radius-m); }
.hd-replay svg { width: 1.1rem; height: 1.1rem; }
.hd-replay { gap: .4rem; }
.hd-sound { display: inline-flex; align-items: center; gap: .55rem; min-height: 3rem; padding: .5rem 1.35rem .5rem 1rem;
  font: inherit; font-size: 1.0625rem; white-space: nowrap; font-weight: 650; color: var(--accent-ink); background: var(--accent); border: 0;
  border-radius: 999px; box-shadow: var(--shadow-2); cursor: pointer; }
.hd-sound:hover { transform: translateY(-1px); }
.hd-sound[disabled] { cursor: progress; opacity: .85; transform: none; }
.hd-sound-icon, .hd-sound-icon svg { width: 1.6rem; height: 1.6rem; display: block; }
.hero-demo[data-mode="muted"] .hd-sound { animation: hd-pulse 2.4s ease-in-out 1.2s 3; }
@keyframes hd-pulse { 50% { box-shadow: var(--shadow-2), 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent); } }

.hd-parts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }
.hd-part { --c: var(--accent); position: relative; display: flex; flex-direction: column; align-items: stretch; gap: .35rem; min-width: 0;
  padding: .45rem .2rem .4rem; font: inherit; font-size: clamp(.7rem, 3.1vw, .9375rem); font-weight: 650; line-height: 1.1;
  color: var(--ink); background: color-mix(in srgb, var(--c) 14%, var(--bg-raised)); border: 2px solid var(--c);
  border-radius: var(--radius-s); cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; }
.hd-part[data-part="instrument"] { --c: var(--instrument); }
.hd-part[data-part="soprano"] { --c: var(--soprano); }
.hd-part[data-part="alto"] { --c: var(--alto); }
.hd-part[data-part="tenor"] { --c: var(--tenor); }
.hd-part[data-part="bass"] { --c: var(--bass); }
.hd-part[aria-pressed="false"] { background: var(--bg-sunken); border-color: var(--line); color: var(--ink-faint); }
.hd-part.is-tour { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 45%, transparent); }
.hd-part.is-solo { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent); }
.hd-part-label { display: flex; align-items: center; justify-content: center; gap: .3rem; min-width: 0; overflow: hidden; white-space: nowrap; }
.hd-part-label svg { width: 1.15em; height: 1.15em; flex: none; }
.hd-meter { display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--c) 18%, var(--bg-sunken)); overflow: hidden; }
.hd-meter i { display: block; height: 100%; background: var(--c); transform: scaleX(0); transform-origin: left; }
.hd-part[aria-pressed="false"] .hd-meter { background: var(--bg); }
.hd-note { margin: var(--space-2) 0 0; font-size: .875rem; color: var(--ink-soft); }
.hd-credit { margin: var(--space-2) 0 0; font-size: .75rem; line-height: 1.3; color: var(--ink-faint); }
@media (max-width: 30rem) {
  .hero-demo { padding: var(--space-2) var(--space-3) var(--space-3); }
  .hd-parts { gap: 6px; }
  .hd-part[data-part="instrument"] .hd-part-label span { display: none; }
  .hd-sound { min-height: 2.75rem; padding: .4rem 1rem .4rem .8rem; font-size: 1rem; }
  .hd-title { font-size: 1.1rem; }
  .hero-actions { gap: var(--space-2); margin-top: var(--space-3); }
  .hero-actions .btn { min-height: 2.75rem; padding: .5rem 1rem; font-size: .9375rem; }
}

/* Pillars: the three messages, a compact row right under the hero */
.pillars { border-block: 1px solid var(--line); background: var(--bg-raised); }
.pillars-grid { display: grid; gap: var(--space-3) var(--space-5); padding-block: clamp(1rem, 2vw, 1.5rem); }
.pillar { min-width: 0; max-width: 30rem; }
.pillar-title { margin: 0 0 .2rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.2; }
.pillar-title::before { content: ""; display: block; width: 2rem; height: 3px; border-radius: 2px; margin-bottom: var(--space-2); background: var(--accent); }
.pillar p { margin: 0; color: var(--ink-soft); font-size: .9375rem; line-height: 1.45; }

/* Section bands */
.features, .more, .who, .teaser { padding-block: var(--band); }
.more { background: var(--bg-sunken); }
.who { padding-bottom: 0; }
.section-title { text-align: center; margin-bottom: clamp(2rem, 4.5vw, 4.5rem); }

/* Feature strips: still image beside its text */
.strips { display: grid; gap: clamp(3.5rem, 8vw, 8rem); }
.strip { display: grid; gap: var(--space-5); align-items: center; }
.strip-media { min-width: 0; }
.strip-media .shot-phone { max-width: 15rem; margin-inline: auto; }
.strip-text { min-width: 0; }
.strip-text .lede { margin-bottom: var(--space-5); max-width: 30rem; }

/* "And more": six small cards */
.mini-grid { display: grid; gap: var(--space-6) var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini { display: flex; flex-direction: column; min-width: 0; text-align: center; }
/* Every card's picture sits in the same box, so the titles below line up. */
.mini-media { position: relative; aspect-ratio: 5 / 8; margin-bottom: var(--space-4); }
.mini-media .shot { position: absolute; inset: 0; margin: auto; box-shadow: var(--shadow-1); }
.mini-media .shot-phone { width: auto; height: 100%; max-width: 100%; }
.mini-media .shot-wide { width: 100%; height: auto; }
.mini .h3 { font-size: 1.15rem; }
.mini p { font-size: .9375rem; color: var(--ink-soft); margin-bottom: var(--space-2); }
.mini a { margin-top: auto; font-weight: 600; }

/* Who */
.who-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.who-grid p { margin: 0; color: var(--ink-soft); }

/* Teaser */
.teaser-box { background: var(--bg-sunken); border-radius: var(--radius-l); padding: clamp(2.5rem, 5vw, 4.5rem) var(--space-5); text-align: center; }
.teaser-box .lede { margin-inline: auto; max-width: 44rem; }
.teaser-form { display: flex; flex-wrap: wrap; gap: var(--space-3); max-width: 34rem; margin: var(--space-5) auto 0; }
.teaser-form input { flex: 1 1 14rem; min-width: 0; min-height: 3rem; padding: .6rem 1rem; font: inherit; color: var(--ink);
  background: var(--bg-raised); border: 1.5px solid var(--line); border-radius: 999px; }
@media (max-width: 30rem) { .teaser-form .btn { width: 100%; } }
.teaser-form input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

/* Closing */
.closing { padding-block: var(--band); text-align: center; background: var(--accent-soft); }
.closing .h1 { max-width: 22ch; margin-inline: auto; }
.closing .lede { margin: var(--space-4) auto 0; }
.closing-beta { margin: var(--space-4) 0 0; }
.link-btn { font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; padding: .5rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: .18em; }
.link-btn:hover { text-decoration-thickness: 2px; }
body:has(.closing) .site-footer { margin-top: 0; }   /* the closing band sits right on the footer */

@media (prefers-reduced-motion: reduce) { .hero-demo .hd-sound { animation: none; } }

@media (min-width: 40rem) {
  .pillars-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
}
@media (min-width: 48rem) {
  .who-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-7) var(--space-5); }
  .mini-media { aspect-ratio: 4 / 5; }
  .strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); }
  .strip.flip .strip-media { order: 2; }
  .strip.strip-land { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .strip-media .shot-phone { max-width: 17rem; }
}
@media (min-width: 64rem) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 4vw, 5rem); }
  .hero-copy .h1 { font-size: clamp(2.6rem, 3.6vw, 4.5rem); }
  .who-grid { grid-template-columns: repeat(4, 1fr); }
  /* Strips: picture and text each take half; the text keeps a readable measure. */
  .strips { max-width: 88rem; margin-inline: auto; }
  .strip, .strip.flip { gap: clamp(3rem, 7vw, 8rem); }
  .strip-media .shot-phone { max-width: 20rem; }
  .strip.flip .strip-text { justify-self: end; }
  .strip.strip-land { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(3rem, 5vw, 6rem); }
}
@media (min-width: 1800px) {
  .mini-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .strip-media .shot-phone { max-width: 22rem; }
}
