/* ==========================================================================
   kuchr — release gateway
   "Deep Water": near-black stage, artwork-led, three equal doors out.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  --bg: #05080b;
  --ink: #fff;
  --ink-2: rgb(255 255 255 / 0.64);
  --ink-3: rgb(255 255 255 / 0.42);
  --glass: rgb(255 255 255 / 0.055);
  --glass-hi: rgb(255 255 255 / 0.10);
  --line: rgb(255 255 255 / 0.13);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --swap: 340ms;

  /* Per-service brand colours. The vivid value is used for logos, accent bars and
     glows; the deep value is the hover/active fill, dark enough to keep white label
     text at AA contrast while still reading unmistakably as the brand. */
  --spotify: #1ed760;
  --spotify-deep: #0d7a37;
  --apple: #fa233b;
  --apple-deep: #a8122a;
  --ytm: #ff0033;
  --ytm-deep: #b00022;

  /* Sunlit gold for the unreleased track — sampled warm from its artwork, and kept
     clear of the cool hero above so the teaser reads as its own thing. */
  --next: #e0a765;
}

/* Accent per track, sampled from each artwork. */
.stage[data-track='immersion'] { --accent: #3fa9d6; --accent-soft: rgb(63 169 214 / 0.46); }
.stage[data-track='opera']     { --accent: #c9954e; --accent-soft: rgb(201 149 78 / 0.44); }
.stage[data-track='dream']     { --accent: #e0323a; --accent-soft: rgb(224 50 58 / 0.42); }

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

/* width/height attributes are on every img to reserve layout space and prevent shift.
   They land as presentational hints, though, and an explicit height stops `aspect-ratio`
   from doing anything. Releasing height here lets ratio rules govern. */
img { height: auto; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent, #3fa9d6);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink); color: #000;
  font-size: 0.875rem; font-weight: 600;
  border-radius: 0 0 10px 10px;
}
.skip:focus { transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Film grain — the thing that keeps a dark page from reading as flat.
   -------------------------------------------------------------------------- */
.grain {
  position: fixed; inset: -50%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Hero — the entire conversion surface
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding:
    calc(env(safe-area-inset-top) + 1.1rem)
    calc(env(safe-area-inset-right) + 1.25rem)
    calc(env(safe-area-inset-bottom) + 0.9rem)
    calc(env(safe-area-inset-left) + 1.25rem);
  overflow: hidden;
}

/* The background is a small, already-blurred image. Blurring at build time instead of
   with a CSS filter means zero GPU blur cost per frame — which is what keeps the drift
   animation smooth on a mid-range phone. */
.hero__bg {
  position: absolute; inset: 0; z-index: -3;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.18);
  animation: drift 55s var(--ease) infinite alternate;
  transition: opacity var(--swap) var(--ease);
}
@keyframes drift {
  0%   { transform: scale(1.18) translate3d(-1.5%, -1%, 0); }
  100% { transform: scale(1.30) translate3d(1.5%, 1.5%, 0); }
}

.hero__scrim {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(115% 75% at 50% 34%, rgb(5 8 11 / 0.10) 0%, rgb(5 8 11 / 0.58) 58%, rgb(5 8 11 / 0.93) 100%),
    linear-gradient(180deg, rgb(5 8 11 / 0.34) 0%, rgb(5 8 11 / 0.08) 30%, rgb(5 8 11 / 0.82) 100%);
}

/* Accent bloom behind the artwork, breathing slowly. */
.hero__glow {
  position: absolute; z-index: -1;
  left: 50%; top: 38%;
  width: min(150vw, 900px); aspect-ratio: 1;
  translate: -50% -50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%);
  filter: blur(28px);
  opacity: 0.85;
  animation: breathe 11s ease-in-out infinite alternate;
  transition: background var(--swap) var(--ease);
}
@keyframes breathe {
  0%   { opacity: 0.55; scale: 0.92; }
  100% { opacity: 0.95; scale: 1.06; }
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* The hero pill is absolutely positioned. On a tall screen the centred content clears
     it on its own, but on anything short it rides up underneath. This reserves the
     pill's height *plus* breathing room, so the artwork never crowds it at any size. */
  padding-top: 2.75rem;
  gap: clamp(1.1rem, 3.4svh, 1.9rem);
  width: 100%;
  max-width: 27.5rem;
  margin-inline: auto;
  position: relative;
  transition: opacity var(--swap) var(--ease), transform var(--swap) var(--ease);
}

/* Mid-swap the hero contents dip out; JS repaints, then they lift back in. */
.stage.is-swapping .hero__inner,
.stage.is-swapping .backpill { opacity: 0; transform: translateY(10px); }
.stage.is-swapping .hero__bg img { opacity: 0; }

/* --- back to immersion ------------------------------------------------------
   Anchored to the hero, not to .hero__inner: that element is vertically centred and
   spans the whole flex area, so anything hung above its top edge lands off-screen. */
.backpill {
  position: absolute;
  z-index: 4;
  top: calc(env(safe-area-inset-top) + 0.55rem);
  left: 50%;
  translate: -50% 0;
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.42rem 0.85rem 0.42rem 0.6rem;
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.01em;
  color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease),
    opacity var(--swap) var(--ease), transform var(--swap) var(--ease);
  white-space: nowrap;
}
.backpill svg { width: 15px; height: 15px; }
.backpill:hover { color: var(--ink); border-color: var(--accent); background: var(--glass-hi); }
.backpill[hidden] { display: none; }

/* --- "something new is coming" whisper -------------------------------------- */
.tease {
  position: absolute;
  z-index: 4;
  top: calc(env(safe-area-inset-top) + 0.55rem);
  left: 50%;
  translate: -50% 0;
  display: inline-flex; align-items: center; gap: 0.5rem;
  max-width: calc(100% - 2.5rem);
  padding: 0.42rem 0.95rem 0.42rem 0.8rem;
  font-size: 0.78125rem; font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  animation: rise 0.75s var(--ease) 0.5s both;
  transition:
    color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease),
    opacity var(--swap) var(--ease), transform var(--swap) var(--ease);
}
.tease[hidden] { display: none; }
.tease:hover { color: var(--ink); border-color: rgb(224 167 101 / 0.55); background: var(--glass-hi); }

