/* JamLand, the app's page.
   One warm evening theme (the village after dark is the brand) and one face
   for every letter: Jersey 15, the same as the app. It sets small beside
   ordinary faces, so font-size-adjust scales it to their lowercase height.
   Shapes: anything you press is a pill; pictures and panels are 20px.
   Motion is one easing curve, used everywhere, and none at all with
   Reduce Motion. */

@font-face {
  font-family: "Jersey 15";
  src: url("../fonts/Jersey15-Regular.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font: "Jersey 15", system-ui, -apple-system, sans-serif;
  --bg: #17100c;
  --surface: #221812;
  --surface-2: #2c2018;
  --line: #3d2e23;
  --ink: #f4e9dc;        /* 15.7:1 on --bg */
  --muted: #c4b19c;      /* 9.1:1 on --bg, 8.4:1 on --surface */
  --amber: #ffd27a;      /* 12.6:1 on --bg: highlights, never body text */
  --orange: #e8754a;     /* primary actions */
  --orange-hover: #f08a5f;
  --on-orange: #2a140b;  /* 5.9:1 on --orange */
  --wood: #3b2618;
  --paper: #f5e7c8;      /* signs and speech bubbles */
  --radius: 20px;
  --content: 1180px;
  --gutter: clamp(16px, 4vw, 36px);
  --section: clamp(96px, 12vw, 172px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
* { font-size-adjust: ex-height 0.48 !important; font-synthesis: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(232, 117, 74, 0.13), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(255, 210, 122, 0.07), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* A whisper of grain over everything, like lamplight on wood. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 60; background: var(--amber); color: #2a140b; padding: 10px 16px; border-radius: 999px; font-weight: 800; }
.skip:focus { left: 12px; }

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--font); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 86px); line-height: 1.02; letter-spacing: -0.005em; }
h2 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.05; }
h3 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.12; }
.lede { color: var(--muted); font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; max-width: 40ch; }
.section-head { max-width: 760px; }
.section-head > p { margin-top: 18px; color: var(--muted); font-size: 20px; max-width: 48ch; }
.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 24px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 9px; height: 9px; background: var(--amber); box-shadow: 2px 2px 0 #7a4a1c; }

