@font-face {
  font-family: "Hegarty";
  src: url("assets/BBHHegarty-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Plex Mono";
  src: url("assets/IBMPlexMono-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Plex Mono";
  src: url("assets/IBMPlexMono-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0d0f0f;
  --panel: #171a1a;
  --panel-soft: #202424;
  --line: #3e4343;
  --white: #f6f5f3;
  --muted: #a3a5a4;
  --pink: #f3a0bd;
  --pink-light: #ffd8e5;
  --max: 1480px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 12%, rgb(243 160 189 / 7%), transparent 25rem),
    var(--ink);
  font-family: "Plex Mono", monospace;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}

main {
  position: relative;
  z-index: 1;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.split {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(20rem, 0.84fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 8rem);
  min-height: 100svh;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.75rem, 6vw, 6rem) clamp(1.25rem, 4vw, 4rem);
}

.hero {
  grid-template-columns: minmax(0, 3fr) minmax(21rem, 2fr);
  gap: 0;
}

.hero > .copy {
  --mission-reach: clamp(4rem, 8vw, 8rem);
  width: calc(100% + var(--mission-reach));
  margin-left: calc(-1 * var(--mission-reach));
}

.hero::after,
.feature::after {
  position: absolute;
  right: clamp(1.25rem, 4vw, 4rem);
  bottom: 0;
  left: clamp(1.25rem, 4vw, 4rem);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}

.hero-art {
  position: relative;
  isolation: isolate;
  min-height: clamp(22rem, 45vw, 40rem);
  display: grid;
  align-items: center;
  justify-items: end;
  translate: clamp(1.5rem, 3vw, 3rem) 0;
}

.hero-art::before {
  position: absolute;
  z-index: -2;
  width: 80%;
  aspect-ratio: 1;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgb(243 160 189 / 18%), transparent 66%);
  filter: blur(18px);
}

.brand-lockup {
  width: min(112%, 58rem);
  max-width: none;
  aspect-ratio: 5 / 2;
  filter: drop-shadow(0 2rem 4rem rgb(0 0 0 / 60%));
  animation: logo-drift 7s ease-in-out infinite;
}

.step-stamp {
  position: absolute;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgb(13 15 15 / 72%);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 0.65rem 0.8rem;
}

.bubble-field {
  position: absolute;
  top: -8rem;
  left: 50%;
  width: calc(100vw + 16rem);
  height: calc(100% + 8rem);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-50%);
}

.bubble {
  position: absolute;
  left: var(--x);
  bottom: -15%;
  width: var(--size);
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 42%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 26%, rgb(255 255 255 / 82%) 0 3%, transparent 10%),
    radial-gradient(circle at 70% 78%, rgb(243 160 189 / 36%), transparent 48%),
    rgb(255 216 229 / 7%);
  box-shadow: inset -0.2rem -0.3rem 0.9rem rgb(243 160 189 / 16%);
  opacity: 0;
  animation: bubble-rise var(--duration) var(--delay) linear infinite;
}

.copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 1.35rem;
  color: var(--pink);
  font-size: clamp(0.7rem, 1vw, 0.84rem);
  font-weight: 600;
  letter-spacing: 0.13em;
}

h1,
h2 {
  margin: 0;
  font-family: "Hegarty", Impact, sans-serif;
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1,
h2 {
  max-width: 12ch;
  font-size: clamp(2.65rem, 3.15vw, 3.75rem);
}

.lede {
  max-width: 43rem;
  margin: clamp(1.35rem, 2.2vw, 2rem) 0 0;
  color: #c7c7c5;
  font-size: clamp(0.94rem, 1.05vw, 1.06rem);
  line-height: 1.65;
}

.download-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 31rem);
  margin-top: 1.6rem;
  padding: 0.7rem 0.72rem 0.7rem 1.3rem;
  border: 1px solid var(--pink-light);
  border-radius: 0.7rem;
  color: #160f12;
  background: var(--pink);
  box-shadow: 0 1rem 3.4rem rgb(243 160 189 / 18%);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.download-button:hover {
  transform: translateY(-3px);
  background: var(--pink-light);
  box-shadow: 0 1.25rem 4rem rgb(243 160 189 / 28%);
}

.download-button:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 4px;
}

