/* Roots of Rhythm
   Direction: colour chapters (tasteskill v2, seed 832317843). Type: Roundo.
   Palette: the client's own four colours (Sandy Brown, Chestnut, Blue Slate, Powder Blue) on a neutral ground.
   Every chapter is one flat field; a stressed syllable is a big drum head, a weak one a small drum head. */

:root {
  --bg: #f7f7f5;
  --surface: #ebebe8;
  --ink: #000000;
  --muted: #666662;
  --accent: #902d2a;      /* Chestnut: white text 8.1:1 */
  --accent-ink: #ffffff;
  --sandy: #fcaa67;       /* Sandy Brown: black text 11.1:1 */
  --powder: #95b8d1;      /* Powder Blue: black text 10.1:1 */
  --slate: #4f5d75;       /* Blue Slate: white text 6.7:1 */
  --on-dark: #ffffff;

  --font: "Roundo", "Nunito", "Avenir Next", ui-rounded, system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.75rem, 0.5rem + 8.2vw, 8rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(0.75rem, 1.6vw, 1.5rem);
  --gap: 8px;
  --pad: clamp(4.5rem, 8vw, 7.5rem);        /* inside each chapter, top and bottom */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
  --stagger-item: 80ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.5; font-weight: 400;
  font-kerning: normal; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; hyphens: none; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
p { text-wrap: pretty; }
.nobr { white-space: nowrap; }
i { font-style: italic; }
:target { scroll-margin-top: 1.5rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
/* on the Chestnut grounds a Chestnut highlight would vanish, so select in Sandy Brown there */
.steps ::selection, .qa[open] ::selection, .book ::selection, .tile--accent ::selection { background: var(--sandy); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.display { font-size: var(--step-display); line-height: 1.05; letter-spacing: -0.025em; font-weight: 500; }
.head { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.025em; font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.only-narrow { display: none; }
html:not(.js) .needs-js { display: none; }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; transition: text-decoration-color var(--t-hover) ease; }
.link-plain { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
  .link-plain:hover { text-decoration-thickness: 0.14em; }
}

/* one button shape for the whole page: fully round, ink fill */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.6rem;
  border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; white-space: nowrap;
  font-weight: 500; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .button:hover { background: var(--accent); color: var(--accent-ink); } }

.field {
  width: 100%; min-height: 3.25rem; padding: 0.7rem 1.1rem; border: 0; border-radius: 999px;
  background: var(--bg); color: var(--ink); font-size: max(1rem, var(--step-body));
}
.field:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.tile { margin: 0; overflow: hidden; }
.tile--ink { background: var(--ink); color: var(--bg); }
.tile--sandy { background: var(--sandy); }
.tile--powder { background: var(--powder); }
.tile--slate { background: var(--slate); color: var(--on-dark); }
.tile--accent { background: var(--accent); color: var(--accent-ink); }
.tile--surface { background: var(--surface); }
.tile--ink :focus-visible, .tile--slate :focus-visible, .tile--accent:focus-visible,
.steps :focus-visible, .play :focus-visible { outline-color: var(--on-dark); }

/* ---------- hero: two drum heads, seen from above ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: clip; background: var(--bg);
  display: grid; grid-template-rows: auto 1fr; padding: var(--margin);
}
/* the nav sits on its own strip of ground, so its links never fall on the photograph */
.nav { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: calc(var(--margin) * -1) calc(var(--margin) * -1) 0; padding: var(--margin); background: var(--bg); }
.nav__mark { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.nav__links { display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); }
.nav__links a { text-decoration-color: transparent; }
.hero__drums { position: absolute; inset: 0; pointer-events: none; }
.hero__drum { position: absolute; display: block; max-width: none; overflow: visible; }
.hero__drum circle { transform-box: fill-box; transform-origin: center; transition: transform 180ms var(--ease-out); }
.hero__drum.is-hit circle { transform: scale(0.965); transition-duration: 60ms; }
.hero__drum--bass img { width: 100%; height: 100%; max-width: none; border-radius: 50%; object-fit: cover; background: var(--sandy); transition: transform 180ms var(--ease-out); }
.hero__drum--bass.is-hit img { transform: scale(0.965); transition-duration: 60ms; }
.hero__drum--bass { width: 120svh; height: 120svh; left: max(calc(84% - 60svh), 600px); top: calc(52% - 60svh); }
.hero__drum--tone { width: 46svh; height: 46svh; left: max(calc(52% - 23svh), 520px); top: calc(92% - 23svh); fill: var(--accent); mix-blend-mode: multiply; }
.hero__copy { position: relative; z-index: 1; align-self: center; max-width: min(46vw, 40rem); padding-block: 2rem; }
.hero__logo { width: clamp(5.5rem, 8vw, 7.5rem); height: auto; margin-bottom: clamp(1rem, 2vw, 1.5rem); }
.hero__title { margin-left: -0.04em; }
.hero__lead { margin-top: clamp(1.5rem, 2.6vw, 2.5rem); max-width: 30ch; font-size: var(--step-lead); line-height: 1.35; }
.hero__actions { margin-top: clamp(1.5rem, 2.6vw, 2.5rem); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }

/* the name as a beat: ROOTS of RHY-thm */
.name-beat { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 3.25rem; font-weight: 500; }
.name-beat > span:last-child { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
.name-beat__drums { display: inline-flex; align-items: center; gap: 0.3rem; }
.name-beat__drums i { display: block; border-radius: 50%; background: currentColor; }
.name-beat__drums i[data-s="1"] { width: 1.35rem; height: 1.35rem; }
.name-beat__drums i[data-s="0"] { width: 0.6rem; height: 0.6rem; }
.name-beat__drums .is-hit { background: var(--accent); transform: scale(0.86); }

.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.lines [data-line] { display: block; }

/* ---------- steps: tiles that grow ---------- */
.steps { position: relative; background: var(--accent); color: var(--on-dark); padding: var(--pad) var(--margin); }
.steps__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.steps__title { grid-column: 1 / 7; }
.steps__photo { margin: 0 0 clamp(2.5rem, 5vw, 4rem); overflow: clip; }
.steps__photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 58%; }
.steps__lead { grid-column: 7 / 13; max-width: 34ch; font-size: var(--step-lead); line-height: 1.35; color: var(--on-dark); }
.steps__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: 10px; }
.step { display: grid; grid-template-rows: subgrid; grid-row: 1 / 3; }
.step--1 { grid-column: 1 / 4; }
.step--2 { grid-column: 4 / 8; }
.step--3 { grid-column: 8 / 13; }
.step__tile { align-self: end; margin: 0; overflow: hidden; }
.step--1 .step__tile { height: 30vh; background: var(--sandy); }
.step--2 .step__tile { height: 44vh; background: var(--powder); }
.step--3 .step__tile { height: 60vh; background: var(--bg); }
.step__tile img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.step--1 .step__tile img { object-position: 50% 0%; }
.step--2 .step__tile img { object-position: 50% 0%; }
.step--3 .step__tile img { object-position: 50% 80%; }
.step__text { padding-top: 1.25rem; display: flex; flex-direction: column; align-items: flex-start; }
.step__text h3 { font-size: var(--step-lead); line-height: 1.2; font-weight: 500; }
.step__text p { margin-top: 0.4rem; max-width: 34ch; color: var(--on-dark); }
.step__facts { font-weight: 500; }
.step__text p:last-of-type { margin-bottom: 1.5rem; }
.step__signup { margin-top: auto; }
.button--light { background: var(--bg); color: var(--ink); }

/* ---------- where we meet: the studio, in Powder Blue between the beat maker and Drum a word ---------- */
.venue { background: var(--powder); color: var(--ink); padding: var(--pad) var(--margin); }
.venue__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.venue__title { grid-column: 1 / 7; }
.venue__text { grid-column: 7 / 13; }
.venue__lead { max-width: 34ch; font-size: var(--step-lead); line-height: 1.35; }
.venue__head:last-child { margin-bottom: 0; }
.venue__go { margin-top: 0.75rem; }
.venue__go a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
/* for the Dance Annex photographs, back the day the venue says yes (spare-photos/venue-*.webp) */
.venue__photos { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.venue__photo { margin: 0; overflow: hidden; }
.venue__photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* the door fills the height of the two rooms beside it; its picture never sizes the rows */
.venue__photo--door { grid-column: 1 / 8; grid-row: 1 / 3; position: relative; min-height: 16rem; }
.venue__photo--door img { position: absolute; inset: 0; }
.venue__photo:nth-child(2) { grid-column: 8 / 13; grid-row: 1; aspect-ratio: 16 / 9; }
.venue__photo:nth-child(3) { grid-column: 8 / 13; grid-row: 2; aspect-ratio: 16 / 9; }

/* ---------- play: drum a word ---------- */
.play { background: var(--slate); color: var(--on-dark); padding: var(--pad) var(--margin); min-height: 90svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: var(--gutter); row-gap: clamp(2.5rem, 5vw, 4.5rem); }
.play__head { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.play__head h2 { grid-column: 1 / 6; }
.play__lead { grid-column: 7 / 13; max-width: 38ch; font-size: var(--step-lead); line-height: 1.35; }
.play__stage { grid-column: 1 / 8; align-self: center; }
.word { display: flex; flex-wrap: wrap; align-items: flex-end; gap: clamp(1rem, 2.4vw, 2.5rem) clamp(0.9rem, 2.2vw, 2.25rem); font-size: var(--display-fit, var(--step-display)); }
.word.is-long { font-size: var(--step-head); }
.syl { display: flex; flex-direction: column; align-items: center; gap: 0.18em; padding: 0.06em 0.04em; line-height: 1; letter-spacing: -0.025em; border-radius: 0.2em; }
.syl i { display: block; border-radius: 50%; background: var(--on-dark); transition: transform 160ms var(--ease-out), background-color 120ms ease; }
.syl[data-s="1"] i { width: 0.92em; height: 0.92em; }
.syl[data-s="2"] i { width: 0.6em; height: 0.6em; }
.syl[data-s="0"] i { width: 0.32em; height: 0.32em; }
.syl[data-s="1"] span { font-weight: 600; }
.syl.is-hit i { background: var(--sandy); transform: scale(0.88); }
.syl.is-hit span { color: var(--sandy); }
.word__whole { display: block; width: 100%; line-height: 1; letter-spacing: -0.025em; font-weight: 500; }
.play__note { margin-top: clamp(1.5rem, 3vw, 2.5rem); max-width: 44ch; font-size: var(--step-lead); line-height: 1.35; }
.play__controls { grid-column: 8 / 13; align-self: center; display: grid; row-gap: 2rem; }
.chips { display: flex; flex-wrap: wrap; gap: var(--gap); }
.chip {
  min-height: 2.75rem; padding: 0 1.1rem; border-radius: 999px; background: var(--bg); color: var(--ink); font-weight: 500;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--sandy); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .chip:not([aria-pressed="true"]):hover { background: var(--ink); color: var(--bg); }
  .play .button:hover { background: var(--sandy); color: var(--ink); }
}
.own { }
.own__label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.own__row { display: flex; gap: var(--gap); }

/* ---------- time signature: one bar of drum heads ---------- */
.meter { background: var(--bg); padding: var(--pad) var(--margin); }
.meter__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.meter__intro { grid-column: 1 / 7; }
.meter__lead { margin-top: 1.25rem; max-width: 40ch; font-size: var(--step-lead); line-height: 1.35; }
.meter__choose { grid-column: 7 / 13; justify-self: end; display: flex; flex-wrap: wrap; gap: var(--gap); }
.meter__sig {
  display: grid; place-content: center; width: clamp(3.75rem, 6vw, 5.25rem); aspect-ratio: 1; border-radius: 50%;
  background: var(--surface); color: var(--ink); font-size: clamp(1.15rem, 1.7vw, 1.6rem); font-weight: 600; line-height: 0.95; text-align: center;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.meter__sig span { display: block; }
.meter__sig:active { transform: scale(0.95); }
.meter__sig[aria-checked="true"] { background: var(--ink); color: var(--bg); }
@media (hover: hover) and (pointer: fine) { .meter__sig:not([aria-checked="true"]):hover { background: var(--sandy); } }
.meter__kits { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; margin-bottom: 0.75rem; font-size: var(--step-body); }
.tab { min-height: 2.75rem; color: var(--ink); font-weight: 400; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.3em; text-decoration-thickness: 3px; transition: text-decoration-color var(--t-hover) ease; }
.tab[aria-selected="true"] { font-weight: 600; text-decoration-color: currentColor; }
@media (hover: hover) and (pointer: fine) { .tab:hover { text-decoration-color: currentColor; } }
/* two bars: labels, bar 1 and bar 2 in three columns, so both bars' steps are the same width */
.meter__grid { display: grid; grid-template-columns: 5.5rem 1fr 1fr; column-gap: 1.5rem; }
.meter__bar { display: grid; row-gap: 0.25rem; align-content: start; }
.meter__bar--1 { grid-column: 1 / 3; }
.meter__bar--1 .meter__row { grid-template-columns: 7rem 1fr; }
.meter__bar--2 { grid-column: 3; position: relative; }
.meter__bar--2 .meter__row { grid-template-columns: 1fr; }
.meter__bar--2 .meter__voice { display: none; }
.meter__bar--2::before { content: ""; position: absolute; left: -0.75rem; top: 0.75rem; bottom: 2.25rem; width: 1px; background: #d6d6d0; }
.meter__row { display: grid; grid-template-columns: 5.5rem 1fr; align-items: center; }
.meter__voice { font-weight: 500; white-space: nowrap; }
.meter__cells { display: flex; }
.meter__cell { flex: 1 1 0; min-width: 0; height: 4rem; display: grid; place-items: center; border-radius: 999px; transition: background-color 90ms linear; }
.meter__cell.is-start:not(:first-child), .meter__count .is-start:not(:first-child) { margin-left: clamp(0.4rem, 1.2vw, 1.25rem); }
.meter__cell i { display: block; border-radius: 50%; background: #d6d6d0; transition: transform 140ms var(--ease-out), background-color 120ms ease; }
/* the dot grows with the drum: 1 is the highest sound (clave, ka), 5 the lowest (conga 2, dum) */
.meter__row[data-size="1"] .meter__cell i { width: min(1rem, 1.3vw); height: min(1rem, 1.3vw); }
.meter__row[data-size="2"] .meter__cell i { width: min(1.3rem, 1.7vw); height: min(1.3rem, 1.7vw); }
.meter__row[data-size="3"] .meter__cell i { width: min(1.6rem, 2.1vw); height: min(1.6rem, 2.1vw); }
.meter__row[data-size="4"] .meter__cell i { width: min(2rem, 2.6vw); height: min(2rem, 2.6vw); }
.meter__row[data-size="5"] .meter__cell i { width: min(2.4rem, 3.1vw); height: min(2.4rem, 3.1vw); }
.meter__row[data-ink="accent"] .meter__cell[aria-pressed="true"] i { background: var(--accent); }
.meter__row[data-ink="slate"] .meter__cell[aria-pressed="true"] i { background: var(--slate); }
.meter__row[data-ink="ink"] .meter__cell[aria-pressed="true"] i { background: var(--ink); }
.meter__cell.is-now { background: var(--sandy); }
.meter__cell.is-now[aria-pressed="true"] i { transform: scale(1.14); }
@media (hover: hover) and (pointer: fine) { .meter__cell:not(.is-now):hover { background: var(--surface); } }
.meter__count { margin-top: 0.5rem; }
.meter__count span { flex: 1 1 0; min-width: 0; text-align: center; font-size: var(--step-small); color: var(--muted); }
.meter__count span.is-start { color: var(--ink); font-weight: 600; }
.meter__controls { margin-top: clamp(1.75rem, 3.5vw, 3rem); display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 1.25rem 2.5rem; }
.meter__play { min-width: 7.5rem; }
.meter__tempo { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; }
.meter__tempo input { width: clamp(8rem, 16vw, 13rem); accent-color: var(--accent); }
.meter__tempo output { min-width: 4.6em; font-variant-numeric: tabular-nums; font-weight: 400; }
.meter__note { justify-self: end; max-width: 46ch; }

/* ---------- questions: accordion of filled tiles ---------- */
.faq { background: var(--bg); padding: var(--pad) var(--margin); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.faq__title { grid-column: 1 / 5; position: sticky; top: 6rem; }
.faq__list { grid-column: 5 / 13; display: grid; gap: var(--gap); }
.qa { background: var(--surface); transition: background-color var(--t-ui) ease, color var(--t-ui) ease; }
.qa summary {
  position: relative; display: flex; align-items: center; min-height: 4.5rem; padding: 1rem 4.5rem 1rem 1.5rem;
  font-size: var(--step-body); font-weight: 500; line-height: 1.3; cursor: pointer; list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before, .qa summary::after {
  content: ""; position: absolute; right: 1.5rem; top: 50%; width: 16px; height: 3px; margin-top: -1.5px;
  border-radius: 2px; background: currentColor; transition: transform var(--t-ui) var(--ease-out);
}
.qa summary::after { transform: rotate(90deg); }
.qa[open] { background: var(--accent); color: var(--accent-ink); }
.qa[open] summary::after { transform: rotate(0deg); }
.qa[open] :focus-visible { outline-color: var(--accent-ink); }
.qa__panel p { padding: 0 1.5rem 1.5rem; max-width: 52ch; font-size: var(--step-body); }
@media (hover: hover) and (pointer: fine) { .qa:not([open]) summary:hover { background: #e2e2de; } }

/* ---------- book: the whole band is the button; a line from Paul Simon's song closes the page ---------- */
.book { background: var(--accent); }
.book__link { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: clamp(3rem, 8vw, 6rem); min-height: min(72svh, 56vw); padding: var(--margin); color: var(--accent-ink); text-decoration: none; overflow: hidden; container-type: inline-size; }
.book__next { max-width: 26ch; font-size: var(--step-body); line-height: 1.4; }
.book__arrow { position: absolute; top: var(--margin); right: var(--margin); width: 48px; height: 48px; }
.book__quote { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.book__quote blockquote { margin: 0; }
/* the song's two lines, one per line across the band: 15.04em at weight 500 with the opening mark hung,
   measured in Roundo (26 November 2026), so 15.5 leaves a little room for other renderers */
.book__quote p { padding-left: 0.33em; font-size: min(100vw / 16.5, 11rem); font-size: min(100cqi / 15.5, 11rem); line-height: 1.05; letter-spacing: -0.025em; font-weight: 500; }
.book__line { display: block; white-space: nowrap; }
.book__open { margin-left: -0.33em; }
.book__quote figcaption { font-size: var(--step-body); line-height: 1.4; }
.book__quote cite { font-style: normal; }
.book__link:hover, .book__link:focus-visible { background: var(--accent-ink); color: var(--accent); }
.book__link:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }

/* ---------- footer: the last rows of the board ---------- */
.footer { background: var(--bg); padding: var(--margin); }
.footer__board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.footer__board > .tile { padding: 1.25rem 1.5rem; }
.footer__statement { grid-column: 1 / 5; min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.footer__line { font-size: var(--step-lead); line-height: 1.3; max-width: 22ch; }
.footer__legal { font-size: var(--step-small); }
.footer__nav { grid-column: 5 / 8; min-height: 220px; }
.footer__nav ul { display: grid; gap: 0.3rem; }
.footer__place { grid-column: 8 / 10; min-height: 220px; display: flex; flex-direction: column; gap: 0.3rem; }
.footer__place p:first-child, .footer__contact p { font-weight: 500; }
.footer__contact { grid-column: 10 / 13; min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; }
.footer__handle { font-size: var(--step-body); overflow-wrap: anywhere; }
.footer__mark { grid-column: 1 / 9; min-height: 320px; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.footer__logo { width: auto; height: min(15rem, 100%); max-height: 15rem; }
.footer__invite {
  grid-column: 9 / 13; min-height: 320px; display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none; font-size: var(--step-lead); line-height: 1.2; font-weight: 500;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.footer__invite svg { align-self: flex-end; width: 64px; height: 64px; transition: transform var(--t-ui) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .footer__invite:hover { background: var(--ink); color: var(--bg); }
  .footer__invite:hover svg { transform: translate(4px, -4px); }
}
.footer__notes { grid-column: 1 / -1; padding: 1rem 0 0.5rem; display: grid; gap: 0.75rem; }
.footer__notes p { max-width: 56ch; }

/* ---------- motion (the finished page is the reduced-motion page) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero [data-line] { transform: translateY(105%); animation: rise-line 900ms var(--ease-expo) forwards; animation-delay: calc(120ms + var(--i) * 100ms); }
  .js .hero [data-load] { opacity: 0; transform: translateY(14px); animation: rise-in 600ms var(--ease-out) forwards; animation-delay: var(--d); }
  .js .hero__drum--bass { transform: translateX(14%); animation: drum-in 1200ms var(--ease-expo) 60ms forwards; }
  .js .hero__drum--tone { transform: translateY(30%); animation: drum-in 1100ms var(--ease-expo) 260ms forwards; }

  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * var(--stagger-item)); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .shutter[data-reveal] { opacity: 1; transform: none; }
  .js .shutter[data-reveal] img { clip-path: inset(0 0 100% 0); transform: scale(1.12); transition: clip-path 1100ms var(--ease-in-out), transform 1500ms var(--ease-soft); }
  .js .shutter[data-reveal].is-in img { clip-path: inset(0); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .syl.is-hit i, .name-beat__drums .is-hit, .hero__drum.is-hit circle, .hero__drum.is-hit img, .meter__cell.is-now i { transform: none; }
}
@keyframes rise-line { to { transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drum-in { to { transform: none; } }

/* ---------- tablets and phones: the drums sit under the words ---------- */
@media (max-width: 60rem) {
  .hero { grid-template-rows: auto auto 1fr; }
  .hero__copy { grid-row: 2; max-width: 40rem; align-self: start; padding-top: 9svh; }
  .hero__drums { position: relative; inset: auto; grid-row: 3; min-height: 66vw; margin: 1.25rem calc(var(--margin) * -1) calc(var(--margin) * -1); }
  .hero__drum--bass { width: 130vw; height: 130vw; left: -6vw; top: 12vw; }
  .hero__drum--tone { width: 54vw; height: 54vw; left: -14vw; top: 0; }
}

/* ---------- tablet ---------- */
@media (max-width: 64rem) {
  .play__stage { grid-column: 1 / -1; }
  .play__controls { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); align-items: end; }
  .footer__statement { grid-column: 1 / 7; }
  .footer__nav { grid-column: 7 / 13; }
  .footer__place { grid-column: 1 / 7; }
  .footer__contact { grid-column: 7 / 13; }
  .footer__mark { grid-column: 1 / -1; }
  .footer__invite { grid-column: 1 / -1; min-height: 200px; }
}

/* ---------- phone: its own composition ---------- */
@media (max-width: 45rem) {
  :root { --gap: 6px; }
  .only-wide { display: none; }
  .only-narrow { display: list-item; }

  .hero__lead { font-size: var(--step-lead); margin-top: 1.5rem; }
  .hero__actions { margin-top: 1.5rem; gap: 0.75rem 1.25rem; }


  .steps__head { grid-template-columns: 1fr; row-gap: 1rem; margin-bottom: 2rem; }
  .steps__title, .steps__lead { grid-column: 1; }
  .steps__lead { font-size: var(--step-body); }
  .steps__photo img { aspect-ratio: 4 / 3; }
  .hero__logo { width: 5.5rem; margin-bottom: 1rem; }

  .meter__head { grid-template-columns: 1fr; }
  .meter__intro, .meter__choose { grid-column: 1; justify-self: start; }
  .meter__lead { font-size: var(--step-body); }
  .meter__sig { width: 3.5rem; font-size: 1.1rem; }
  .meter__row { grid-template-columns: 2.5rem 1fr; }
  .meter__voice { font-size: var(--step-small); }
  .meter__cell { height: 3rem; }
  .meter__cell.is-start:not(:first-child), .meter__count .is-start:not(:first-child) { margin-left: 0.125rem; }
  .meter__row[data-size="1"] .meter__cell i { width: min(0.75rem, 2.6vw); height: min(0.75rem, 2.6vw); }
  .meter__row[data-size="2"] .meter__cell i { width: min(0.92rem, 3.2vw); height: min(0.92rem, 3.2vw); }
  .meter__row[data-size="3"] .meter__cell i { width: min(1.1rem, 3.9vw); height: min(1.1rem, 3.9vw); }
  .meter__row[data-size="4"] .meter__cell i { width: min(1.35rem, 4.7vw); height: min(1.35rem, 4.7vw); }
  .meter__row[data-size="5"] .meter__cell i { width: min(1.6rem, 5.6vw); height: min(1.6rem, 5.6vw); }
  .meter__voice-n { display: block; }
  .venue__head { grid-template-columns: 1fr; row-gap: 1rem; }
  .venue__title, .venue__text { grid-column: 1; }
  .venue__lead { font-size: var(--step-body); }
  .venue__photos { grid-template-columns: 1fr 1fr; }
  .venue__photo--door { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; min-height: 0; }
  .venue__photo:nth-child(2), .venue__photo:nth-child(3) { grid-column: auto; grid-row: auto; aspect-ratio: 16 / 10; }
  /* on a phone the second bar goes under the first, with its own labels, so steps keep their width */
  .meter__grid { grid-template-columns: 1fr; row-gap: 1.75rem; }
  .meter__bar--1, .meter__bar--2 { grid-column: 1; }
  .meter__bar--1 .meter__row, .meter__bar--2 .meter__row { grid-template-columns: 2.5rem 1fr; }
  .meter__bar--2 .meter__voice { display: block; }
  .meter__bar--2::before { display: none; }
  .meter__kits { gap: 0.25rem 1.25rem; }
  .meter__controls { grid-template-columns: 1fr; justify-items: start; }
  .meter__note { justify-self: start; }
  .steps__grid { display: block; }
  .step { display: block; }
  .step + .step { margin-top: 1.75rem; }
  .step--1 .step__tile { height: 60vw; }
  .step--2 .step__tile { height: 76vw; }
  .step--3 .step__tile { height: 92vw; }

  .play { min-height: 0; }
  .play__head { grid-template-columns: 1fr; row-gap: 1rem; }
  .play__head h2, .play__lead { grid-column: 1; }
  .play__lead { font-size: var(--step-body); }
  .word { font-size: var(--step-display); }
  .word.is-long { font-size: 8vw; }
  .play__stage, .play__controls { grid-column: 1 / -1; }
  .play__controls { grid-template-columns: 1fr; }


  .faq { grid-template-columns: 1fr; }
  .faq__title { grid-column: 1; position: static; margin-bottom: 1.5rem; }
  .faq__list { grid-column: 1; gap: 6px; }
  .qa summary { min-height: 4rem; padding: 0.9rem 3.5rem 0.9rem 1.25rem; }
  .qa summary::before, .qa summary::after { right: 1.25rem; }
  .qa__panel p { padding: 0 1.25rem 1.25rem; }

  .book__link { min-height: max(46svh, 18rem); }
  .book__next { max-width: 18ch; }
  .book__arrow { width: 32px; height: 32px; }

  .footer__board { grid-template-columns: 1fr 1fr; }
  .footer__board > .tile { padding: 1.25rem; }
  .footer__mark { grid-column: 1 / -1; grid-row: 1; min-height: 160px; }
  .footer__logo { height: 10rem; }
  .footer__invite { grid-column: 1 / -1; grid-row: 2; min-height: 140px; }
  .footer__nav { grid-column: 1; grid-row: 3; min-height: 0; }
  .footer__place { grid-column: 2; grid-row: 3; min-height: 0; }
  .footer__contact { grid-column: 1 / -1; grid-row: 4; min-height: 0; }
  .footer__statement { grid-column: 1 / -1; grid-row: 5; min-height: 0; }
  .footer__line { font-size: var(--step-body); }
}

/* ---------- small phones: the song line runs on as a statement, as two lines across would be too small ---------- */
@media (max-width: 24rem) {
  .book__quote p { font-size: 1.5rem; text-wrap: balance; }
  .book__line { display: inline; white-space: normal; }
}

/* ---------- the narrowest phones: keep the title on the first screen under the logo ---------- */
@media (max-width: 22.5rem) {
  .hero__copy { padding-top: 3svh; }
  .hero__logo { width: 3.25rem; margin-bottom: 0.4rem; }
}