/* ---------- buttons, links, forms ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap;
  min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--orange); color: var(--on-orange);
  font: 800 17px/1 var(--font); text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(232, 117, 74, 0.6);
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.button:hover { background: var(--orange-hover); transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(232, 117, 74, 0.7); }
.button:active { transform: translateY(0) scale(0.98); }
.button.small { min-height: 44px; padding: 0 20px; font-size: 15px; box-shadow: none; }
.button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.button.ghost:hover { box-shadow: inset 0 0 0 2px var(--muted); }
.button[disabled] { opacity: 0.7; cursor: progress; transform: none; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-weight: 800;
  text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: color 0.3s var(--ease);
}
.text-link:hover { color: var(--amber); }

.waitlist { margin-top: 34px; max-width: 540px; }
.field-label { display: block; margin-bottom: 8px; font-weight: 800; font-size: 15px; }
.field-row { display: flex; gap: 10px; }
.field {
  flex: 1; min-width: 0; min-height: 54px; padding: 0 22px;
  border-radius: 999px; border: 2px solid var(--line); background: var(--surface-2);
  color: var(--ink); font: 400 17px var(--font);
  transition: border-color 0.3s var(--ease);
}
.field::placeholder { color: #a8957f; } /* 5.5:1 on --surface-2 */
.field:focus-visible { outline: none; border-color: var(--amber); }
.field[aria-invalid="true"] { border-color: #ff8f7a; }
.field-help { margin-top: 10px; color: var(--muted); font-size: 15px; }
.field-status { margin-top: 6px; min-height: 1.5em; font-size: 15px; font-weight: 700; }
.field-status[data-kind="error"] { color: #ffab99; }
.field-status[data-kind="success"] { color: var(--amber); }
.waitlist[data-state="done"] .field-row,
.waitlist[data-state="done"] .field-label,
.waitlist[data-state="done"] .field-help { display: none; }
.waitlist[data-state="done"] .field-status { font-size: 18px; }
@media (max-width: 520px) {
  .field-row { flex-direction: column; }
  .field-row .button { width: 100%; }
}

/* ---------- the floating bar ---------- */

.bar {
  position: fixed; z-index: 50; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--gutter)), 1120px);
  border-radius: 999px; padding: 6px 8px 6px 18px;
  display: flex; align-items: center; gap: 20px;
  background: rgba(34, 24, 18, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(255, 230, 200, 0.09), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  transition: background-color 0.4s var(--ease);
}
.bar[data-scrolled] { background: rgba(28, 20, 15, 0.88); }
@media (prefers-reduced-transparency: reduce) {
  .bar { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand .wordmark { height: 52px; width: auto; transition: transform 0.4s var(--ease); }
.brand:hover .wordmark { transform: rotate(-2deg) scale(1.03); }
.bar-nav { display: flex; gap: 4px; margin-left: auto; }
.bar-nav a {
  text-decoration: none; font-weight: 700; font-size: 16px; color: var(--muted);
  padding: 10px 14px; border-radius: 999px; transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.bar-nav a:hover { color: var(--ink); background: rgba(255, 230, 200, 0.07); }
@media (max-width: 860px) {
  .bar-nav { display: none; }
  .bar .button.small { margin-left: auto; }
  .brand .wordmark { height: 44px; }
}

/* ---------- hero ---------- */

.hero {
  max-width: var(--content); margin: 0 auto;
  padding: clamp(128px, 15vw, 176px) var(--gutter) clamp(56px, 7vw, 96px);
}
.hero h1 { max-width: none; }
.hero-eyebrow { color: var(--amber); font-weight: 800; letter-spacing: 0.08em; font-size: 15px; margin-bottom: 20px; }
/* The musician, strumming inside the headline. */
.inline-sprite {
  /* A quarter smaller than the words, and a soft glow rather than a frame,
     so the musician is what you see. */
  display: inline-block; vertical-align: -0.04em; width: 0.94em; height: 0.69em; margin: 0 0.06em;
  border-radius: 999px; overflow: hidden; position: relative;
  background: radial-gradient(circle at 50% 110%, rgba(232, 160, 96, 0.32), rgba(232, 160, 96, 0.06) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 122, 0.14);
}
.hero-player {
  position: absolute; left: 50%; bottom: -0.12em; width: 1.02em; height: 1.02em; margin-left: -0.51em;
  background: url("../img/hero/0.png") 0 0 / 900% 100% no-repeat;
  image-rendering: pixelated; animation: strum 1.8s steps(8) infinite;
  transition: opacity 0.35s var(--ease);
}
.hero-player.away { opacity: 0; }
@keyframes strum { to { background-position: 100% 0; } }

.hero-lower {
  margin-top: clamp(28px, 4vw, 44px);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start;
}
.hero-visual { margin: 0; position: relative; padding-bottom: 64px; }
/* The village, up and to the left; the phone stands in front of it. */
.scene {
  position: relative; width: 82%; aspect-ratio: 256 / 340; border-radius: var(--radius); overflow: hidden;
  background: #2c3a1e; box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}
.scene-art { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; transition: opacity 0.6s var(--ease); }
[data-time="day"] .night-only, [data-time="night"] .day-only { opacity: 0; }
.phone {
  border-radius: 38px; overflow: hidden; background: #0b0806;
  border: 7px solid #0b0806; box-shadow: 0 0 0 1px var(--line), 0 40px 80px -20px rgba(8, 5, 3, 0.85);
}
.hero-phone { position: absolute; right: 0; bottom: 0; width: min(270px, 48%); }
.scene-caption {
  position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 15px;
}
.toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.toggle button {
  min-height: 44px; min-width: 72px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font: 800 15px var(--font); cursor: pointer; transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.toggle button[aria-checked="true"] { background: var(--ink); color: #2a140b; }

@media (max-width: 900px) {
  .hero-lower { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 12px; max-width: 520px; }
}
@media (max-width: 480px) {
  .scene-caption > span:first-child { display: none; }
}

/* ---------- the instruments, going by ---------- */

.marquee {
  border-block: 1px solid var(--line); background: rgba(34, 24, 18, 0.6); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; padding: 22px 0; }
.marquee-track ul { list-style: none; margin: 0; padding: 0; display: flex; }
.marquee-track li { display: flex; align-items: center; font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; color: var(--muted); white-space: nowrap; }
.marquee-track li::after { content: ""; width: 8px; height: 8px; margin: 0 clamp(18px, 2.4vw, 32px); background: var(--orange); transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: march 60s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@keyframes march { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { width: auto; }
  .marquee-track ul { flex-wrap: wrap; justify-content: center; padding: 0 var(--gutter); row-gap: 6px; }
  .marquee-track ul + ul { display: none; }
}

/* ---------- sections ---------- */

.chapter { max-width: var(--content); margin: 0 auto; padding: var(--section) var(--gutter) 0; }

/* ---------- the village, to explore ---------- */

.village-body { margin-top: 48px; display: grid; grid-template-columns: minmax(280px, 480px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.map {
  position: relative; aspect-ratio: 256 / 340; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0, 0, 0, 0.8); background: #2c3a1e;
}
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; transition: opacity 0.6s var(--ease); }
.map-sprite {
  position: absolute; image-rendering: pixelated; pointer-events: none;
  left: calc(var(--x) / 256 * 100%); top: calc(var(--y) / 340 * 100%); width: calc(var(--w) / 256 * 100%);
}
.spot {
  position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 14px;
  left: calc(var(--l) / 256 * 100%); top: calc(var(--t) / 340 * 100%);
  width: calc((var(--r) - var(--l)) / 256 * 100%); height: calc((var(--b) - var(--t)) / 340 * 100%);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.spot:hover { background: rgba(255, 210, 122, 0.14); }
.spot[aria-selected="true"] { background: rgba(255, 210, 122, 0.1); box-shadow: inset 0 0 0 3px var(--amber), 0 0 40px rgba(255, 210, 122, 0.35); }
.spot:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
/* Each place's sign, where the app hangs it. */
.spot span {
  position: absolute; white-space: nowrap; transform: translate(-50%, -100%);
  left: calc((var(--sx) - var(--l)) / (var(--r) - var(--l)) * 100%);
  top: calc((var(--sy) - var(--t)) / (var(--b) - var(--t)) * 100%);
  padding: 3px 10px 2px; border-radius: 6px; background: #ecd3a4; color: #2a140b;
  box-shadow: inset 0 0 0 2px var(--wood), 0 3px 0 var(--wood); font: 700 15px/1.2 var(--font);
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease);
}
.spot:hover span { transform: translate(-50%, calc(-100% - 3px)); }
.spot[aria-selected="true"] span { background: var(--amber); }

.places { min-height: 520px; }
.place { display: grid; grid-template-columns: 1fr minmax(170px, 250px); gap: clamp(20px, 3vw, 40px); align-items: start; }
.js .place[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .place.entering { animation: rise 0.6s var(--ease); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.place-copy > p { margin-top: 14px; color: var(--muted); }
.place-copy > .place-sub { margin-top: 6px; color: var(--ink); font-size: 1.12em; }
.place-copy > .place-note { margin-top: 18px; color: var(--ink); }
.ticks strong { color: var(--ink); font-weight: 700; }
.place-copy .text-link { margin-top: 18px; }
.place-shot { border-radius: 30px; border: 6px solid #0b0806; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -20px rgba(8, 5, 3, 0.8); }
.place-shot.wide { border: 0; border-radius: 22px; grid-column: 1 / -1; max-width: 440px; }
.saying { margin: 20px 0 0; padding: 16px 18px; border-radius: 12px; background: var(--paper); color: #2a140b; box-shadow: inset 0 0 0 2px var(--wood), 0 4px 0 var(--wood); }
.saying p, .tile .saying p { font-size: 19px; line-height: 1.4; color: #2a140b; }
.saying cite { display: block; margin-top: 8px; font-style: normal; font-size: 15px; color: #6b4a30; }
@media (max-width: 920px) {
  .village-body { grid-template-columns: 1fr; }
  .map { max-width: 480px; }
  .places { min-height: 0; }
}
@media (max-width: 560px) {
  .place { grid-template-columns: 1fr; }
  .place-shot { max-width: 240px; }
  .spot span { font-size: 13px; padding: 2px 7px 1px; }
}

/* On a phone the place you tapped rises in a sheet over the page, so it is
   read beside the map rather than found by scrolling past it. The sheet is
   frosted glass: the village shows through it, blurred and tinted dark
   enough that the words stay easy to read (the muted text keeps over 4.5:1
   even over the daytime green). Solid with Reduce Transparency. */
.sheet-bar { display: none; }
@media (max-width: 760px) {
  .js .places {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    max-height: min(70svh, 660px); overflow-y: auto; overscroll-behavior: contain;
    padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
    background: rgba(26, 18, 13, 0.7);
    -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
    border-radius: 26px 26px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 233, 200, 0.12), 0 -30px 60px -24px rgba(0, 0, 0, 0.7);
    transform: translateY(105%); visibility: hidden;
    transition: transform 0.45s var(--ease), visibility 0s linear 0.45s;
  }
  .js .village-body.sheet-open .places {
    transform: none; visibility: visible;
    transition: transform 0.45s var(--ease), visibility 0s;
  }
  .js .sheet-bar {
    display: flex; position: sticky; top: 0; z-index: 1; justify-content: flex-end; align-items: center;
    margin: 0 calc(-1 * var(--gutter)); padding: 10px 12px 4px;
    /* What scrolls under the close button fades rather than showing through. */
    background: linear-gradient(rgba(26, 18, 13, 0.55), rgba(26, 18, 13, 0));
  }
  .grabber { position: absolute; left: 50%; top: 8px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(244, 233, 220, 0.28); }
  .sheet-close {
    width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
    display: inline-grid; place-items: center; background: rgba(244, 233, 220, 0.12); color: var(--ink);
  }
  .sheet-close:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
  .js .place { gap: 18px; }
  .js .place-shot { max-width: 200px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .js .places, .js .village-body.sheet-open .places { transition: none; }
}
@media (max-width: 760px) {
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .js .places { background: var(--surface); }
  }
}
@media (max-width: 760px) and (prefers-reduced-transparency: reduce) {
  .js .places { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .js .sheet-bar { background: var(--surface); }
}

/* ---------- a sentence, read as you scroll ---------- */

.statement { max-width: 1000px; margin: 0 auto; padding: var(--section) var(--gutter) 0; text-align: center; }
.statement p { font-size: clamp(30px, 4vw, 54px); line-height: 1.2; font-weight: 700; text-wrap: balance; }
.statement .word { opacity: var(--o, 1); transition: opacity 0.25s linear; }
.js .statement .word { --o: 0.14; }
.statement em { font-style: normal; color: var(--amber); }

/* ---------- the stack: one card over the next ---------- */

.stack-cards { margin-top: 48px; display: grid; gap: 28px; }
.stack-card {
  position: sticky; top: calc(104px + var(--i) * 16px);
  display: grid; grid-template-columns: 1fr minmax(220px, 320px); gap: clamp(24px, 5vw, 72px); align-items: center;
  min-height: min(540px, 72vh); padding: clamp(28px, 4vw, 52px);
  border-radius: 28px; background: linear-gradient(160deg, #2a1d15, #1d140f);
  box-shadow: inset 0 0 0 1px var(--line), 0 -24px 60px -30px rgba(0, 0, 0, 0.9);
  transform-origin: 50% 0; transform: scale(var(--s, 1)); filter: brightness(var(--b, 1));
}
.stack-card > div > p { margin-top: 16px; color: var(--muted); max-width: 42ch; }
.stack-art { position: relative; }
.stack-card > div > p + p { margin-top: 12px; }
/* The whole phone screen, never cropped, and short enough to fit the
   window with the card stuck under the bar. */
.stack-art .phone {
  width: min(100%, 270px, calc((100svh - 230px) * 660 / 1435)); margin-left: auto;
  aspect-ratio: 660 / 1435; transition: transform 0.9s var(--ease);
}
.stack-art .phone img { width: 100%; height: 100%; object-fit: contain; }
.stack-card:hover .stack-art .phone { transform: translateY(-6px) rotate(-1deg); }
.stack-art .float {
  position: absolute; z-index: 2; left: -26%; bottom: 8%; width: 100%; border-radius: 22px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85);
}
@media (max-width: 760px) {
  .stack-card { position: relative; top: auto; grid-template-columns: 1fr; transform: none; filter: none; min-height: 0; }
  .stack-art .phone { margin: 0 auto; width: min(100%, 250px); }
  .stack-art .float { left: 0; width: 100%; bottom: -6%; }
}

/* ---------- recording, to try ---------- */

.duo { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.duo-copy > p { margin-top: 18px; color: var(--muted); max-width: 44ch; }
.duo-copy > .duo-note { margin-top: 22px; color: var(--ink); }
.deck-demo { display: grid; gap: 18px; }
.deck {
  background: linear-gradient(#3a2a1e, #2a1e16); border-radius: 26px; padding: 22px;
  box-shadow: inset 0 0 0 2px #4a3626, 0 5px 0 #120c08, 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}
.deck-head { display: flex; align-items: baseline; justify-content: space-between; }
.deck-title { color: var(--amber); font-weight: 800; letter-spacing: 0.12em; font-size: 14px; }
.deck-time { font: 700 40px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--ink); }
.deck[data-state="recording"] .deck-time { color: #ff9a85; }
.cassette { margin-top: 16px; border-radius: 12px; padding: 12px 16px 16px; background: #e9d7b4; box-shadow: inset 0 0 0 3px var(--wood), 0 4px 0 #120c08; }
.cassette-label { font: 700 17px/1 var(--font); color: var(--wood); text-align: center; padding: 7px; border-radius: 4px; background: #f7ecd6; box-shadow: inset 0 0 0 2px #c9a878; }
.cassette-window { margin: 14px auto 0; max-width: 320px; height: 70px; border-radius: 35px; background: #241a12; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; position: relative; }
.reel { width: 50px; height: 50px; border-radius: 50%; background: repeating-conic-gradient(#d9c39b 0 30deg, #8a6a46 30deg 60deg); box-shadow: inset 0 0 0 10px #241a12, inset 0 0 0 13px #d9c39b; }
.tape { position: absolute; left: 62px; right: 62px; top: 50%; height: 10px; margin-top: -5px; background: #5a3a24; border-radius: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .deck[data-state="recording"] .reel { animation: spin 1.6s linear infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }
.meter { margin-top: 18px; height: 40px; display: flex; align-items: flex-end; gap: 3px; }
.meter i { flex: 1; height: 8%; background: #6b8e4e; border-radius: 2px; transition: height 0.12s ease; }
.meter i.hot { background: var(--amber); }
.meter i.peak { background: #ff8f7a; }
.marks { position: relative; height: 18px; margin-top: 10px; border-bottom: 2px solid #4a3626; }
.marks b { position: absolute; bottom: -2px; width: 4px; height: 16px; margin-left: -2px; background: var(--amber); box-shadow: 1px 1px 0 #7a4a1c; }
.deck-buttons { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.deck-button {
  min-height: 50px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line);
  font: 800 16px/1 var(--font); display: inline-flex; align-items: center; gap: 10px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.deck-button:hover:not([disabled]) { box-shadow: inset 0 0 0 2px var(--muted); transform: translateY(-1px); }
.deck-button:active:not([disabled]) { transform: scale(0.97); }
.deck-button[disabled] { opacity: 0.45; cursor: default; }
.deck-button.rec { background: var(--orange); color: var(--on-orange); box-shadow: 0 10px 30px -10px rgba(232, 117, 74, 0.6); }
.deck-button.rec:hover { background: var(--orange-hover); }
.dot { width: 14px; height: 14px; border-radius: 50%; background: #b3261e; box-shadow: 0 0 0 2px var(--on-orange); }
.deck[data-state="recording"] .rec .dot { border-radius: 1px; width: 4px; height: 14px; background: var(--on-orange); box-shadow: 7px 0 0 var(--on-orange); margin-right: 7px; }
.deck-status { margin-top: 14px; color: var(--muted); font-size: 15px; min-height: 1.5em; }
.shelf { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; box-shadow: inset 0 0 0 1px var(--line); }
.shelf h3 { font-size: 19px; }
.tapes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.tape-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.tape-card .mini { width: 56px; height: 38px; border-radius: 6px; background: #e9d7b4; box-shadow: inset 0 0 0 2px var(--wood); position: relative; }
.tape-card .mini::before, .tape-card .mini::after { content: ""; position: absolute; top: 13px; width: 13px; height: 13px; border-radius: 50%; background: #241a12; box-shadow: inset 0 0 0 3px #d9c39b; }
.tape-card .mini::before { left: 9px; }
.tape-card .mini::after { right: 9px; }
.tape-card strong { display: block; font-size: 17px; }
.tape-card span { color: var(--muted); font-size: 15px; }
.tape-card .counted { color: var(--amber); }
.shelf-empty { margin-top: 10px; color: var(--muted); font-size: 15px; }
@media (prefers-reduced-motion: no-preference) {
  .tape-card.new, .bubble.new, .friend-card { animation: rise 0.55s var(--ease); }
}
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } }

/* ---------- friends, to try ---------- */

.friend-demo { background: var(--surface); border-radius: 26px; padding: clamp(22px, 3vw, 34px); box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0, 0, 0, 0.8); }
.demo-title { margin-bottom: 18px; }
.at-field { position: relative; flex: 1; display: flex; min-width: 0; }
.at-field .at { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; pointer-events: none; }
.at-field .field { padding-left: 38px; }
.inline-link { border: 0; background: none; padding: 6px 2px; color: var(--amber); font: 700 15px var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.friend-result { margin-top: 18px; }
.friend-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.friend-card .face { width: 54px; height: 54px; border-radius: 50%; background: #6fa8d8; box-shadow: inset 0 0 0 3px #f2ddb4; image-rendering: pixelated; padding: 4px; }
.friend-card strong { display: block; font-size: 18px; }
.friend-card span { color: var(--muted); font-size: 15px; }
.friend-card .button { min-height: 44px; padding: 0 18px; font-size: 15px; box-shadow: none; }
.friend-card .button[disabled] { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); opacity: 1; cursor: default; transform: none; }
.friend-note { margin-top: 12px; color: var(--muted); font-size: 15px; }
.friend-note.yes { color: var(--amber); font-weight: 700; }
.friend-actions { margin-top: 14px; }
.together { margin: 22px 0 0; }
.together img { max-width: 280px; border-radius: 30px; border: 6px solid #0b0806; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -20px rgba(8, 5, 3, 0.8); }
.together figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }
@media (max-width: 480px) {
  .friend-card { grid-template-columns: auto 1fr; }
  .friend-card .button { grid-column: 1 / -1; width: 100%; }
}

/* ---------- the little things: a gapless grid ---------- */

/* Four columns: a wide and a narrow tile on top of a wide and a narrow
   one, beside a tall one. 2 + 1 + 1 over 2 + 1 + (the tall one) fills all
   eight cells; at two columns and at one, every tile spans the row. */
.bento {
  margin-top: 48px; display: grid; gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense;
}
.tile {
  position: relative; overflow: hidden; border-radius: 24px; padding: 24px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px #57402f, 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.tile h3 { font-size: 22px; }
.tile p { color: var(--muted); font-size: 16px; }
.tile .art { margin-top: auto; border-radius: 18px; overflow: hidden; }
.tile .art img { transition: transform 0.9s var(--ease); }
.tile:hover .art img { transform: scale(1.04); }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
.instrument-list { list-style: none; margin: 4px 0 0; padding: 0; columns: 2; column-gap: 14px; font-size: 16px; color: var(--ink); }
.instrument-list li { break-inside: avoid; padding: 3px 0; }
.instrument-list li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; vertical-align: 0.15em; background: var(--orange); }
.monk-talk { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: end; }
.monk-button {
  width: 112px; height: 112px; border: 0; padding: 0; border-radius: 20px; cursor: pointer;
  background: radial-gradient(circle at 50% 75%, #3a5a2a, #1f3016); box-shadow: inset 0 0 0 2px var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.monk-button img { width: 100%; height: 100%; image-rendering: pixelated; }
.monk-button:hover { transform: translateY(-3px) rotate(-2deg); box-shadow: inset 0 0 0 2px var(--amber); }
.monk-button:active { transform: scale(0.96); }
.bubble { margin: 0 0 18px; position: relative; }
.bubble::before { content: ""; position: absolute; left: -12px; bottom: 18px; border: 8px solid transparent; border-right: 12px solid var(--wood); border-left: 0; }
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.tall { grid-row: auto; grid-column: span 2; }
  .instrument-list { columns: 3; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .tile.wide, .tile.tall { grid-column: auto; }
  .instrument-list { columns: 2; }
  .monk-talk { grid-template-columns: 1fr; }
  .bubble::before { display: none; }
}

/* ---------- your musician ---------- */

.maker-card {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 64px); align-items: center;
  margin-top: 48px; padding: clamp(24px, 4vw, 48px); border-radius: 28px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.stage {
  width: 260px; height: 280px; border-radius: var(--radius); overflow: hidden; position: relative;
  background: url("../img/practice-room.png") 46% 74% / 820px auto no-repeat, #2a1c12;
  image-rendering: pixelated; box-shadow: inset 0 0 0 1px var(--line);
}
.sprite {
  position: absolute; left: 50%; bottom: 8px; width: 260px; height: 260px; margin-left: -130px;
  background-repeat: no-repeat; background-size: 2340px 260px; image-rendering: pixelated;
  animation: strip 1.8s steps(9) infinite;
}
@keyframes strip { to { background-position: -2340px 0; } }
fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
fieldset:last-child { margin-bottom: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 800; font-size: 15px; }
.styles { display: flex; gap: 8px; flex-wrap: wrap; }
.style-choice {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  padding: 0 18px 0 8px; border-radius: 999px; background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; font-weight: 700; font-size: 16px;
  transition: box-shadow 0.3s var(--ease);
}
.style-choice img { width: 32px; height: 32px; image-rendering: pixelated; border-radius: 999px; background: #3a2a1e; }
.style-choice input, .swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.style-choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--amber); }
.style-choice:has(input:focus-visible), .swatch:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 2px; }
.swatch { position: relative; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 999px; }
.swatch span { width: 32px; height: 32px; border-radius: 999px; box-shadow: inset 0 0 0 2px rgba(23, 16, 12, 0.45); transition: transform 0.3s var(--ease); }
.swatch:hover span { transform: scale(1.08); }
.swatch:has(input:checked) span { transform: scale(1.12); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
@media (max-width: 640px) {
  .maker-card { grid-template-columns: 1fr; }
  .stage { width: 100%; max-width: 340px; }
}

/* ---------- teachers ---------- */

.teachers { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.teachers-copy > p { margin-top: 16px; color: var(--muted); max-width: 42ch; }
.teachers-copy .button { margin-top: 28px; }
.teachers-visual { position: relative; padding-bottom: 72px; }
.teachers-visual .dashboard { border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0, 0, 0, 0.8); }
.teachers-visual .plan { position: absolute; left: -24px; bottom: 0; width: 52%; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -20px rgba(8, 5, 3, 0.8); }
@media (max-width: 860px) {
  .teachers { grid-template-columns: 1fr; }
  .teachers-visual .plan { left: 8px; width: 62%; }
}

/* ---------- questions ---------- */

.faq { max-width: 860px; margin: 0 auto; padding: var(--section) var(--gutter) 0; }
.faq-list { margin-top: 32px; }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-weight: 800; font-size: 20px; transition: color 0.3s var(--ease);
}
summary:hover { color: var(--amber); }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  color: var(--amber); font-size: 28px; font-weight: 700; line-height: 1; transition: transform 0.4s var(--ease);
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--muted); padding: 0 0 20px; max-width: 64ch; }
details p a { color: var(--amber); font-weight: 700; text-underline-offset: 4px; }

/* ---------- closing ---------- */

.closing {
  position: relative; overflow: hidden; margin: var(--section) auto clamp(48px, 8vw, 96px);
  max-width: calc(var(--content) - 2 * var(--gutter)); width: calc(100% - 2 * var(--gutter));
  border-radius: 32px; box-shadow: inset 0 0 0 1px var(--line);
}
.closing-art { position: absolute; inset: 0; background: url("../img/village_night.png") 50% 35% / max(100%, 900px) auto no-repeat, #141b44; image-rendering: pixelated; }
.closing-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(23, 16, 12, 0.55), rgba(23, 16, 12, 0.92) 70%); }
.closing-inner { position: relative; text-align: center; padding: clamp(80px, 12vw, 150px) var(--gutter); }
.closing-inner h2 { font-size: clamp(44px, 7vw, 96px); max-width: 14ch; margin: 0 auto; }
.closing-inner > p { margin: 18px auto 0; color: var(--ink); max-width: 40ch; font-size: 20px; }
.waitlist.centered { margin: 32px auto 0; text-align: left; }

/* ---------- footer ---------- */

.foot { max-width: var(--content); margin: 0 auto; padding: 28px var(--gutter) 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; border-top: 1px solid var(--line); }
.foot .brand .wordmark { height: 56px; }
.foot-nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.foot-nav a { color: var(--muted); font-weight: 700; padding: 10px 12px; border-radius: 999px; }
.foot-nav a:hover { color: var(--ink); }
.fine { color: var(--muted); font-size: 15px; width: 100%; }

/* ---------- arriving ---------- */

/* Things settle in as they arrive: lift, and pictures grow from a little
   smaller. Only with scripting on, and never with Reduce Motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .grow { transform: scale(0.9); opacity: 0.4; transition: transform 1.1s var(--ease), opacity 1.1s var(--ease); }
  .js .grow.in { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sprite, .hero-player { animation: none; }
}
