/* Next Sound Lab - written by hand. The look of the Spectrum Sound Lab's page, in the demo's
   chrome and copper: chrome blue, copper gold, the logo's purple shadow, the copper bars. */
@font-face { font-family: Geist; src: url(fonts/geist-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url(fonts/geist-600.woff2) format("woff2"); font-weight: 600 900; font-display: swap; }

/* the demo: black, chrome blue (--cyan), copper (--yellow), the logo's purple shadow (--blue) */
:root {
  color-scheme: dark;
  --bg: #000;
  --card: #090914;
  --card-hi: #13132a;
  --border: #2b2b55;
  --fg: #f1f1f6;
  --muted: #b3b3cc;
  --heading: #fff;
  --cyan: #8fdcff;
  --yellow: #f0b450;
  --red: #ff2828;
  --blue: #4a1c8c;
  --radius: 4px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; color: var(--fg); background: var(--bg); font: 17px/1.6 Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); }
img, video { max-width: 100%; height: auto; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font: 900 clamp(1.4rem, 3vw, 2rem)/1.2 Geist, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.04em; color: var(--cyan); margin-bottom: 12px; text-shadow: 3px 3px 0 var(--blue); }
h3 { font: 700 1.05rem/1.3 Geist, system-ui, sans-serif; color: var(--heading); margin-bottom: 6px; }
p { margin: 0 0 12px; }
code { font: 0.86em ui-monospace, monospace; background: var(--card-hi); border: 1px solid var(--border); border-radius: 3px; padding: 1px 5px; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* the copper bars, sliding, along the very top */
.tape { position: fixed; inset: 0 0 auto; height: 6px; z-index: 20;
  background: linear-gradient(90deg, #ff2828, #ffc800, #28ff78, #00a0ff, #dc3cff, #ff2828) 0 0 / 50% 100%; animation: roll 6s linear infinite; }
@keyframes roll { to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .tape { animation: none; } html { scroll-behavior: auto; } }

/* the bar along the top */
.top { position: sticky; top: 6px; z-index: 10; background: rgb(0 0 0 / 0.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font: 900 1.05rem/1 Geist, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.05em; color: var(--heading); text-decoration: none; white-space: nowrap; }
.brand img { image-rendering: pixelated; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover { color: var(--fg); }

/* buttons and badges: flat colour, a hard shadow, like a Spectrum menu */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; line-height: 1.25; border-radius: var(--radius); background: var(--cyan); color: #000; font: 700 0.92rem/1 Geist, system-ui, sans-serif; text-decoration: none; border: 0; box-shadow: 4px 4px 0 var(--blue); transition: transform 0.1s, box-shadow 0.1s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--blue); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--blue); }
.btn small { font-weight: 400; opacity: 0.7; }
.btn-ghost { background: var(--card-hi); color: var(--fg); box-shadow: inset 0 0 0 1px var(--border), 4px 4px 0 #000; }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--muted), 5px 5px 0 #000; }
.btn-small { min-height: 34px; padding: 6px 12px; font-size: 0.82rem; box-shadow: 3px 3px 0 var(--blue); }
.btn-small.btn-ghost { box-shadow: inset 0 0 0 1px var(--border); text-transform: uppercase; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 2px; font: 800 0.78rem/1.5 Geist, system-ui, sans-serif; letter-spacing: 0.05em; }
.mnext { background: var(--yellow); color: #000; }
.m1mb { background: var(--blue); color: #fff; }
.date { color: var(--muted); font-size: 0.85rem; }

/* sections */
main { overflow-x: clip; }
main > section { padding: 76px 0 0; }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 800 0.75rem/1 Geist, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.2em; color: var(--yellow); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 9px; background: linear-gradient(#ff2828 0 33%, #ffc800 33% 67%, #00a0ff 67%); }
.sub, .meta { color: var(--muted); }
.sub { margin-bottom: 28px; }

/* grid items may shrink below their content (a long button, a wide picture) */
.hero > *, .demo > *, .tech > *, .download > * { min-width: 0; }

/* the top of a page */
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; padding-top: 52px; }
.hero h1 { margin: 6px 0 18px; }
.hero h1.title { font: 900 clamp(1.8rem, 4vw, 2.7rem)/1.15 Geist, system-ui, sans-serif; color: var(--heading); text-shadow: 3px 3px 0 var(--blue); }
.logo { display: block; width: min(560px, 100%); image-rendering: pixelated; }
.lead { font: 600 1.25rem/1.4 Geist, system-ui, sans-serif; color: var(--heading); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.hero-shot { margin: 0; }
.hero-shot img, .hero-shot video, .gallery img, .demo-media img, .demo-media video { display: block; width: 100%; image-rendering: pixelated; background: #000; border: 1px solid var(--border); border-radius: var(--radius); }
.hero-shot img, .hero-shot video { box-shadow: 8px 8px 0 var(--blue); }
.hero-shot figcaption { margin-top: 14px; font-size: 0.86rem; color: var(--muted); }

/* the demos on the front page */
.demos { display: grid; gap: 22px; }
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: center; padding: 20px; }
.demo h3 { font-size: 1.3rem; margin-bottom: 10px; }
.demo h3 a { color: var(--heading); text-decoration: none; }
.demo h3 a:hover { color: var(--cyan); }
.demo p { color: var(--muted); }
.demo .links { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }

/* the whole demo, with sound */
.watch { margin: 22px 0 0; padding: 20px; }
.watch video { display: block; width: 100%; max-width: 800px; margin-inline: auto; image-rendering: pixelated; background: #000; border: 1px solid var(--border); border-radius: var(--radius); }
.watch figcaption { max-width: 800px; margin: 12px auto 0; color: var(--muted); font-size: 0.9rem; }

/* the diagram on the how-it-works page */
.diagram { margin: 18px 0 22px; overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 620px; height: auto; }  /* a phone scrolls it sideways */
.diagram figcaption { color: var(--muted); font-size: 0.86rem; margin-top: 8px; }

/* cards */
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: linear-gradient(160deg, var(--card-hi), var(--card)); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.cards .card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* how it works */
.tech { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.tech-text h2 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); margin-top: 30px; }
.tech-text h2:first-child { margin-top: 0; }
.tech-text p, .tech-text li { color: #dcdcea; }
.tech-text ul { padding-left: 20px; }
.tech-text b { color: var(--heading); }
.numbers { position: sticky; top: 90px; }
.numbers h3 { color: var(--yellow); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; margin-bottom: 12px; }
.numbers dl { margin: 0; display: grid; gap: 10px; }
.numbers dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.numbers dd { margin: 0; font-weight: 600; }

/* screens */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr; } }
.gallery a { display: block; }
.gallery a.wide { grid-column: 1 / -1; }

/* loading and downloads */
.download { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; padding: 36px; }
.download p { margin: 0 0 10px; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 0.94rem; display: grid; gap: 14px; align-content: center; }
.steps b { color: var(--fg); }

/* the changelog */
.log ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); }
.log time { color: var(--yellow); font-weight: 700; margin-right: 8px; white-space: nowrap; }
.log b { color: var(--fg); }

/* other demos */
.pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; }
.pager a { color: var(--muted); text-decoration: none; }
.pager a:hover { color: var(--cyan); }

/* the bottom */
.foot { display: flex; gap: 14px; align-items: flex-start; margin-top: 80px; padding: 28px 0 48px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.foot img { image-rendering: pixelated; margin-top: 3px; }
.small { font-size: 0.8rem; }

/* the lightbox */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgb(0 0 0 / 0.92); }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; image-rendering: pixelated; }
.lightbox figcaption { color: var(--muted); margin-top: 8px; max-width: 80ch; margin-inline: auto; }
.lb-btn { position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--fg); font-size: 28px; cursor: pointer; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-close { top: 32px; right: 16px; transform: none; }

@media (max-width: 860px) {
  .hero, .demo, .tech, .download { grid-template-columns: 1fr; }
  .hero { gap: 28px; padding-top: 36px; }
  .top nav { display: none; }
  .numbers { position: static; }
  .download { padding: 24px; gap: 24px; }
}
