/* Home Note site styles. Fonts are self-hosted: no third-party requests. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/atkinson-hyperlegible-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/atkinson-hyperlegible-latin-700.woff2") format("woff2");
}

/* Layout: the keyboard is the spine. A deep-blue stage holds a playable keyboard with the
   course's four number stickers; the same four sticker colours mark 1, 4, 5 and 6 everywhere. */
:root {
  --bg: #f3f5fb;
  --surface: #ffffff;
  --ink: #161a33;
  --ink-soft: #4a5070;
  --line: #d6dbec;
  --accent: #2f49d1;
  --stage: #1b2150;
  --stage-2: #262e6e;
  --stage-ink: #f3f5fb;
  --stage-soft: #bcc4ee;
  --home: #ffc52e;
  --next: #35c28b;
  --away: #ff7a4d;
  --rainy: #6b9bff;
  --on-sticker: #161a33;
  --key-white: #fbfbf6;
  --key-white-out: #c9cddd;
  --key-edge: #aab0c8;
  --key-black: #14162b;
  --key-black-out: #474c72;
  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1024; --surface: #181b3a; --ink: #eef0fb; --ink-soft: #abb2d6; --line: #2c3162;
    --accent: #a3b4ff; --stage: #1e2560; --stage-2: #2a3380; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1024; --surface: #181b3a; --ink: #eef0fb; --ink-soft: #abb2d6; --line: #2c3162;
  --accent: #a3b4ff; --stage: #1e2560; --stage-2: #2a3380; color-scheme: dark;
}

