/* Actual Rhythms landing pages. Same palette and type as the app (styles.css):
   cream page, white sheets of notation, deep teal for action, Caslon for display, Public Sans for text. */
:root {
  --page: #F6F5F1;
  --surface: #FFFFFF;
  --ink: #202622;
  --muted: #5C635F;
  --teal: #18665F;
  --teal-hover: #145750;
  --teal-pale: #E4F0EB;
  --border: #D8DDD8;
  --perfect: #1E7A4C;
  --miss: #B42318;
  --font-serif: "Libre Caslon Text", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --measure: 64ch;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 17px/1.6 var(--font-sans);
}
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-hover); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* header */
.site-head { border-bottom: 1px solid var(--border); background: var(--page); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 14px; }
.brand { font: 400 22px/1 var(--font-serif); color: var(--ink); text-decoration: none; margin-right: auto; display: flex; align-items: center; gap: 10px; }
.brand img { width: auto; height: 36px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--teal); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid var(--teal);
  font: 600 16px/1 var(--font-sans); text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-hover); color: #fff; }
.btn-quiet { background: transparent; color: var(--teal); }
.btn-quiet:hover { background: var(--teal-pale); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fine { font-size: 14px; color: var(--muted); }

/* type */
.eyebrow { font: 600 12px/1.2 var(--font-sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--teal); margin: 0; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.06; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; }
h3 { font-size: 22px; line-height: 1.25; }
.lede { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; color: var(--muted); max-width: var(--measure); margin: 0; }
p { margin: 0; }
.prose { display: grid; gap: 14px; max-width: var(--measure); }
.prose p { color: var(--muted); }

/* sections */
section { padding-block: 64px; }
section + section { border-top: 1px solid var(--border); }
.section-head { display: grid; gap: 12px; margin-bottom: 32px; max-width: 760px; }

/* hero */
.hero { padding-block: 56px 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 22px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 32px; } }

/* a sheet of real notation, with its source */
.excerpt { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 16px; display: grid; gap: 10px; margin: 0; }
.excerpt img { width: 100%; height: auto; }
.excerpt figcaption { display: grid; gap: 2px; border-top: 1px solid var(--border); padding-top: 10px; }
.excerpt .src { font: 400 18px/1.3 var(--font-serif); }
.excerpt .src em { color: var(--muted); }
.excerpt .where { font-size: 14px; color: var(--muted); }
.excerpt-stack { display: grid; gap: 14px; }
.excerpt-stack .excerpt:nth-child(2) { margin-left: 8%; }
@media (max-width: 860px) { .excerpt-stack .excerpt:nth-child(2) { margin-left: 0; } }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }

/* numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.stat { padding: 20px 22px; display: grid; gap: 4px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b { font: 400 34px/1.1 var(--font-serif); font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* three reasons / features */
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.point { display: grid; gap: 10px; align-content: start; }
.point p { color: var(--muted); }
@media (max-width: 860px) { .points { grid-template-columns: 1fr; gap: 24px; } }

/* steps (a real sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { display: grid; gap: 8px; align-content: start; counter-increment: step; }
.steps li::before { content: counter(step); font: 600 13px/1 var(--font-mono); color: var(--teal); width: 30px; height: 30px; border: 1.5px solid var(--teal); border-radius: 50%; display: grid; place-items: center; }
.steps p { color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* tap feedback illustration (the app's lanes) */
.lanes { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.lanes svg { width: 100%; height: auto; display: block; }

/* comparison tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--border); }
thead th { font: 600 12px/1.3 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--page); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; }
tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
tr.ours { background: var(--teal-pale); }
tr.ours th { color: var(--teal); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.real { background: var(--teal); color: #fff; }
.pill.gen { background: #F1E7DA; color: #7A4A12; }
.pill.own { background: #E3EAF5; color: #23426E; }
.pill.na { background: var(--page); color: var(--muted); border: 1px solid var(--border); }

/* claim box */
.claim { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: 0 14px 14px 0; padding: 22px 24px; display: grid; gap: 10px; max-width: 820px; }
.claim p { color: var(--muted); }

.sources { font-size: 14px; color: var(--muted); display: grid; gap: 6px; padding-left: 18px; margin: 0; }
.sources a { color: var(--muted); }

/* call to action band */
.cta { background: var(--teal); color: #fff; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.82); }
.cta .btn-primary { background: #fff; color: var(--teal); border-color: #fff; }
.cta .btn-primary:hover { background: var(--teal-pale); color: var(--teal); }
section.cta + section, section + section.cta { border-top: 0; }

/* footer */
.site-foot { padding-block: 32px 48px; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: grid; gap: 10px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--muted); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 28px; } }
.list { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--muted); }
.list b { color: var(--ink); font-weight: 600; }
.players { columns: 3 180px; column-gap: 24px; margin: 0; padding: 0; list-style: none; font-size: 15px; color: var(--muted); }
.players li { break-inside: avoid; padding: 3px 0; }

@media (prefers-reduced-motion: no-preference) { .btn { transition: background-color 0.15s; } }

/* Same rhythm page: one block per matched family */
.pairs { display: grid; gap: 56px; }
.pair { display: grid; gap: 18px; }
.pair-head { display: grid; gap: 8px; max-width: 760px; }
.pair-head p { color: var(--muted); }

/* play button on an excerpt's caption */
.excerpt figcaption.has-play { grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: center; }
.excerpt figcaption .src, .excerpt figcaption .where { grid-column: 1; }
.excerpt figcaption .play { grid-column: 2; grid-row: 1 / span 2; }
.play {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--teal); background: var(--teal); color: #fff;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.play::before { content: ""; width: 0; height: 0; margin-left: 3px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor; }
.play:hover { background: var(--teal-hover); }
.play.is-playing::before { width: 12px; height: 12px; margin: 0; border: 0; background: currentColor; border-radius: 2px; }
.play.is-loading { opacity: 0.6; }

/* a match: excerpts joined by equals signs with arrows (side by side; a third one below the first) */
.match { display: grid; grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr); align-items: center; }
.match > figure:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.match > .eq-h { grid-column: 2; grid-row: 1; }
.match > figure:nth-of-type(2) { grid-column: 3; grid-row: 1; }
.match > .eq-v { grid-column: 1; grid-row: 2; }
.match > figure:nth-of-type(3) { grid-column: 1; grid-row: 3; }
.eq { display: flex; align-items: center; justify-content: center; color: var(--teal); }
.eq svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; transform: scale(1.25); }
.eq circle { fill: var(--teal-pale); }
.eq .eq-v-svg, .eq-v .eq-h-svg { display: none; }
.eq-v .eq-v-svg { display: block; }
.eq-v { padding-block: 14px; }
/* stacked: the hero, and every match on narrow screens */
.hero-match.match { grid-template-columns: minmax(0, 1fr); }
.hero-match.match > figure, .hero-match.match > .eq { grid-column: 1; grid-row: auto; }
@media (max-width: 760px) {
  .match { grid-template-columns: minmax(0, 1fr); }
  .match > * { grid-column: 1 !important; grid-row: auto !important; }
  .eq-h { padding-block: 14px; }
  .eq-h .eq-h-svg { display: none; }
  .eq-h .eq-v-svg { display: block; }
}
