/* ==========================================================
   LAVORI — prima/dopo, video, playlist
   ========================================================== */
.work { padding: clamp(110px, 13vw, 200px) var(--gutter) clamp(40px, 6vw, 80px); border-top: 1px solid var(--coal); }
.work--tail { border-top: 0; padding-top: clamp(60px, 8vw, 120px); }
.work__head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px 64px; align-items: end; margin-bottom: clamp(56px, 8vw, 110px); }
.work__head .section-tag { grid-column: 1 / -1; }
.work__title { font-size: clamp(48px, 8.5vw, 150px); font-weight: 900; line-height: .86; letter-spacing: -.045em; font-variation-settings: "wdth" 120; }
.work__intro { color: var(--silver); font-size: clamp(16px, 1.3vw, 20px); max-width: 42ch; }
.work__sub { display: flex; align-items: baseline; gap: 16px; margin: clamp(72px, 9vw, 130px) 0 28px; padding-top: 18px; border-top: 1px solid var(--coal); }
.ab > .work__sub { margin-top: 0; }
.work__sub p { color: var(--dim); }
.work__sub h3 { font-size: clamp(26px, 2.6vw, 40px); font-weight: 800; letter-spacing: -.02em; font-variation-settings: "wdth" 115; margin-left: auto; }

/* ---------- prima / dopo ---------- */
.ab__tracks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--coal); }
.ab__tracks button {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; text-align: left; padding: 16px 18px;
  border-right: 1px solid var(--coal); transition: background-color .4s, color .4s;
}
.ab__tracks button:last-child { border-right: 0; }
.ab__tracks button > span { grid-row: span 2; color: var(--dim); padding-top: .3em; }
.ab__tracks b { font-size: 17px; font-weight: 700; }
.ab__tracks small { color: var(--silver); font-size: 13px; }
.ab__tracks button:hover { background: var(--coal); }
.ab__tracks button[aria-selected="true"] { background: var(--white); color: var(--ink); }
.ab__tracks button[aria-selected="true"] span, .ab__tracks button[aria-selected="true"] small { color: var(--ink); }

.ab__stage { position: relative; border: 1px solid var(--coal); border-top: 0; }
.ab__wave { display: block; width: 100%; height: clamp(200px, 26vw, 340px); cursor: pointer; }
.ab__time { position: absolute; right: 16px; bottom: 12px; color: var(--silver); pointer-events: none; }

.ab__controls { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 28px; margin-top: 24px; }
.ab__play { width: 64px; height: 64px; border-radius: 50%; background: var(--white); display: grid; place-items: center; flex: none; transition: transform .4s var(--ease-out); }
.ab__play:hover { transform: scale(1.06); }
.ab__play span { width: 0; height: 0; border-left: 17px solid var(--ink); border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
.ab__play.is-playing span { width: 16px; height: 20px; margin: 0; border: 0; border-left: 5px solid var(--ink); border-right: 5px solid var(--ink); }

.ab__switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--graphite); border-radius: 999px; padding: 4px; isolation: isolate; }
.ab__switch button { position: relative; z-index: 1; padding: 12px 22px; font-weight: 600; font-size: 15px; color: var(--silver); transition: color .35s; white-space: nowrap; }
.ab__switch button[aria-checked="true"] { color: var(--ink); }
.ab__thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--white); transition: transform .55s var(--ease); }
.ab__switch[data-active="master"] .ab__thumb { transform: translateX(100%); }
.ab__state { color: var(--white); min-width: 14ch; }
.ab__hint { color: var(--dim); margin-left: auto; }
.ab__hint kbd { font: inherit; border: 1px solid var(--graphite); border-radius: 4px; padding: 0 .4em; color: var(--silver); }

