/* Palette ricavata dalla locandina di "Forever Young": nero-bruciato, marrone-rosso, rosso fuoco, arancio, ambra, crema. */
:root {
  --bg: #0d0605;
  --panel: #150a07;
  --surface: rgba(255, 236, 220, 0.05);
  --surface-2: rgba(255, 236, 220, 0.09);
  --line: rgba(255, 150, 70, 0.22);
  --cream: #fff3e4;
  --muted: #d3b09c;
  --dim: #9c7b6b;
  --maroon: #4a1510;
  --red: #e2401c;
  --orange: #f5701a;
  --amber: #ffa62b;
  --cta: linear-gradient(90deg, #ff8a1f 0%, #ea3f1c 100%);
  --glow: 0 12px 34px -10px rgba(245, 112, 26, 0.7);
  --script: "Segoe Script", "Bradley Hand", "Brush Script MT", cursive;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(900px 600px at 80% 8%, rgba(245, 112, 26, 0.25), transparent 62%),
    radial-gradient(800px 600px at 5% 95%, rgba(120, 30, 16, 0.5), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* Copertina sfocata come atmosfera di fondo */
.backdrop {
  position: fixed;
  inset: -100px;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(80px) saturate(1.4) brightness(0.42);
  opacity: 0.9;
}

.icon { flex: none; }

/* Header */
.topbar { padding: 18px 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; }
.brand-mark { color: var(--orange); display: grid; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.15rem; letter-spacing: 0.06em; text-transform: uppercase; }
.brand-text small { font-size: 0.7rem; color: var(--muted); }
.brand-logo { display: block; height: 44px; width: auto; }
/* Struttura: stepper in fondo (mobile), copertina prima del contenuto solo nella schermata iniziale */
.shell {
  display: flex;
  flex-direction: column;
  padding: 0 20px 40px;
  min-height: calc(100vh - 78px);
  max-width: 1180px;
  margin: 0 auto;
}
body.has-player .shell { padding-bottom: 110px; }
.col-content { order: 1; width: 100%; max-width: 520px; margin: 0 auto; }
.col-art { order: 0; display: none; }
body[data-screen="landing"] .col-art { display: block; }
.stepper { order: 2; margin-top: auto; padding-top: 28px; }
body[data-screen="landing"] .stepper { display: none; }

/* Stepper */
.stepper ol { display: flex; list-style: none; margin: 0; padding: 0; }
.stepper li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--dim); }
.stepper li + li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.stepper li.is-done + li::before,
.stepper li.is-current::before { background: var(--orange); }
.stepper .num {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--dim);
  background: var(--panel);
  font-size: 0.75rem;
  font-weight: 700;
}
.stepper .num .icon { display: none; }
.stepper .is-current { color: var(--cream); }
.stepper .is-current .num { background: var(--cta); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.stepper .is-done .num { background: var(--orange); border-color: transparent; color: #fff; }
.stepper .is-done .num .n { display: none; }
.stepper .is-done .num .icon { display: block; }

/* Copertina */
.art-card {
  position: relative;
  width: min(260px, 66vw);
  margin: 6px auto 26px;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line);
}
.art-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-placeholder {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: linear-gradient(160deg, #f5701a, #4a1510 70%, #120806);
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cover-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 0;
  border-radius: 50%;
  background: var(--cta);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--glow);
}
.cover-play .i-pause { display: none; }
.cover-play.is-playing .i-play { display: none; }
.cover-play.is-playing .i-pause { display: block; }

/* Player Spotify in barra fissa */
.playerbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  height: 80px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.playerbar iframe { display: block; width: 100%; border: 0; }
.playerbar { visibility: hidden; }
.playerbar.is-ready { visibility: visible; }
.playerbar.is-failed { display: none; }

/* Pagine semplici (errore, home) */
.simple { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 24px; }
.simple h1 { margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.simple p { margin: 0; color: var(--muted); }

/* Desktop: contenuto | copertina, stepper in alto */
@media (min-width: 900px) {
  .topbar { padding: 26px 40px; }
  .shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "stepper stepper" "content art";
    column-gap: 64px;
    row-gap: 30px;
    align-items: center;
    padding: 0 40px 50px;
    min-height: calc(100vh - 210px);
  }
  body.has-player .shell { padding-bottom: 120px; }
  .stepper { grid-area: stepper; order: 0; margin: 0; }
  .col-content { grid-area: content; max-width: 540px; margin: 0; justify-self: end; }
  .col-art { grid-area: art; display: block; order: 0; }
  body[data-screen="landing"] .stepper { display: block; visibility: hidden; }

  .stepper ol { justify-content: center; }
  .stepper li { flex: none; flex-direction: row; gap: 10px; font-size: 0.85rem; }
  .stepper li + li::before { position: static; width: 72px; height: 2px; margin: 0 16px; }

  .art-card { width: min(520px, 100%); margin: 0; border-radius: 24px; }
  .cover-play { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
