/* Kalimba Coach: the app's own world. Warm paper, walnut ink, koa wood and brushed steel.
   Yellow is reserved for one thing, as in the app: "play this key now". */

:root {
  --paper: #F8F3EC;
  --paper-2: #F1E8DC;
  --ink: #2A1C12;
  --ink-2: #7A6453;
  --band: #EFE3D2;
  --hair: #E0D2BF;
  --wood: #9A5427;
  --wood-light: #D49A5E;
  --wood-mid: #B0703A;
  --wood-dark: #7C4520;
  --walnut: #16110D;
  --now: #FFD23F;
  --correct: #1F8A4C;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --wrap: 1080px;
  --gutter: clamp(16px, 5vw, 44px);
  --section: clamp(88px, 12vw, 150px);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 60px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.5 var(--font); letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
::selection { background: rgb(255 210 63 / .45); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--wood); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid rgb(154 84 39 / .55); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.center { text-align: center; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }

h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.035em; text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.sub { margin: 18px auto 0; max-width: 34em; color: var(--ink-2); font-size: 1.1875rem; text-wrap: pretty; }
.eyebrow { margin-bottom: 14px; color: var(--wood); font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow-light { color: var(--wood-light); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: 56px; background: rgb(248 243 236 / .78); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); box-shadow: 0 1px 0 rgb(42 28 18 / 0); transition: box-shadow .3s; }
.nav.scrolled { box-shadow: 0 1px 0 rgb(42 28 18 / .1); }
.nav-in { width: min(100% - 2 * var(--gutter), var(--wrap)); height: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-app { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.02em; white-space: nowrap; }
.nav-app img { width: 28px; height: 28px; border-radius: 22.5%; box-shadow: 0 0 0 .5px rgb(0 0 0 / .12); }
.nav-app:hover { text-decoration: none; }
.nav-home { color: var(--ink-2); font-size: .8125rem; white-space: nowrap; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 96px); background: radial-gradient(60% 50% at 50% 100%, rgb(212 154 94 / .22), transparent 70%); }
.hero-copy { text-align: center; }
.soon { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .8125rem; font-weight: 600; letter-spacing: .01em; }
.soon-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 0 rgb(255 210 63 / .7); animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(255 210 63 / .7); } 70%, 100% { box-shadow: 0 0 0 9px rgb(255 210 63 / 0); } }
h1 { margin-top: 22px; font-size: clamp(2.6rem, 7.4vw, 5rem); font-weight: 750; line-height: 1.02; letter-spacing: -0.045em; text-wrap: balance; }
.lede { margin: 22px auto 0; max-width: 31em; color: var(--ink-2); font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.45; text-wrap: pretty; }

