/* KiMiA website. Colours from the app's Graphite Orange theme (Theme.swift), the patch and layer colours from the app.
   Rules from the app: no ellipses; a button changes colour, never size; rows stay aligned.
   Motion: transforms and opacity only; everything still under prefers-reduced-motion. */

@font-face {
  font-family: "Unbounded";
  src: url("/fonts/unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --deep: #0b0b10;
  --ground: #101013;
  --surface: #141416;
  --panel: #242429;
  --raised: #33333b;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);
  --text: #ededf0;
  --soft: #c4c4cc;
  --muted: #9a9aa5;
  --accent: #ffb04a;
  --accent-ink: #20170d;
  --accent-glow: rgb(255 176 74 / 0.35);
  --violet: #c7aaff;
  --p1: #ff6666;
  --p2: #5ce085;
  --la: #00dbff;
  --lb: #ffde38;
  --lc: #ff6bdb;
  --ld: #ff9429;
  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wide: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--deep);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 7.2vw, 96px); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 4.6vw, 60px); }
h3 { font-size: clamp(19px, 1.7vw, 23px); letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--soft); max-width: 46ch; }
.eyebrow { font: 600 13px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); display: inline-flex; gap: 10px; align-items: center; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.7; }
.muted { color: var(--muted); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Buttons: colour changes, size never does */
.btn {
  --bg: var(--panel); --fg: var(--text); --bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { --bg: var(--raised); --bd: rgb(255 255 255 / 0.24); }
.btn-primary { --bg: var(--accent); --fg: var(--accent-ink); --bd: var(--accent); }
.btn-primary:hover { --bg: #ffc06e; --bd: #ffc06e; }
.btn-small { height: 40px; padding: 0 18px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease); border-bottom: 1px solid transparent; }
.site-header.scrolled { background: rgb(11 11 16 / 0.78); backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.wordmark { font: 700 22px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wordmark .mark { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--soft); text-decoration: none; font-size: 15px; transition: color 0.2s, background-color 0.2s; }
.nav a:hover, .nav a[aria-current] { color: var(--text); background: rgb(255 255 255 / 0.06); }
/* Sounds and the course stand out: the two places that sell. */
.nav a.nav-hl { border: 1px solid; }
/* Sounds and the course: lit, the two places that sell (owner, 4 Nov: more than tinted). */
.nav a.nav-hl { font-weight: 700; }
.nav a.nav-sounds { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 18px var(--accent-glow); }
.nav a.nav-sounds:hover, .nav a.nav-sounds[aria-current] { color: var(--accent-ink); background: #ffc26e; border-color: #ffc26e; }
.nav a.nav-course { color: #17101f; background: var(--violet); border-color: var(--violet); box-shadow: 0 0 18px rgb(199 170 255 / 0.35); }
.nav a.nav-course:hover { color: #17101f; background: #d8c4ff; border-color: #d8c4ff; }
.nav a.nav-hl + a.nav-hl { margin-left: 6px; }
/* Download: the brightest thing in the header, with a slow halo. */
.header-cta { position: relative; }
.header-cta::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--accent); opacity: 0; animation: halo 2.8s var(--ease) infinite; pointer-events: none; }
@keyframes halo { 0% { transform: scale(1); opacity: 0.7; } 70%, 100% { transform: scale(1.22, 1.5); opacity: 0; } }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; }
@media (max-width: 1180px) and (min-width: 1041px) { .nav a:not(.nav-hl) { padding-inline: 9px; font-size: 14px; } .site-header .wrap { gap: 20px; } }
@media (max-width: 1040px) {
  .nav { position: fixed; inset: 68px 0 auto; flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; background: var(--panel); border-bottom: 1px solid var(--line-strong); box-shadow: 0 24px 48px -12px rgb(0 0 0 / 0.8); /* (a lighter panel than the page, so the menu and its rows stand out: owner, 4 Nov) */ transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity 0.2s, transform 0.2s, visibility 0s 0.2s; }
  .nav.open { opacity: 1; transform: none; visibility: visible; transition: opacity 0.2s, transform 0.2s; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line-strong); font-size: 17px; }
  .menu-toggle { display: inline-grid; place-items: center; margin-left: 12px; }
  .site-header .header-cta { margin-left: auto; }
  /* The menu on a phone: Sounds and the course first, as two lit buttons (owner, 4 Nov). */
  .nav a.nav-hl { order: -1; margin: 6px 0; padding: 15px 18px; border-radius: 14px; border: 0; font-weight: 700; text-align: center; }
  .nav a.nav-sounds, .nav a.nav-sounds:hover { color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 24px var(--accent-glow); }
  .nav a.nav-course, .nav a.nav-course:hover { color: #17101f; background: var(--violet); box-shadow: 0 0 24px rgb(199 170 255 / 0.35); margin-bottom: 14px; }
  .nav a.nav-hl + a.nav-hl { margin-left: 0; }
}
@media (max-width: 380px) { .site-header .header-cta { padding: 0 14px; } .wordmark { font-size: 20px; } }

/* Read aloud, not shown */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Sections */
section { position: relative; }
.section { padding-block: clamp(96px, 13vw, 180px); }
/* The header's 'The stage' lands on the section's words at 80 px, like Engines and Play it, not on the padding above them. */
#stage { scroll-margin-top: 0; }
.section-head { display: grid; gap: 22px; max-width: 820px; margin-bottom: clamp(44px, 6vw, 80px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

/* The top: a stage */
.hero { padding-top: clamp(100px, 12vh, 140px); min-height: 100svh; overflow: hidden; isolation: isolate; }
.hero::before { /* the stage light */
  content: ""; position: absolute; z-index: -1; left: 50%; top: -18%; width: min(1400px, 160vw); aspect-ratio: 1.3; translate: -50% 0;
  background: radial-gradient(closest-side, rgb(255 176 74 / calc(0.20 + var(--level, 0) * 0.35)), rgb(255 176 74 / 0.06) 55%, transparent 72%);
  pointer-events: none;
}
.hero::after { /* the stage floor */
  content: ""; position: absolute; z-index: -1; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, var(--deep)); pointer-events: none;
}
.hero-copy { display: grid; justify-items: center; text-align: center; gap: 22px; }
/* Two lines on a laptop, sized by the window's height too, so the buttons and the numbers show without scrolling. */
.hero-copy h1 { max-width: 13ch; }
@media (min-width: 900px) { .hero-copy h1 { max-width: 20ch; font-size: clamp(56px, min(6vw, 10vh), 92px); } }
.hero-copy h1 em { font-style: normal; color: var(--accent); }
.hero-copy .lede { max-width: 40em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.hero-note { font-size: 14px; color: var(--muted); }
.hero-copy .hero-lede { max-width: 34em; }
.hl8 { color: var(--accent); font-weight: 700; }
/* The hero's numbers, 8 layers first: Patch 1's four layers and Patch 2's, in the app's layer colours, playing. */
.hero-stats { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero-stats li { display: grid; justify-items: center; align-content: end; gap: 4px; min-width: 128px; padding: 14px 18px 12px; border: 1px solid var(--line); border-radius: 16px; background: rgb(20 20 22 / 0.6); }
.hero-stats b { font: 700 30px/1 var(--display); letter-spacing: -0.02em; }
.hero-stats li > span:last-child { font-size: 13px; color: var(--muted); }
.hero-stats .hs-engines { border-color: rgb(255 176 74 / 0.55); background: radial-gradient(120% 100% at 50% 0%, rgb(255 176 74 / 0.18), transparent 70%), rgb(20 20 22 / 0.6); }
.hero-stats .hs-engines b { font-size: 40px; color: var(--accent); }
.hs-waves { width: 104px; height: 28px; margin-bottom: 2px; color: var(--accent); }
.hero-stats .hs-layers { border-color: rgb(0 219 255 / 0.4); background: radial-gradient(120% 100% at 50% 0%, rgb(0 219 255 / 0.12), transparent 70%), rgb(20 20 22 / 0.6); }
.hero-stats .hs-layers b { font-size: 40px; color: var(--la); }
.hero-stats :is(.hs-engines, .hs-layers, .hs-voices, .hs-pads, .hs-switch) > span:last-child { color: var(--text); font-weight: 600; }
.hs-bars { display: flex; gap: 8px; height: 28px; margin-bottom: 2px; }
.hs-bars > span { display: flex; gap: 3px; align-items: end; padding-bottom: 3px; border-bottom: 2px solid var(--p1); }
.hs-bars > .hs-p2 { border-color: var(--p2); }
.hs-bars i { width: 5px; height: 23px; border-radius: 2px; background: var(--c); transform-origin: bottom; animation: meter 1.6s var(--ease) infinite alternate; }
.hs-bars i:nth-child(2) { animation-delay: -0.4s; } .hs-bars i:nth-child(3) { animation-delay: -0.9s; } .hs-bars i:nth-child(4) { animation-delay: -1.3s; }
.hs-p2 i { animation-duration: 1.9s; }
.hero-stats .hs-voices { border-color: rgb(199 170 255 / 0.45); background: radial-gradient(120% 100% at 50% 0%, rgb(199 170 255 / 0.14), transparent 70%), rgb(20 20 22 / 0.6); }
.hero-stats .hs-voices b { font-size: 40px; color: var(--violet); }
.hero-stats .hs-pads { border-color: rgb(255 107 219 / 0.45); background: radial-gradient(120% 100% at 50% 0%, rgb(255 107 219 / 0.13), transparent 70%), rgb(20 20 22 / 0.6); }
.hero-stats .hs-pads b { font-size: 40px; color: var(--lc); }
.hero-stats .hs-switch { border-color: rgb(92 224 133 / 0.45); background: radial-gradient(120% 100% at 50% 0%, rgb(92 224 133 / 0.13), transparent 70%), rgb(20 20 22 / 0.6); }
.hero-stats .hs-switch b { font-size: 40px; color: var(--p2); }
/* Two rows of Set pads, one lit, moving along. */
.hs-grid { width: 100px; height: 27px; margin-bottom: 2px; }
.hs-cells { fill: rgb(255 107 219 / 0.16); stroke: rgb(255 107 219 / 0.4); stroke-width: 1; }
.hs-lit { fill: var(--lc); filter: drop-shadow(0 0 4px rgb(255 107 219 / 0.8)); animation: pad-step 4.8s steps(1) infinite; }
@keyframes pad-step { 0% { transform: translate(0, 0); } 25% { transform: translate(42px, 13px); } 50% { transform: translate(-28px, 13px); } 75% { transform: translate(56px, 0); } }
/* The switch: the old sound's line rings out (Patch 1) while the new one has already begun (Patch 2). */
.hs-lanes { width: 104px; height: 28px; margin-bottom: 2px; }
.hs-old { stroke: var(--p1); opacity: 0.85; }
.hs-new { stroke: var(--p2); }
/* 128 dots, a voice each (16 by 8), breathing. */
.hs-poly { position: relative; width: 96px; height: 28px; margin-bottom: 2px; background: radial-gradient(circle, rgb(199 170 255 / 0.35) 1px, transparent 1.5px) 0 0 / 6px 3.5px; }
.hs-poly::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, var(--violet) 1.1px, transparent 1.6px) 0 0 / 6px 3.5px; animation: breathe 2.4s var(--ease) infinite alternate; }
@keyframes breathe { from { opacity: 0.25; } to { opacity: 1; } }
@keyframes meter { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
@media (max-width: 520px) { .hero-stats li { min-width: 0; flex: 1 1 28%; padding-inline: 6px; } .hero-stats :is(.hs-pads, .hs-switch) { flex: 1 1 40%; } .hero-stats li > span:last-child { text-align: center; font-size: 12px; } .hero-stats :is(.hs-engines, .hs-layers, .hs-voices, .hs-pads, .hs-switch) b { font-size: 32px; } .hs-waves, .hs-poly, .hs-grid, .hs-lanes { width: 84px; } .hs-bars { gap: 5px; } }

.stage { perspective: 1600px; margin-top: clamp(48px, 7vw, 88px); }
.screen {
  position: relative; border-radius: clamp(10px, 1.4vw, 18px); overflow: hidden; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong), 0 40px 120px -20px rgb(0 0 0 / 0.9), 0 0 120px -30px var(--accent-glow);
  transform-origin: 50% 0; transform: rotateX(calc((1 - var(--rise, 1)) * 24deg)) scale(calc(0.9 + var(--rise, 1) * 0.1));
  will-change: transform; aspect-ratio: 1710 / 1166; /* Play, down to the whole Live output */
  isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); /* (iPhone Safari clips the blended scope at the rounded edge only with a mask) */
  /* never taller than the window under the header: the whole app shows at once on a laptop */
  width: min(100%, calc((100svh - 130px) * 1710 / 1166)); margin-inline: auto;
}
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.6s var(--ease); }
.screen img + img { opacity: 0; }
.screen img.on { opacity: 1; }
.screen-caption { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 20px; min-height: 24px; font: 500 14px/1.5 var(--mono); color: var(--muted); }
.screen-caption b { color: var(--text); font-weight: 600; }
.screen-caption .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); align-self: center; box-shadow: 0 0 12px var(--accent); }

