:root {
  --vh: 1vh;                              /* 1% of the visible viewport height */
  --gap: clamp(.6rem, calc(var(--vh) * 2.6), 2.4rem);   /* base vertical rhythm */
  --bg: #0b0405;
  --red: #8c0f14;
  --red-bright: #d3202a;
  --gold: #f3b45a;
  --text: #f5e9e4;
}

@supports (height: 1dvh) { :root { --vh: 1dvh; } }

* { box-sizing: border-box; }

/* one screen, never scrolls */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: calc(var(--vh) * 100);
  background: var(--bg);
  color: var(--text);
  font-family: "Raleway", system-ui, sans-serif;
}

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

/* ---------- nav ---------- */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.4rem clamp(1.25rem, 5vw, 3.2rem);
  font-size: .95rem;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.brand { position: relative; }
.brand-name { margin: 0; }
.brand-x { display: inline-block; margin-inline: .9em; }   /* the names part around the "x"; the links sit under each name */
.brand-links {                                  /* one group under each name: left under the first, right under the second */
  position: absolute;
  top: calc(100% + .7rem);
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}
.brand-group {
  display: flex;
  gap: .9rem;
}
.brand-group a { display: block; color: #eadbd3; transition: color .2s, transform .2s; }
.brand-group a:hover, .brand-group a:focus-visible { color: var(--gold); transform: translateY(-2px); }
.brand-group svg { display: block; width: 1.35rem; height: 1.35rem; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .75)); }

/* ---------- stage ---------- */
.stage {
  position: relative;
  height: calc(var(--vh) * 100);
  overflow: hidden;
  background: #0b0405;
  isolation: isolate;
}
/* backdrop: 1920s jazz café stage (assets/bg.webp) */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("assets/bg.webp") center bottom / cover no-repeat;
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(8, 3, 3, .55), transparent 18%),
    radial-gradient(ellipse 100% 90% at 50% 50%, transparent 55%, rgba(5, 2, 3, .6) 100%);
}

/* stage smoke: black-background loop, "screen" adds only the smoke; sits between the backdrop and the vignette */
.smoke {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
  opacity: .4;
  pointer-events: none;
  transition: opacity 1.1s ease, filter 1.1s ease;
}

/* ---------- content ---------- */
.content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: clamp(4.2rem, calc(var(--vh) * 10), 8rem) 1.25rem clamp(.8rem, calc(var(--vh) * 3), 2rem);
  text-align: center;
}

.title {
  margin: 0;
  font-family: "Dela Gothic One", Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(2.4rem, min(10vw, calc(var(--vh) * 11)), 7.5rem);
  line-height: .95;
  text-transform: uppercase;
  color: #f1c987;
  background: linear-gradient(#fff0cf 10%, #f0b24f 55%, #b8651c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: blur(4px) drop-shadow(0 0 22px rgba(255, 170, 70, .45));
}

.artists {
  margin: calc(var(--gap) * 1.4) 0 0;
  font-family: "Syncopate", sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, min(3vw, calc(var(--vh) * 3.4)), 2rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--text);
  text-shadow: 0 0 20px rgba(0, 0, 0, .8);
}

.tagline {
  margin: calc(var(--gap) * .6) 0 var(--gap);
  font-size: clamp(.7rem, 1.6vw, .9rem);
  letter-spacing: .4em;
  text-transform: uppercase;
  color: #e8d6cf;
}

.buy {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: clamp(.65rem, calc(var(--vh) * 1.8), 1.05rem) 2.6rem;
  border: 1px solid var(--red-bright);
  border-radius: 4px;
  background: linear-gradient(#7c0d13, #560a0e);
  box-shadow: 0 0 24px rgba(200, 30, 40, .25);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s, opacity .7s ease;
}
.buy:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
  box-shadow: 0 0 36px rgba(220, 40, 50, .5);
}

