:root {
  color-scheme: dark;
  --ink: #fff8ed;
  --paper: #f7ead8;
  --muted: rgba(255, 248, 237, 0.66);
  --faint: rgba(255, 248, 237, 0.1);
  --line: rgba(255, 248, 237, 0.18);
  --black: #070708;
  --panel: rgba(17, 15, 15, 0.62);
  --accent: #e9605f;
  --amber: #d7ac66;
  --green: #8cc6a4;
  --mx: 50%;
  --my: 50%;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: #090807;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

body::selection {
  background: var(--accent);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.cursor-light {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--mx) var(--my),
    rgba(255, 248, 237, 0.18),
    rgba(255, 248, 237, 0.045) 9rem,
    transparent 22rem
  );
  mix-blend-mode: screen;
}

.screen {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.backdrop,
.backdrop::after {
  position: absolute;
  inset: 0;
}

.backdrop {
  z-index: -4;
}

.backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.08) brightness(0.4);
  transform: scale(1.11);
}

.backdrop::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(7, 7, 8, 0.96), rgba(7, 7, 8, 0.46) 42%, rgba(7, 7, 8, 0.88)),
    linear-gradient(0deg, rgba(7, 7, 8, 0.95), transparent 46%, rgba(7, 7, 8, 0.54));
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 248, 237, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 248, 237, 0.07) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 78%, transparent);
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(233, 96, 95, 0.13), transparent 36%),
    linear-gradient(290deg, rgba(140, 198, 164, 0.1), transparent 42%);
}

.topbar {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(1120px, calc(100% - 30px));
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 8, 8, 0.58);
  backdrop-filter: blur(28px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 26px 90px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.topbar::before,
.player-console::before,
.contact-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 248, 237, 0.18),
    transparent 34%
  );
  transition: opacity 180ms ease;
}

.topbar:hover::before,
.player-console:hover::before,
.contact-modal:hover::before {
  opacity: 1;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--black);
  font-size: 0.72rem;
  font-weight: 900;
}

.topbar p {
  margin: 0;
  text-align: center;
  color: rgba(255, 248, 237, 0.74);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.topbar-action,
.mini-contact,
.transport-button,
.primary-play,
.track-item,
.modal-close,
.contact-link {
  border: 1px solid var(--line);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.topbar-action,
.mini-contact,
.transport-button,
.modal-close {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.08);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.stage {
  display: grid;
  grid-template-columns: minmax(220px, 0.64fr) minmax(320px, 0.92fr) minmax(440px, 1.12fr);
  grid-template-areas: "intro art player";
  align-items: center;
  gap: clamp(20px, 3.2vw, 68px);
  width: 100%;
  height: 100%;
  padding: clamp(86px, 10svh, 104px) clamp(18px, 4.6vw, 80px) clamp(24px, 5svh, 54px);
}

.intro {
  grid-area: intro;
  align-self: center;
  animation: rise 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(4.4rem, 10.2vw, 12rem);
  line-height: 0.75;
  letter-spacing: 0;
  text-wrap: balance;
}

.intro-copy {
  max-width: 430px;
  margin-bottom: 30px;
  color: rgba(255, 248, 237, 0.72);
  font-size: clamp(0.98rem, 1.3vw, 1.18rem);
  line-height: 1.7;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-row span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(255, 248, 237, 0.055);
  color: rgba(255, 248, 237, 0.7);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.art-stack {
  grid-area: art;
  justify-self: center;
  width: min(33vw, 570px);
  min-width: 300px;
  transform-style: preserve-3d;
  transition: transform 180ms ease;
  animation: rise 760ms 90ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.art-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 237, 0.22);
  border-radius: 34px;
  background: rgba(255, 248, 237, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 40px 150px rgba(0, 0, 0, 0.48);
}

.art-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(255, 248, 237, 0.16);
  border-radius: 26px;
  pointer-events: none;
}

.art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 1200ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 300ms ease;
}

.art-stack.playing .art-frame img {
  filter: saturate(1.15) contrast(1.05);
  transform: scale(1.045);
}

.play-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  width: clamp(82px, 8vw, 124px);
  height: clamp(82px, 8vw, 124px);
  place-items: center;
  border: 1px solid rgba(255, 248, 237, 0.44);
  border-radius: 50%;
  background: rgba(7, 7, 8, 0.46);
  backdrop-filter: blur(22px);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, background 180ms ease;
}

.play-core:hover {
  background: rgba(255, 248, 237, 0.12);
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 23px solid var(--ink);
}

.play-core.is-playing .play-icon {
  width: 25px;
  height: 31px;
  margin-left: 0;
  border: 0;
  background: linear-gradient(90deg, var(--ink) 0 34%, transparent 34% 66%, var(--ink) 66%);
}

.art-caption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  margin-top: 14px;
  padding: 0 3px;
  color: rgba(255, 248, 237, 0.78);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.art-caption span {
  color: var(--amber);
}

