/* ThoccKey landing page.
   The whole page takes its colours from the switch that is playing (set from JS as --bg, --fg, --accent…).
   App pieces (island, Library window, popover) keep the app's own honey + cream so they read as the real thing. */

@property --bg { syntax: '<color>'; inherits: true; initial-value: #FBF2E0; }
@property --fg { syntax: '<color>'; inherits: true; initial-value: #2A1E0C; }
@property --soft { syntax: '<color>'; inherits: true; initial-value: #6B5B40; }
@property --faint { syntax: '<color>'; inherits: true; initial-value: #EBDDBF; }
@property --line { syntax: '<color>'; inherits: true; initial-value: #E3D5B8; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #E0A63B; }
@property --accent-ink { syntax: '<color>'; inherits: true; initial-value: #17171A; }

:root {
  /* Fonts. Macs and iPhones show Apple's own system font (SF Pro) with no font file sent; other devices get Geist.
     --head is the headline family; its weight and spacing are tuned per font in js/app.js (FONTS). ?font=name previews another. */
  --display: -apple-system, BlinkMacSystemFont, "Geist", "Helvetica Neue", sans-serif;
  --head: var(--display);
  --mono: ui-monospace, "SF Mono", Menlo, "Geist Mono", monospace;
  --hw: 660; --hls: -0.042em; --hls-xl: -0.055em; --thock-lo: 500; --thock-hi: 900; --clack-lo: 200; --clack-hi: 400; --clack-style: normal; --clack-squeeze: .34;
  --honey: #F5B301; --honey-deep: #C68F00; --ink: #17171A; --cream: #FBF8F1; --panel: #F1E8D2; --track: #EDEBE6;
  --pad: clamp(18px, 5.5vw, 96px);
  --tone: 0; --k: 0.5;
  transition: --bg .9s cubic-bezier(.3, .6, .2, 1), --fg .9s cubic-bezier(.3, .6, .2, 1), --soft .9s, --faint .9s, --line .9s, --accent .9s, --accent-ink .9s;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--display); font-size: 17px; line-height: 1.5; letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* The second voice in a headline: same letters, quieter. */
em { font-style: normal; opacity: .55; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 99; background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- layers ---------- */
.layer { position: fixed; inset: 0; pointer-events: none; }
/* --lift: how far the footer has come up (set from JS); the pinned scene moves up with it */
.layer, #stage { translate: 0 calc(var(--lift, 0px) * -1); }
.layer.back { z-index: 1; }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; display: block; }
.layer.front { z-index: 3; }
.scene { position: absolute; inset: 0; visibility: hidden; --e: 0; --x: 0; --p: 0; --v: calc(var(--e) * (1 - var(--x))); }
.scene.on { visibility: visible; }
.scene a, .scene button, .scene .chunky, .scene .copy { pointer-events: auto; }
#track { position: relative; z-index: 0; }
#track > div { position: absolute; left: 0; width: 1px; height: 1px; }

/* Scroll-driven entrance: each .r rises in a beat after the one before it, and leaves the same way. */
.r {
  --ee: clamp(0, (var(--e) - var(--i, 0) * 0.09) * 2.4, 1);
  --xx: clamp(0, (var(--x) - var(--i, 0) * 0.05) * 2.6, 1);
  opacity: calc(var(--ee) * (1 - var(--xx)));
  transform: translate3d(0, calc((1 - var(--ee)) * 64px - var(--xx) * 84px), 0);
  will-change: transform, opacity;
}

/* ---------- shared type ---------- */
.label { margin: 0 0 22px; display: flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.label b { font-weight: 500; color: var(--fg); }
.label b::after { content: ""; display: inline-block; width: 22px; height: 1px; margin-left: 10px; vertical-align: middle; background: currentColor; opacity: .4; }
h2 { margin: 0 0 24px; font: var(--hw) clamp(38px, 4.9vw, 80px)/1 var(--head); letter-spacing: var(--hls); text-wrap: balance; }
.body { margin: 0 0 18px; max-width: 38ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; }
.aside { margin: 0; font: 400 13px/1.5 var(--mono); letter-spacing: 0; color: var(--soft); max-width: 44ch; }
.copy { position: absolute; left: var(--pad); }
.btn {
  display: inline-flex; align-items: center; gap: 12px; height: 54px; padding: 0 12px 0 24px; border-radius: 27px;
  background: var(--fg); color: var(--bg); font: 550 16px/1 var(--display); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn .tag { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 9px 11px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.btn.big { height: 68px; padding: 0 14px 0 30px; border-radius: 34px; font-size: 20px; }
.btn.big .tag { padding: 12px 14px; font-size: 12px; }
.btn[aria-disabled="true"] { cursor: default; }
.link { font: 500 15px/1 var(--display); text-decoration: none; opacity: .7; transition: opacity .2s; }
.link:hover { opacity: 1; }
.kc { display: inline-block; width: 20px; height: 19px; border-radius: 6px; background: linear-gradient(#FFD64A, #F5B301); box-shadow: 0 3px 0 #C68F00, inset 0 1px 0 rgba(255,255,255,.6); flex: none; transform: translateY(-1.5px); }

/* ---------- island (nav + live streak) ---------- */
.island {
  position: fixed; z-index: 30; top: 14px; left: 50%; height: 46px; width: 520px; border-radius: 23px; background: #0A0A0B; color: #fff; overflow: hidden;
  transform: translateX(-50%) scale(var(--boost, 1)); transform-origin: 50% 0;
  transition: width .5s cubic-bezier(.3, 1.35, .45, 1), top .5s cubic-bezier(.3, .8, .3, 1), border-radius .5s;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .55);
}
.island-nav { position: absolute; inset: 0 auto 0 0; display: flex; align-items: center; gap: 2px; padding: 0 6px 0 16px; white-space: nowrap; transition: opacity .22s, transform .35s; }
.island-brand { display: flex; align-items: center; gap: 8px; margin-right: 10px; font: 600 15px/1 var(--display); text-decoration: none; letter-spacing: -0.02em; }
.island-brand .bm { height: 19px; width: auto; flex: none; }
.island-brand .bw { height: 21px; width: auto; flex: none; color: #fff; --accent: #F5B301; transform: translateY(1px); }
.island-links { display: flex; }
.island-links a { padding: 9px 10px; border-radius: 99px; font: 500 13px/1 var(--display); color: rgba(255,255,255,.66); text-decoration: none; transition: color .2s, background-color .2s; }
.island-links a:hover, .island-links a.here { color: #fff; }
.island-links a.here { background: rgba(255,255,255,.12); }
.island-btn { width: 34px; height: 34px; margin-left: 6px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); transition: background-color .2s; }
.island-btn:hover, .island-btn[aria-expanded="true"] { background: var(--honey); color: var(--ink); }
.island-cta { margin-left: 6px; height: 34px; padding: 0 15px; border-radius: 17px; display: inline-flex; align-items: center; background: #fff; color: var(--ink); font: 550 13px/1 var(--display); text-decoration: none; }
.island-live { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 18px 0 16px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.live-l { display: flex; align-items: center; gap: 10px; font: 600 16px/1 var(--display); font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: center; gap: 3px; height: 22px; }
.bars i { width: 3px; border-radius: 2px; background: var(--honey); height: calc(var(--h, .14) * 100%); transition: height .28s cubic-bezier(.2, .7, .3, 1); }
.island.live .island-nav { opacity: 0; pointer-events: none; transform: scale(.94); }
.island.live .island-live { opacity: 1; }
.bm-mini { width: 24px; height: auto; flex: none; overflow: visible; }
.one-tag .bm-mini { width: 20px; }
.island.bump .live-l .k2 { animation: kc-press .16s ease-out; }
@keyframes kc-press { 40% { transform: translateY(1.4px); } }
/* notch scene: the island comes forward and hangs from a screen edge */
.bezel { position: fixed; z-index: 29; top: 0; left: 0; right: 0; height: 18px; background: #0A0A0B; transform: translateY(calc((var(--bz, 0) - 1) * 100%)); }
.island.notched { top: 0; border-radius: 0 0 23px 23px; }

/* ---------- quick controls (.ctl): the same rows under the island button and in the menu bar scene ---------- */
.ctl-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 14px; min-height: 58px; border-top: 1px solid var(--ctl-line, var(--line)); }
.ctl-row:first-child { border-top: 0; }
.ctl-k { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ctl-soft, var(--soft)); }
.ctl-v { min-width: 46px; text-align: right; font: 500 14px/1 var(--display); font-variant-numeric: tabular-nums; }
.ctl-sw { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ctl-sw img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.ctl-sw b { font: 600 16px/1.1 var(--display); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctl-sw small { display: block; margin-top: 3px; font: 400 12px/1 var(--display); color: var(--ctl-soft, var(--soft)); white-space: nowrap; }
.ctl-steps { display: flex; gap: 6px; }
.ctl-steps button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; line-height: 1; box-shadow: inset 0 0 0 1px var(--ctl-line, var(--line)); transition: background-color .2s, color .2s; }
.ctl-steps button:hover { background: var(--ctl-fg, var(--fg)); color: var(--ctl-bg, var(--bg)); }
.ctl-toggle { grid-column: 3; width: 46px; height: 28px; border-radius: 14px; position: relative; background: var(--ctl-track, color-mix(in srgb, var(--fg) 16%, transparent)); transition: background-color .2s; }
.ctl-toggle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.ctl-toggle[aria-checked="true"] { background: var(--ctl-accent, var(--accent)); }
.ctl-toggle[aria-checked="true"]::after { transform: translateX(18px); background: var(--ctl-knob, var(--accent-ink)); }
.ctl .chunky { --h: 26px; background: var(--ctl-track, color-mix(in srgb, var(--fg) 14%, transparent)); }
.ctl .chunky::before { background: var(--ctl-accent, var(--accent)); }
/* a thin ring keeps the knob visible when the accent itself is near white (Oreo) */
.chunky::after { outline: 1.5px solid rgba(0,0,0,.16); outline-offset: -1px; }
/* under the island button it is part of the island: black, with honey */
.pop {
  --ctl-knob: #17171A; --ctl-line: rgba(255,255,255,.13); --ctl-soft: rgba(255,255,255,.55); --ctl-fg: #fff; --ctl-bg: #0A0A0B; --ctl-track: rgba(255,255,255,.16); --ctl-accent: var(--honey);
  position: fixed; z-index: 28; top: 70px; left: 50%; width: 348px; max-width: calc(100vw - 20px); transform: translateX(-50%); padding: 4px 20px; border-radius: 24px; background: #0A0A0B; color: #fff;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.55);
  transform-origin: 50% 0; transition: opacity .2s, transform .3s cubic-bezier(.3, 1.4, .5, 1);
}
.pop[hidden] { display: block; opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.96); pointer-events: none; visibility: hidden; transition: opacity .15s, transform .15s, visibility 0s .15s; }
.island-btn .off-x { display: none; }
.island-btn.muted { background: #E5484D; color: #fff; }
.island-btn.muted .on-waves { display: none; } .island-btn.muted .off-x { display: inline; }

/* chunky slider (app style): --a..--b is the filled part, --t the knob */
.chunky { --h: 22px; position: relative; height: var(--h); border-radius: 99px; background: var(--track); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.chunky::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc((100% - var(--h)) * var(--a, 0)); width: calc((100% - var(--h)) * (var(--b, 0) - var(--a, 0)) + var(--h)); border-radius: 99px; background: var(--honey); }
.chunky::after { content: ""; position: absolute; top: 0; left: calc((100% - var(--h)) * var(--t, 0)); width: var(--h); height: var(--h); border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.28), 0 0 0 .5px rgba(0,0,0,.08); }
.chunky.big { --h: 34px; background: color-mix(in srgb, var(--fg) 14%, transparent); }
.chunky.big::before { background: var(--accent); }
.chunky.big::after { box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 .5px rgba(0,0,0,.1); }

/* sound rings: spread out from under the key you pressed */
.rings { position: absolute; inset: 0; overflow: hidden; }
.ring { position: absolute; left: 0; top: 0; width: 84vmin; height: 84vmin; margin: -42vmin 0 0 -42vmin; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; pointer-events: none; }
.ring.go { animation: ring .9s cubic-bezier(.15, .7, .3, 1); }
@keyframes ring { from { transform: translate3d(var(--rx), var(--ry), 0) scale(.1); opacity: .9; } to { transform: translate3d(var(--rx), var(--ry), 0) scale(1); opacity: 0; } }

/* ---------- hero ---------- */
.hero-h {
  position: absolute; left: calc(var(--pad) - .05em); top: 15vh; margin: 0; font: var(--hw) clamp(64px, 11.4vw, 214px)/.9 var(--head); letter-spacing: var(--hls-xl);
  opacity: calc(1 - var(--x) * 1.6); transform: translate3d(0, calc(var(--x) * -18vh), 0);
}
.swap { display: block; position: relative; overflow: hidden; padding: .04em .08em .2em .05em; margin-bottom: -.24em; white-space: nowrap; }
.swap-a, .swap-b { display: block; transition: transform .55s cubic-bezier(.7, 0, .2, 1); }
.hero-h.thump { animation: thump .16s ease-out; transform-origin: 0 100%; }
@keyframes thump { 35% { scale: 1 .965; } }
.swap-b { position: absolute; left: .05em; top: .04em; transform: translateY(125%); color: var(--fg); }
.swap:nth-child(2) > * { transition-delay: .07s; }
.typed .swap-a { transform: translateY(-125%); }
.typed .swap-b { transform: none; }
.boot .swap-a { transform: translateY(125%); }
.hero-copy { position: absolute; left: var(--pad); bottom: 8vh; width: min(370px, 86vw); }
.kicker { margin: 0 0 16px; display: flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero-sub { margin: 0 0 28px; font-size: clamp(17px, 1.36vw, 20px); line-height: 1.45; letter-spacing: -0.012em; }
.hero-sub em { opacity: 1; }
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.boot .hero-copy > * { opacity: 0; }
.hero-copy > * { transition: opacity .8s .5s; }

/* ---------- 01 library ---------- */
.s-library .copy { top: 50%; width: min(29vw, 560px); transform: translateY(-50%); }
/* The switch shelf: no window, no scrolling. All 19 are always in view. */
.shelf { position: absolute; right: 3.4vw; top: 53%; width: min(58vw, 980px); transform: translateY(-50%); opacity: var(--v); }
.shelf-stage { aspect-ratio: 2.95; }      /* the keyboard sits here (see wellPose in app.js) */
.shelf-now { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 28px; }
.shelf-now h3 { margin: 0 0 6px; font: var(--hw) clamp(26px, 2.9vw, 46px)/1 var(--head); letter-spacing: var(--hls); }
.shelf-now p { margin: 0; font-size: 14px; color: var(--soft); }
.shelf-variants { display: flex; gap: 6px; flex: none; }
.shelf-variants button { height: 32px; padding: 0 14px; border-radius: 16px; font: 550 13px/1 var(--display); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .2s, color .2s; }
.shelf-variants button:hover { box-shadow: inset 0 0 0 1px var(--soft); }
.shelf-variants button.sel { background: var(--fg); color: var(--bg); box-shadow: none; }
.shelf-filters { display: flex; gap: 22px; margin-top: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.shelf-filters button { position: relative; padding: 4px 0; font: 500 13px/1 var(--display); color: var(--soft); transition: color .2s; }
.shelf-filters button:hover, .shelf-filters button.sel { color: var(--fg); }
.shelf-filters button.sel::after { content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 2px; background: var(--accent); }
.shelf-filters small { margin-left: 5px; font: inherit; opacity: .6; }
.shelf-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px 4px; margin-top: 12px; }
.sw { min-width: 0; padding: 6px 2px 4px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; transition: opacity .3s; }
.sw-art { width: min(62px, 82%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--fg) 6%, transparent); transition: background-color .3s, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.sw-art img { width: 84%; height: 84%; object-fit: contain; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.sw b { font: 500 11.5px/1.15 var(--display); color: var(--soft); text-wrap: balance; min-height: 2.3em; transition: color .2s; }
.sw:hover .sw-art img { transform: translateY(-3px) scale(1.08); }
.sw:hover b, .sw.sel b { color: var(--fg); }
.sw.sel .sw-art { background: var(--accent); transform: scale(1.08); }
.sw.sel b { font-weight: 650; }
.sw.off { opacity: .22; pointer-events: none; }

/* ---------- 02 feel ---------- */
.s-feel .copy { top: 50%; width: min(34vw, 660px); transform: translateY(-50%); }
.notes { list-style: none; margin: 30px 0 0; padding: 0; counter-reset: n; }
.notes li { position: relative; padding: 14px 0; border-top: 1px solid var(--line); }
.notes li::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--accent); transition: width .5s cubic-bezier(.3, .7, .2, 1); }
.notes li.lit::before { width: 100%; }
.notes b { display: block; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.notes span { display: block; font-size: 15px; line-height: 1.45; max-width: 42ch; }
.notes li > * { opacity: .45; transition: opacity .35s; }
.notes li.lit > * { opacity: 1; }
.wave { position: absolute; right: var(--pad); top: 17vh; width: 50vw; height: 16vh; opacity: var(--v); }
/* the keyboard fades into the page colour behind the words */
.layer.front .s-feel::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 34%, color-mix(in srgb, var(--bg) 70%, transparent) 44%, transparent 64%); opacity: var(--v); }
.wave canvas { width: 100%; height: 100%; display: block; }
.wave-cap { position: absolute; left: 0; right: 0; bottom: calc(100% + 12px); display: flex; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.wave-cap span { flex: 0 0 60%; } .wave-cap b { color: var(--fg); }

/* ---------- 03 stereo ---------- */
.s-stereo .copy { left: 50%; bottom: 6.5vh; width: min(640px, 90vw); margin-left: max(-320px, -45vw); text-align: center; }
.s-stereo .copy .label { justify-content: center; } .s-stereo .copy .body { margin-inline: auto; }
.s-stereo h2 { margin-bottom: 16px; font-size: clamp(36px, 4.4vw, 72px); }
.field { display: flex; align-items: center; gap: 16px; margin-top: 22px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.field .chunky { flex: 1; }
.ear { position: absolute; top: 37%; font: var(--hw) min(46vh, 30vw)/1 var(--head); letter-spacing: var(--hls); color: var(--faint); transform: translateY(-50%); opacity: var(--v); transition: color .7s ease-out; user-select: none; }
.ear-l { left: 1.5vw; } .ear-r { right: 1.5vw; }
.ear.hit { color: var(--accent); transition: none; }

/* ---------- 04 tone ---------- */
.s-tone .copy { top: 15vh; width: min(36vw, 700px); }
.tone-words { position: absolute; right: var(--pad); top: 0; bottom: 0; width: 46vw; opacity: var(--v); }
.tw { position: absolute; right: 0; font-family: var(--head); line-height: .8; white-space: nowrap; transform-origin: 100% 50%; }
.tw-thock { bottom: calc(50% + 44px); font-size: calc(4.5vw + 11.5vw * var(--k)); font-weight: calc(var(--thock-lo) + (var(--thock-hi) - var(--thock-lo)) * var(--k)); letter-spacing: var(--hls-xl); opacity: calc(.2 + .8 * var(--k)); }
/* Clack is the same word, thin and narrow. Geist has no width axis, so the squeeze is a transform. */
.tw-clack { top: calc(50% + 44px); font-size: calc(4.5vw + 13vw * (1 - var(--k))); font-weight: calc(var(--clack-lo) + (var(--clack-hi) - var(--clack-lo)) * var(--k)); font-style: var(--clack-style); letter-spacing: .01em; opacity: calc(1 - .8 * var(--k)); transform: scaleX(calc(1 - var(--clack-squeeze) * (1 - var(--k)))); }
.tone-ctl { position: absolute; right: var(--pad); top: 50%; width: min(36vw, 520px); margin-top: -17px; }

/* ---------- 05 notch ---------- */
.s-notch .copy { left: 50%; top: 31vh; width: min(700px, 90vw); margin-left: max(-350px, -45vw); text-align: center; }
.s-notch .copy .label { justify-content: center; } .s-notch .copy .body { margin-inline: auto; max-width: 46ch; }
.s-notch .aside { margin-inline: auto; max-width: none; }
.up { display: inline-block; animation: up 1.2s ease-in-out infinite; }
@keyframes up { 50% { transform: translateY(-5px); } }

/* ---------- 06 menu bar ---------- */
.s-menubar .copy { top: 21vh; width: min(36vw, 680px); }
.one { position: absolute; right: 7vw; top: 0; bottom: 14vh; margin: auto 0; height: fit-content; width: min(46vw, 660px); display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.one-key { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 200px; text-align: center; }
.one-tag { margin: 0; display: flex; align-items: center; gap: 9px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.one-tag .kc { width: 16px; height: 15px; border-radius: 5px; box-shadow: 0 2.5px 0 #C68F00, inset 0 1px 0 rgba(255,255,255,.6); }
.one-cap { margin: 0; font-size: 14px; line-height: 1.35; color: var(--soft); }
/* the big key: the menu bar icon at 12x. Honey when sound is on, grey and sunk when muted. */
.bigkey { position: relative; width: 176px; height: 168px; border-radius: 40px; background: linear-gradient(#D69A00, #A87800); box-shadow: 0 26px 40px -18px rgba(0,0,0,.45), 0 4px 0 rgba(0,0,0,.12); transition: background .25s; -webkit-tap-highlight-color: transparent; }
.bigkey-face { position: absolute; left: 15px; right: 15px; top: 9px; height: 128px; border-radius: 28px; display: grid; place-items: center; color: #3A2A00;
  background: linear-gradient(#FFDD5C, #F5B301); box-shadow: inset 0 2px 0 rgba(255,255,255,.65), inset 0 -10px 18px rgba(170,110,0,.25), 0 6px 10px -4px rgba(90,60,0,.5);
  transition: transform .12s cubic-bezier(.3, 1.5, .5, 1), background .25s, color .25s; }
.bigkey:hover .bigkey-face { transform: translateY(2px); }
.bigkey:active .bigkey-face, .bigkey.down .bigkey-face { transform: translateY(14px); transition-duration: .05s; }
.bigkey[aria-pressed="false"] { background: linear-gradient(#8E8C87, #6F6D68); }
.bigkey[aria-pressed="false"] .bigkey-face { transform: translateY(9px); background: linear-gradient(#DEDCD6, #C3C0B9); color: #6F6D68; box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 3px 6px -3px rgba(0,0,0,.4); }

/* ---------- 07 more ---------- */
.s-more .copy.wide { top: 50%; width: min(60vw, 900px); transform: translateY(-50%); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3vw; align-items: end; padding: 3.4vh 0; border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { margin: 0; font: var(--hw) clamp(30px, 3.9vw, 64px)/1 var(--head); letter-spacing: var(--hls); }
.rows p { margin: 0; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.45; color: var(--soft); max-width: 36ch; }

/* ---------- end ---------- */
.end-word { position: absolute; left: calc(var(--pad) - .06em); top: 10vh; font: var(--hw) clamp(120px, 25vw, 470px)/.86 var(--head); letter-spacing: var(--hls-xl); opacity: var(--v); transform: translate3d(0, calc((1 - var(--e)) * 12vh), 0); }
.end-copy { position: absolute; left: var(--pad); bottom: 8vh; }
.end-copy .body { max-width: 30ch; margin-bottom: 26px; font-size: clamp(18px, 1.6vw, 24px); }
.s-end .btn .tag { background: var(--bg); color: var(--fg); }

/* depth: the big type behind the keyboard drifts against the mouse */
.hero-h, .end-word, .tone-words { translate: calc(var(--mx, 0) * -18px) calc(var(--my, 0) * -12px); }
.ear-l, .ear-r { translate: calc(var(--mx, 0) * -26px) calc(var(--my, 0) * -14px); }
.wave { translate: calc(var(--mx, 0) * -10px) calc(var(--my, 0) * -6px); }

/* ---------- now-playing chip ---------- */
.chip { position: absolute; right: 18px; bottom: 18px; height: 50px; padding: 0 18px 0 8px; border-radius: 25px; display: flex; align-items: center; gap: 8px; pointer-events: auto; background: var(--cream); color: var(--ink); box-shadow: 0 12px 30px -12px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.07); text-align: left; transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), opacity .4s; }
.chip:hover { transform: translateY(-2px); }
.chip img { object-fit: contain; }
.chip small { display: block; font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #8B867B; margin-bottom: 4px; }
.chip b { display: block; font: 600 14px/1 var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.chip.pulse img { animation: chip-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes chip-pop { 30% { transform: scale(1.3) rotate(-8deg); } }
/* The Library window and the popover already say which switch is playing. */
[data-at="library"] .chip, [data-at="menubar"] .chip { opacity: 0; pointer-events: none; transform: translateY(10px); }

.no-gl #stage { display: none; }

/* ---------- footer: the name is a keyboard ---------- */
.foot { position: relative; z-index: 5; background: var(--ink); color: #F4EFE6; padding: clamp(44px, 7vw, 96px) var(--pad) 26px; font-size: 15px; overflow: hidden; }
.foot-stage { position: relative; margin-bottom: clamp(30px, 5vw, 70px); }
.foot-word { display: block; width: 100%; height: auto; overflow: visible; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fl { cursor: pointer; outline: none; transform: translateY(calc(var(--w, 0) * -1.7px)); transition: transform .28s cubic-bezier(.3, 1.6, .5, 1); }
.fl rect { fill: transparent; }
.fl path { fill: none; stroke: #F4EFE6; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1s cubic-bezier(.5, 0, .2, 1) calc(var(--i) * .09s), stroke .3s; }
.fl-drop path { stroke: var(--honey); }
/* the second c lands one key-travel lower once the word is written */
.fl-drop { translate: 0 -2.6px; transition: transform .28s cubic-bezier(.3, 1.6, .5, 1), translate .5s cubic-bezier(.3, 1.8, .5, 1) 1.15s; }
.drawn .fl path { stroke-dashoffset: 0; }
.drawn .fl-drop { translate: 0 0; }
.fl.down { transform: translateY(1.5px); transition-duration: .05s; }
.fl.down path { stroke: var(--honey); transition: stroke 0s; }
.fl-drop.down path { stroke: #fff; }
.fl:focus-visible path { stroke: var(--honey); }
.foot-hint { position: absolute; right: 0; bottom: calc(100% + 10px); margin: 0; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #8F8A80; opacity: 0; transition: opacity .6s 1.6s; }
.drawn .foot-hint { opacity: 1; }
.fh-touch { display: none; }
@media (hover: none) { .fh-mouse { display: none; } .fh-touch { display: inline; } }
.foot-row { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 24px 48px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand b { display: block; font: var(--hw) 22px/1 var(--head); letter-spacing: var(--hls); margin-bottom: 6px; }
.foot-brand span { color: #A9A59C; }
.foot-markbtn { width: 52px; flex: none; }
.foot-mark { display: block; width: 100%; overflow: visible; }
.foot-mark .k1, .foot-mark .k2 { transition: transform .22s cubic-bezier(.3, 1.6, .5, 1); }
.foot-markbtn:hover .foot-mark .k2 { transform: translateY(-.6px); }
.foot-markbtn.down .foot-mark .k2 { transform: translateY(1.6px); transition-duration: .05s; }
.foot-markbtn.down .foot-mark .k1 { transform: translateY(.6px); transition-duration: .05s; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; padding-top: 4px; }
.foot-nav a { color: #C9C4B9; text-decoration: none; font-weight: 500; transition: color .2s; }
.foot-nav a:hover { color: var(--honey); }
.foot-credits { margin: 0; max-width: 40ch; color: #A9A59C; font-size: 13.5px; line-height: 1.5; } .foot-credits a { color: #F4EFE6; }
.foot-base { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 30px; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #77736B; }
/* back to top: a little keycap */
.foot-top { display: inline-block; height: 40px; padding-bottom: 5px; border-radius: 11px; background: #8E8A80; text-decoration: none; }
.ft-face { display: grid; place-items: center; height: 35px; padding: 0 14px; border-radius: 10px; background: linear-gradient(#FBF8F1, #E9E3D6); color: var(--ink); font: 600 12px/1 var(--display); letter-spacing: 0; text-transform: none; transition: transform .1s; }
.foot-top:hover .ft-face { transform: translateY(1px); }
.foot-top:active .ft-face { transform: translateY(4px); }

/* ---------- narrow screens ---------- */
@media (max-width: 860px) and (max-aspect-ratio: 13/10), (max-aspect-ratio: 4/5) {
  .island { top: 10px; }
  .island-links { display: none; }
  .hero-h { top: 11svh; font-size: 21vw; }
  .hero-copy { bottom: auto; top: calc(11svh + 45vw); width: 86vw; }
  .hero-sub { font-size: 16px; margin-bottom: 18px; }
  .btn { height: 48px; font-size: 15px; padding-left: 20px; }
  .copy, .s-library .copy, .s-feel .copy, .s-tone .copy, .s-menubar .copy, .s-more .copy.wide { left: var(--pad); right: var(--pad); width: auto; top: 10.5svh; transform: none; }
  h2 { font-size: clamp(34px, 10.4vw, 60px); margin-bottom: 14px; }
  .label { margin-bottom: 14px; }
  .body { font-size: 16px; }
  .s-library .aside { display: none; }
  .shelf { left: 14px; right: 14px; width: auto; top: auto; bottom: 12px; transform: none; }
  .shelf-now { margin-top: 8px; align-items: center; } .shelf-now h3 { font-size: 22px; margin: 0; } .shelf-now p { display: none; }
  .shelf-variants button { height: 28px; padding: 0 11px; font-size: 12px; }
  .shelf-filters { gap: 16px; margin-top: 10px; padding-bottom: 8px; } .shelf-filters button.sel::after { bottom: -9px; } .shelf-filters small { display: none; }
  .shelf-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
  .sw { padding: 2px; } .sw b { display: none; } .sw-art { width: min(44px, 92%); }
  .notes { margin-top: 14px; } .notes li { padding: 9px 0; } .notes b { font-size: 15px; } .notes span { font-size: 13.5px; }
  .wave { left: var(--pad); right: var(--pad); width: auto; top: auto; bottom: 38svh; height: 7svh; } .wave-cap { display: none; }
  .s-stereo .copy { top: auto; bottom: 9svh; left: var(--pad); right: var(--pad); margin: 0; width: auto; }
  .ear { top: 18svh; font-size: 26vw; }
  .tone-words { left: var(--pad); right: var(--pad); width: auto; top: calc(10.5svh + 27vw); bottom: auto; height: 50svh; }
  .tw-thock { font-size: calc(8vw + 15vw * var(--k)); bottom: calc(50% + 30px); } .tw-clack { font-size: calc(8vw + 17vw * (1 - var(--k))); top: calc(50% + 30px); }
  .tone-ctl { left: var(--pad); right: var(--pad); width: auto; top: calc(10.5svh + 27vw + 25svh); }
  .s-tone .body { display: none; }
  .s-notch .copy { top: 25svh; left: var(--pad); right: var(--pad); margin: 0; width: auto; }
  .one { left: var(--pad); right: var(--pad); width: auto; top: auto; bottom: 9svh; margin: 0; grid-template-columns: 1fr; gap: 14px; }
  .one-key { width: auto; flex-direction: row; gap: 16px; text-align: left; } .one-tag { display: none; }
  .bigkey { flex: none; width: 104px; height: 98px; border-radius: 26px; } .bigkey-face { left: 9px; right: 9px; top: 5px; height: 74px; border-radius: 18px; } .bigkey-face svg { width: 34px; height: 34px; }
  .bigkey:active .bigkey-face, .bigkey.down .bigkey-face { transform: translateY(9px); } .bigkey[aria-pressed="false"] .bigkey-face { transform: translateY(6px); }
  .ctl-row { min-height: 50px; grid-template-columns: 70px 1fr auto; gap: 10px; }
  .s-menubar .aside { display: none; }
  .rows li { grid-template-columns: 1fr; gap: 8px; padding: 2.2svh 0; } .rows h3 { font-size: 8.6vw; }
  .s-more .copy.wide { right: 26vw; }
  .end-word { top: 11svh; font-size: 29vw; }
  .end-copy { bottom: auto; top: calc(11svh + 30vw); }
  .chip { right: 10px; bottom: 10px; height: 44px; padding-right: 14px; } .chip img { width: 28px; height: 28px; } .chip small { display: none; }
  .foot-row { grid-template-columns: 1fr; gap: 22px; } .foot-nav { justify-content: flex-start; } .foot-hint { position: static; margin-top: 12px; }
}
/* short phones: the feel notes keep their titles only, so the waveform below never runs into them */
@media (max-width: 860px) and (max-aspect-ratio: 13/10) and (max-height: 780px), (max-aspect-ratio: 4/5) and (max-height: 780px) {
  .notes span { display: none; } .notes li { padding: 7px 0; }
}
/* small laptops and narrow windows */
@media (min-width: 861px) and (max-width: 1180px) {
  .one { right: 4vw; width: 52vw; gap: 26px; } .one-key { width: 150px; }
  .bigkey { width: 140px; height: 134px; border-radius: 32px; } .bigkey-face { left: 12px; right: 12px; top: 7px; height: 102px; border-radius: 22px; } .bigkey-face svg { width: 42px; height: 42px; }
  .ctl-row { grid-template-columns: 64px 1fr auto; gap: 12px; }
  .sw b { font-size: 10.5px; }
}
@media (max-height: 760px) and (min-width: 861px) {
  .hero-h { top: 13vh; font-size: min(11.4vw, 21vh); }
  h2 { font-size: clamp(36px, 4.6vw, 70px); margin-bottom: 16px; }
  .sw-art { width: min(50px, 76%); } .shelf-now { margin-top: 10px; } .shelf-filters { margin-top: 12px; } .shelf-grid { margin-top: 8px; gap: 2px 4px; }
  .notes li { padding: 9px 0; }
  .rows li { padding: 2.4vh 0; }
}
/* phones on their side and very short windows: the desktop side-by-side layout, squeezed to fit under the island */
@media (max-height: 560px) and (min-aspect-ratio: 13/10), (max-width: 860px) and (min-aspect-ratio: 13/10) {
  .island { top: 8px; height: 40px; border-radius: 20px; }
  .island-links { display: none; }
  .pop { top: 56px; max-height: calc(100svh - 64px); overflow: auto; }
  h2 { font-size: clamp(22px, 8.4svh, 44px); margin-bottom: 10px; }
  .label { margin-bottom: 10px; font-size: 10.5px; }
  .body { font-size: 14px; margin-bottom: 8px; max-width: 42ch; }
  .aside { display: none; }
  .copy { max-width: 44vw; }
  .hero-h { top: 66px; font-size: min(17svh, 10vw); }
  .hero-copy { bottom: 5svh; width: min(300px, 34vw); } .kicker { display: none; } .hero-cta .link { display: none; }
  .hero-sub { font-size: 14px; margin-bottom: 12px; }
  .btn { height: 42px; font-size: 14px; padding-left: 18px; } .btn .tag { padding: 7px 9px; font-size: 10px; }
  .btn.big { height: 48px; font-size: 15px; padding-left: 20px; }
  .s-library .copy { top: calc(50% + 24px); width: 34vw; } .s-library .body { display: none; }
  .shelf { right: 3vw; width: 56vw; top: calc(50% + 24px); }
  .shelf-stage { aspect-ratio: 2.95; width: 66%; margin: 0 auto; }   /* keep the keyboard's own shape; smaller, not squashed */
  .shelf-now { margin-top: 6px; } .shelf-now h3 { font-size: 20px; margin: 0; } .shelf-now p { display: none; }
  .shelf-variants button { height: 26px; padding: 0 10px; font-size: 11.5px; }
  .shelf-filters { gap: 14px; margin-top: 6px; padding-bottom: 6px; } .shelf-filters button { font-size: 12px; } .shelf-filters button.sel::after { bottom: -7px; } .shelf-filters small { display: none; }
  .shelf-grid { gap: 2px; margin-top: 6px; } .sw { padding: 1px; } .sw b { display: none; } .sw-art { width: min(34px, 90%); }
  .s-feel .copy { top: calc(50% + 24px); width: 42vw; }
  .notes { margin-top: 8px; } .notes li { padding: 6px 0; } .notes b { font-size: 14px; } .notes span { display: none; }
  .wave { top: 72px; height: 13svh; width: 44vw; } .wave-cap { display: none; }
  .ear { top: 40%; font-size: 30svh; } .ear-l { left: 3vw; } .ear-r { right: 3vw; }   /* smaller ears in the gaps beside the keyboard */
  .s-stereo .copy { bottom: 4svh; } .s-stereo h2 { font-size: clamp(22px, 7svh, 40px); margin-bottom: 6px; } .s-stereo .body { display: none; }
  .field { margin-top: 8px; }
  .s-tone .copy { top: 64px; width: 44vw; } .s-tone .body { display: none; }
  .tone-words { width: 40vw; top: 52px; }
  .tw-thock { font-size: calc(7svh + 13svh * var(--k)); bottom: calc(50% + 30px); } .tw-clack { font-size: calc(7svh + 15svh * (1 - var(--k))); top: calc(50% + 30px); }
  .tone-ctl { width: 40vw; top: calc(52px + (100% - 52px) / 2); }
  .s-notch .copy { top: 96px; } .s-notch .body { font-size: 13.5px; } .s-notch h2 { font-size: clamp(22px, 7.4svh, 40px); }
  .s-menubar .copy { top: 64px; width: 40vw; } .s-menubar .body { display: none; }
  .one { right: 3vw; width: 50vw; bottom: 0; top: 52px; gap: 16px; }
  .one-key { width: 110px; gap: 8px; } .one-tag { display: none; } .one-cap { font-size: 12px; }
  .bigkey { width: 96px; height: 92px; border-radius: 24px; } .bigkey-face { left: 8px; right: 8px; top: 5px; height: 68px; border-radius: 17px; } .bigkey-face svg { width: 30px; height: 30px; }
  .bigkey:active .bigkey-face, .bigkey.down .bigkey-face { transform: translateY(8px); } .bigkey[aria-pressed="false"] .bigkey-face { transform: translateY(5px); }
  .ctl-row { min-height: 40px; grid-template-columns: 58px 1fr auto; gap: 10px; } .ctl-sw img { width: 26px; height: 26px; } .ctl-sw b { font-size: 14px; } .ctl-sw small { display: none; }
  .s-more .copy.wide { top: 58px; transform: none; width: 72vw; } .s-more .label { margin-bottom: 4px; }
  .rows li { padding: 1.4svh 0; gap: 2vw; align-items: center; } .rows h3 { font-size: clamp(19px, 6svh, 38px); } .rows p { font-size: 12.5px; line-height: 1.35; }
  .end-word { top: 64px; font-size: min(30svh, 20vw); }
  .end-copy { bottom: 5svh; } .end-copy .body { font-size: 14px; margin-bottom: 12px; }
  .chip { right: 10px; bottom: 10px; height: 40px; padding-right: 14px; } .chip img { width: 26px; height: 26px; } .chip small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  :root { transition: none; }
  .fl, .fl path, .fl-drop { transition: none !important; translate: none !important; } .fl path { stroke-dashoffset: 0; }
  .r { transform: none; }
  .swap-a, .swap-b, .island, .btn, .sw-art, .sw-art img, .bigkey-face { transition: none; }
  .up, .ring.go, .hero-h.thump { animation: none; }
}