/* CD packshot: case + disc as separate layers so the disc can slide in and the case can flip */
/* fills whatever height is left between the button and the icons; never pushes the page taller */
.cd-wrap {
  position: relative;
  flex: 0 1 min(calc(var(--vh) * 34), calc(86vw / 1.3949));
  min-height: 0;
  aspect-ratio: 929 / 666;
  margin-block: auto;
  pointer-events: none;      /* the glow reaches over the button; clicks must pass through */
  perspective: 1400px;
  perspective-origin: 37% 50%;
  -webkit-box-reflect: below 2px linear-gradient(transparent 62%, rgba(255, 255, 255, .2));
}
/* warm light spilling around the product */
.cd-wrap::before {
  content: "";
  position: absolute;
  inset: -20% -16% -8%;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 52%, rgba(255, 150, 70, .3), transparent 65%);
  filter: blur(22px);
  transition: opacity .7s ease;
}
.disc,
.front img {
  display: block;
  width: 100%;
  height: 100%;
  filter: brightness(.84) contrast(.95) saturate(.86) sepia(.14)
          drop-shadow(0 22px 26px rgba(0, 0, 0, .75));
}
.disc {
  position: absolute;
  top: 0;
  left: calc(74.17% - 1px);          /* 1px overlap under the case, so no hairline seam */
  width: calc(25.83% + 1px);
  height: 100%;
}
.flipper {
  position: absolute;
  top: 0;
  left: 0;
  width: 74.17%;
  height: 100%;
  transform-style: preserve-3d;
}
.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* scene tint painted only on the front (masked by the case image itself) */
.front::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url("assets/cd-case.webp") center / 100% 100% no-repeat;
  mask: url("assets/cd-case.webp") center / 100% 100% no-repeat;
  background: linear-gradient(165deg, rgba(255, 160, 80, .22), transparent 42%, rgba(12, 4, 4, .5));
}
/* empty back of the plastic-wrapped sleeve */
.back {
  transform: rotateY(180deg);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .09) 0, rgba(255, 255, 255, .02) 18%, transparent 30%),
    linear-gradient(62deg, transparent 55%, rgba(255, 255, 255, .05) 66%, transparent 74%),
    repeating-linear-gradient(112deg, transparent 0 2.4rem, rgba(255, 255, 255, .03) 2.4rem 2.45rem, transparent 2.45rem 6rem),
    radial-gradient(ellipse 80% 70% at 30% 22%, rgba(130, 22, 28, .55), transparent 65%),
    linear-gradient(160deg, #2b0a0e, #130507 55%, #1e0709);
  box-shadow:
    inset 0 0 0 .18em #7a4a1b,
    inset 0 0 0 .25em rgba(255, 205, 130, .5),
    inset 0 0 4em rgba(0, 0, 0, .65);
}
.back::before,
.back::after {            /* heat-sealed seams of the wrap */
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
}
.back::before { top: 4%; }
.back::after { bottom: 4%; }

/* fade the rest of the page while the sleeve comes to the camera */
.nav, .title, .artists, .tagline, .cta, .platforms { transition: opacity .7s ease; }
.is-busy .cd-wrap { -webkit-box-reflect: none; }
.is-busy .stage { overflow: visible; }
.is-approach .nav,
.is-approach .title,
.is-approach .artists,
.is-approach .tagline,
.is-approach .cta,
.is-approach .platforms,
.is-tracks .nav,
.is-tracks .title,
.is-tracks .artists,
.is-tracks .tagline,
.is-tracks .cta,
.is-tracks .platforms { opacity: 0; pointer-events: none; }
.is-approach .cd-wrap::before { opacity: 0; }


/* ---------- cinematic touches ---------- */
/* light glint sweeping over the plastic wrap (animated from order.js) */
.glint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 236, 205, .7) 50%, transparent 58%);
  background-size: 300% 100%;
  background-position: 100% 0;
}
.front .glint {
  -webkit-mask: url("assets/cd-case.webp") center / 100% 100% no-repeat;
  mask: url("assets/cd-case.webp") center / 100% 100% no-repeat;
}

/* rack focus: the scene behind softens and darkens as the sleeve comes close */
.stage::before { transition: filter 1.1s ease; }
.is-approach .stage::before { filter: blur(9px) brightness(.5); }
.is-tracks .stage::before { filter: blur(5px) brightness(.5); }
.is-approach .smoke { opacity: .22; filter: blur(9px); }
.is-tracks .smoke { opacity: .3; filter: blur(5px); }

/* anamorphic streak when the sleeve lands */
.flare {
  position: fixed;
  left: 0;
  right: 0;
  top: 34%;
  z-index: 55;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent 5%, rgba(255, 190, 110, .95) 50%, transparent 95%);
  box-shadow: 0 0 22px 6px rgba(255, 160, 80, .45);
  filter: blur(.6px);
}