.player-console {
  position: relative;
  grid-area: player;
  justify-self: end;
  display: grid;
  grid-template-rows: auto minmax(118px, 1fr) auto auto auto;
  width: min(100%, 670px);
  min-height: min(720px, calc(100svh - 140px));
  max-height: calc(100svh - 120px);
  padding: clamp(18px, 2.6vw, 34px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 248, 237, 0.1), rgba(255, 248, 237, 0.035)),
    var(--panel);
  backdrop-filter: blur(30px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 42px 160px rgba(0, 0, 0, 0.42);
  animation: rise 760ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.player-console > *,
.contact-modal > *,
.topbar > * {
  position: relative;
}

.console-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}

.track-meta p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.track-meta h2 {
  max-width: 520px;
  margin-bottom: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.9rem, 5.3vw, 6.3rem);
  line-height: 0.88;
  letter-spacing: 0;
}

#waveform {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 118px;
  margin: clamp(18px, 3svh, 36px) 0 clamp(14px, 2svh, 20px);
  border-block: 1px solid rgba(255, 248, 237, 0.12);
}

.transport {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.transport-button {
  min-height: 54px;
  background: rgba(255, 248, 237, 0.07);
}

.primary-play {
  display: inline-flex;
  min-width: clamp(124px, 13vw, 178px);
  min-height: 62px;
  align-items: center;
  justify-content: center;
  border-color: rgba(255, 248, 237, 0.46);
  border-radius: 999px;
  background: var(--paper);
  color: var(--black);
  font-size: 0.92rem;
  font-weight: 950;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 14px;
  margin: clamp(14px, 2.3svh, 20px) 0 clamp(16px, 2.6svh, 24px);
  color: rgba(255, 248, 237, 0.68);
  font-size: 0.78rem;
  font-weight: 900;
}

.timeline span:last-child {
  text-align: right;
}

.scrubber {
  width: 100%;
  accent-color: var(--accent);
}

.track-list {
  display: grid;
  gap: 10px;
}

.track-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: clamp(58px, 8.2svh, 70px);
  padding: 0 18px;
  border-color: transparent;
  border-radius: 18px;
  background: rgba(255, 248, 237, 0.052);
  color: var(--ink);
  text-align: left;
}

.track-item span,
.track-item small {
  color: rgba(255, 248, 237, 0.58);
  font-size: 0.76rem;
  font-weight: 900;
}

.track-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.track-item:hover,
.track-item.active {
  border-color: rgba(255, 248, 237, 0.24);
  background: rgba(255, 248, 237, 0.12);
  transform: translateX(5px);
}

.track-item.active span {
  color: var(--amber);
}

.ticker {
  position: absolute;
  left: 0;
  bottom: 12px;
  z-index: -1;
  display: flex;
  gap: 32px;
  min-width: 200vw;
  color: rgba(255, 248, 237, 0.065);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(4.2rem, 11vw, 12rem);
  font-weight: 700;
  white-space: nowrap;
  animation: marquee 24s linear infinite;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 7, 8, 0.66);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.contact-modal {
  position: relative;
  width: min(560px, 100%);
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 248, 237, 0.11), rgba(255, 248, 237, 0.035)),
    rgba(17, 15, 15, 0.8);
  box-shadow: 0 42px 150px rgba(0, 0, 0, 0.52);
  transform: translateY(18px) scale(0.98);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.open .contact-modal {
  transform: translateY(0) scale(1);
}

.contact-modal h2 {
  margin-bottom: 18px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.9;
}

.contact-modal p:not(.eyebrow) {
  margin-bottom: 26px;
  color: var(--muted);
  line-height: 1.72;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 248, 237, 0.08);
}

.contact-link {
  display: inline-flex;
  min-height: 52px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--black);
  font-weight: 900;
  overflow-wrap: anywhere;
}

button:hover,
.contact-link:hover {
  border-color: rgba(255, 248, 237, 0.34);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .stage {
    grid-template-columns: minmax(230px, 0.68fr) minmax(390px, 1fr);
    grid-template-areas:
      "intro player"
      "art player";
    align-content: center;
  }

  .art-stack {
    justify-self: start;
    width: min(34vw, 340px);
    min-width: 250px;
  }

  .player-console {
    min-height: min(690px, calc(100svh - 140px));
  }
}