/* ---------- video: nastro a tutta larghezza ---------- */
.reel { overflow: hidden; padding: 8px 0 clamp(20px, 3vw, 40px); cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.reel.is-dragging { cursor: grabbing; }
.reel:focus-visible { outline: 1px solid var(--graphite); outline-offset: -1px; }
.reel__track { display: flex; gap: clamp(12px, 1.4vw, 20px); width: max-content; will-change: transform; padding-left: var(--gutter); }
.reel__item { position: relative; height: clamp(360px, 52vh, 560px); overflow: hidden; background: var(--coal); flex: none; }
.reel__item video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; transition: transform 1s var(--ease-out), filter .6s; filter: grayscale(.85) contrast(1.05); }
.reel__item:hover video { transform: scale(1.03); filter: none; }
.reel__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; display: grid; gap: 2px;
  background: linear-gradient(transparent, rgba(12, 11, 12, .85)); pointer-events: none;
}
.reel__item figcaption span { color: var(--silver); }
.reel__item figcaption b { font-size: 17px; font-weight: 700; }
.reel__item figcaption small { color: var(--silver); font-size: 13px; }
@media (hover: none) { .reel__item video { filter: none; } }

/* ---------- playlist ---------- */
.playlist { display: grid; grid-template-columns: clamp(140px, 18vw, 240px) 1fr; gap: 20px clamp(24px, 3vw, 48px); align-items: center; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--coal); }
.playlist__cover { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.1); transition: filter .8s; }
.playlist:hover .playlist__cover, .playlist.is-loaded .playlist__cover { filter: none; }
.playlist__info > .mono:first-child { color: var(--dim); }
.playlist__name { font-size: clamp(32px, 4vw, 64px); font-weight: 900; letter-spacing: -.035em; line-height: .95; font-variation-settings: "wdth" 120; margin: 10px 0 6px; }
.playlist__by { color: var(--silver); }
.playlist__text { color: var(--silver); margin: 16px 0 24px; max-width: 46ch; }
.playlist__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; }
.playlist__note { color: var(--dim); margin-top: 18px; text-transform: none; letter-spacing: .02em; }
.playlist__player { grid-column: 1 / -1; }
.playlist__player:empty { display: none; }
.playlist__player iframe { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; }
.playlist.is-loaded .playlist__load { display: none; }

/* rimandi dalle righe dei servizi */
.track__link { grid-column: 2 / 4; justify-self: start; color: var(--white); border-bottom: 1px solid var(--graphite); padding-bottom: 2px; transition: border-color .3s; }
.track__link:hover { border-color: var(--white); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: clamp(16px, 4vw, 48px); background: rgba(12, 11, 12, .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lightbox[hidden] { display: none; }
.lightbox__inner { width: min(960px, 100%); display: grid; place-items: center; }
.lightbox__video { max-width: 100%; max-height: 82vh; background: #000; }
.lightbox__video--reel { height: 82vh; aspect-ratio: 9 / 16; width: auto; }
.lightbox__yt { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.lightbox__spotify { width: min(560px, 100%); height: 352px; border: 0; border-radius: 12px; }
.lightbox__soon { text-align: center; display: grid; gap: 10px; }
.lightbox__soon p:last-child { font-size: clamp(28px, 4vw, 48px); font-weight: 800; letter-spacing: -.02em; }
.lightbox__soon .mono { color: var(--silver); }
.lightbox__close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border: 1px solid var(--graphite); border-radius: 50%; transition: border-color .3s, transform .5s var(--ease); }
.lightbox__close:hover { border-color: var(--white); transform: rotate(90deg); }
.lightbox__close span { position: absolute; left: 12px; right: 12px; top: 50%; height: 1.5px; background: var(--white); }
.lightbox__close span:first-child { transform: rotate(45deg); }
.lightbox__close span:last-child { transform: rotate(-45deg); }

@media (max-width: 960px) {
  .work__head { grid-template-columns: 1fr; }
  .ab__tracks { grid-template-columns: 1fr; }
  .ab__tracks button { border-right: 0; border-bottom: 1px solid var(--coal); }
  .ab__tracks button:last-child { border-bottom: 0; }
  .ab__hint { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .playlist { grid-template-columns: 96px 1fr; align-items: start; }
  .playlist__name { font-size: 30px; }
  .ab__switch button { padding: 11px 16px; font-size: 14px; }
  .reel__item { height: 62vh; }
  .track__link { grid-column: 2; }
}
