/* kreaudio.com
 *
 * One dark theme, on purpose: the brand is aurora light on near-black, and
 * so is the app. One accent, Aurora Cyan, taken from the brand image. The
 * type is the system's own (San Francisco on a Mac, Segoe UI on Windows),
 * the same faces the app uses, so nothing is downloaded.
 *
 * Shapes: containers 24px, pictures inside them 14px, controls fully round.
 * Layers: the aurora canvas is -1 (fixed, behind everything), the nav 20,
 * the skip link 30. Sections that should hide the aurora carry their own
 * background; the hero, the stage and the closing call stay clear.
 */

:root {
  color-scheme: dark;

  --bg: #08060c;
  --surface: #110e17;
  --surface-2: #17131f;
  --field: #0d0b12;
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.14);
  --field-line: #6b6579;

  --ink: #f4f2f7;
  --ink-2: #b9b5c4;
  --ink-3: #8f8a9c;

  --accent: #55bfea;
  --accent-hi: #90daf8;
  --on-accent: #07020a;
  --danger: #ff7a6b;

  /* The aurora, sampled from the brand image. Violet only ever appears
     dark; the light comes from cyan and periwinkle. */
  --violet: 45 31 88;
  --indigo: 48 63 142;
  --periwinkle: 110 136 207;
  --cyan: 49 162 209;
  --teal: 24 85 73;

  /* Inside the app's own screens, its teal, not the site's accent. */
  --app-teal: #34cfc0;

  --r-box: 24px;
  --r-media: 14px;
  --gutter: 20px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; }

img, picture { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
}

::selection { background: rgb(var(--cyan) / 0.4); color: var(--ink); }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* Type */

h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
}

h3 {
  font-size: 1.3125rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.016em;
}