/* The scope: the sound you hear, drawn */
.scope { position: absolute; left: 0; right: 0; bottom: 0; height: min(140px, 22%); /* (on a phone a share of the small screen; on a laptop as before) */ pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 0.5s; }
.playing .scope { opacity: 1; }

/* Bento grid of stage features */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  position: relative; grid-column: span 2; padding: 28px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--ground));
  border: 1px solid var(--line); overflow: hidden; display: grid; align-content: start; gap: 12px; min-height: 230px;
}
.tile.wide { grid-column: span 3; }
.tile.full { grid-column: span 6; }
.tile .k { font: 600 clamp(38px, 4vw, 54px)/1 var(--display); letter-spacing: -0.03em; color: var(--accent); }
.tile p { color: var(--soft); font-size: 16px; }
.tile .shot { margin: 8px -28px -28px; border-top: 1px solid var(--line); }
@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, 1fr); } .tile, .tile.wide { grid-column: span 1; } .tile.full { grid-column: span 2; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .tile, .tile.wide, .tile.full { grid-column: span 1; } }

/* Split: text and a screen side by side */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.flip { grid-template-columns: 7fr 5fr; }
.split.flip > :first-child { order: 2; }
.split .copy { display: grid; gap: 22px; }
.points { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--soft); }
.points li::before { content: ""; width: 8px; height: 8px; margin: 9px 0 0 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.points b { color: var(--text); font-weight: 600; }
.framed { border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-strong), 0 30px 80px -30px rgb(0 0 0 / 0.9); background: var(--surface); }
@media (max-width: 960px) { .split, .split.flip { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }

/* The switch: two lanes */
.lanes { position: relative; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: clamp(20px, 3vw, 36px); overflow: hidden; }
.lanes svg { width: 100%; height: auto; }
.lane-old { stroke: var(--p1); }
.lane-new { stroke: var(--p2); }
.legend { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; color: var(--soft); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 4px; border-radius: 2px; background: var(--c); }
/* An arrow nudging toward Hear the switch, until it has been played once. */
.switch-cta .nudge { width: 34px; height: 18px; color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); animation: nudge 1.1s var(--ease) infinite; }
.switch-cta.heard .nudge { visibility: hidden; animation: none; }
@keyframes nudge { 0%, 100% { transform: translateX(-6px); opacity: 0.55; } 50% { transform: translateX(2px); opacity: 1; } }

