/* Both album illustrations share the campaign paper and ink. */
.pressing-intro {
  --stage-ink: var(--brand-primary);
  --intro-pad-top: max(16px, env(safe-area-inset-top, 0px));
  --intro-pad-bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  position: fixed;
  inset: 0;
  inline-size: 100%;
  max-inline-size: none;
  block-size: 100%;
  block-size: 100dvh;
  max-block-size: none;
  margin: 0;
  padding-block: calc(var(--intro-pad-top) * 1.44) calc(var(--intro-pad-bottom) * 1.44);
  padding-inline: max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-left, 0px));
  border: 0;
  overflow: auto;
  overscroll-behavior: contain;
  isolation: isolate;
  color: var(--stage-ink);
  background: radial-gradient(ellipse at 50% 40%, var(--surface-canvas) 18%, var(--surface-tinted) 100%);
}
.pressing-intro[open] {
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
}
.pressing-intro::backdrop { background: var(--surface-tinted); }
html:has(.pressing-intro[open]) { overflow: hidden; }
.pressing-intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: url("/assets/images/bg.png") center top / clamp(420px, 55vw, 750px) auto repeat;
  opacity: .56;
}
.studio-stage {
  position: relative;
  display: grid;
  justify-items: center;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  row-gap: clamp(4px, 1.2vh, 12px);
  inline-size: 100%;
  max-inline-size: 730px;
  min-inline-size: 0;
  align-self: stretch;
  padding-block: 4px;
}
.studio-gramophone {
  position: relative;
  inline-size: min(calc(100% + 20px), 720px, 88vh);
  inline-size: min(calc(100% + 20px), 720px, 88svh);
}
.horn-melody {
  position: absolute;
  inset: 0;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  overflow: hidden;
  pointer-events: none;
  fill: none;
  stroke: #634773;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.horn-note { opacity: 0; transform-box: fill-box; transform-origin: center; }
.horn-note-high { --note-delay: 920ms; stroke: #785889; }
.horn-note-low { --note-delay: 1840ms; }
.pressing-intro:not([data-audio="playing"]) .horn-melody { opacity: .75; }
.studio-gramophone img, .studio-cassette img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  object-fit: contain;
  user-select: none;
}
.pressing-intro[data-audio="blocked"] .studio-gramophone { cursor: pointer; }
.studio-stage h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 24px);
  margin: 0;
  padding-block: 0 .1em;
  color: var(--stage-ink);
  font: inherit;
  font-size: clamp(2.3rem, min(9.4vw, 7.6vh), 4.15rem);
  font-size: clamp(2.3rem, min(9.4vw, 7.6svh), 4.15rem);
  font-weight: 800;
  line-height: 1.12;
}
.studio-stage h2::before, .studio-stage h2::after {
  content: "";
  inline-size: clamp(22px, 7vw, 42px);
  block-size: 1px;
  background: var(--border-subtle);
}
.studio-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  inline-size: min(100%, var(--size));
  gap: 8px;
  align-self: end;
  margin-block-start: 12px;
}
.studio-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-inline-size: 100px;
  min-block-size: 48px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-control);
  background: var(--surface-default);
  color: var(--stage-ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  touch-action: manipulation;
}
.studio-actions #skip-intro {
  justify-content: flex-start;
  text-align: start;
  background: var(--brand-primary);
  color: var(--text-on-brand);
  border-color: var(--brand-primary);
}
.studio-actions button:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; }
.studio-actions svg {
  flex: none;
  inline-size: 18px;
  block-size: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-width: 1.7;
}
#intro-sound .studio-wave, #intro-sound[aria-pressed="true"] .studio-mute { display: none; }
#intro-sound[aria-pressed="true"] .studio-wave { display: block; }
.prepare-view { text-align: center; }
.prepare-view .view-heading { margin: 0; }
.studio-cassette {
  inline-size: min(100%, 430px);
  margin-inline: auto;
  margin-block: 0 clamp(12px, 2vh, 20px);
}
.cassette-face { position: relative; overflow: hidden; border-radius: 18px; }
.studio-progress {
  display: block;
  inline-size: min(28%, 100px);
  block-size: 3px;
  margin: 12px auto 0;
  border-radius: 2px;
  overflow: hidden;
  background: var(--border-subtle, #dfd5e5);
}
.studio-progress::after {
  content: "";
  display: block;
  block-size: 100%;
  border-radius: inherit;
  background: var(--brand-primary, #4a2a70);
  transform-origin: right center;
}
.cancel-prepare { width: 100%; }
@media (hover: hover) {
  .studio-actions button:hover { background: var(--surface-selected); }
  .studio-actions #skip-intro:hover { background: var(--brand-primary-deep); border-color: var(--brand-primary-deep); }
}
@media (prefers-reduced-motion: no-preference) {
  .pressing-intro[data-leaving] { animation: studio-exit 240ms ease-out forwards; }
  .pressing-intro[open]::before { animation: studio-notes 900ms ease-out both; }
  .pressing-intro[open] .horn-note {
    animation: horn-phrase 2760ms linear var(--note-delay, 0ms) infinite both;
  }
  .studio-actions button { transition: transform 160ms ease-out, background-color 160ms ease-out; }
  .studio-actions button:active { transform: scale(.97); }
  .pressing-intro[open] #skip-intro .glyph { animation: studio-skip-cue 1.15s ease-in-out .5s 2; }
  .prepare-view:not([hidden]) .studio-progress::after { animation: studio-progress var(--press-duration, 6500ms) linear both; }
  @supports (clip-path: ellipse(1% 1% at 50% 50%)) {
    .prepare-view:not([hidden]) .cassette-face::before,
    .prepare-view:not([hidden]) .cassette-face::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: url("/assets/studio/cassette.webp?v=illustrated") center / 100% 100% no-repeat;
      /* An 84px-radius crop around each spindle on the 1152 × 768 drawing. */
      clip-path: ellipse(7.291667% 10.9375% at var(--hub-x) var(--hub-y));
      transform-origin: var(--hub-x) var(--hub-y);
      animation: cassette-spool 1700ms linear infinite;
    }
    .cassette-face::before { --hub-x: 29.663077%; --hub-y: 47.906975%; }
    .cassette-face::after { --hub-x: 70.090357%; --hub-y: 48.169962%; }
  }
}
/* Coordinates use the drawing's 1152 × 864 viewBox, so the notes follow the horn at every size. */
@keyframes horn-phrase {
  0% { opacity: 0; transform: translate(0, 0) rotate(8deg) scale(.56); }
  12% { opacity: .96; transform: translate(-46px, -11px) rotate(3deg) scale(.76); }
  42% { opacity: .96; transform: translate(-154px, -41px) rotate(-6deg) scale(.98); }
  68% { opacity: .84; transform: translate(-241px, -82px) rotate(-11deg) scale(1.03); }
  92%, 100% { opacity: 0; transform: translate(-330px, -147px) rotate(-14deg) scale(.94); }
}
@media (prefers-reduced-motion: reduce) {
  .pressing-intro[open] .horn-note-lead {
    opacity: .74;
    transform: translate(-145px, -40px) rotate(-6deg);
  }
}
@keyframes cassette-spool { to { transform: rotate(1turn); } }
@keyframes studio-notes { from { opacity: .24; } to { opacity: .56; } }
@keyframes studio-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes studio-skip-cue { 0%, 100% { transform: none; } 48% { transform: translateX(-3px); } }
@keyframes studio-exit { to { opacity: 0; } }
@media (max-height: 570px) and (orientation: landscape) {
  .pressing-intro {
    --intro-pad-top: max(6px, env(safe-area-inset-top, 0px));
    --intro-pad-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
  .studio-stage { padding: 0; row-gap: 2px; }
  .studio-gramophone { inline-size: min(62vw, 84vh); inline-size: min(62vw, 84svh); }
  .studio-stage h2 { font-size: clamp(1.45rem, 7vh, 2.5rem); }
  .studio-actions { margin-block-start: 4px; }
  .studio-actions button { min-block-size: 44px; padding-block: 4px; }
  .prepare-view:not([hidden]) { display: grid; grid-template-columns: minmax(100px,.75fr) minmax(0,1fr); gap: 16px; align-items: center; }
  .studio-cassette { margin: 0; }
}
@media print { .pressing-intro { display: none !important; } }