.tease__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--next);
  box-shadow: 0 0 0 0 rgb(224 167 101 / 0.65);
  animation: ping 2.6s ease-out infinite;
  flex: none;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgb(224 167 101 / 0.6); }
  70%  { box-shadow: 0 0 0 8px rgb(224 167 101 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(224 167 101 / 0); }
}

.stage.is-swapping .tease { opacity: 0; transform: translateY(10px); }

/* --- artwork ---------------------------------------------------------------- */
.art {
  position: relative;
  /* Everything under the artwork — title block, three buttons, preview trigger, peek
     strip, padding — costs a roughly fixed ~28rem. Sizing against what's left, rather
     than a flat svh fraction, is what keeps the whole hero inside one screen on short
     wide desktops and tall phones alike. The max() is a floor so it can never collapse. */
  width: max(6rem, min(70vw, calc(100svh - 30.75rem), 25rem));
  aspect-ratio: 1;
  border-radius: clamp(8px, 2.2vw, 14px);
  overflow: hidden;
  background: #0a0f14 center/cover no-repeat;
  box-shadow:
    0 2px 6px rgb(0 0 0 / 0.4),
    0 18px 50px -12px rgb(0 0 0 / 0.75),
    0 0 0 1px rgb(255 255 255 / 0.07) inset;
  animation: rise 0.75s var(--ease) both;
}
.art img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity var(--swap) var(--ease);
}

/* Slow sheen sweep, pointer devices only. */
.art::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / 0.13) 50%, transparent 62%);
  translate: -100% 0;
  pointer-events: none;
}
@media (hover: hover) {
  .art:hover::after { animation: sheen 1.1s var(--ease); }
}
@keyframes sheen { to { translate: 100% 0; } }