.eyebrow {
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.section-lede {
  margin-top: 20px;
  max-width: 36em;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 1rem/1 var(--font);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: var(--accent-hi); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-small { height: 44px; padding: 0 20px; font-size: 0.9375rem; }

/* The aurora canvas (aurora.js). Until it is ready, and wherever WebGL is
   missing, the CSS gradients in .aurora stand in for it. */

.aurora-gl {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.aurora-gl.is-ready { opacity: 1; }
.has-gl .aurora { display: none; }

/* Sections that hide the aurora. */
.statement,
.demo,
.features,
.teams,
.footer { background: var(--bg); }

/* Nav: transparent over the aurora, a glass bar once the page moves. */

.nav-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 8px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.is-stuck {
  background: rgb(8 6 12 / 0.72);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-bottom-color: var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .nav.is-stuck {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
}

.nav-brand {
  display: block;
  padding: 10px 0;
  border-radius: 4px;
}
.nav-brand img { width: 132px; }

@media (max-width: 380px) {
  .nav-brand img { width: 112px; }
  .nav .btn-small { padding: 0 16px; }
}

/* The CSS aurora: the stand-in when there is no WebGL. */

.aurora {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto 0;
  height: min(1000px, 130vw);
  pointer-events: none;
  background:
    radial-gradient(72% 58% at 50% 0%, rgb(var(--violet) / 0.95), transparent 72%),
    radial-gradient(42% 34% at 8% 58%, rgb(var(--teal) / 0.5), transparent 70%),
    radial-gradient(38% 40% at 96% 70%, rgb(var(--indigo) / 0.45), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 52%, transparent);
  mask-image: linear-gradient(#000 52%, transparent);
}
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
}
.aurora::before {
  background: radial-gradient(34% 40% at 80% 24%, rgb(var(--cyan) / 0.4), transparent 70%);
}
.aurora::after {
  background: radial-gradient(28% 30% at 54% 8%, rgb(var(--periwinkle) / 0.32), transparent 72%);
}

.aurora-rise {
  inset: auto 0 0 0;
  height: 100%;
  background:
    radial-gradient(80% 70% at 50% 100%, rgb(var(--violet) / 0.95), transparent 72%),
    radial-gradient(40% 40% at 12% 100%, rgb(var(--teal) / 0.55), transparent 70%);
  -webkit-mask-image: linear-gradient(transparent, #000 45%);
  mask-image: linear-gradient(transparent, #000 45%);
}
.aurora-rise::before {
  background: radial-gradient(36% 46% at 70% 96%, rgb(var(--cyan) / 0.4), transparent 70%);
}
.aurora-rise::after {
  background: radial-gradient(30% 36% at 34% 100%, rgb(var(--periwinkle) / 0.3), transparent 72%);
}

@media (prefers-reduced-motion: no-preference) {
  .aurora::before { animation: drift-a 26s ease-in-out infinite alternate; }
  .aurora::after { animation: drift-b 34s ease-in-out infinite alternate; }
  .aurora.is-paused::before,
  .aurora.is-paused::after { animation-play-state: paused; }
}
@keyframes drift-a { to { transform: translate3d(-7%, 5%, 0) scale(1.1); } }
@keyframes drift-b { to { transform: translate3d(6%, 4%, 0) scale(1.12); } }

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 96px));
  padding-bottom: clamp(72px, 9vw, 120px);
}

/* Over the live aurora the copy keeps a quiet patch of night behind it:
   on a wide screen the left of the hero, on a narrow one a soft band
   behind the words themselves (see "Text over the light" below). */
@media (min-width: 900px) {
  .has-gl .hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgb(8 6 12 / 0.7), rgb(8 6 12 / 0.5) 38%, rgb(8 6 12 / 0) 64%);
    -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
    mask-image: linear-gradient(180deg, #000 70%, transparent);
  }
}

.hero h1 {
  max-width: 13em;
  font-size: clamp(2.625rem, 1.2rem + 4.6vw, 4.75rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.lede {
  margin-top: 24px;
  max-width: 33em;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.3125rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero .waitlist { margin-top: 36px; }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* The waitlist form */

.waitlist {
  position: relative;
  max-width: 560px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.field-row {
  display: flex;
  gap: 10px;
}

.field-input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 22px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font: 400 1.0625rem/1 var(--font);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field-input:hover { border-color: var(--ink-3); }
.field-input:focus,
.field-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--cyan) / 0.35);
}
.field-input[aria-invalid="true"] { border-color: var(--danger); }
.field-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(255 122 107 / 0.3); }

.field-help {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 0.875rem;
}
.field-help a {
  color: var(--ink);
  text-underline-offset: 3px;
}
.field-help a:hover { color: var(--accent-hi); }

.field-error {
  margin-top: 10px;
  color: var(--danger);
  font-size: 0.9375rem;
}

.form-status:empty { display: none; }
.form-status {
  padding: 16px 22px;
  border: 1px solid rgb(var(--cyan) / 0.45);
  border-radius: var(--r-box);
  background: rgb(var(--cyan) / 0.1);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.45;
}
.form-status strong { font-weight: 600; }

.waitlist.is-busy .btn { cursor: progress; opacity: 0.7; }
.waitlist.is-done .field-label,
.waitlist.is-done .field-row,
.waitlist.is-done .field-help,
.waitlist.is-done .field-error { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .waitlist.is-done .form-status { animation: rise 0.6s var(--ease) both; }
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-slot:empty { display: none; }
.turnstile-slot { margin-top: 14px; }

@media (max-width: 479px) {
  .field-row { flex-direction: column; }
  .field-input { flex: none; }
  .field-row .btn { width: 100%; }
}

/* The stage: the app, played by the scroll (motion.js). Without script or
   with reduced motion it is a plain picture with the notes beneath it. */

.stage {
  position: relative;
  padding-block: clamp(24px, 4vw, 48px) clamp(72px, 9vw, 112px);
}

.stage-sticky {
  display: grid;
  justify-items: center;
  gap: clamp(20px, 3vw, 32px);
  width: min(100% - 2 * var(--gutter), 1200px);
  margin-inline: auto;
}

.stage-title { margin: 0; }
.stage-title-top img { width: min(84vw, 900px); }
.stage-title-bottom {
  margin-right: -0.62em;
  color: var(--accent);
  font: 500 clamp(1.125rem, 0.7rem + 1.9vw, 2.25rem)/1 var(--font-display);
  letter-spacing: 0.62em;
  text-transform: uppercase;
}

.stage-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3200 / 1940;
  overflow: hidden;
  border-radius: 1.6% / 2.64%;
  background: #101316;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.12),
    0 24px 60px -12px rgb(0 0 0 / 0.7),
    0 60px 140px -40px rgb(var(--violet) / 0.9);
}

.stage-zoom,
.screen,
.screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.stage-zoom { transform-origin: 0 0; }
.screen { opacity: 0; }
.screen-loaded { opacity: 1; }
.stage:not(.is-live) .screen-next { opacity: 1; }

/* "Play" pressed: everything of the playing screen except the section rail
   and the waveform, which the sweep reveals bar by bar. */
.screen-pressed {
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0,
    16.56% 19.07%, 100% 19.07%, 100% 37.73%, 16.56% 37.73%, 16.56% 19.07%);
}
.screen-sweep { clip-path: inset(21.24% 83.44% 62.27% 16.56%); }

.stage-playhead,
.stage-dim,
.stage-ring { display: none; }

.stage-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px 32px;
  width: 100%;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.stage-note h3 { font-size: 1.125rem; }
.stage-note p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* Live: a tall section with a sticky screen; motion.js sets the numbers. */

.stage.is-live {
  height: 480vh;
  padding: 0;
}
.stage.is-live .stage-sticky {
  position: sticky;
  top: 0;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.stage.is-live .stage-sticky { --mid: calc(50% + var(--nav-h) / 2); }

.stage.is-live .stage-card {
  position: absolute;
  left: 50%;
  top: var(--mid);
  width: var(--card-w, 100vw);
  height: var(--card-h, 60vw);
  margin: calc(var(--card-h, 60vw) / -2) 0 0 calc(var(--card-w, 100vw) / -2);
  aspect-ratio: auto;
  transform-origin: 50% 50%;
  will-change: transform;
}

.stage.is-live .stage-title {
  position: absolute;
  left: 50%;
  will-change: transform, opacity;
}
.stage.is-live .stage-title-top {
  bottom: calc(100% - var(--mid) + var(--start-h, 30vw) / 2 + var(--title-gap, 28px));
  transform: translateX(-50%);
}
.stage.is-live .stage-title-bottom {
  top: calc(var(--mid) + var(--start-h, 30vw) / 2 + var(--title-gap, 28px));
  transform: translateX(-50%);
}

.stage.is-live .stage-playhead {
  display: block;
  position: absolute;
  top: 21.24%;
  height: 16.5%;
  left: 16.56%;
  width: 0.07%;
  min-width: 1px;
  background: var(--app-teal);
  box-shadow: 0 0 10px 1px rgb(52 207 192 / 0.8);
  opacity: 0;
}

.stage.is-live .stage-dim {
  display: block;
  position: absolute;
  inset: 0;
  background: rgb(4 3 8 / 0.62);
  opacity: 0;
}

.stage.is-live .stage-ring {
  display: block;
  position: absolute;
  border: 2px solid rgb(144 218 248 / 0.9);
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgb(var(--cyan) / 0.18);
  opacity: 0;
}

.stage.is-live .stage-notes {
  position: absolute;
  inset: 0;
  display: block;
  margin: 0;
  pointer-events: none;
}
.stage.is-live .stage-note {
  position: absolute;
  bottom: max(28px, 5vh);
  width: min(360px, 100% - 2 * var(--gutter));
  padding: 20px 22px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: var(--r-box);
  background: rgb(14 11 20 / 0.72);
  -webkit-backdrop-filter: saturate(1.3) blur(20px);
  backdrop-filter: saturate(1.3) blur(20px);
  box-shadow: 0 20px 50px -20px rgb(0 0 0 / 0.8);
  opacity: 0;
  will-change: transform, opacity;
}
.stage.is-live .stage-note[data-place="left"] { left: max(var(--gutter), 3vw); }
.stage.is-live .stage-note[data-place="right"] { right: max(var(--gutter), 3vw); }
.stage.is-live .stage-note h3 { font-size: 1.25rem; }
.stage.is-live .stage-note p { font-size: 1rem; }

@media (prefers-reduced-transparency: reduce) {
  .stage.is-live .stage-note {
    background: var(--surface-2);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* On a phone the screen stays whole and the notes sit under it. */
@media (max-width: 767px) {
  .stage.is-live { height: 420vh; }
  .stage.is-live .stage-note,
  .stage.is-live .stage-note[data-place="left"],
  .stage.is-live .stage-note[data-place="right"] {
    left: var(--gutter);
    right: var(--gutter);
    bottom: auto;
    top: calc(var(--mid) + var(--normal-h, 56vw) / 2 + 20px);
    width: auto;
    padding: 16px 18px;
  }
  .stage.is-live .stage-note h3 { font-size: 1.125rem; }
  .stage.is-live .stage-note p { font-size: 0.9375rem; }
}

/* What Kreaudio is */

.statement {
  padding-block: clamp(112px, 16vw, 200px) clamp(72px, 10vw, 128px);
  background: linear-gradient(180deg, rgb(8 6 12 / 0), var(--bg) clamp(96px, 14vw, 180px));
}

.statement-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 28px;
}

.statement h2 {
  max-width: 12em;
  font-size: clamp(2.25rem, 1.1rem + 3.8vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.038em;
}

.statement p {
  max-width: 30em;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.5;
  text-wrap: pretty;
}

@media (min-width: 900px) {
  .statement-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px; }
  .statement h2 { grid-column: 1 / span 10; }
  .statement p { grid-column: 6 / span 7; }
}

/* Try it: a small working model of section jumps (demo.js). */

.demo {
  padding-block: clamp(48px, 7vw, 96px) clamp(96px, 12vw, 160px);
}

.player {
  margin-top: clamp(32px, 4vw, 48px);
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background:
    radial-gradient(120% 140% at 100% 0%, rgb(var(--violet) / 0.35), transparent 55%),
    var(--surface);
}

.player-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.player-song {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.player-now {
  margin-top: 4px;
  color: var(--accent);
  font-size: 1.0625rem;
  font-weight: 600;
}
.player-next {
  margin-left: 10px;
  color: var(--ink-2);
  font-weight: 500;
}

.player-lcd {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--r-media);
  background: rgb(0 0 0 / 0.35);
}
.lcd-cell {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-width: 64px;
  padding: 10px 14px;
}
.lcd-cell + .lcd-cell { border-left: 1px solid var(--line); }
.lcd-cell b {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.lcd-wide { min-width: 84px; }
.lcd-cell small {
  color: var(--ink-3);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* The beat lamps: real state, one per beat of the bar. */
.lamps {
  display: flex;
  gap: 4px;
  height: 24px;
  align-items: stretch;
}
.lamps i {
  width: 10px;
  border-radius: 3px;
  background: rgb(255 255 255 / 0.1);
  transition: background-color 0.18s ease-out, box-shadow 0.18s ease-out;
}
.lamps i.is-on {
  background: var(--accent);
  box-shadow: 0 0 12px rgb(var(--cyan) / 0.7);
  transition: none;
}
.lamps i.is-on.is-one { background: var(--accent-hi); }

.player-wave {
  display: block;
  width: 100%;
  height: clamp(104px, 12vw, 148px);
  margin-top: 20px;
  border-radius: var(--r-media);
  background: rgb(0 0 0 / 0.3);
  touch-action: manipulation;
}

.player-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  position: relative;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.04);
  color: var(--ink);
  font: 600 0.9375rem/1 var(--font);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.chip:hover { background: rgb(255 255 255 / 0.09); }
.chip:active { transform: scale(0.97); }
.chip.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.chip.is-queued {
  border-color: var(--accent);
  background: rgb(var(--cyan) / 0.14);
}
@media (prefers-reduced-motion: no-preference) {
  .chip.is-queued { animation: queued 1s ease-in-out infinite; }
}
@keyframes queued {
  50% { box-shadow: 0 0 0 4px rgb(var(--cyan) / 0.25); }
}

.player-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.player-btn {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 0.9375rem/1 var(--font);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.player-btn:hover { background: var(--accent-hi); }
.player-btn:active { transform: scale(0.97); }
.player-btn-quiet {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
}
.player-btn-quiet:hover { background: rgb(255 255 255 / 0.08); }
.player-btn-quiet[aria-pressed="true"] { border-color: var(--accent); }

.player-status {
  flex: 1 1 220px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-align: right;
}

@media (max-width: 640px) {
  .player-lcd { width: 100%; }
  .lcd-cell { flex: 1; min-width: 0; padding: 10px 6px; }
  .player-status { text-align: left; }
}

/* Features: a bento of four real screens and one promise. */

.features {
  padding-bottom: clamp(80px, 10vw, 128px);
}

.section-title {
  max-width: 16em;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.cell {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
}

/* A soft light that follows the pointer across a card (motion.js). */
.cell[data-spotlight]::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgb(var(--cyan) / 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.cell[data-spotlight].is-lit::after { opacity: 1; }

.cell-copy { padding: 28px 28px 0; }
.cell-copy p {
  margin-top: 10px;
  max-width: 34em;
  color: var(--ink-2);
  font-size: 1rem;
}

.cell-media {
  margin-top: auto;
  padding-top: 28px;
  will-change: transform;
}
.cell-media img { width: 100%; }

.cell-keys .cell-media img { border-top: 1px solid var(--line); }

.cell-click .cell-media { padding-left: 28px; }
.cell-click .cell-media img {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: var(--r-media);
}

.cell-remote .cell-media {
  display: flex;
  justify-content: center;
  max-height: 460px;
  overflow: hidden;
  padding-inline: 28px;
}
.cell-remote .cell-media img {
  width: min(300px, 86%);
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
}

.cell-backup {
  background:
    radial-gradient(110% 80% at 100% 0%, rgb(var(--cyan) / 0.3), transparent 62%),
    radial-gradient(90% 90% at 0% 100%, rgb(var(--violet) / 0.95), transparent 72%),
    var(--surface);
}
.cell-figure {
  padding: 24px 28px 0;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 3.2rem + 4vw, 7rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}
.cell-figure span {
  margin-left: 0.14em;
  color: var(--ink-2);
  font-size: 0.42em;
  letter-spacing: -0.02em;
}
.cell-backup .cell-copy {
  margin-top: auto;
  padding-top: 40px;
  padding-bottom: 28px;
}

@media (min-width: 768px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "keys keys"
      "remote click"
      "remote backup";
  }
  .cell-keys { grid-area: keys; }
  .cell-remote { grid-area: remote; }
  .cell-click { grid-area: click; }
  .cell-backup { grid-area: backup; }
  .cell-remote .cell-media { max-height: none; }
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "keys keys remote"
      "click backup remote";
  }
}

/* One song library: three steps that walk down the page. */

.teams {
  padding-block: clamp(80px, 10vw, 136px) clamp(96px, 12vw, 160px);
  border-top: 1px solid var(--line);
}

.flow {
  display: grid;
  gap: 40px;
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  list-style: none;
}

.flow li {
  padding-left: 24px;
  border-left: 1px solid var(--line-2);
}

.flow h3 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.flow p {
  margin-top: 14px;
  max-width: 21em;
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    align-items: start;
  }
  .flow li:nth-child(2) { margin-top: 64px; }
  .flow li:nth-child(3) { margin-top: 128px; }
}

/* The closing call */

.join {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(112px, 14vw, 184px);
}

.has-gl .join::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg), rgb(8 6 12 / 0) clamp(120px, 18vw, 220px), rgb(8 6 12 / 0) calc(100% - 96px), var(--bg));
}

/* The words keep a soft patch of night behind them wherever they fall. */
.has-gl .join-inner::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -14% -18%;
  pointer-events: none;
  background: radial-gradient(closest-side, rgb(8 6 12 / 0.82), rgb(8 6 12 / 0.62) 55%, rgb(8 6 12 / 0));
}