* { box-sizing: border-box; }
img { max-width: 100%; }
[hidden] { display: none !important; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.55; margin: 0;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--rainy); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 36px); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
section { scroll-margin-top: 84px; }
.band { padding-block: clamp(48px, 8vw, 92px); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.head { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(24px, 4vw, 40px); }

/* Sticker: the course's number dots */
.dot {
  display: inline-grid; place-items: center; flex: none;
  width: 1.9em; height: 1.9em; border-radius: 50%;
  font-family: var(--display); font-weight: 800; color: var(--on-sticker);
  background: var(--home);
}
.dot.n4 { background: var(--next); }
.dot.n5 { background: var(--away); }
.dot.n6 { background: var(--rainy); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 999px; border: 2px solid transparent;
  background: var(--home); color: var(--on-sticker);
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--stage-ink); border-color: var(--stage-soft); }
.btn.small { padding: 10px 16px; font-size: 0.92rem; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.brand .dot { font-size: 0.8rem; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.link { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.nav a.link:hover { color: var(--ink); }
@media (max-width: 760px) { .nav a.link { display: none; } }

/* Stage (hero) */
.stage { background: var(--stage); color: var(--stage-ink); padding-block: clamp(36px, 6vw, 72px) clamp(28px, 5vw, 56px); }
.stage .eyebrow { color: var(--stage-soft); }
.pitch { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: end; }
.pitch > * { min-width: 0; }
.pitch .say { display: flex; flex-direction: column; gap: 18px; }
.pitch .say p { color: var(--stage-soft); font-size: 1.15rem; max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0; color: var(--stage-soft); font-size: 0.95rem; }
.facts b { color: var(--stage-ink); font-family: var(--display); font-size: 1.1rem; }
@media (max-width: 820px) { .pitch { grid-template-columns: 1fr; align-items: start; } }

/* Piano */
.piano { margin-top: clamp(26px, 4vw, 44px); background: var(--stage-2); border-radius: 22px; padding: clamp(12px, 2vw, 22px); }
.piano-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-bottom: 14px; }
.piano-bar p { color: var(--stage-soft); font-size: 0.98rem; }
.piano-bar strong { color: var(--stage-ink); font-family: var(--display); font-size: 1.25rem; }
.keys { position: relative; display: flex; height: clamp(150px, 24vw, 250px); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.key { appearance: none; border: 0; padding: 0; margin: 0; cursor: pointer; position: relative; font: inherit; }
.key.white { flex: 1 1 0; min-width: 0; background: var(--key-white); border-right: 1px solid var(--key-edge); border-radius: 0 0 7px 7px; }
.key.white:first-child { border-radius: 8px 0 7px 8px; }
.key.white.out { background: var(--key-white-out); }
.key.black { position: absolute; top: 0; height: 62%; width: 4.2%; transform: translateX(-50%); background: var(--key-black); border-radius: 0 0 5px 5px; z-index: 2; }
.key.black.out { background: var(--key-black-out); }
.key.lit.white { background: var(--home); }
.key.lit.black { background: var(--accent); }
.key:active { filter: brightness(0.9); }
.key .dot { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 3; pointer-events: none;
  width: clamp(20px, 3.3vw, 36px); height: clamp(20px, 3.3vw, 36px); font-size: clamp(0.72rem, 1.7vw, 1.05rem);
  box-shadow: 0 2px 0 rgba(22, 26, 51, 0.35); }
.key.black .dot { bottom: 8px; }
.key .dot.is-home { box-shadow: 0 0 0 3px var(--key-black), 0 0 0 6px var(--home); }
.key .dot.is-home.n6 { box-shadow: 0 0 0 3px var(--key-black), 0 0 0 6px var(--rainy); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 14px 0 0; color: var(--stage-soft); font-size: 0.95rem; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend .dot { font-size: 0.78rem; }
.legend b { color: var(--stage-ink); }

.explore { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(16px, 3vw, 36px); margin-top: 22px; align-items: start; }
.explore > * { min-width: 0; }
@media (max-width: 820px) { .explore { grid-template-columns: 1fr; } }
.months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.month { appearance: none; cursor: pointer; border: 2px solid transparent; border-radius: 12px; padding: 8px 4px;
  background: var(--stage); color: var(--stage-ink); font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  display: flex; flex-direction: column; align-items: center; gap: 2px; }
.month small { font: 400 0.7rem/1.2 var(--body); color: var(--stage-soft); letter-spacing: 0.04em; }
.month[aria-pressed="true"] { background: var(--home); color: var(--on-sticker); }
.month[aria-pressed="true"] small { color: var(--on-sticker); }
.month:hover { border-color: var(--stage-soft); }
.detail { display: flex; flex-direction: column; gap: 12px; }
.detail h3 { font-size: 1.5rem; color: var(--stage-ink); }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 0.98rem; }
.detail dt { color: var(--stage-soft); }
.detail dd { margin: 0; color: var(--stage-ink); min-width: 0; }
.detail ul { margin: 0; padding-left: 1.1em; }

/* Week */
.days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.days li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.days .eyebrow { color: var(--accent); }
.days p { color: var(--ink-soft); font-size: 0.98rem; }
@media (max-width: 980px) { .days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .days { grid-template-columns: 1fr; } }
.note { margin-top: 18px; color: var(--ink-soft); font-size: 0.98rem; max-width: 70ch; }

/* Method */
.ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(24px, 5vw, 64px); }
.ideas > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ideas p { color: var(--ink-soft); }
@media (max-width: 700px) { .ideas { grid-template-columns: 1fr; } }
.twins { margin-top: clamp(28px, 4vw, 44px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 3vw, 30px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px clamp(20px, 4vw, 48px); }
.twins > * { min-width: 0; }
.twins .full { grid-column: 1 / -1; }
.loop { display: flex; flex-direction: column; gap: 10px; }
.loop .row { display: flex; gap: 8px; font-size: 1.25rem; }
.loop span.where { color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 620px) { .twins { grid-template-columns: 1fr; } }

/* Two-column blocks */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.plain { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }
ol.plain { padding-left: 1.4em; }
.tint { background: var(--surface); border-block: 1px solid var(--line); }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; list-style: none; padding: 0; margin: 0; }
.counts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; border-top: 3px solid var(--ink); padding-top: 10px; }
.counts b { font-family: var(--display); font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.counts span { color: var(--ink-soft); font-size: 0.98rem; }
@media (max-width: 620px) { .counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Offer */
.offer { background: var(--stage); color: var(--stage-ink); border-radius: 26px; padding: clamp(22px, 5vw, 56px);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.offer > * { min-width: 0; }
.offer p { color: var(--stage-soft); }
.offer form { display: flex; flex-direction: column; gap: 10px; }
.offer label { font-weight: 700; color: var(--stage-ink); }
.offer input { font: inherit; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--stage-soft); background: var(--key-white); color: var(--on-sticker); width: 100%; }
.offer .fine { font-size: 0.88rem; }
.offer .msg { font-weight: 700; color: var(--stage-ink); background: var(--stage-2); padding: 12px 14px; border-radius: 12px; }
@media (max-width: 820px) { .offer { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: flex; flex-direction: column; max-width: 780px; }
.faq details { border-top: 1px solid var(--line); padding-block: 16px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.faq p { margin-top: 10px; color: var(--ink-soft); max-width: 65ch; }

footer { padding-block: 36px 48px; color: var(--ink-soft); font-size: 0.9rem; }
footer .wrap { display: flex; flex-direction: column; gap: 10px; }
footer p { max-width: 80ch; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .key, .month, .btn { transition: background-color 120ms ease, filter 120ms ease; }
}

/* Small layout helpers (kept as classes so the page needs no inline styles) */
.label-gap { margin-bottom: 10px; }
.facts-gap { margin-top: 22px; }
.split-gap { margin-top: clamp(28px, 4vw, 44px); }
.band.flush-top { padding-top: 0; }
.offer .msg.ok { background: var(--next); color: var(--on-sticker); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Simple one-message pages (thanks, 404) */
.solo { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.solo .stack { align-items: center; max-width: 34rem; }
.solo .btn.ghost { color: var(--ink); border-color: var(--ink-soft); }