.button-arrow {
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border-radius: 0.45rem;
  color: var(--white);
  background: var(--ink);
  font-size: 1.35rem;
  transition: transform 180ms ease;
}

.download-button:hover .button-arrow {
  transform: rotate(-6deg) scale(1.03);
}

.requirement {
  color: #777b7a;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  line-height: 1.6;
  margin: 1rem 0 0;
}

.product-shot {
  position: relative;
  margin: 0;
}

.product-shot::before {
  position: absolute;
  inset: 10% 7%;
  z-index: -1;
  content: "";
  border-radius: 50%;
  background: rgb(243 160 189 / 14%);
  filter: blur(60px);
}

.product-shot img {
  width: 100%;
  aspect-ratio: 193 / 127;
  filter: drop-shadow(0 2.5rem 3.8rem rgb(0 0 0 / 52%));
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.product-shot:hover img {
  transform: translateY(-0.7rem) scale(1.01);
}

.shot-crossfade {
  display: grid;
}

.shot-crossfade img {
  grid-area: 1 / 1;
}

.shot-crossfade img:last-child {
  opacity: 0;
  animation: screen-crossfade 10s ease-in-out infinite;
}

.step-stamp {
  top: 2%;
  left: 3%;
  z-index: 2;
  color: var(--pink-light);
  transform: rotate(-2deg);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.65rem 0.75rem;
  color: var(--muted);
  background: var(--panel);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.audition {
  position: relative;
  display: grid;
  align-content: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  min-height: 100svh;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(5rem, 8vw, 8rem) clamp(1.25rem, 4vw, 4rem);
}

.stem-player {
  overflow: hidden;
  border: 1px solid #454a49;
  border-radius: 0.8rem;
  background: #121515;
  box-shadow: 0 2.8rem 6rem rgb(0 0 0 / 45%);
}

.stem-player button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.stem-player button:focus-visible {
  position: relative;
  z-index: 3;
  outline: 3px solid var(--white);
  outline-offset: -4px;
}

.player-heading,
.player-controls,
.player-footer {
  display: flex;
  align-items: center;
}

.player-heading {
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem;
  border-bottom: 1px solid #343938;
  background: #191d1c;
}

.track-title {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 0.8rem;
}

.track-title span,
.track-title small,
.player-footer {
  color: #777c7a;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.track-title strong {
  grid-row: 2;
  font-family: "Hegarty", Impact, sans-serif;
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  font-weight: 400;
  line-height: 1;
}

.track-title small {
  grid-row: 2;
}

.model-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 36rem);
  padding: 0.28rem;
  border: 1px solid #434847;
  border-radius: 0.5rem;
  background: #0d0f0f;
}

.model-switch button {
  min-height: 2.8rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.32rem;
  color: #8e9291;
  background: transparent;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: color 160ms ease, background 160ms ease;
}

.model-switch button.active {
  color: #150d10;
  background: var(--pink);
}

.player-controls {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #202423;
}

.play-control {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 5.1rem;
  border: 1px solid var(--pink-light) !important;
  border-radius: 0.45rem;
  color: #171011 !important;
  background: var(--pink);
  transition: background 160ms ease, transform 160ms ease;
}

.play-control:hover {
  background: var(--pink-light);
}

.play-control:active {
  transform: scale(0.97);
}

.play-control svg {
  width: 2rem;
  fill: currentColor;
}

.play-control .pause-icon,
.stem-player.playing .play-control .play-icon {
  display: none;
}

.stem-player.playing .play-control .pause-icon {
  display: block;
}

.stem-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.stem-controls button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  min-height: 5.1rem;
  padding: 0.6rem;
  border: 1px solid #444947;
  border-radius: 0.42rem;
  color: #7c8280;
  background: #111313;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.stem-controls button:hover {
  border-color: #777d7a;
  color: var(--white);
}

.stem-controls button[aria-pressed="true"] {
  border-color: var(--pink-light);
  color: #171011;
  background: var(--pink);
}

.stem-controls svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stem-controls button:first-child svg rect {
  fill: currentColor;
  stroke: none;
}