/* Text over the light, on a narrow screen: the copy spans the width, so a
   band of night runs behind it, feathered at every edge. */
@media (max-width: 899px) {
  .has-gl .hero-copy { position: relative; }
  .has-gl .hero-copy::before,
  .has-gl .join-inner::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -40px calc(-1 * var(--gutter)) -48px;
    pointer-events: none;
    background: rgb(8 6 12 / 0.66);
    -webkit-mask-image:
      linear-gradient(180deg, transparent, #000 40px, #000 calc(100% - 48px), transparent),
      linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(180deg, transparent, #000 40px, #000 calc(100% - 48px), transparent),
      linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
    mask-composite: intersect;
  }
}

.join-inner {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
}

.join h2 {
  font-size: clamp(2.5rem, 1.3rem + 4vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.join-inner > p {
  margin-top: 20px;
  max-width: 31em;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.join .waitlist {
  width: 100%;
  margin-top: 40px;
  text-align: left;
}

/* Footer */

.footer {
  padding-block: 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  gap: 20px;
  align-items: center;
}

.footer-brand { width: 112px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
}
.footer-links a {
  padding-block: 10px;
  color: var(--ink-2);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal {
  max-width: 62em;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: auto 1fr; }
  .footer-links { justify-content: flex-end; }
  .legal { grid-column: 1 / -1; }
}

/* Reveal on arrival. site.js only marks what starts below the fold, so
   nothing visible on load ever blinks. */

@media (prefers-reduced-motion: no-preference) {
  .is-waiting {
    opacity: 0;
    translate: 0 28px;
  }
  .is-waiting.is-in {
    opacity: 1;
    translate: 0 0;
    transition: opacity 0.8s var(--ease), translate 0.8s var(--ease);
  }
  .bento > :nth-child(2).is-in,
  .flow > :nth-child(2).is-in { transition-delay: 0.08s; }
  .bento > :nth-child(3).is-in,
  .flow > :nth-child(3).is-in { transition-delay: 0.16s; }
  .bento > :nth-child(4).is-in { transition-delay: 0.08s; }
}

/* Plain pages: privacy, joined, not found */

.page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 96px));
  padding-bottom: clamp(80px, 10vw, 128px);
}
.page .aurora { height: min(720px, 110vw); }
.page-short { min-height: min(78dvh, 760px); }

.aurora-quiet { opacity: 0.6; }

.page h1 {
  max-width: 14em;
  font-size: clamp(2.25rem, 1.4rem + 2.8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.page .lede { max-width: 36em; }

.doc {
  max-width: 40em;
  margin-top: 48px;
}
.doc h2 {
  margin-top: 40px;
  font-size: 1.375rem;
  letter-spacing: -0.016em;
  line-height: 1.3;
}
.doc p,
.doc li {
  color: var(--ink-2);
}
.doc p { margin-top: 12px; }
.doc ul {
  margin: 12px 0 0;
  padding-left: 1.2em;
}
.doc li + li { margin-top: 6px; }
.doc a,
.page-actions a:not(.btn) {
  color: var(--accent);
  text-underline-offset: 3px;
}
.doc a:hover { color: var(--accent-hi); }

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 36px;
}

[hidden] { display: none !important; }