/* --- title block ------------------------------------------------------------ */
.meta {
  text-align: center;
  animation: rise 0.75s var(--ease) 0.09s both;
}
.meta__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  transition: color var(--swap) var(--ease);
}
.meta__title {
  font-size: clamp(2.1rem, 9.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  background: linear-gradient(180deg, #fff 42%, rgb(255 255 255 / 0.74) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.meta__artist {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --- the three doors -------------------------------------------------------- */
.listen {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  animation: rise 0.75s var(--ease) 0.18s both;
}

.svc {
  position: relative;
  display: grid;
  /* logo · name · cta. The accent bar is absolutely positioned, so it takes no column. */
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 3.625rem;
  padding: 0.75rem 1.1rem 0.75rem 1.15rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  isolation: isolate;
  transition:
    transform 0.28s var(--ease),
    border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

/* Brand-coloured fill, revealed on hover/focus from the left. */
.svc::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: var(--svc-deep);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}

.svc__bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--svc);
  opacity: 0.85;
  transition: width 0.28s var(--ease), opacity 0.28s var(--ease);
}

.svc__logo { display: grid; place-items: center; width: 1.5rem; }
.svc__logo svg {
  width: 100%; height: auto;
  fill: var(--ink);
  transition: fill 0.28s var(--ease), transform 0.28s var(--ease);
}

/* The label is the only part allowed to give up space. Without min-width:0 a nowrap
   grid item refuses to shrink and pushes the "Play →" out of the button instead. */
.svc__name {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.svc__cta {
  display: inline-flex; align-items: center; gap: 0.34rem;
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  transition: color 0.28s var(--ease);
}
.svc__arrow {
  width: 15px; height: 15px;
  transition: transform 0.28s var(--ease);
}

.svc--spotify { --svc: var(--spotify); --svc-deep: var(--spotify-deep); }
.svc--apple   { --svc: var(--apple);   --svc-deep: var(--apple-deep); }
.svc--ytm     { --svc: var(--ytm);     --svc-deep: var(--ytm-deep); }

.svc:hover, .svc:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--svc) 55%, transparent);
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--svc) 45%, transparent);
}
.svc:hover::before, .svc:focus-visible::before { opacity: 1; }
.svc:hover .svc__bar, .svc:focus-visible .svc__bar { width: 5px; opacity: 1; }
.svc:hover .svc__logo svg, .svc:focus-visible .svc__logo svg { fill: var(--svc); transform: scale(1.06); }
.svc:hover .svc__cta, .svc:focus-visible .svc__cta { color: var(--ink); }
.svc:hover .svc__arrow, .svc:focus-visible .svc__arrow { transform: translateX(3px); }
.svc:active { transform: translateY(0) scale(0.988); }

/* Browsers without color-mix still get a clear, branded hover. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .svc:hover, .svc:focus-visible { border-color: var(--svc); }
}

/* --- preview trigger --------------------------------------------------------
   Deliberately quiet. The three service buttons are the page's job; this is an
   optional courtesy for someone who wants to hear it before committing a tap. */
.preview {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: -0.25rem;
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  animation: rise 0.75s var(--ease) 0.26s both;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.preview svg { width: 15px; height: 15px; fill: currentColor; opacity: 0.85; }
.preview:hover, .preview:focus-visible {
  color: var(--ink);
  border-color: var(--line);
  background: var(--glass);
}

/* --- preview panel ---------------------------------------------------------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden] { display: none; }

.sheet__scrim {
  position: absolute; inset: 0;
  background: rgb(2 4 6 / 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade 0.28s var(--ease) both;
}

.sheet__panel {
  position: absolute;
  left: 50%; bottom: 0;
  translate: -50% 0;
  width: min(100%, 27rem);
  padding:
    1.5rem
    calc(env(safe-area-inset-right) + 1.35rem)
    calc(env(safe-area-inset-bottom) + 1.35rem)
    calc(env(safe-area-inset-left) + 1.35rem);
  background: linear-gradient(180deg, #0d151c 0%, #070b0f 100%);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -20px 60px -12px rgb(0 0 0 / 0.8);
  text-align: center;
  animation: sheetUp 0.36s var(--ease) both;
  /* Never taller than the screen: on a landscape phone the panel would otherwise clip
     top and bottom, taking the close button off-screen with it. */
  max-height: 94svh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet__panel:focus { outline: none; }

/* Above phone size it stops being a bottom sheet and becomes a centred card. */
@media (min-width: 34rem) {
  .sheet__panel {
    top: 50%; bottom: auto;
    translate: -50% -50%;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding-bottom: 1.5rem;
    animation-name: cardIn;
  }
  .sheet__grip { display: none; }
}

.sheet__grip {
  width: 2.25rem; height: 4px;
  margin: -0.55rem auto 0.9rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.18);
}

