/* Ziyad: quiet Japanese-minimal system. One flat light-grey page, hairlines and
 * whitespace instead of boxes, one hinomaru red, greyscale everything else. Mobile-first. */

:root {
  --canvas: #ECEBE8;        /* page */
  --panel: #FFFFFF;         /* text on dark buttons */
  --ink: #111111;
  --muted: #555555;         /* 6.3:1 on the canvas */
  --hairline: rgba(17, 17, 17, 0.85);
  --soft-line: rgba(17, 17, 17, 0.12);
  --red: #E60012;           /* the only colour */

  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius-sm: 14px;
  --max: 1120px;
  --header: 5.4rem;         /* sticky nav height the pinned stage clears (two rows on phones) */
}

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

/* Proximity snap: the only snap point is .stage-snap, which settles the page on the open deck + crate. */
html { scroll-behavior: smooth; scroll-padding-top: 5rem; overflow-x: clip; scroll-snap-type: y proximity; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 0.6em;
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}
h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); max-width: 11ch; }
h3 { font-size: 1rem; font-weight: 500; letter-spacing: 0.06em; }

p { margin: 0 0 1em; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--canvas);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* --- Header / nav -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(236, 235, 232, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-header nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}
.brand__dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--red);
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.nav-links a:hover { color: var(--ink); text-decoration: underline; }

/* --- Layout: one flat page; whitespace separates the parts ---------------- */

main { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }

.section {
  position: relative;
  padding: 4.5rem 0 2rem;
}

.section h2 { position: relative; z-index: 0; }
/* A soft hinomaru tucked behind the first letter of every section title;
   translucent and offset up-left so the letter stays fully legible. */
.section h2 { isolation: isolate; }
.section h2::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.42em;
  top: -0.36em;
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.32;
  pointer-events: none;
}

.lede { font-size: 0.95rem; color: var(--muted); max-width: 52ch; margin-top: 0; }
.note { font-size: 0.8rem; color: var(--muted); }

/* Vertical Japanese accent text (decorative). */
.jp {
  position: absolute;
  top: 2.1rem;
  right: 1.1rem;
  writing-mode: vertical-rl;
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  color: #8a8a8a;
  user-select: none;
}

/* Hairline footer rows: small things left, a long rule, a bold label right. */
.rule-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.rule-row__line {
  flex: 1 1 auto;
  min-width: 2rem;
  height: 1px;
  background: var(--hairline);
}
.rule-row b,
.rule-row__label { color: var(--ink); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em; }

/* --- Hinomaru motifs ----------------------------------------------------- */

.hinomaru {
  position: absolute;
  border-radius: 50%;
  background: var(--red);
  pointer-events: none;
}

/* --- Hero ---------------------------------------------------------------- */

/* The whole first screen. */
.hero {
  position: relative;
  display: grid;
  gap: 2rem;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  min-height: calc(100svh - var(--header));
  padding: 2rem 0 1.5rem;
}
.hero__art {
  position: relative;
  justify-self: center;
  width: min(300px, 70vw);
}
.hero__art img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 999px;            /* the arch / stadium crop */
  background: #E4E3E0;
  filter: grayscale(1) contrast(1.05);
}
.hinomaru--hero {
  z-index: 1;
  left: -14%;
  top: -6%;
  width: 46%;
  aspect-ratio: 1;
  mix-blend-mode: multiply;
  opacity: 0.92;
}
.hero h1 span { display: block; }
.tagline { font-size: 0.95rem; color: var(--muted); max-width: 36ch; margin: 0 0 1.5rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }
.hero__rule { grid-column: 1 / -1; margin-top: 0; align-self: end; }

/* --- Buttons ------------------------------------------------------------- */

