/* ============================================================
   SIDE A — a case study you listen to
   ============================================================ */
.sa {
  position: relative;
  background: #111111; /* the app's own background: screens melt into the page */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  color: var(--bone);
}
.sa .sa-kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--smoke);
}
.sa .sa-kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: var(--neon-glow);
}

/* ---------- hero: the record and its sleeve ---------- */
.sa-hero {
  position: relative; min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto; column-gap: var(--gut);
  padding: 18vh var(--gut) 16vh;
}
.sa-hero-meta {
  position: absolute; top: 12vh; left: var(--gut); display: flex; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--smoke);
}
.sa-hero-meta b { color: #fff; font-weight: 500; text-shadow: var(--neon-glow); }
.sa-title {
  grid-column: 1; grid-row: 1; align-self: end;
  display: flex; flex-direction: column;
  font-weight: 600; font-size: clamp(110px, 14.5vw, 270px); line-height: 0.78; letter-spacing: -0.065em;
  will-change: transform, opacity;
}
.sa-title span:last-child { padding-left: 0.04em; }
.sa-tag {
  grid-column: 1; grid-row: 2; margin-top: 5vh;
  font-size: clamp(20px, 2.3vw, 36px); font-weight: 500; letter-spacing: -0.02em; color: var(--mist);
}
.sa-facts {
  grid-column: 1; grid-row: 3; margin-top: 6vh;
  display: flex; gap: clamp(28px, 4vw, 64px); flex-wrap: wrap;
}
.sa-facts dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--smoke); margin-bottom: 8px; }
.sa-facts dd { font-size: 14px; color: var(--bone); }

.sa-record {
  grid-column: 2; grid-row: 1 / span 3; align-self: center; justify-self: start;
  position: relative; width: min(34vw, 540px); aspect-ratio: 1;
  will-change: transform;
}
.sa-sleeve {
  position: absolute; inset: 0; z-index: 2; overflow: hidden; background: #fff;
  box-shadow: 0 60px 120px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform-origin: 30% 80%; will-change: transform;
}
.sa-sleeve img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 54%; }
.sa-sleeve span {
  position: absolute; left: 6%; bottom: 5.5%;
  font-family: var(--mono); font-size: clamp(8px, 0.7vw, 10.5px); letter-spacing: 0.22em; color: #050506; opacity: 0.7;
}
.sa-vinyl { position: absolute; inset: 2.5%; z-index: 1; will-change: transform; }
.sa-disc {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 31%, rgba(255, 255, 255, 0.04) 31.4%, transparent 32.2%),
    repeating-radial-gradient(circle at 50% 50%, #0d0d0f 0 1.1px, #1d1d21 1.1px 2.5px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 60px rgba(255, 255, 255, 0.05), 0 40px 80px -10px rgba(0, 0, 0, 0.75), inset 0 0 0 5px #060607, inset 0 0 0 6px rgba(255, 255, 255, 0.08);
  will-change: transform;
}
.sa-label {
  position: absolute; inset: 34%; border-radius: 50%; background: #ecebe7; color: #050506;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9%;
  font-family: var(--mono); font-size: clamp(7px, 0.62vw, 10px); letter-spacing: 0.2em;
}
.sa-label span:first-child { font-family: var(--sans); font-weight: 600; font-size: 1.9em; letter-spacing: -0.02em; }
.sa-label i { width: 7%; aspect-ratio: 1; border-radius: 50%; background: #050506; }
.sa-sheen {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 200deg, transparent 0 6%, rgba(255, 255, 255, 0.13) 11%, transparent 17% 52%, rgba(255, 255, 255, 0.08) 60%, transparent 67%);
  -webkit-mask: radial-gradient(circle, transparent 0 34%, #000 34.5%);
          mask: radial-gradient(circle, transparent 0 34%, #000 34.5%);
}
.sa-cue {
  position: absolute; right: var(--gut); bottom: 15vh; display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--smoke);
}
.sa-cue i { width: 1px; height: 46px; background: linear-gradient(#fff, transparent); animation: saCue 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes saCue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- pinned scenes ---------- */
.sa-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gut);
}

/* lyrics */
.sa-lyrics { height: 280vh; }
.sa-lyric {
  margin-top: 5vh; max-width: 15ch;
  font-weight: 600; font-size: clamp(44px, 7vw, 128px); line-height: 0.96; letter-spacing: -0.05em;
}
.sa-lyric .w { color: #232327; transition: color 0.6s var(--ease), text-shadow 0.8s var(--ease); }
.sa-lyric .w.on { color: #fff; text-shadow: 0 0 34px rgba(255, 255, 255, 0.18); }
.sa-story {
  margin-top: 7vh; max-width: 48ch; opacity: 0;
  font-size: clamp(16px, 1.3vw, 20px); line-height: 1.6; color: var(--mist);
}

/* chapters: big screens that rise into place */
.sa-chapter { padding: 20vh var(--gut) 8vh; }
.sa-chapter-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gut); row-gap: 3vh;
  align-items: end; margin-bottom: 9vh;
}
.sa-chapter-head .sa-kicker { grid-column: 1 / -1; }
.sa-chapter-head h2 { font-weight: 600; font-size: clamp(38px, 5vw, 92px); line-height: 0.92; letter-spacing: -0.045em; }
.sa-chapter-head p { font-size: clamp(16px, 1.35vw, 21px); line-height: 1.55; color: var(--mist); max-width: 40ch; }
.sa-chapter-media {
  --rise: 0;
  opacity: calc(0.15 + var(--rise) * 0.85);
  transform: translate3d(0, calc((1 - var(--rise)) * 14vh), 0) scale(calc(0.9 + var(--rise) * 0.1));
  transform-origin: 50% 0;
  will-change: transform, opacity;
}
.sa-chapter.is-pair .sa-chapter-media { display: grid; grid-template-columns: 1fr 1fr; gap: 2vw; align-items: start; }
.sa-chapter.is-pair .sa-frame:nth-child(2) { margin-top: 12vh; }
.sa-frame {
  position: relative; border-radius: clamp(8px, 1vw, 16px); overflow: hidden; background: #111;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 80px 140px -50px rgba(0, 0, 0, 0.95);
}
.sa-frame img { display: block; width: 100%; height: auto; transition: transform 1.4s var(--ease); }
.sa-frame:hover img { transform: scale(1.012); }
.sa-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.06), transparent 30%);
}