.player-time {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-width: 9.25rem;
  color: var(--white);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.player-time small {
  margin: 0 0.45rem;
  color: #606563;
  font-size: 0.68rem;
}

.waveform {
  position: relative;
  height: clamp(10rem, 15vw, 13.5rem);
  overflow: hidden;
  border-top: 1px solid #343938;
  border-bottom: 1px solid #343938;
  background:
    linear-gradient(90deg, transparent 49.9%, rgb(255 255 255 / 5%) 50%, transparent 50.1%),
    #080a0a;
  cursor: ew-resize;
}

.waveform canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.waveform-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--white);
  box-shadow: 0 0 1.1rem rgb(255 255 255 / 70%);
  transform: translateX(-1px);
  pointer-events: none;
}

.waveform-playhead::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 0;
  content: "";
  border-top: 0.65rem solid var(--white);
  border-right: 0.42rem solid transparent;
  border-left: 0.42rem solid transparent;
  transform: translateX(-50%);
}

.waveform-hint {
  position: absolute;
  right: 0.8rem;
  bottom: 0.65rem;
  color: rgb(255 255 255 / 28%);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.player-footer {
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #171a1a;
}

.model-led {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #b9bcbb;
}

.model-led i {
  width: 0.48rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0.75rem var(--pink);
}

.model-led b {
  font-weight: 600;
}

.audio-rack {
  display: none;
}

.reverse {
  grid-template-columns: minmax(20rem, 0.84fr) minmax(0, 1.16fr);
}

.closing-cta {
  display: flex;
  justify-content: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 4vw, 4rem);
}

.closing-cta .download-button {
  margin-top: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 850ms ease, transform 850ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes logo-drift {
  0%, 100% { transform: translateY(0) rotate(-0.35deg); }
  50% { transform: translateY(-0.7rem) rotate(0.35deg); }
}

@keyframes screen-crossfade {
  0%, 38%, 100% { opacity: 0; }
  48%, 88% { opacity: 1; }
}

@keyframes bubble-rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.65); }
  12% { opacity: var(--opacity); }
  55% { transform: translate3d(var(--drift), -52vh, 0) scale(1); }
  92% { opacity: var(--opacity); }
  100% { opacity: 0; transform: translate3d(calc(var(--drift) * -0.45), -105vh, 0) scale(1.1); }
}

@media (max-width: 850px) {
  .split,
  .reverse {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    min-height: auto;
    padding-block: 5rem;
  }

  .hero {
    gap: 1.5rem;
    padding-top: 3rem;
  }

  .hero > .copy {
    width: 100%;
    margin-left: 0;
  }

  .hero-art {
    min-height: 18rem;
    justify-items: center;
    overflow: hidden;
    translate: 0;
  }

  .brand-lockup {
    width: 140%;
    max-width: none;
    translate: -1.5% 0;
  }

  .feature .product-shot {
    order: 1;
  }

  .feature .copy {
    order: 2;
  }

  h1,
  h2 {
    max-width: 12ch;
    font-size: clamp(2.4rem, 10.5vw, 3.2rem);
  }

  .audition {
    min-height: auto;
  }

  .player-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .model-switch {
    width: 100%;
  }

  .player-controls {
    grid-template-columns: 4rem minmax(0, 1fr);
  }

  .player-time {
    grid-column: 1 / -1;
    min-height: 2.5rem;
  }

  .play-control,
  .stem-controls button {
    min-height: 4.65rem;
  }

  .player-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .split,
  .reverse,
  .audition {
    width: 100%;
    padding-inline: 1rem;
  }

  .hero {
    padding-top: 1rem;
  }

  .hero-art {
    min-height: 13rem;
  }

  .track-title {
    grid-template-columns: 1fr;
  }

  .track-title small {
    grid-row: 3;
    margin-top: 0.2rem;
  }

  .model-switch button {
    padding-inline: 0.45rem;
    font-size: 0.58rem;
  }

  .player-controls {
    grid-template-columns: 1fr;
  }

  .play-control {
    min-height: 3.4rem;
  }

  .stem-controls {
    grid-template-columns: repeat(4, minmax(3.25rem, 1fr));
  }

  .stem-controls button {
    min-height: 4rem;
    padding-inline: 0.2rem;
    font-size: 0.52rem;
  }

  .stem-controls svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .player-time {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brand-lockup,
  .bubble,
  .shot-crossfade img:last-child {
    animation: none;
  }

  .bubble {
    display: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