/* ---------- order panel (sits on the back of the sleeve) ---------- */
.panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 5.5rem 1.25rem 2rem;
  overflow-y: auto;            /* safety net only: the form is sized to fit without it */
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.is-open .panel--order,
.is-tracks-open .panel--tracks {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .7s ease .1s;
}
.panel-close {
  position: absolute;
  top: 1.6rem;
  left: clamp(1.25rem, 5vw, 3.2rem);
  padding: .6rem 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s;
}
.panel-close:hover { color: var(--gold); }
.panel-body { width: min(30rem, 100%); text-align: left; }
.panel .eyebrow {
  margin: 0 0 .6rem;
  font-size: .75rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold);
}
.panel h2 {
  margin: 0;
  font-family: "Dela Gothic One", Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
  text-transform: uppercase;
  background: linear-gradient(#fff0cf 10%, #f0b24f 60%, #b8651c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* film grain over the whole page ties every layer together */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.4rem, 4vw, 2.6rem);
  margin: 0;
  padding: var(--gap) 0 0;
  list-style: none;
}
.platforms a {
  display: block;
  opacity: .92;
  transition: transform .2s, color .2s, opacity .2s;
}
.platforms a:hover { color: var(--gold); opacity: 1; transform: translateY(-3px); }
.platforms svg { display: block; height: clamp(1.3rem, calc(var(--vh) * 3.2), 2.2rem); width: auto; }

/* ---------- contact ---------- */
@media (max-width: 600px) {
  .tagline { letter-spacing: clamp(.18em, 1.6vw + .05em, .4em); }
  /* keep the left-hand curtain in frame; darken so the text stays readable over the busier left side */
  .stage::before { background-position: left bottom; }
  .smoke { object-position: left center; opacity: .7; }
  .stage::after {
    background:
      linear-gradient(rgba(8, 3, 3, .35), rgba(8, 3, 3, .35)),
      linear-gradient(rgba(8, 3, 3, .55), transparent 18%),
      radial-gradient(ellipse 100% 90% at 50% 50%, transparent 55%, rgba(5, 2, 3, .6) 100%);
  }
  .nav { flex-direction: column; gap: .8rem; padding-top: 1.6rem; font-size: .8rem; }
  .content { padding-top: clamp(6rem, calc(var(--vh) * 13), 9rem); }
}

/* short landscape screens (phones on their side): text left, CD right */
@media (orientation: landscape) and (max-height: 560px) {
  .nav { padding-top: 1.2rem; }
  .content {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    grid-template-rows: 1fr auto auto auto auto 1fr auto;
    grid-template-areas:
      "title   cd"
      "title   cd"
      "artists cd"
      "tagline cd"
      "buy     cd"
      ".       cd"
      "plat    plat";
    column-gap: 2rem;
    align-items: center;
    justify-items: center;
    padding-top: 3.4rem;
  }
  .title { grid-area: title; align-self: end; font-size: clamp(2rem, min(7vw, calc(var(--vh) * 16)), 5rem); }
  .artists { grid-area: artists; margin-top: calc(var(--gap) * .8); }
  .tagline { grid-area: tagline; margin-bottom: calc(var(--gap) * .8); }
  .cta { grid-area: buy; gap: .6rem; }
  .cta .buy { padding: .5rem .8rem; font-size: .72rem; letter-spacing: .08em; }
  .cta .buy svg { display: none; }
  .cta .buy--ghost { font-size: .66rem; }
  .cd-wrap {
    grid-area: cd;
    flex: none;
    margin: 0;
    height: min(calc(var(--vh) * 62), calc(40vw / 1.3949));
  }
  .platforms { grid-area: plat; padding-top: .4rem; }
  .platforms svg { height: clamp(1.1rem, calc(var(--vh) * 5), 1.6rem); }
}

/* ---------- CTA row: primary (order) and secondary (tracklist, outline) buttons ---------- */
.cta {
  --fs: clamp(.74rem, 1.2vw + .4rem, 1.05rem);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(.6rem, 2vw, 1rem);
}
.cta .buy {
  padding-inline: clamp(.9rem, 3vw, 2.4rem);
  font-size: var(--fs);
  letter-spacing: clamp(.08em, .6vw, .14em);
  gap: clamp(.45rem, 1.4vw, .9rem);
  white-space: nowrap;
}
.cta .buy svg { width: 1.2em; height: 1.2em; flex: none; }
.cta .buy--ghost {                              /* secondary: outline only, no fill, no glow */
  background: transparent;
  border-color: rgba(243, 180, 90, .55);
  box-shadow: none;
  color: #f1dfc6;
  font-weight: 500;
  font-size: calc(var(--fs) * .88);
}
.cta .buy--ghost:hover {
  filter: none;
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(243, 180, 90, .08);
  box-shadow: none;
}

/* ---------- tracklist panel: the sleeve parks in .tl-slot, the list sits beside it ---------- */
.panel--tracks { padding: 4.2rem clamp(1.25rem, 5vw, 3.2rem) 1.5rem; overflow: hidden; }
.panel--tracks::before {                       /* soft scrim so the list reads over the scene */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 70% 70% at 68% 52%, rgba(5, 2, 3, .62), transparent 70%);
}
.tracks-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
  align-items: center;
  gap: clamp(1.5rem, 6vw, 5rem);
  width: min(62rem, 100%);
}
.tl-slot {                                     /* empty anchor: order.js flies the real sleeve here */
  justify-self: center;
  width: min(36vw, calc(var(--vh) * 54 * 1.0345));
  aspect-ratio: 689 / 666;
}
.tl-eyebrow {
  margin: 0 0 .5rem;
  font-size: .72rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold);
}
.tl h2 {
  margin: 0 0 clamp(.6rem, calc(var(--vh) * 2), 1.4rem);
  font-weight: 500;
  font-size: clamp(1rem, 1.6vw + .5rem, 1.5rem);
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--text);
}
.tl-list { margin: 0; padding: 0; list-style: none; }
.tl-list li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  align-items: baseline;
  padding: clamp(.35rem, calc(var(--vh) * 1.5), .85rem) .2rem;
  border-bottom: 1px solid rgba(255, 205, 130, .16);
  font-size: clamp(.82rem, calc(var(--vh) * 2), 1.02rem);
  letter-spacing: .04em;
  color: #eadbd3;
  transition: color .2s, border-color .2s;
}
.tl-list li:hover { color: var(--gold); border-bottom-color: rgba(255, 205, 130, .4); }
.tl-list .n { color: #b49a8e; font-variant-numeric: tabular-nums; }
.tl-total {
  margin: clamp(.6rem, calc(var(--vh) * 1.6), 1rem) 0 0;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #a58f84;
}

/* the list builds up row by row */
.tl > *,
.tl-list li {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .35s ease, transform .35s ease;
}
.is-tracks-open .tl > *,
.is-tracks-open .tl-list li {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease var(--d, 0s), transform .6s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), color .2s, border-color .2s;
}
.tl > :nth-child(1) { --d: .3s; }
.tl > :nth-child(2) { --d: .38s; }
.tl > :nth-child(4) { --d: 1.05s; }
.tl-list li { --d: calc(.45s + var(--i, 0) * .07s); }
.tl-list { opacity: 1 !important; transform: none !important; }   /* rows animate, the <ol> itself does not */