.btn,
.filters button {
  display: inline-block;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover,
.filters button:hover { background: var(--ink); color: var(--panel); }
.btn--solid { background: var(--ink); color: var(--panel); }
.btn--solid:hover { background: var(--red); border-color: var(--red); color: var(--panel); }
.btn--outline { background: transparent; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn:disabled:hover { background: transparent; color: var(--ink); }

/* --- Lists: hairline rows straight on the page ----------------------------- */

.list { border-top: 1px solid var(--hairline); }
.tracks,
.files { list-style: none; margin: 0; padding: 0; }
.tracks:empty,
.files:empty { display: none; }

.tracks li,
.files li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  padding: 0.8rem 0.1rem;
  border-bottom: 1px solid var(--soft-line);
  font-size: 0.9rem;
}

.track__n {
  min-width: 1.75rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.track__title,
.file__title { font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.85rem; }
.track__artist { flex: 1 1 12rem; color: var(--muted); font-size: 0.85rem; }
.track__duration { font-variant-numeric: tabular-nums; margin-left: auto; color: var(--muted); font-size: 0.8rem; }

.fallback { margin: 0.75rem 0; font-weight: 500; }
.shy { margin: 0.75rem 0 0; }

.embed { margin-top: 1.5rem; }
#spotify-embed-slot iframe {
  display: block;
  margin-top: 1rem;
  border: 0;
  border-radius: var(--radius-sm);
}

/* --- Role chips and filters ---------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.chip::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--ink);
}
.chip--spotify::before,
.chip--composition::before { background: var(--red); }
.chip--demo::before,
.chip--other::before { background: transparent; box-shadow: inset 0 0 0 1px var(--ink); }

.badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--panel);
  background: var(--red);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}
.filters button { padding: 0.5rem 1rem; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }

/* --- Pinned turntable stage (js/stage.js) -------------------------------- */

/* A tall runway; the stage pins for its length and scroll progress through it
 * (0 -> 1) opens the dust cover (phase 2, to 0.38), shrinks the deck into its
 * corner while the crate slides in (phase 3, 0.42 -> 0.84), then holds. */
.stage-runway {
  position: relative;
  height: 400vh;
  width: 100vw;
  margin-inline: calc(50% - 50vw);  /* full bleed out of main's column */
  overflow: clip;                   /* the swinging lid's empty margins; sticky still works */
}
/* Progress 0.9 of the 300vh travel: where the page parks with deck + crate in view. */
.stage-snap {
  position: absolute;
  left: 0;
  top: 270vh;
  width: 1px;
  height: 1px;
  scroll-snap-align: start;
  scroll-margin-top: 0;
  pointer-events: none;
}
/* Phones: deck on top, controls and a one-row swipe crate under it, all in one screen. */
.stage {
  --reveal: 1;              /* 0 -> 1 as the crate slides in (js/stage.js) */
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding: calc(var(--header) + 0.25rem) 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
/* Phones: the crate rises in from below. Inert (js/stage.js) until it has arrived. */
.stage__side {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  opacity: var(--reveal);
  translate: 0 calc(5rem * (1 - var(--reveal)));
  will-change: opacity, translate;
}

/* All deck layers live in the turntable photo's 1024 x 1024 pixel space, so
 * every position below is (px / 1024) and the whole stack scales together.
 * Just the object on the page: no box, no backdrop. */
/* Laid out at its final deck size; js/stage.js carries it to the big centred
 * pose of phase 2 with --tt-x / --tt-y / --tt-scale (all layers move together). */
.turntable {
  --tt-x: 0px;
  --tt-y: 0px;
  --tt-scale: 1;
  position: relative;
  flex: none;
  width: min(100%, 19.5rem, calc(100svh - var(--header) - 24rem));
  min-width: min(100%, 220px);
  aspect-ratio: 1;
  transform: translate(var(--tt-x), var(--tt-y)) scale(var(--tt-scale));
  transform-origin: 50% 50%;
  will-change: transform;
}
.turntable__base {
  position: absolute;
  inset: 0;
  background: url("../assets/turntable/turntable.webp") center / 100% 100% no-repeat;
  /* The baked contact shadow runs off the photo's right edge: feather it out
   * (the plinth itself ends at ~86%) so no straight cut shows. */
  -webkit-mask: linear-gradient(to right, #000 88%, transparent 99.5%);
  mask: linear-gradient(to right, #000 88%, transparent 99.5%);
}

/* Clear acrylic dust cover, three photographed poses. Hinge line runs along the
 * plinth's back edge, (455,440) -> (860,580); its midpoint is the transform origin.
 * Default is the open pose (no JS, reduced motion); js/stage.js drives the rest. */
.lid {
  position: absolute;
  inset: 0;
  background: center / 100% 100% no-repeat;
  transform-origin: 64.16% 49.8%;
  pointer-events: none;
  will-change: transform, opacity;
}
.lid--closed { background-image: url("../assets/turntable/lid-closed.webp"); opacity: 0; }
.lid--half { background-image: url("../assets/turntable/lid-half.webp"); opacity: 0; }
.lid--open { background-image: url("../assets/turntable/lid-open.webp"); }

.stage__controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.stage__controls .note { margin: 0; font-size: 0.72rem; line-height: 1.4; }

/* The platter's top face: a 406px circle centred on (438, 582), squashed to
 * the photo's ellipse (ry / rx = 108 / 203). Everything inside lies on the platter plane. */
.turntable__platter {
  position: absolute;
  left: 22.95%;
  top: 37.01%;
  width: 39.65%;
  aspect-ratio: 1;
  transform: scaleY(0.532);
}

/* Soft contact shadow: grows tight and dark as the record settles. */
.turntable__shadow {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55) 86%, rgba(0, 0, 0, 0) 100%);
  filter: blur(6px);
  opacity: 0;
  transform: translateY(5%) scale(0.92);
  transition: opacity 0.35s ease 0.45s, transform 0.35s ease 0.45s;
}

.vinyl {
  border-radius: 50%;
  background: url("../assets/turntable/vinyl-deck.webp") center / 100% 100% no-repeat;
}
.vinyl--deck {
  position: absolute;
  inset: 1.5%;
  opacity: 0;
  translate: 0 -26%;
  /* Leaving: wait for the arm to swing home, then lift the record off. */
  transition: opacity 0.3s ease 0.6s, translate 0.45s cubic-bezier(0.4, 0, 0.6, 1) 0.5s;
}
.vinyl__spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
/* The record's own label (33% of the disc), printed with the record's title. */
.vinyl__label {
  position: absolute;
  inset: 33.6%;
  border-radius: 50%;
  background: #F3F1EC;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  container-type: inline-size;
}
.vinyl__dot {
  position: absolute;
  left: 50%;
  top: 13%;
  width: 21%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--red);
}
.vinyl__label::after {
  /* the centre hole */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: #6d6d6d;
}
.vinyl__title {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 60%;
  font-size: 7.5cqi;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Fixed studio light: it stays put while the grooves turn under it. */
.vinyl__sheen {
  position: absolute;
  inset: 1.5%;
  border-radius: 50%;
  background:
    conic-gradient(from 20deg,
      transparent 0deg, rgba(255, 255, 255, 0.55) 22deg, transparent 52deg,
      transparent 180deg, rgba(255, 255, 255, 0.4) 204deg, transparent 236deg),
    radial-gradient(closest-side, transparent 92%, rgba(255, 255, 255, 0.18) 99%, transparent 100%);
  -webkit-mask: radial-gradient(closest-side, transparent 35%, #000 37%);
  mask: radial-gradient(closest-side, transparent 35%, #000 37%);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease 0.5s;
}

/* The spindle pokes up through the label hole (base 438,582 -> tip 434,563). */
.turntable__spindle {
  position: absolute;
  left: 41.95%;
  top: 54.9%;
  width: 0.85%;
  height: 2.05%;
  border-radius: 40% 40% 20% 20% / 30% 30% 15% 15%;
  background: linear-gradient(90deg, #6f6f6f, #f2f2f2 45%, #9a9a9a 70%, #4d4d4d);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease 0.6s;
}

.tonearm-base,
.tonearm {
  position: absolute;
  inset: 0;
  background: center / 100% 100% no-repeat;
  pointer-events: none;
}
.tonearm-base { background-image: url("../assets/turntable/tonearm-base.webp"); }
/* Pivot at (728, 560). Resting arm; swinging home on eject. */
.tonearm {
  background-image: url("../assets/turntable/tonearm.webp");
  transform-origin: 71.09% 54.69%;
  rotate: 0deg;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
  transition: rotate 0.8s cubic-bezier(0.45, 0, 0.3, 1), filter 0.8s ease;
}

.turntable[data-state="playing"] .vinyl--deck {
  opacity: 1;
  translate: 0 0;
  transition: opacity 0.12s ease, translate 0.45s cubic-bezier(0.3, 0, 0.3, 1);
}
.turntable[data-state="playing"] .vinyl__spin { animation: spin 1.8s linear infinite; }
.turntable[data-state="playing"] .turntable__shadow {
  opacity: 0.7;
  transform: translateY(1.5%) scale(1);
  transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}
.turntable[data-state="playing"] .vinyl__sheen,
.turntable[data-state="playing"] .turntable__spindle { opacity: 1; transition-delay: 0.3s; }
.turntable[data-state="playing"] .vinyl__sheen { opacity: 0.32; }
/* Once the record lands: cue lever up, swing over the lead-in, lower the stylus. */
.turntable[data-state="playing"] .tonearm {
  rotate: 18deg;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
  transition: rotate 0.8s cubic-bezier(0.45, 0, 0.3, 1) 0.45s;
  animation: arm-lift 0.8s ease-in-out 0.45s both;
}

.vinyl--flying {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  background-image: url("../assets/turntable/vinyl.webp");
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.25));
}

@keyframes spin { to { rotate: 360deg; } }
@keyframes arm-lift {
  0% { translate: 0 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
  20%, 80% { translate: 0 -0.7%; filter: drop-shadow(0 9px 6px rgba(0, 0, 0, 0.22)); }
  100% { translate: 0 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
}

.deck__now {
  margin: 0;
  min-height: 1.4em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.deck__player iframe {
  display: block;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(17, 17, 17, 0.04);
}
.deck__player:empty,
.deck__frames:empty { display: none; }
.deck__spotify iframe { border-radius: 12px; }

/* Prev / eject / next, plus the "open in" link pushed to the right. */
.transport {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
}
.transport .btn { padding: 0.4rem 1rem; font-size: 0.72rem; }
.transport .transport__skip { padding: 0.4rem 0.75rem; }
.transport__links { margin-left: auto; white-space: nowrap; }

/* Autoplay got blocked: a big red tap target right on the platter. */
.deck__tap {
  position: absolute;
  z-index: 5;
  left: 42.8%;
  top: 56.8%;
  translate: -50% -50%;
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--panel);
  background: var(--red);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.deck__tap:hover { background: var(--ink); }
.turntable[data-audio="paused"] .vinyl__spin { animation-play-state: paused; }

/* --- The crate: a horizontal, scroll-snapped run of sleeves (paged with the arrows) --- */
.crate { min-width: 0; }
.crate__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hairline);
}
.crate h2 {
  max-width: none;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.crate__jp { margin-left: 0.5rem; font-weight: 400; color: var(--muted); letter-spacing: 0.2em; }
.crate__pager {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.crate__arrow {
  width: 2rem;
  height: 2rem;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}
.crate__arrow:hover:not(:disabled) { border-color: var(--ink); }
.crate__arrow:disabled { opacity: 0.3; cursor: default; }

/* The shelf: square sleeves with tiny captions; the photo disc peeks out on hover. */
.shelf {
  --rows: 1;
  --cols: 3.4;              /* sleeves per screenful; the fraction peeks the next one */
  --gap: 0.9rem;
  position: relative;
  list-style: none;
  margin: 0;
  /* Room above for the disc peeking out of each sleeve (scrollers clip both axes). */
  padding: 1.1rem 0 0.25rem;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(var(--rows), auto);
  grid-auto-columns: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  gap: 1.4rem var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf__slot {
  position: relative;
  isolation: isolate;
  min-width: 0;
  scroll-snap-align: start;
}

.sleeve {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 0;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
}
.sleeve__art {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 3px;
  background: #FAF9F6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 10px 22px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.sleeve__art::before,
.sleeve__art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.sleeve__no {
  position: absolute;
  z-index: 1;
  right: 8%;
  top: 6%;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink);
}

/* 0 hinomaru: a single red sun */
.cover--0::before { left: 28%; top: 28%; width: 44%; height: 44%; background: var(--red); }
/* 1 night: black sleeve, small sun low-left, a white hairline */
.cover--1 { background: #151515; }
.cover--1 .sleeve__no { color: #f2f2f2; }
.cover--1::before { left: 12%; bottom: 14%; width: 20%; height: 20%; background: var(--red); }
.cover--1::after { left: 12%; right: 12%; top: 50%; height: 1px; border-radius: 0; background: rgba(255, 255, 255, 0.55); }
/* 2 three suns, fading in */
.cover--2 { background: #EFEEEB; }
.cover--2::before {
  left: 14%; top: 34%; width: 32%; height: 32%;
  background: var(--red);
  opacity: 0.22;
  box-shadow: 2.6rem 0 0 rgba(230, 0, 18, 0.55);
}
.cover--2::after { left: 54%; top: 34%; width: 32%; height: 32%; background: var(--red); }
/* 3 frame: L-shaped hairline ending in a black square, sun off the edge */
.cover--3::before { right: -16%; top: 16%; width: 52%; height: 52%; background: var(--red); }
.cover--3::after {
  left: 10%; right: 10%; bottom: 10%; height: 62%;
  border-radius: 0;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) right -1px bottom -1px / 7px 7px no-repeat;
}
/* 4 arch: a grey stadium "photo" with a sun overlapping its top */
.cover--4::before {
  left: 30%; top: 20%; width: 40%; height: 66%;
  border-radius: 999px;
  background: linear-gradient(160deg, #9b9b9b, #3b3b3b);
}
.cover--4::after { left: 20%; top: 12%; width: 28%; height: 28%; background: var(--red); mix-blend-mode: multiply; opacity: 0.92; }

.sleeve__flag {
  position: absolute;
  z-index: 2;
  left: 8%;
  bottom: 8%;
  display: none;
  padding: 0.1rem 0.5rem;
  font-size: 0.6rem;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--panel);
  background: var(--ink);
  border-radius: 999px;
}

.sleeve__caption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.45rem;
  padding-top: 0.3rem;
  border-top: 1px solid var(--hairline);
}
.sleeve__title {
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
}
.sleeve__by {
  font-size: 0.66rem;
  line-height: 1.35;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
}
.sleeve .chip { display: none; }

.sleeve:hover .sleeve__art,
.sleeve:focus-visible .sleeve__art { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 16px 30px rgba(0, 0, 0, 0.14); }
.sleeve:focus-visible { outline-offset: 3px; box-shadow: none; }

/* The photo disc tucked behind the top of its sleeve; slides out on hover/focus. */
.sleeve__disc {
  position: absolute;
  z-index: 0;
  left: 7%;
  top: 0;
  width: 86%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: url("../assets/turntable/vinyl.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
  pointer-events: none;
  transform: translateY(-12%);
  transition: transform 0.35s cubic-bezier(0.3, 1.2, 0.5, 1), opacity 0.2s ease;
}
.sleeve:hover + .sleeve__disc,
.sleeve:focus-visible + .sleeve__disc { transform: translateY(-20%) rotate(40deg); }

/* The record that's on the deck leaves an empty sleeve behind. */
.sleeve[aria-pressed="true"] .sleeve__art { opacity: 0.55; }
.sleeve[aria-pressed="true"] .sleeve__flag { display: inline-block; }
.sleeve[aria-pressed="true"] + .sleeve__disc { opacity: 0; transform: translateY(20%); }

/* --- Contact ------------------------------------------------------------- */

/* Thin L-shaped frame down the right and along the bottom, ending in a black square (720px+). */
.framed::after {
  display: none;
  content: "";
  position: absolute;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 55%;
  height: 70%;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) right 5px bottom 5px / 12px 12px no-repeat;
  pointer-events: none;
}
.framed { padding-bottom: 3rem; }
.hinomaru--contact {
  display: none;
  right: 18%;
  top: 22%;
  width: 4.5rem;
  height: 4.5rem;
}
#contact h2 { max-width: 18ch; font-size: clamp(1.6rem, 4.6vw, 2.8rem); overflow-wrap: normal; }
#contact .rule-row { position: relative; z-index: 1; }
.rule-row__label { white-space: nowrap; }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.socials a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.socials svg { width: 20px; height: 20px; }
.socials a:hover { background: var(--ink); color: var(--panel); }

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding: 1.5rem 1rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer p { margin: 0; }

/* --- Wider screens ------------------------------------------------------- */

@media (min-width: 720px) {
  :root { --header: 3.6rem; }
  main { padding: 0 1.5rem; }
  .section { padding-top: 7rem; }
  .jp { top: 7.1rem; right: 0.25rem; }
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto;
    align-items: center;
    gap: 2.5rem 3rem;
  }
  .hero__art { grid-column: 2; grid-row: 1; width: 280px; }
  .hero__text { grid-column: 1; grid-row: 1; padding-bottom: 1rem; }
  .hero__rule { grid-row: 2; }
  .framed { padding-bottom: 4.5rem; }
  .framed::after { display: block; right: 0; bottom: 0; }
  .framed .jp { right: 1.6rem; }
  .hinomaru--contact { display: block; }
  #contact .rule-row { margin-right: 2.4rem; }
  .socials { gap: 0.35rem; }
}

/* Desktop: deck big on the left, controls + a paged two- or three-row crate on
 * the right, all in the one pinned screen. Until the crate slides in, the deck
 * sits centred (shifted right by half the side column). */
@media (min-width: 900px) {
  .stage {
    --side: clamp(19rem, 30vw, 27rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--side);
    align-items: center;
    column-gap: 2.5rem;
    padding: calc(var(--header) + 0.5rem) 2rem 1rem;
  }
  .turntable {
    width: min(100%, calc((100svh - var(--header)) * 0.72));
    min-width: 0;
    justify-self: center;
  }
  /* Desktop: the crate slides in from the right. */
  .stage__side {
    width: 100%;
    gap: 1.1rem;
    translate: calc(6rem * (1 - var(--reveal))) 0;
  }
  .shelf { --rows: 2; --cols: 3; --gap: 1rem; }
  .sleeve .chip { display: inline-flex; align-self: flex-start; }
}
@media (min-width: 900px) and (min-height: 1020px) {
  .shelf { --rows: 3; }
}

/* --- Reduced motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .sleeve:hover .sleeve__art,
  .sleeve:focus-visible .sleeve__art,
  .sleeve:hover + .sleeve__disc,
  .sleeve:focus-visible + .sleeve__disc { transform: translateY(-12%) !important; }
  .sleeve:hover .sleeve__art,
  .sleeve:focus-visible .sleeve__art { transform: none !important; }
  /* No spin, no drop, no swing: the record just sits there and the arm rests on it. */
  .turntable .vinyl--deck,
  .turntable .tonearm { translate: none !important; }
  /* No pinned runway and no swinging cover: the deck sits there with its lid up. */
  .stage-runway { height: auto; }
  .stage-snap { display: none; }
  .stage { position: static; height: auto; padding-top: 4.5rem; }
  .turntable { transform: none !important; }
  .lid--closed,
  .lid--half { display: none; }
}