/* Engines */
.engines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.engine {
  position: relative; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); padding: 22px; display: grid; gap: 10px; align-content: start;
  transition: border-color 0.25s, background-color 0.25s;
}
.engine:hover { border-color: rgb(255 176 74 / 0.4); background: #18181b; }
.engine canvas { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; background: var(--deep); }
.engine h3, .engine .card-h { margin-top: 8px; }
.card-h { font-size: clamp(19px, 1.7vw, 23px); letter-spacing: -0.01em; line-height: 1.2; }
.engine p { color: var(--soft); font-size: 15px; }
.engine .stat { font: 500 13px/1.4 var(--mono); color: var(--muted); }
.play-chip {
  position: absolute; top: 30px; right: 30px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgb(11 11 16 / 0.7);
  display: grid; place-items: center; cursor: pointer; transition: background-color 0.2s, border-color 0.2s;
}
.play-chip:hover, .play-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.play-chip svg { width: 16px; height: 16px; }
@media (max-width: 1080px) { .engines { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .engines { grid-template-columns: 1fr; } }

/* Edit tour */
.tour { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 5vw, 72px); }
.tour-steps { display: grid; gap: 0; }
.tour-step { padding: 28vh 0; opacity: 0.62; transition: opacity 0.4s var(--ease); }
.tour-step:first-child { padding-top: 10vh; }
.tour-step.on { opacity: 1; }
.tour-step h3 { margin-bottom: 10px; }
.tour-step p { color: var(--soft); }
.tour-view { position: sticky; top: calc(50vh - min(28vw, 330px)); height: fit-content; }
.tour-view img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s var(--ease); }
.tour-view img.on { opacity: 1; }
.tour-view .hl { position: absolute; border: 2px solid var(--accent); border-radius: 10px; box-shadow: 0 0 0 9999px rgb(11 11 16 / 0.55), 0 0 30px var(--accent-glow); transition: all 0.6s var(--ease); pointer-events: none; }
@media (max-width: 960px) { .tour { grid-template-columns: 1fr; } .tour-view { position: relative; top: 0; order: -1; } .tour-step { padding: 28px 0; opacity: 1; } .tour-view .hl { display: none; } }