/* phones in portrait: sleeve on top, list below */
@media (max-width: 700px), (max-aspect-ratio: 1/1) {
  .panel--tracks { padding-top: 3.6rem; }
  .tracks-body { grid-template-columns: 1fr; gap: clamp(.6rem, calc(var(--vh) * 2), 1.4rem); width: min(26rem, 100%); }
  .tl-slot { width: min(62vw, calc(var(--vh) * 25 * 1.0345)); }
  .tl h2 { letter-spacing: .4em; }
}
/* small portrait phones (e.g. 320x568): smaller sleeve and tighter rows so all ten tracks fit */
@media (max-width: 700px) and (max-height: 600px), (max-aspect-ratio: 1/1) and (max-height: 600px) {
  .tl-slot { width: calc(var(--vh) * 19 * 1.0345); }
  .tl-list li { padding-block: calc(var(--vh) * 1.05); }
}
/* short landscape: tighter rows so all ten fit */
@media (orientation: landscape) and (max-height: 560px) {
  .panel--tracks { padding-top: 2.8rem; padding-bottom: .8rem; }
  .tracks-body { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); width: min(48rem, 100%); }
  .tl-slot { width: min(34vw, calc(var(--vh) * 62 * 1.0345)); }
  .tl-eyebrow { display: none; }
  .tl-list li { padding-block: .22rem; font-size: .82rem; }
  .tl h2 { margin-bottom: .4rem; font-size: 1rem; }
  .tl-total { margin-top: .4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tl > *, .tl-list li { transition: none !important; }
}

/* very narrow phones: keep the tagline on one line */
@media (max-width: 360px) {
  .tagline { font-size: .62rem; letter-spacing: .2em; white-space: nowrap; }
}