.stage { width: min(100% - 2 * var(--gutter), 860px); margin: clamp(40px, 6vw, 64px) auto 0; }
.stage-ticker { position: relative; height: 54px; margin: 0 2.5% 6px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.ticker-track { position: absolute; left: 50%; top: 0; height: 100%; display: flex; align-items: center; gap: 4px; transition: transform .35s var(--ease-out); }
.tok { min-width: 42px; height: 42px; padding: 0 8px; display: grid; place-items: center; border-radius: 10px; font-size: 1.5rem; font-weight: 700; font-stretch: condensed; font-variant-numeric: tabular-nums; color: var(--ink); transition: background .2s, transform .2s; }
.tok.now { background: var(--now); transform: scale(1.08); }
.tok.past { color: var(--ink-2); opacity: .6; }
.kalimba { width: 100%; height: auto; overflow: visible; touch-action: manipulation; }
.tine { cursor: pointer; }
.tine .tine-gold { opacity: 0; transition: opacity .12s; }
.tine.lit .tine-gold, .tine.hit .tine-gold { opacity: 1; }
.tine .tine-glow { opacity: 0; transition: opacity .2s; }
.tine.lit .tine-glow { opacity: .75; }
.tine-body { transition: transform .12s var(--ease-out); transform-box: fill-box; transform-origin: 50% 0; }
.tine.hit .tine-body { transform: scaleY(.985); }
.tine-label { font: 700 26px var(--font); fill: #3B4148; text-anchor: middle; pointer-events: none; }
.tine-dot { fill: #3B4148; pointer-events: none; }
.note-bar text { font: 800 22px var(--font); text-anchor: middle; }

.stage-bar { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; }
.play { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px 0 18px; border: 0; border-radius: 999px; background: var(--wood); color: #fff; font: 600 1.0625rem var(--font); letter-spacing: -0.01em; cursor: pointer; transition: transform .15s var(--ease-out), background .2s; }
.play:hover { background: #874820; }
.play:active { transform: scale(.97); }
.play-icon { width: 14px; height: 16px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.play[aria-pressed="true"] .play-icon { clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }
.stage-hint { color: var(--ink-2); font-size: .9375rem; }

/* ---------- Score section ---------- */
.score-sec { padding: var(--section) 0; background: var(--paper-2); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.split-copy p { margin-top: 18px; color: var(--ink-2); font-size: 1.1875rem; max-width: 30em; text-wrap: pretty; }
.split-copy p.small { font-size: 1rem; }
.legend { margin-top: 26px; display: grid; gap: 14px; }
.legend li { display: flex; align-items: center; gap: 14px; font-weight: 550; }
.sw { flex: none; width: 18px; height: 40px; border-radius: 4px; }
.sw-solid { background: var(--ink); }
.sw-hatch { background: repeating-linear-gradient(45deg, var(--ink) 0 2.2px, var(--paper) 2.2px 6.4px); box-shadow: inset 0 0 0 1.5px var(--ink); }
.sw-now { background: var(--now); }

.phone { justify-self: center; width: min(100%, 340px); padding: 9px; border-radius: 54px; background: linear-gradient(150deg, #3A2A1E, var(--walnut)); box-shadow: 0 0 0 1px rgb(255 255 255 / .06) inset, 0 50px 80px -40px rgb(42 28 18 / .55), 0 24px 40px -30px rgb(42 28 18 / .5); }
.phone img { width: 100%; height: auto; border-radius: 45px; }
.phone-sm { width: min(100%, 290px); border-radius: 46px; padding: 8px; }
.phone-sm img { border-radius: 38px; }

/* ---------- Listens ---------- */
.listen-sec { padding: var(--section) 0 0; }
.listen-card { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 96px) clamp(24px, 7vw, 96px); border-radius: 32px; background: radial-gradient(70% 90% at 85% 10%, #4A2E1A, var(--walnut) 65%); color: #F4EADF; }
.listen-card h2 { max-width: 13em; }
.listen-card p:not(.eyebrow) { margin-top: 20px; max-width: 34em; color: #CDB9A5; font-size: 1.1875rem; text-wrap: pretty; }
.wave { display: flex; align-items: center; gap: 6px; height: 64px; margin-bottom: 30px; }
.wave span { width: 7px; height: 100%; border-radius: 4px; background: var(--wood-light); transform: scaleY(.15); animation: wave 1.6s ease-in-out infinite; }
.wave span:nth-child(5n+1) { animation-delay: -.2s; } .wave span:nth-child(5n+2) { animation-delay: -.7s; } .wave span:nth-child(5n+3) { animation-delay: -1.1s; } .wave span:nth-child(5n+4) { animation-delay: -.4s; } .wave span:nth-child(5n) { animation-delay: -1.4s; }
.wave span:nth-child(6) { background: var(--now); }
@keyframes wave { 0%, 100% { transform: scaleY(.15); } 30% { transform: scaleY(1); } 60% { transform: scaleY(.4); } }

/* ---------- Features ---------- */
.features { padding: var(--section) 0; }
.feat-grid { margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.feat { display: flex; flex-direction: column; overflow: hidden; padding: 44px 40px 0; border-radius: 30px; background: #fff; box-shadow: 0 0 0 1px rgb(42 28 18 / .06); }
.feat-write { background: var(--band); }
.feat-copy p { margin-top: 10px; color: var(--ink-2); max-width: 26em; }
.feat-icon { width: 34px; height: 34px; margin-bottom: 18px; color: var(--wood); }
.feat .phone { margin-top: 36px; margin-bottom: -150px; }
.minis { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.minis li { padding: 30px 28px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px rgb(42 28 18 / .06); }
.minis svg { width: 28px; height: 28px; color: var(--wood); margin-bottom: 14px; }
.minis h3 { font-size: 1.125rem; }
.minis p { margin-top: 6px; color: var(--ink-2); font-size: 1rem; }

/* ---------- Languages ---------- */
.langs { padding: var(--section) 0; background: var(--paper-2); }
.names { margin-top: clamp(36px, 5vw, 56px); display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.names li { width: 170px; padding: 26px 16px 22px; display: grid; justify-items: center; gap: 4px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px rgb(42 28 18 / .06); }
.names b { margin-top: 12px; font-size: 2.25rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.names li:nth-child(2) b { color: var(--wood); }
.names li.wide { width: 260px; }
.names span:last-child { color: var(--ink-2); font-size: .9375rem; }
.tine-chip { width: 30px; height: 64px; padding-top: 40px; border-radius: 6px 6px 15px 15px; background: linear-gradient(90deg, #8A9096, #F3F5F6 35%, #B9BFC4 60%, #8A9096); color: #3B4148; font-weight: 800; font-size: .9375rem; text-align: center; line-height: 1; }

/* ---------- Plans ---------- */
.plans { padding: var(--section) 0; }
.plan-grid { margin: clamp(36px, 5vw, 56px) auto 0; max-width: 820px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan { padding: 36px 34px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px rgb(42 28 18 / .06); }
.plan h3 { font-size: 1.625rem; }
.plan ul { margin-top: 18px; display: grid; gap: 12px; }
.plan li { position: relative; padding-left: 28px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 13px; height: 7px; border-left: 2.5px solid var(--correct); border-bottom: 2.5px solid var(--correct); transform: rotate(-45deg); }
.plan-pro { background: linear-gradient(160deg, var(--wood-mid), var(--wood-dark)); color: #fff; box-shadow: 0 30px 60px -30px rgb(124 69 32 / .7); }
.plan-pro li::before { border-color: var(--now); }
.plan-note { margin-top: 22px; color: #F4DFC8; font-size: .9375rem; }

/* ---------- CTA ---------- */
.cta { padding: var(--section) 0; background: radial-gradient(50% 70% at 50% 100%, rgb(212 154 94 / .28), transparent 70%), var(--paper-2); }
.cta-icon { width: 128px; height: 128px; margin: 0 auto 28px; border-radius: 22.5%; box-shadow: 0 0 0 .5px rgb(0 0 0 / .12), 0 24px 40px -18px rgb(90 47 20 / .6); }

/* ---------- Support ---------- */
.support { padding: clamp(64px, 9vw, 110px) 0; }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 40px; }
.support-grid h2 { grid-column: 1 / -1; font-size: clamp(1.75rem, 3vw, 2.25rem); }
.support p { margin-top: 8px; color: var(--ink-2); font-size: 1rem; }

.foot { padding: 28px 0 40px; border-top: 1px solid var(--hair); color: var(--ink-2); font-size: .8125rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- Reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .soon-dot, .wave span { animation: none; }
  .wave span { transform: scaleY(.6); }
}

/* ---------- Small screens ---------- */
@media (max-width: 834px) {
  .split { grid-template-columns: 1fr; text-align: left; }
  .feat-grid { grid-template-columns: 1fr; }
  .minis { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .feat { padding: 34px 24px 0; }
  .names li { width: calc(50% - 7px); }
  .names li.wide { width: 100%; }
  .tok { min-width: 34px; height: 36px; font-size: 1.25rem; }
  .stage-ticker { height: 44px; }
  .nav-home { display: none; }
}