/* Themes */
.themes { display: grid; gap: 22px; }
.theme-picks { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.theme-pick { height: 40px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--soft); transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.theme-pick i { width: 24px; height: 24px; border-radius: 50%; background: conic-gradient(var(--a) 0 50%, var(--g) 0); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.2); }
.theme-pick[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: var(--panel); }

/* Keyboard */
.keys-box { border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--ground)); padding: clamp(18px, 3vw, 32px); display: grid; gap: 22px; }
.keys-groups { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.group-pick { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; transition: color 0.15s, background-color 0.15s, border-color 0.15s; }
.group-pick span { font-size: 12px; opacity: 0.7; margin-left: 2px; }
.group-pick:hover { color: var(--text); }
.group-pick[aria-pressed="true"] { color: var(--text); border-color: var(--line-strong); background: var(--panel); }
.keys-sounds { display: flex; gap: 8px; flex-wrap: wrap; min-height: 38px; }
.sound-pick { height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--soft); font-size: 14px; cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.sound-pick[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.keyboard { position: relative; display: flex; height: clamp(150px, 20vw, 220px); user-select: none; -webkit-user-select: none; touch-action: none; }
.key { flex: 1; position: relative; border: 1px solid #000; border-radius: 0 0 8px 8px; background: linear-gradient(#f4f4f6, #dcdce2); cursor: pointer; transition: background-color 0.05s; }
.key.down { background: linear-gradient(#ffd79e, var(--accent)); }
.key.black { position: absolute; z-index: 2; height: 62%; border-radius: 0 0 6px 6px; background: linear-gradient(#2c2c33, #0d0d10); border-color: #000; }
.key.black.down { background: linear-gradient(#c78a3a, #8a5a1c); }
.key .lbl { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font: 600 11px/1 var(--mono); color: #77777f; pointer-events: none; }
.key.black .lbl { color: #8a8a94; }
.keys-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.held { font: 500 13px/1 var(--mono); }

/* Specs at a glance */
.glance { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.glance div { padding: 26px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.glance b { font: 600 clamp(28px, 3vw, 40px)/1 var(--display); letter-spacing: -0.02em; }
.glance span { color: var(--muted); font-size: 15px; }
@media (max-width: 800px) { .glance { grid-template-columns: repeat(2, 1fr); } }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quote { margin: 0; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 16px; align-content: space-between; }
.quote blockquote { margin: 0; font: 500 clamp(18px, 1.6vw, 21px)/1.45 var(--body); }
.quote figcaption { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* Get KiMiA */
.get { border-radius: calc(var(--radius) + 8px); padding: clamp(36px, 6vw, 80px); background: radial-gradient(120% 140% at 50% 0%, rgb(255 176 74 / 0.18), transparent 60%), var(--surface); border: 1px solid var(--line-strong); text-align: center; display: grid; gap: 22px; justify-items: center; }
.notify { display: flex; gap: 10px; width: min(100%, 520px); flex-wrap: wrap; justify-content: center; }
.notify input[type="email"] { flex: 1 1 260px; height: 52px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--deep); color: var(--text); font: inherit; }
.notify input[type="email"]::placeholder { color: var(--muted); }
.consent { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 14px; color: var(--muted); max-width: 520px; }
.consent input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.form-status { min-height: 24px; font-size: 15px; }
.form-status.ok { color: var(--p2); }
.form-status.err { color: var(--p1); }
.reqs { display: flex; gap: 10px 28px; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: 14px; }

/* FAQ */
.faq { display: grid; gap: 0; max-width: 860px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 22px; color: var(--soft); max-width: 70ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; color: var(--muted); font-size: 15px; }
.foot { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.foot .foot-h { font-family: var(--display); margin: 0 0 14px; color: var(--text); font-size: 14px; font-weight: 600; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.foot a:hover { color: var(--text); }
.fine { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; display: grid; gap: 8px; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: span 2; } }

/* Reveal on scroll (only when JavaScript runs and motion is welcome) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* Plain pages (specs, faq, legal) */
.page-head { padding: 80px 0 clamp(40px, 6vw, 72px); display: grid; gap: 20px; }
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(24px, 3vw, 34px); margin: 56px 0 18px; }
.prose p, .prose li { color: var(--soft); }
.prose p + p { margin-top: 14px; }
.spec-group { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); }
.spec-group h2 { font-size: 22px; margin: 0; position: sticky; top: 96px; align-self: start; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.spec-table th, .spec-table td { text-align: left; vertical-align: top; padding: 13px 0; border-bottom: 1px solid var(--line); }
.spec-table th { width: 34%; font-weight: 500; color: var(--muted); padding-right: 24px; }
.spec-table td { color: var(--text); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
@media (max-width: 800px) { .spec-group { grid-template-columns: 1fr; gap: 12px; } .spec-group h2 { position: static; } .spec-table th { width: 42%; } }

/* Page to page: a short crossfade where the browser supports it; the header stays put. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .screen { transform: none; }
  .header-cta::after { animation: none; }
  .hs-bars i { animation: none; transform: none; }
  .hs-poly::after { animation: none; }
}

/* Sounds: the store. The demos on top, then the banks: cover, samples, price and cart. */
.store-head { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); align-items: end; gap: 16px 48px; padding-bottom: clamp(28px, 4vw, 44px); }
.store-head .eyebrow { grid-column: 1 / -1; }
.store-head h1 { font-size: clamp(36px, 5.2vw, 72px); margin: 0; white-space: nowrap; }
.store-head .lede { margin: 0; }
@media (max-width: 860px) { .store-head { grid-template-columns: 1fr; } }
.listen { margin-bottom: clamp(72px, 10vw, 128px); }
.player { display: grid; grid-template-columns: minmax(200px, 300px) 1fr minmax(260px, 340px); gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-radius: 28px; background: radial-gradient(120% 140% at 0% 0%, rgb(255 176 74 / 0.08), transparent 55%), var(--surface); }
.player-cover { aspect-ratio: 1; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.8); transition: transform 0.5s var(--ease); }
.player-cover canvas { width: 100%; height: 100%; display: block; }
.player.playing .player-cover { transform: scale(1.02); }
.player-main { min-width: 0; display: grid; gap: 10px; }
.player-title { font: 700 clamp(26px, 3.2vw, 40px)/1.1 var(--display); letter-spacing: -0.02em; margin: 0; }
.player-bank { margin: 0; font-size: 17px; }
.player-bank a { color: var(--accent); text-decoration: none; }
.player-bank a:hover { text-decoration: underline; }
.player-parts { margin: 0; color: var(--muted); font-size: 14px; min-height: 2.6em; }
.player-controls { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.player-play { min-width: 128px; }
.player-play .i-stop, .sample .i-stop { display: none; }
.player-play[aria-pressed="true"] .i-play, .sample[aria-pressed="true"] .i-play { display: none; }
.player-play[aria-pressed="true"] .i-stop, .sample[aria-pressed="true"] .i-stop { display: block; }
.player-skip { color: var(--soft); }
.wave { height: 72px; margin-top: 10px; cursor: pointer; touch-action: none; border-radius: 10px; outline-offset: 4px; }
.wave canvas { width: 100%; height: 100%; display: block; }
.player-time { display: flex; justify-content: space-between; font: 13px var(--mono); color: var(--muted); }
.tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; align-self: stretch; align-content: center; }
.track { width: 100%; display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; transition: background-color 0.2s, border-color 0.2s; }
.track:hover { background: rgb(255 255 255 / 0.04); }
.track.on { background: var(--panel); border-color: var(--line-strong); }
.track-n { font: 13px var(--mono); color: var(--muted); }
.track.on .track-n { color: var(--accent); }
.track-t { display: grid; gap: 2px; min-width: 0; }
.track-t b { font-weight: 600; font-size: 15px; }
.track-t span { font-size: 13px; color: var(--muted); }
.track-len { font: 13px var(--mono); color: var(--muted); }
.track[aria-pressed="true"] .track-n { color: transparent; background: center / 14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cg fill='%23ffb04a'%3E%3Crect x='1' y='4' width='2.4' height='8' rx='1'/%3E%3Crect x='5.8' y='1' width='2.4' height='11' rx='1'/%3E%3Crect x='10.6' y='6' width='2.4' height='6' rx='1'/%3E%3C/g%3E%3C/svg%3E"); }
@media (max-width: 1100px) { .player { grid-template-columns: 220px 1fr; } .tracks { grid-column: 1 / -1; } }
@media (max-width: 640px) { .player { grid-template-columns: 1fr; border-radius: 22px; } .player-cover { max-width: 148px; } .tracks { grid-column: auto; } }

.shop-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 32px; margin-bottom: 28px; }
.shop-head h2 { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--soft); font: inherit; font-size: 14px; cursor: pointer; transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.chip span { color: var(--muted); margin-left: 4px; font-size: 12px; }
.chip:hover { color: var(--text); border-color: rgb(255 255 255 / 0.3); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip[aria-pressed="true"] span { color: var(--accent-ink); }
.banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.bank { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--surface); transition: border-color 0.25s, transform 0.4s var(--ease); view-transition-name: var(--vt); }
.bank:hover { border-color: var(--line-strong); }
.bank[hidden] { display: none; }
.bank-cover { position: relative; aspect-ratio: 16 / 9; background: #0f0f13; }
.bank-cover canvas { width: 100%; height: 100%; display: block; }
.bank-tags { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 6px; }
.bank-tags span { padding: 4px 10px; border-radius: 999px; font-size: 12px; background: rgb(11 11 16 / 0.72); border: 1px solid var(--line-strong); color: var(--soft); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bank-body { display: flex; flex-direction: column; gap: 12px; padding: 20px 20px 18px; flex: 1; }
.bank-body h3 { margin: 0; font: 700 22px/1.15 var(--display); letter-spacing: -0.01em; }
.bank-body > p { margin: 0; color: var(--soft); font-size: 15px; line-height: 1.5; }
.samples { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.sample { width: 100%; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: background-color 0.2s; }
.sample svg { width: 28px; height: 28px; padding: 7px; border-radius: 50%; background: var(--panel); color: var(--accent); transition: background-color 0.2s, color 0.2s; }
.sample:hover { background: rgb(255 255 255 / 0.04); }
.sample:hover svg, .sample[aria-pressed="true"] svg { background: var(--accent); color: var(--accent-ink); }
.sample-t { min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.sample-k { font: 12px var(--mono); color: var(--muted); }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.price { font: 700 24px/1 var(--display); }
.add { min-width: 150px; }
.add .add-on { display: none; }
.add[aria-pressed="true"] { --bg: rgb(92 224 133 / 0.12); --bd: rgb(92 224 133 / 0.55); --fg: var(--p2); }
.add[aria-pressed="true"] .add-on { display: inline; }
.add[aria-pressed="true"] .add-off { display: none; }
.shop-note { margin: 40px 0 120px; color: var(--muted); font-size: 14px; max-width: 70ch; }

.cart-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgb(36 36 41 / 0.92); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 16px 40px -16px rgb(0 0 0 / 0.8); transition: background-color 0.2s, border-color 0.2s; }
.cart-fab svg { width: 22px; height: 22px; }
.cart-fab b { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; background: var(--raised); }
.cart-fab.has { border-color: var(--accent); }
.cart-fab.has b { background: var(--accent); color: var(--accent-ink); }
.cart-fab.bump b { animation: bump 0.45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
.cart-scrim { position: fixed; inset: 0; z-index: 70; background: rgb(0 0 0 / 0.5); opacity: 0; transition: opacity 0.25s; }
.cart-scrim.open { opacity: 1; }
.cart { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(420px, 100%); display: flex; flex-direction: column; padding: 24px; background: var(--surface); border-left: 1px solid var(--line-strong); transform: translateX(100%); transition: transform 0.3s var(--ease); }
.cart.open { transform: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cart-head h2 { margin: 0; font-size: 26px; }
.cart-close { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.cart-close svg { width: 18px; height: 18px; }
.cart-items { list-style: none; margin: 0; padding: 0; overflow: auto; }
.cart-items li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-remove { grid-column: 1 / -1; justify-self: start; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.cart-remove:hover { color: var(--text); }
.cart-empty { color: var(--muted); }
.cart-foot { margin-top: auto; display: grid; gap: 12px; padding-top: 16px; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; }
.cart-foot p { margin: 0; color: var(--muted); font-size: 13px; }

/* The homepage's two selling tiles: the banks (amber) and the course (violet). */
.sell { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sell .tile { grid-column: auto; min-height: 0; padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; align-items: flex-start; gap: 16px; text-decoration: none; color: inherit; transition: border-color 0.25s; }
.sell .tile h2 { font-size: clamp(28px, 3.4vw, 44px); max-width: 16ch; margin: 0; }
.sell .tile p { color: var(--soft); margin: 0 0 8px; max-width: 46ch; }
.sell .tile .btn { margin-top: auto; }
.sell-banks { background: radial-gradient(90% 120% at 0% 0%, rgb(255 176 74 / 0.16), transparent 60%), var(--surface); }
.sell-banks:hover { border-color: rgb(255 176 74 / 0.5); }
.sell-course { background: radial-gradient(90% 120% at 100% 0%, rgb(199 170 255 / 0.18), transparent 60%), var(--surface); }
.sell-course .eyebrow { color: var(--violet); }
.sell-course:hover { border-color: rgb(199 170 255 / 0.5); }
.sell-course:hover .btn { --bg: var(--violet); --fg: #17101f; --bd: var(--violet); }
.sell-banks:hover .btn { --bg: #ffc06e; --bd: #ffc06e; }
@media (max-width: 860px) { .sell { grid-template-columns: 1fr; } }
