/* ---------- Tokens (pulled from the album cover) ---------- */
:root {
  --night: #060a24;        /* deep ultramarine, page base */
  --cobalt: #1c2f9e;       /* the blue in the cover text */
  --lavender: #d7d2f5;     /* cloud highlights, main text */
  --haze: #8f88c4;         /* muted text */
  --ember: #ff8a4c;        /* the orange streaks */
  --vinyl: #000;

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--night);
  color: var(--lavender);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Background: blurred cover + vignette ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 70% at 50% 38%, rgba(6, 10, 36, 0) 0%, rgba(6, 10, 36, .55) 55%, var(--night) 100%),
    url("/bg.jpg") center 30% / cover no-repeat,
    var(--night);
}

/* ---------- Layout ---------- */
.page {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top, 0px) + 40px)
    22px
    calc(env(safe-area-inset-bottom, 0px) + 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.name {
  margin: 0 0 34px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: min(8.4vw, 3rem);
  line-height: 1;
  letter-spacing: .02em;
  text-align: center;
  color: var(--lavender);
  text-shadow: 0 0 28px rgba(110, 120, 255, .45), 0 2px 0 rgba(0, 0, 0, .35);
  white-space: nowrap;
}

/* ---------- Sleeve + vinyl ---------- */
/* --s is the sleeve size; the record pokes out ~half its width to the right */
.record {
  --s: min(58vw, 280px);
  position: relative;
  width: calc(var(--s) * 1.48);
  height: var(--s);
  margin-bottom: 40px;
}

.record__vinyl {
  position: absolute;
  z-index: 1;
  top: calc(var(--s) * .02);
  left: calc(var(--s) * .5);
  width: calc(var(--s) * .96);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow:
    0 18px 34px -14px rgba(0, 0, 0, .85),
    0 0 0 1px rgba(255, 255, 255, .05),
    0 0 70px -20px rgba(60, 80, 255, .4);
}

/* The sleeve: stationary, sits in front of the record */
.sleeve {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: var(--s);
  height: var(--s);
  border-radius: 2px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .22) 100%),
    url("/cover.jpg") center / cover no-repeat,
    var(--cobalt);
  box-shadow:
    /* shadow cast onto the record */
    10px 0 18px -4px rgba(0, 0, 0, .75),
    4px 0 4px -1px rgba(0, 0, 0, .55),
    /* sleeve lifting off the background */
    0 26px 44px -16px rgba(0, 0, 0, .9),
    0 0 0 1px rgba(255, 255, 255, .06);
}

/* Cardboard edges: a slight highlight on top/left, darker opening on the right */
.sleeve::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .18),
    inset -2px 0 0 rgba(0, 0, 0, .45),
    inset -10px 0 14px -10px rgba(0, 0, 0, .6);
}

.record__disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    /* outer rim */
    radial-gradient(circle closest-side, transparent 0 97%, #1a1a1a 98%, #040404 100%),
    /* run-out area by the label + lead-in band at the edge */
    radial-gradient(circle closest-side, transparent 0 47%, #090909 47% 55%, transparent 55% 93%, #0c0c0c 93% 95.5%, transparent 95.5%),
    /* fine grooves */
    repeating-radial-gradient(circle closest-side, #040404 0 1px, #161616 1.5px, #060606 2.3px),
    var(--vinyl);
  will-change: transform;
  animation: spin 20s linear infinite; /* one turn every 20 seconds */
}

.record__label {
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: url("/cover.jpg") center / cover no-repeat, var(--cobalt);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08);
}

/* Light reflection stays still while the record turns */
.record__sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    conic-gradient(from 20deg,
      transparent 0deg,
      rgba(215, 210, 245, .2) 22deg,
      transparent 48deg,
      transparent 180deg,
      rgba(255, 138, 76, .14) 202deg,
      transparent 228deg,
      transparent 360deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 48%, #000 50% 97%, transparent 98%);
          mask: radial-gradient(circle closest-side, transparent 0 48%, #000 50% 97%, transparent 98%);
}

.record__hole {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.2%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--night);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .12);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Links ---------- */
nav { width: 100%; }

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  border-top: 1px solid rgba(215, 210, 245, .14);
}

.links[hidden] { display: none; }

.links li { border-bottom: 1px solid rgba(215, 210, 245, .14); }

.link {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 0 6px;
  color: var(--lavender);
  text-decoration: none;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: .01em;
  transition: color .2s ease, background-color .2s ease;
}

.link__icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--haze);
  transition: color .2s ease;
}

.link:hover,
.link:active { background-color: rgba(28, 47, 158, .28); }

.link:hover .link__icon,
.link:active .link__icon { color: var(--ember); }

.link:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: -2px;
}

/* Platforms marked "soon" in config.js: visible but not clickable */
.link--soon { color: var(--haze); cursor: default; }

.link__note {
  margin-left: auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--haze);
}

.link--soon:hover,
.link--soon:active { background-color: transparent; }

.link--soon:hover .link__icon,
.link--soon:active .link__icon { color: var(--haze); }

.footer {
  margin-top: 36px;
  font-size: .8125rem;
  color: var(--haze);
  letter-spacing: .02em;
}

/* ---------- Load-in: one moment, the record arrives ---------- */
@media (prefers-reduced-motion: no-preference) {
  .record { animation: arrive .9s cubic-bezier(.2, .7, .2, 1) both; }
  .links  { animation: fade .6s ease .35s both; }
}

@keyframes arrive {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Reduced motion: record holds still ---------- */
@media (prefers-reduced-motion: reduce) {
  .record__disc { animation: none; }
  .link, .link__icon { transition: none; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 720px) {
  .page { padding-top: calc(env(safe-area-inset-top, 0px) + 72px); }
  .name { font-size: 3.4rem; margin-bottom: 44px; }
}