.sheet__close {
  position: absolute;
  top: 0.85rem; right: 0.85rem;
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  color: var(--ink-3);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.sheet__close svg { width: 15px; height: 15px; }
.sheet__close:hover { color: var(--ink); background: var(--glass-hi); }

.sheet__eyebrow {
  font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent, #3fa9d6);
}
.sheet__title {
  margin-top: 0.3rem;
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.03em;
}

.sheet__player { margin-top: 1.15rem; min-height: 152px; }
.sheet__player iframe {
  display: block;
  width: 100%;
  height: 152px;
  border: 0;
  border-radius: 12px;
}
.sheet__loading {
  display: grid; place-items: center;
  height: 152px;
  font-size: 0.8125rem;
  color: var(--ink-3);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.sheet__note {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: balance;
}

.sheet__cta {
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  margin-top: 1.15rem;
  min-height: 3rem;
  padding: 0.7rem 1.1rem;
  font-size: 0.9375rem; font-weight: 600;
  color: #fff;
  background: var(--spotify-deep);
  border-radius: 12px;
  transition: filter 0.25s var(--ease), transform 0.25s var(--ease);
}
.sheet__cta svg { width: 18px; height: 18px; fill: var(--spotify); flex: none; }
.sheet__cta:hover { filter: brightness(1.15); transform: translateY(-1px); }

/* Short viewports (landscape phone): tighten so the panel fits without scrolling. */
@media (max-height: 30rem) {
  .sheet__panel { padding-top: 1.05rem; padding-bottom: 1.05rem; }
  .sheet__title { font-size: 1.25rem; }
  .sheet__player { margin-top: 0.8rem; }
  .sheet__note { margin-top: 0.65rem; }
  .sheet__cta { margin-top: 0.8rem; min-height: 2.75rem; }
  .sheet__close { top: 0.6rem; right: 0.6rem; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* --- "also by kuchr" peek --------------------------------------------------- */
.peek {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 0.5rem 0.2rem;
  color: var(--ink-3);
  animation: rise 0.75s var(--ease) 0.3s both;
  transition: color 0.25s var(--ease);
}
.peek__thumbs { display: flex; gap: 0.3rem; }
.peek__thumbs img {
  width: 1.7rem; height: 1.7rem;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgb(255 255 255 / 0.18);
  transition: transform 0.28s var(--ease);
}
.peek__label {
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.09em; text-transform: lowercase;
}
.peek__chev { width: 14px; height: 14px; transition: transform 0.28s var(--ease); }
.peek:hover { color: var(--ink-2); }
.peek:hover .peek__chev { transform: translateY(3px); }
.peek:hover .peek__thumbs img { transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Catalog — deliberately quiet
   -------------------------------------------------------------------------- */
.catalog {
  position: relative;
  z-index: 1;
  padding:
    clamp(3rem, 9vw, 5.5rem)
    calc(env(safe-area-inset-right) + 1.25rem)
    calc(env(safe-area-inset-bottom) + 3rem)
    calc(env(safe-area-inset-left) + 1.25rem);
  background: linear-gradient(180deg, transparent, rgb(3 5 7 / 0.75) 18%, #030507 45%);
}

/* --------------------------------------------------------------------------
   Next release — noticeable, but never louder than the current single
   -------------------------------------------------------------------------- */
.next {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 3.5vw, 1.35rem);
  max-width: 30rem;
  margin: 0 auto clamp(2.5rem, 7vw, 3.75rem);
  padding: 0.85rem;
  border: 1px solid rgb(224 167 101 / 0.24);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgb(224 167 101 / 0.07), rgb(224 167 101 / 0.02) 55%, transparent),
    var(--glass);
}

.next__art {
  position: relative;
  flex: none;
  width: clamp(5.5rem, 22vw, 7rem);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 11px;
  overflow: hidden;
  cursor: pointer;
  background: #14100c;
  box-shadow: 0 6px 20px -8px rgb(0 0 0 / 0.7);
  /* Suppress the iOS long-press callout and any text selection, so a press-and-hold
     reaches the peek handler instead of the OS menu. */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.next__veil,
.next__peek {
  position: absolute; inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* JPEG first as the fallback, then the WebP pair for anything supporting image-set. */
.next__veil {
  background-image: url('/assets/img/next-veil-320.jpg');
  background-image: image-set(
    url('/assets/img/next-veil-320.webp') 1x,
    url('/assets/img/next-veil-560.webp') 2x
  );
}

/* The partial reveal sits on top of the veil and fades in. Both are pre-blurred, so
   this costs nothing to animate and never resolves into a legible image. */
.next__peek {
  background-image: url('/assets/img/next-peek-320.jpg');
  background-image: image-set(
    url('/assets/img/next-peek-320.webp') 1x,
    url('/assets/img/next-peek-560.webp') 2x
  );
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}
@media (hover: hover) {
  .next__art:hover .next__peek { opacity: 1; }
}
.next__art:focus-visible .next__peek,
.next__art.is-peeking .next__peek { opacity: 1; }

/* A slow band of light travelling across the veil, to catch the eye once. */
.next__art::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgb(255 236 210 / 0.22) 50%, transparent 60%);
  translate: -110% 0;
  animation: glint 6.5s var(--ease) 1.6s infinite;
  pointer-events: none;
}
@keyframes glint {
  0%, 72% { translate: -110% 0; }
  100%    { translate: 110% 0; }
}

.next__hint {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.75rem 0.3rem 0.4rem;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgb(255 255 255 / 0.78);
  background: linear-gradient(180deg, transparent, rgb(10 7 4 / 0.75));
  pointer-events: none;
}
.next__hintA, .next__hintB {
  display: block;
  transition: opacity 0.35s var(--ease);
}
.next__hintB { position: absolute; inset: auto 0 0.4rem; opacity: 0; }
@media (hover: hover) {
  .next__art:hover .next__hintA { opacity: 0; }
  .next__art:hover .next__hintB { opacity: 1; }
}
.next__art:focus-visible .next__hintA,
.next__art.is-peeking .next__hintA { opacity: 0; }
.next__art:focus-visible .next__hintB,
.next__art.is-peeking .next__hintB { opacity: 1; }

.next__text { min-width: 0; }
.next__eyebrow {
  font-size: 0.625rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--next);
}
.next__title {
  margin-top: 0.3rem;
  font-size: clamp(1rem, 4.2vw, 1.1875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}
.next__sub {
  margin-top: 0.28rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.catalog__title {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: clamp(1.4rem, 4vw, 2.2rem);
}

.catalog__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 3vw, 1.25rem);
  max-width: 30rem;
  margin-inline: auto;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.card__art {
  display: block;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 6px 18px -6px rgb(0 0 0 / 0.6);
}
.card__art img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card__text { display: flex; flex-direction: column; gap: 0.1rem; padding: 0 0.15rem 0.15rem; }
.card__name {
  font-size: 1rem; font-weight: 600; letter-spacing: -0.015em;
}
.card__hint {
  font-size: 0.75rem; color: var(--ink-3);
  transition: color 0.3s var(--ease);
}
.card:hover, .card:focus-visible {
  transform: translateY(-3px);
  border-color: rgb(255 255 255 / 0.26);
  background: var(--glass-hi);
}
.card:hover .card__hint { color: var(--ink-2); }
.card[aria-current='true'] { border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Artist
   -------------------------------------------------------------------------- */
.artist {
  max-width: 30rem;
  margin: clamp(3rem, 9vw, 4.5rem) auto 0;
  text-align: center;
}
.artist__avatar {
  width: 4.5rem; height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.9rem;
  border: 1px solid rgb(255 255 255 / 0.16);
}
.artist__name {
  font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.34em; text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.artist__bio {
  margin-top: 0.7rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-3);
  text-wrap: balance;
}
.artist__social {
  display: flex; justify-content: center; gap: 0.6rem;
  margin-top: 1.5rem;
}
.artist__social a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 1.05rem;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.artist__social svg { width: 15px; height: 15px; fill: currentColor; }
.artist__social a:hover {
  color: var(--ink);
  border-color: rgb(255 255 255 / 0.3);
  transform: translateY(-2px);
}
.artist__credit {
  margin-top: 1.6rem;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: rgb(255 255 255 / 0.26);
}

/* --------------------------------------------------------------------------
   No-JS fallback
   -------------------------------------------------------------------------- */
.nojs {
  position: relative; z-index: 5;
  max-width: 30rem; margin: 0 auto; padding: 2rem 1.25rem 3rem;
  text-align: center;
}
.nojs h2 { font-size: 1rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.nojs p { margin-top: 1rem; font-size: 0.9375rem; }
.nojs strong { display: block; margin-bottom: 0.35rem; }
.nojs a {
  display: inline-block; margin: 0.2rem 0.3rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.8125rem; color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Entrance
   -------------------------------------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Larger screens
   -------------------------------------------------------------------------- */
@media (min-width: 40rem) {
  .hero__inner { max-width: 29rem; }
  .svc { min-height: 3.875rem; }
  .catalog__cards { gap: 1.25rem; }
}

@media (min-width: 64rem) {
  /* Buttons and gaps are all a little taller at this breakpoint, so the furniture below
     the artwork reserves more than it does on phones. */
  .art { width: max(6rem, min(34vw, calc(100svh - 34.25rem), 26.5rem)); }
  .hero__inner { max-width: 30rem; }
}

/* A wide but short desktop window (a 720p screen, or a half-height browser) has plenty
   of width and none to spare vertically. Tighten the furniture so the artwork — the
   whole point of the page — doesn't get squeezed down to a thumbnail. */
@media (min-width: 64rem) and (max-height: 46rem) {
  .hero__inner { gap: 1.1rem; }
  .svc { min-height: 3.5rem; }
  .art { width: max(6rem, min(34vw, calc(100svh - 31rem), 26.5rem)); }
}

/* Shorter phones (iPhone SE at 667, anything with browser chrome showing) — tighten
   the furniture so the artwork keeps a usable size instead of being squeezed. */
@media (max-height: 44rem) and (orientation: portrait) {
  .hero__inner { gap: 0.9rem; }
  .meta__title { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .svc { min-height: 3.25rem; }
  .peek { padding-top: 0.6rem; }
  /* Everything below the artwork is smaller here, so it reserves less and the artwork
     gets the difference back — otherwise a 568px phone squeezes it down to nothing. */
  .art { width: max(6rem, min(70vw, calc(100svh - 28.25rem), 25rem)); }
}

/* --------------------------------------------------------------------------
   Landscape phone — where link-in-bio pages usually fall apart.
   Two columns: artwork left, everything actionable right.

   Deliberately last. A landscape phone is ~844px wide, so it also matches the
   min-width blocks above; at equal specificity the later rule wins, and this is
   the more specific situation.
   -------------------------------------------------------------------------- */
@media (orientation: landscape) and (max-height: 34rem) {
  .hero__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 21rem);
    align-items: center;
    /* Split the axes: a wide column gap separates artwork from content, but the three
       stacked rows on the right need to stay tight or the peek strip falls off a 390px
       screen. A single `gap` can't do both. */
    column-gap: clamp(1.25rem, 4vw, 2.5rem);
    row-gap: 0.8rem;
    max-width: 44rem;
    /* Both pills sit top-left here, clear of the centred grid, so the vertical
       reservation isn't needed — and 390px of height can't spare it. */
    padding-top: 0;
  }
  /* Three rows in the right-hand column now: title, buttons, preview trigger. */
  .art { width: min(38vw, 58svh, 15rem); grid-row: span 3; }
  .meta { text-align: left; grid-column: 2; align-self: end; }
  .meta__title { font-size: clamp(1.6rem, 5.2vw, 2.2rem); }
  .listen { grid-column: 2; align-self: start; gap: 0.45rem; }
  .preview { grid-column: 2; justify-self: start; margin-top: 0; padding-left: 0.35rem; }
  .svc { min-height: 3rem; padding-block: 0.5rem; border-radius: 11px; }
  .svc__name { font-size: 0.9375rem; }
  /* Both pills share the hero's top slot, so both move out of the centre here —
     centred, they would land on top of the track title in this two-column layout. */
  .backpill,
  .tease {
    top: calc(env(safe-area-inset-top) + 0.5rem);
    left: calc(env(safe-area-inset-left) + 1.25rem);
    translate: 0 0;
  }
  .peek { padding-top: 0.5rem; }
}

/* --------------------------------------------------------------------------
   Reduced motion — kill ambience, keep affordances.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__bg img { transform: scale(1.12); }
  .art::after { display: none; }
}