/* sessions: a horizontal roll */
.sa-covers { height: 460vh; }
.sa-covers .sa-sticky { justify-content: flex-start; padding: 11vh 0 0; }
.sa-covers-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gut); row-gap: 3vh; align-items: end;
  padding: 0 var(--gut); margin-bottom: 5vh;
}
.sa-covers-head .sa-kicker { grid-column: 1 / -1; }
.sa-covers-head h2 { font-weight: 600; font-size: clamp(38px, 5vw, 92px); line-height: 0.92; letter-spacing: -0.045em; }
.sa-covers-head p { font-size: clamp(16px, 1.35vw, 21px); line-height: 1.55; color: var(--mist); max-width: 40ch; }
.sa-track { display: flex; gap: clamp(18px, 2.2vw, 36px); width: max-content; padding: 0 var(--gut); will-change: transform; }
.sa-cover { width: clamp(260px, 27vw, 440px); }
.sa-cover figure {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #fff;
}
.sa-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.sa-cover:hover img { transform: scale(1.05); }
.sa-time {
  position: absolute; right: 10px; bottom: 10px; padding: 3px 7px; border-radius: 4px;
  background: #050506; color: #fff; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em;
}
.sa-cover-n { display: block; margin-top: 20px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; color: var(--smoke); }
.sa-cover h3 { margin-top: 8px; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; }
.sa-cover p { margin-top: 10px; font-size: clamp(16px, 1.25vw, 20px); font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.sa-cover small { display: block; margin-top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--smoke); text-transform: uppercase; }
.sa-covers-bar { position: absolute; left: var(--gut); right: var(--gut); bottom: 11vh; height: 1px; background: rgba(255, 255, 255, 0.12); }
.sa-covers-bar i { display: block; height: 100%; background: #fff; box-shadow: var(--neon-glow); transform: scaleX(0); transform-origin: left; }

/* focus: countdown → Built. */
.sa-focus { height: 320vh; }
.sa-focus .sa-sticky { align-items: center; text-align: center; }
.sa-focus .sa-kicker { justify-content: center; }
.sa-dial { position: relative; width: min(50vh, 78vw); aspect-ratio: 1; margin-top: 4vh; }
.sa-ring { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.sa-ring circle { fill: none; }
.sa-ring-bg { stroke: rgba(255, 255, 255, 0.1); stroke-width: 0.6; }
.sa-ring-fg { stroke: #fff; stroke-width: 1.4; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6)); }
.sa-face {
  position: absolute; inset: 9%; border-radius: 50%; background: #ecebe7; color: #050506;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.5%;
  transition: opacity 0.8s var(--ease), transform 1.1s var(--ease);
}
.sa-face span { font-family: var(--mono); font-size: clamp(9px, 1.2vh, 12px); letter-spacing: 0.24em; }
.sa-face b { font-weight: 600; font-size: min(8.4vh, 11vw); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sa-built {
  position: absolute; inset: 9%; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #fff, 0 0 40px rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3%;
  opacity: 0; transform: scale(0.94); transition: opacity 0.9s var(--ease) 0.1s, transform 1.2s var(--ease) 0.1s;
}
.sa-built b { font-weight: 600; font-size: min(14vh, 17vw); letter-spacing: -0.06em; line-height: 0.9; }
.sa-built span { font-family: var(--mono); font-size: clamp(9px, 1.2vh, 12px); letter-spacing: 0.24em; color: var(--mist); }
.sa-orbit {
  position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16);
  opacity: 0; transform: scale(0.8); transition: opacity 1.4s var(--ease), transform 1.8s var(--ease);
}
.sa-orbit.o1::before {
  content: ""; position: absolute; top: -4px; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%;
  background: #fff; box-shadow: var(--neon-glow);
}
.sa-dial.is-built .sa-face { opacity: 0; transform: scale(0.88); }
.sa-dial.is-built .sa-built { opacity: 1; transform: none; }
.sa-dial.is-built .sa-ring { opacity: 0; transition: opacity 0.6s; }
.sa-dial.is-built .o1 { opacity: 1; transform: scale(1.18); animation: saOrbit 14s linear infinite; }
.sa-dial.is-built .o2 { opacity: 0.6; transform: scale(1.6); transition-delay: 0.12s; }
.sa-dial.is-built .o3 { opacity: 0.3; transform: scale(2.15); transition-delay: 0.24s; }
@keyframes saOrbit { from { rotate: 0deg; } to { rotate: 360deg; } }
.sa-focus-line {
  margin-top: 6vh; font-size: clamp(20px, 2.3vw, 36px); font-weight: 500; letter-spacing: -0.02em;
  opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease), transform 1.2s var(--ease);
}
.sa-focus-line em { display: block; font-style: normal; color: var(--smoke); }
.sa-focus-line.on { opacity: 1; transform: none; }

/* mobile */
.sa-mobile { padding: 20vh var(--gut) 6vh; }
.sa-phones { display: flex; justify-content: center; align-items: flex-start; gap: clamp(16px, 3vw, 56px); }
.sa-phone {
  width: clamp(190px, 20vw, 320px); aspect-ratio: 440 / 956; padding: clamp(5px, 0.5vw, 8px);
  border-radius: clamp(28px, 2.8vw, 46px); background: #0c0c0e; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 80px 140px -50px #000;
}
.sa-phone img { width: 100%; height: 100%; object-fit: cover; border-radius: clamp(23px, 2.35vw, 39px); }
.sa-phone:nth-child(1), .sa-phone:nth-child(3) { margin-top: 12vh; }
.sa-phone.r { transition-delay: calc(var(--k) * 0.14s); }

/* outro */
.sa-outro { min-height: 92vh; display: flex; align-items: center; padding: 0 var(--gut); }
.sa-outro-line { font-weight: 600; font-size: clamp(46px, 8.4vw, 160px); line-height: 0.9; letter-spacing: -0.055em; }

/* ---------- the player: the page is the session ---------- */
.sa-player {
  position: sticky; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: auto minmax(0, 1.1fr) auto minmax(0, 2.6fr) auto; align-items: center;
  gap: clamp(12px, 1.6vw, 26px); padding: 14px var(--gut);
  background: rgba(17, 17, 17, 0.82); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sa-player-cover { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; background: #fff; }
.sa-player-now { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sa-player-now b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-player-now span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--smoke); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-player-now.swap b, .sa-player-now.swap span { animation: saSwap 0.6s var(--ease) both; }
.sa-player-now.swap span { animation-delay: 0.06s; }
@keyframes saSwap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sa-play {
  width: 38px; height: 38px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.sa-play:hover { transform: scale(1.06); box-shadow: 0 0 18px rgba(255, 255, 255, 0.35); }
.sa-play i { width: 3px; height: 12px; background: #050506; border-radius: 1px; }
.sa.is-paused .sa-play i:first-child { width: 0; height: 0; margin-left: 4px; background: none; border-radius: 0; border-left: 11px solid #050506; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.sa.is-paused .sa-play i:last-child { display: none; }
.sa-progress { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--smoke); font-variant-numeric: tabular-nums; }
.sa-bar { flex: 1; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.sa-bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.sa-np-count { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--smoke); text-transform: uppercase; white-space: nowrap; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .sa-hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; padding-top: 18vh; }
  .sa-record { grid-column: 1; grid-row: 1; width: 66vw; justify-self: start; margin-bottom: 7vh; }
  .sa-title { grid-row: 2; font-size: 30vw; }
  .sa-tag { grid-row: 3; }
  .sa-facts { grid-row: 4; }
  .sa-cue { display: none; }
  .sa-lyric { font-size: 11vw; }
  .sa-chapter-head, .sa-covers-head { grid-template-columns: 1fr; }
  .sa-chapter.is-pair .sa-chapter-media { grid-template-columns: 1fr; }
  .sa-chapter.is-pair .sa-frame:nth-child(2) { margin-top: 0; }
  .sa-cover { width: 74vw; }
  .sa-phones { justify-content: flex-start; overflow-x: auto; padding-bottom: 20px; scroll-snap-type: x mandatory; }
  .sa-phone { flex: 0 0 62vw; scroll-snap-align: center; }
  .sa-phone:nth-child(1), .sa-phone:nth-child(3) { margin-top: 0; }
  .sa-player { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 10px; }
  .sa-progress { grid-column: 1 / -1; }
  .sa-np-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sa-chapter-media { opacity: 1; transform: none; }
  .sa-dial.is-built .o1 { animation: none; }
}
