:root {
  --fondo: #c5c5c5;        /* the grey of the section */
  --inchiostro: #000000;   /* text and lines */
  --spento: rgba(0, 0, 0, 0.45); /* the body text */
  --bordo-disco: #a9a9a9;  /* the thin ring of the record */
  --foro: #c5c5c5;         /* the centre hole, the colour of the page */
  --carta: #ece9e2;        /* the centre label */
  --osmo: cubic-bezier(0.625, 0.05, 0, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: "Mona Sans Variable", "Mona Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
a { color: inherit; text-decoration: none; }

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  padding: clamp(14px, 4.5vh, 44px) clamp(14px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 5vh, 56px);
  overflow: hidden;
}

.top { display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; align-items: baseline; }
.label { font-size: clamp(11px, 1vw, 14px); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-stretch: 110%; }
.intro { font-size: clamp(11px, 1vw, 14px); font-weight: 500; }

.albums {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4vw;
  align-items: stretch;
}

/* the record and its sleeve */
.visual {
  position: relative;
  align-self: center;
  justify-self: start;
  width: min(42vw, 68vh);
  aspect-ratio: 1;
  display: grid;
}
.visual__item {
  grid-area: 1 / 1;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
}
.visual__item[data-active] { opacity: 1; visibility: visible; pointer-events: auto; }
.sleeve {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: saturate(0.9);
}
.sleeve::after { /* a soft fold of light on the cardboard */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.10), rgba(255,255,255,0) 38%, rgba(0,0,0,0.12));
}
.record {
  position: relative;
  width: 90%; height: 90%;
  border: 1px solid var(--bordo-disco);
  border-radius: 50%;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  container-type: size;
  box-shadow: 0 0.6vmin 2.4vmin rgba(0,0,0,0.28);
  -webkit-tap-highlight-color: transparent;
}
.stage[data-dragging] , .stage[data-dragging] * { cursor: grabbing; }
.record__spin { position: absolute; inset: 0; will-change: transform; }
.record__art {
  position: absolute;
  width: 111.5%; height: 111.5%; left: -5.75%; top: -5.75%;
  background-size: cover; background-position: center;
}
.record__grooves { /* fine grooves cut into the image */
  position: absolute; inset: 0; border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 0 1.6px, rgba(0,0,0,0.16) 1.6px 2.1px, rgba(255,255,255,0.05) 2.1px 2.6px),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.18) 31%, rgba(0,0,0,0) 32.5%, rgba(0,0,0,0) 61%, rgba(0,0,0,0.16) 62%, rgba(0,0,0,0) 63.5%);
  mix-blend-mode: multiply;
  opacity: var(--solchi, 0.5);
}
.record__label {
  position: absolute; left: 50%; top: 50%;
  width: 34%; height: 34%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--carta);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 11% 0;
  font-size: 2.1cqw;
  white-space: nowrap;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: #222;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.record__label span { position: absolute; left: 0; right: 0; text-align: center; line-height: 1; }
.record__label span:first-child { top: 17%; }
.record__label span:last-child { bottom: 17%; font-weight: 400; letter-spacing: 0.04em; }
.record__label::before { /* a thin printed ring on the paper */
  content: ""; position: absolute; inset: 7%; border-radius: 50%; border: 1px solid rgba(0,0,0,0.12);
}
.record__shine { /* the light of the room stays still while the record turns under it */
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 20deg at 50% 50%, rgba(255,255,255,0) 0deg, rgba(255,255,255,0.22) 22deg, rgba(255,255,255,0) 50deg, rgba(255,255,255,0) 180deg, rgba(255,255,255,0.14) 204deg, rgba(255,255,255,0) 232deg, rgba(255,255,255,0) 360deg);
  mix-blend-mode: screen;
  opacity: 0.8;
  transition: opacity 0.5s var(--osmo);
}
.record__hole {
  position: absolute; left: 50%; top: 50%;
  width: 11%; height: 11%;
  max-width: 5em; max-height: 5em;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--foro);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
  pointer-events: none;
}