@media (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "player";
    align-content: stretch;
    gap: clamp(12px, 2svh, 18px);
    padding: 86px clamp(14px, 4vw, 28px) clamp(14px, 3svh, 24px);
  }

  .intro {
    max-width: min(620px, calc(100vw - 160px));
  }

  .intro-copy {
    display: none;
  }

  .meta-row {
    margin-top: 18px;
  }

  h1 {
    margin-bottom: 0;
    font-size: clamp(4.2rem, 13vw, 7.2rem);
  }

  .art-stack {
    position: absolute;
    top: 104px;
    right: clamp(18px, 5vw, 42px);
    z-index: 2;
    width: clamp(128px, 22vw, 210px);
    min-width: 0;
  }

  .art-frame {
    border-radius: 24px;
  }

  .art-caption {
    display: none;
  }

  .play-core {
    width: clamp(58px, 10vw, 76px);
    height: clamp(58px, 10vw, 76px);
  }

  .player-console {
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    min-height: 0;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    top: 10px;
    width: calc(100% - 20px);
  }

  .topbar p {
    display: none;
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "player";
    gap: 10px;
    padding: 76px 10px 10px;
  }

  .intro {
    max-width: calc(100vw - 152px);
  }

  .intro-copy,
  .meta-row,
  .eyebrow {
    display: none;
  }

  h1 {
    margin-bottom: 0;
    font-size: clamp(3.2rem, 17vw, 6rem);
  }

  .art-stack {
    position: absolute;
    right: 12px;
    top: 88px;
    z-index: 2;
    width: clamp(104px, 31vw, 150px);
    min-width: 0;
  }

  .art-frame {
    border-radius: 22px;
  }

  .art-frame::before,
  .art-caption {
    display: none;
  }

  .play-core {
    width: 56px;
    height: 56px;
  }

  .play-icon {
    border-top-width: 9px;
    border-bottom-width: 9px;
    border-left-width: 14px;
  }

  .play-core.is-playing .play-icon {
    width: 15px;
    height: 20px;
  }

  .player-console {
    grid-template-rows: auto minmax(64px, 1fr) auto auto auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 14px;
    border-radius: 24px;
  }

  .console-header {
    grid-template-columns: 1fr;
  }

  .mini-contact {
    display: none;
  }

  .track-meta h2 {
    font-size: clamp(2.25rem, 11vw, 3.7rem);
  }

  #waveform {
    min-height: 64px;
    margin: 12px 0 12px;
  }

  .transport {
    grid-template-columns: 1fr 1.3fr 1fr;
  }

  .transport-button,
  .primary-play {
    min-width: 0;
    min-height: 44px;
  }

  .timeline {
    grid-template-columns: 38px 1fr 38px;
    gap: 10px;
    margin: 12px 0;
  }

  .track-list {
    gap: 7px;
  }

  .track-item {
    grid-template-columns: 32px 1fr;
    min-height: clamp(42px, 7svh, 54px);
    padding: 0 12px;
  }

  .track-item small {
    display: none;
  }

  .ticker {
    display: none;
  }
}

@media (max-width: 420px) {
  .topbar {
    min-height: 52px;
    padding: 6px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .topbar-action {
    min-height: 38px;
    padding: 0 12px;
  }

  .stage {
    padding-top: 68px;
  }

  .intro {
    max-width: calc(100vw - 124px);
  }

  h1 {
    font-size: clamp(2.72rem, 16vw, 4.6rem);
  }

  .art-stack {
    top: 78px;
    width: clamp(92px, 29vw, 120px);
  }

  .track-meta p {
    margin-bottom: 7px;
    font-size: 0.68rem;
  }

  .track-meta h2 {
    font-size: clamp(2rem, 10.6vw, 3.2rem);
  }

  .transport {
    gap: 8px;
  }

  .transport-button,
  .primary-play {
    min-height: 40px;
    font-size: 0.76rem;
  }

  .track-item {
    grid-template-columns: 26px 1fr;
    gap: 8px;
    min-height: clamp(38px, 6.4svh, 48px);
    border-radius: 13px;
    font-size: 0.86rem;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  .stage {
    padding-bottom: 28px;
  }

  h1 {
    font-size: clamp(4.4rem, 9vw, 8.8rem);
  }

  .intro-copy {
    margin-bottom: 20px;
    font-size: 0.96rem;
  }

  .player-console {
    min-height: calc(100svh - 128px);
  }

  #waveform {
    height: 132px;
    margin: 20px 0 14px;
  }

  .track-item {
    min-height: 56px;
  }
}

@media (max-height: 620px) and (min-width: 761px) {
  .topbar {
    top: 10px;
    min-height: 50px;
  }

  .stage {
    padding-top: 72px;
    padding-bottom: 14px;
  }

  .eyebrow,
  .intro-copy,
  .meta-row,
  .art-caption {
    display: none;
  }

  h1 {
    margin-bottom: 0;
    font-size: clamp(3.6rem, 8vw, 6.8rem);
  }

  .art-stack {
    width: min(28vw, 260px);
    min-width: 210px;
  }

  .player-console {
    grid-template-rows: auto minmax(72px, 1fr) auto auto auto;
    min-height: calc(100svh - 86px);
    max-height: calc(100svh - 86px);
    padding: 16px;
  }

  .track-meta h2 {
    font-size: clamp(2.3rem, 4.5vw, 4.2rem);
  }

  #waveform {
    min-height: 72px;
    margin: 12px 0 10px;
  }

  .transport-button,
  .primary-play {
    min-height: 42px;
  }

  .timeline {
    margin: 10px 0;
  }

  .track-list {
    gap: 7px;
  }

  .track-item {
    min-height: 42px;
  }
}

@media (max-height: 620px) and (max-width: 760px) {
  .topbar {
    display: none;
  }

  .stage {
    padding-top: 10px;
  }

  .intro,
  .art-stack {
    display: none;
  }

  .track-meta h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