/* the text column */
.info { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.years {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: clamp(6px, 2vh, 20px);
  border-bottom: 1px solid var(--inchiostro);
  font-size: clamp(11px, 1vw, 14px); font-weight: 600;
}
.years__list { display: grid; grid-template-columns: repeat(3, auto); gap: clamp(18px, 4vw, 64px); }
.year { padding: 0.1em 0; overflow: clip; opacity: 0.3; transition: opacity 0.35s var(--osmo); }
.year[data-active] { opacity: 1; }
.all { display: inline-flex; align-items: center; gap: 0.5em; text-transform: uppercase; overflow: clip; padding: 0.1em 0; }
.all svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform 0.5s var(--osmo); }

.texts { flex: 1; display: grid; min-height: 0; }
.text {
  grid-area: 1 / 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: clamp(8px, 3vh, 30px);
  opacity: 0; visibility: hidden; pointer-events: none;
}
.text[data-active] { opacity: 1; visibility: visible; pointer-events: auto; }
.title { font-size: clamp(14px, 1.6vw, 24px); font-weight: 700; text-transform: uppercase; font-stretch: 105%; letter-spacing: -0.01em; }
.mid { display: flex; flex-direction: column; gap: 0.8em; max-width: 24em; font-size: clamp(10px, 0.95vw, 13px); line-height: 1.3; }
.avail { font-weight: 600; }
.body { color: var(--spento); font-weight: 450; }
.buttons { display: flex; }
.btn {
  position: relative; flex: 1;
  padding: clamp(8px, 2.4vh, 22px) 1em;
  border: 1px solid var(--inchiostro);
  font-size: clamp(10px, 0.9vw, 13px); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  text-align: center; overflow: hidden;
}
.btn + .btn { border-left: 0; }
.btn::after {
  content: ""; position: absolute; inset: 0 -1em -2em;
  background: var(--inchiostro);
  transform: scaleY(0) skew(0, -5deg); transform-origin: bottom center;
  transition: transform 0.7s var(--osmo);
}
.btn .roll { position: relative; z-index: 1; }

/* every word rolls up into its copy, as on the original buttons */
.roll { display: inline-block; text-shadow: 0 1.25em currentColor; transition: translate 0.5s var(--osmo); clip-path: inset(6% -2% 4% 0); }
.line-mask { padding-bottom: 0.08em; margin-bottom: -0.08em; }

@media (hover: hover) and (pointer: fine) {
  .year:hover { opacity: 1; }
  .year:hover .roll, .all:hover .roll, .btn:hover .roll { translate: 0 -1.25em; }
  .all:hover svg { transform: translateX(0.25em); }
  .btn:hover::after { transform: scale(1) skew(0); }
  .btn:hover { color: var(--fondo); }
  .btn:hover .roll { text-shadow: 0 1.25em var(--fondo); }
  .record:hover .record__shine { opacity: 1; }
}

.ghost {
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px;
  fill: #111; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
  pointer-events: none; opacity: 0; z-index: 5;
}

/* phone: the record on top, the album underneath */
@media (max-width: 640px) {
  .stage { gap: clamp(8px, 2.4vh, 18px); }
  .top { grid-template-columns: auto 1fr; gap: 12px; }
  .intro { text-align: right; }
  .albums { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: clamp(8px, 2.4vh, 18px); }
  .visual { width: min(54vw, 36vh); justify-self: center; }
  .years__list { gap: 18px; }
  .all { font-size: 0; gap: 0; }
  .all svg { width: 15px; height: 15px; }
  .text { padding-top: 8px; gap: 6px; justify-content: flex-start; }
  .mid { gap: 4px; }
  .body { max-height: 3.9em; overflow: hidden; }
  .buttons { margin-top: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .roll, .btn::after, .year, .all svg { transition: none; }
}
