/* ==========================================================
   Studio Delle Opere di Design — stile
   Minimale, fondi neutri caldi, filetti sottili, 100% sans-serif
   ========================================================== */

/* ---------- Font: SF Pro di sistema su dispositivi Apple, Inter (locale) altrove ---------- */
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }

:root {
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;

  --bg: #ffffff;
  --plate: #f5f5f5;
  --plate-2: #ebebeb;
  --band: #ffffff;
  --ink: #1c1b19;
  --ink-2: #4a4741;
  --muted: #8a857c;
  --rule: #e5e0d8;
  --rule-strong: #1c1b19;
  --accent: #cf3824;
  --accent-soft: rgba(207, 56, 36, 0.08);

  --wrap: 1480px;
  --gutter: clamp(20px, 4vw, 56px);
  --measure: 58ch;
  --topbar-h: 56px;
  --sticky-offset: 120px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }

.kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.section-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); max-width: 54ch; }

/* ---------- Barra in alto (a scomparsa allo scroll) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.topbar.is-hidden {
  transform: translateY(-100%);
}
.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .btn { padding: 7px 20px; font-size: 13px; }
.topbar__keys { font-size: 12px; color: var(--muted); margin-right: 6px; white-space: nowrap; }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 5px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  font: 500 11px/1.4 var(--font-sans);
  text-align: center;
  color: var(--ink-2);
}

/* ---------- Testata ---------- */
.masthead { border-bottom: 1px solid var(--rule); }

.masthead__grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 36px clamp(28px, 4vw, 80px);
  align-items: end;
  padding-block: clamp(36px, 5vw, 76px) clamp(32px, 4vw, 48px);
}

.masthead__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6.4vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 13ch;
  text-wrap: balance;
}

.masthead__intro {
  margin: clamp(20px, 2.5vw, 30px) 0 0;
  max-width: 54ch;
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  line-height: 1.65;
  color: var(--ink-2);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--rule-strong);
}
.stats > div { padding: 14px 0 16px; border-bottom: 1px solid var(--rule); }
.stats > div:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--rule); }
.stats > div:nth-child(even) { padding-left: 20px; }
.stats dt { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }
.stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Carosello opere in evidenza (automatico continuo con separatori verticali) ---------- */
.featured {
  padding-block: clamp(22px, 2.8vw, 36px);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.featured__header {
  margin-bottom: 14px;
}

.hero__viewport {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent 0, #000 2.5%, #000 97.5%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 2.5%, #000 97.5%, transparent 100%);
}

.hero {
  list-style: none;
  margin: 0;
  padding: 4px 0 12px;
  display: flex;
  gap: 0;
  width: max-content;
  animation: hero-auto-scroll 55s linear infinite;
  will-change: transform;
}
.hero__viewport:hover .hero,
.hero:focus-within,
.hero.is-paused {
  animation-play-state: paused;
}

@keyframes hero-auto-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.hero__item {
  flex: 0 0 clamp(180px, 17vw, 230px);
  min-width: 0;
  border-right: 1px solid var(--rule);
  padding: clamp(4px, 0.8vw, 10px) clamp(16px, 1.8vw, 26px) clamp(8px, 1.2vw, 14px);
}
.hero__item a {
  display: block;
  text-decoration: none;
}
.hero__plate {
  aspect-ratio: 1 / 1;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4% 6%;
}
.hero__plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 7px 14px rgba(28, 27, 25, 0.065)) drop-shadow(0 2px 5px rgba(28, 27, 25, 0.035));
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), filter .45s cubic-bezier(.16, 1, .3, 1);
  will-change: transform, filter;
}
.hero__item a:hover img {
  transform: scale(1.04);
  filter: drop-shadow(0 14px 22px rgba(28, 27, 25, 0.10)) drop-shadow(0 4px 9px rgba(28, 27, 25, 0.05));
}
.hero__cap { display: block; padding-top: 10px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.hero__cap strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Pulsanti e controlli (forma supercerchio) ---------- */
.btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: transparent;
  border-radius: 12px;
  padding: 9px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, opacity .2s;
}
.btn:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: .3; cursor: default; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  margin-right: 8px;
}
.check input {
  appearance: none;
  width: 15px; height: 15px;
  margin: 0;
  border: 1px solid var(--ink);
  border-radius: 5px;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.check input::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--ink);
  transform: scale(0);
  transition: transform .15s;
}
.check input:checked::before { transform: scale(1); }

/* ---------- Sezione Estrazione casuale ---------- */
.draw {
  background: transparent;
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(14px, 1.9vw, 22px) clamp(18px, 2.4vw, 28px);
  scroll-margin-top: 0;
}

.draw__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-strong);
}
.draw__bar .section-sub { margin: 2px 0 0; }
.draw__counter {
  display: inline-block;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.draw__reset {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 3px 12px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.draw__reset:hover { border-color: var(--ink); color: var(--ink); }
.draw__controls { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }

.draw__result .work {
  border-bottom: 0;
  padding-block: clamp(12px, 1.4vw, 18px) 0;
}
.draw__result .work.is-entering { animation: fade-in .45s ease both; }

/* Adattamento verticale perfetto per l'estrazione: immagine hero dominante, niente compenetrazioni in basso */
@media (min-width: 961px) {
  .draw .work__content {
    display: grid;
    grid-template-columns: minmax(240px, 3.4fr) minmax(400px, 8.6fr);
    gap: clamp(20px, 3vw, 44px);
    align-items: stretch;
  }
  .draw .work__side {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .draw .work__facts {
    margin: 0 0 12px;
  }
  .draw .work__desc {
    margin: 0 0 auto;
    font-size: 14.5px;
    line-height: 1.62;
  }
  .draw .draw__actions {
    margin-top: clamp(14px, 1.8vw, 22px);
    padding-top: 12px;
  }
  .draw .work__gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 2.1fr 1.3fr;
    height: clamp(360px, calc(100dvh - 240px), 700px);
    column-gap: clamp(18px, 2.6vw, 36px);
    row-gap: clamp(14px, 1.8vw, 22px);
    min-height: 0;
    margin-top: 0;
  }
  .draw .shot--lead,
  .draw .work__gallery .shot:first-child {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 100%;
    padding: clamp(6px, 1vw, 12px) clamp(8px, 1.2vw, 16px) clamp(18px, 2.2vw, 26px) clamp(8px, 1.2vw, 16px);
    border-bottom: 1px solid var(--rule);
  }
  .draw .shot--sub,
  .draw .work__gallery .shot:nth-child(2),
  .draw .work__gallery .shot:nth-child(3) {
    grid-column: span 1;
    grid-row: 2;
    height: 100%;
    padding: clamp(6px, 0.8vw, 12px) clamp(8px, 1.2vw, 16px);
  }
}

/* Pulsanti grandi direttamente nella scheda di estrazione */
.draw__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: clamp(16px, 2.2vw, 24px);
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.btn--lg {
  padding: 11px 28px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Contenuto mascherato prima di "Rivela" */
.work.is-concealed .shot { pointer-events: none; cursor: default; }
.work.is-concealed .shot img { opacity: 0; }
.work.is-concealed .shot::after {
  content: "?";
  position: absolute;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 5vw, 5rem);
  color: var(--muted);
  opacity: .35;
}
.work.is-concealed .work__facts dd {
  color: transparent;
  user-select: none;
  position: relative;
}
.work.is-concealed .work__facts dd::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: .7em;
  width: 9em;
  max-width: 100%;
  transform: translateY(-50%);
  background: var(--rule);
  border-radius: 2px;
}
.work.is-concealed .work__desc {
  color: transparent;
  user-select: none;
  background: repeating-linear-gradient(to bottom, var(--rule) 0 .75em, transparent .75em 1.7em);
  background-position: 0 .48em;
  background-clip: content-box;
}
.work .work__facts dd,
.work .work__desc { transition: color .35s ease; }

.draw__placeholder {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.draw__placeholder p { margin: 0; color: var(--ink-2); max-width: 44ch; font-size: 14.5px; }
.draw__placeholder .big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 4px;
}

@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Catalogo e Barra Filtri ---------- */
.catalog { padding-block: clamp(36px, 5vw, 64px) 110px; }
.catalog__head { margin-bottom: 20px; }

.toolbar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 15;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  transition: top 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.toolbar.is-pushed-up {
  top: 0;
}

.toolbar__row {
  display: flex;
  align-items: center;
  gap: 12px 18px;
  padding-block: 12px 8px;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 12px;
  transition: border-color .2s;
}
.field:focus-within { border-color: var(--ink); }
.field--search { flex: 0 1 380px; }
.field--search svg { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
.field--search input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 9px 18px 9px 42px;
  font-size: 13.5px;
  outline: none;
}
.field--search input::placeholder { color: var(--muted); }

.toolbar__count {
  margin: 0 auto 0 0;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 3px;
}
.segmented__btn {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.segmented__btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Filtri per movimento: drag-to-scroll */
.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-block: 4px 12px;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  mask-image: linear-gradient(to right, #000 95%, transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chips.is-dragging {
  cursor: grabbing;
}
.chip {
  appearance: none;
  flex: none;
  border: 1px solid var(--rule);
  background: transparent;
  border-radius: 10px;
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip[aria-pressed="true"] {
  background: transparent;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--ink);
  font-weight: 600;
}
.chip__n {
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  opacity: .55;
}
.chip[aria-pressed="true"] .chip__n {
  color: var(--accent);
  opacity: 1;
}

.catalog__empty { padding-block: 80px; color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- Capitoli per movimento ---------- */
.chapter + .chapter {
  margin-top: clamp(100px, 10vw, 190px);
}

.chapter__head {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px clamp(24px, 4vw, 56px);
  padding-block: clamp(48px, 6vw, 84px) clamp(16px, 2.2vw, 24px);
  border-bottom: 2.5px solid var(--rule-strong);
  scroll-margin-top: var(--sticky-offset);
}
.chapter__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.8rem, 8.5vw, 7.6rem);
  line-height: .84;
  letter-spacing: -0.055em;
  color: var(--accent);
}
.chapter__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0;
  max-width: 20ch;
  color: var(--ink);
  text-wrap: balance;
}
.chapter__intro {
  margin: 18px 0 0;
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.72;
}
.chapter__meta { margin: 16px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ==========================================================
   Scheda dell'Opera:
   - Descrizione, titolo e dati AL LATO SINISTRO
   - Immagini AL LATO DESTRO: UNA GRANDE SOPRA E DUE SOTTO
   ========================================================== */
.work {
  position: relative;
  contain: layout;
  padding-block: clamp(38px, 4.6vw, 62px);
  border-bottom: 1px solid var(--rule-strong);
  scroll-margin-top: calc(var(--topbar-h) + 115px);
}
/* Mantiene l'opera immediatamente dopo il titolo del movimento ben raccolta e compatta */
.chapter__head + .work {
  padding-top: clamp(24px, 3.2vw, 38px);
}
.work.is-target {
  animation: target-pulse 1.2s ease;
}
@keyframes target-pulse {
  0% { background: transparent; }
  30% { background: var(--accent-soft); }
  100% { background: transparent; }
}
.work:last-child { border-bottom: 1px solid var(--rule-strong); }

.work__content {
  display: grid;
  grid-template-columns: minmax(240px, 3.4fr) minmax(400px, 8.6fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

/* Colonna sinistra: descrizione e metadati */
.work__side {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work__code {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
  padding: 2px 9px;
  border-radius: 7px;
}

.work__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.work__facts {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 8px;
  column-gap: 28px;
  margin: 0 0 16px;
  padding-block: 12px;
  max-width: var(--measure);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}
.work__facts > div { display: contents; }
.work__facts dt,
.work__facts dd {
  margin: 0;
  padding-block: 2px;
  font-size: 13.5px;
  line-height: 1;
}
.work__facts dt { color: var(--muted); min-width: 6.5em; }
.work__facts dd { font-variant-numeric: tabular-nums; }

.work__desc {
  margin: 0;
  max-width: var(--measure);
  font-size: 15px;
  line-height: 1.68;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Colonna destra: Galleria — UNA GRANDE SOPRA E DUE SOTTO SEPARATE DA LINEA */
.work__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 2.1fr 1.3fr;
  height: clamp(360px, calc(100dvh - 240px), 700px);
  column-gap: clamp(18px, 2.6vw, 36px);
  row-gap: clamp(14px, 1.8vw, 22px);
  min-height: 0;
}

.shot {
  appearance: none;
  position: relative;
  border: 0;
  margin: 0;
  background: transparent;
  border-radius: 0;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  width: 100%;
  padding: clamp(6px, 1vw, 14px);
}
.shot img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 10px 20px rgba(28, 27, 25, 0.075)) drop-shadow(0 3px 7px rgba(28, 27, 25, 0.04));
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), filter .45s cubic-bezier(.16, 1, .3, 1), opacity .45s ease;
  will-change: transform, filter;
  transform-origin: center center;
}
.shot:hover img,
.shot:focus-visible img {
  transform: scale(1.04);
  filter: drop-shadow(0 18px 32px rgba(28, 27, 25, 0.12)) drop-shadow(0 5px 12px rgba(28, 27, 25, 0.06));
}

/* 1 grande sopra con linea orizzontale di separazione */
.shot--lead,
.work__gallery .shot:first-child {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 100%;
  padding: clamp(6px, 1vw, 12px) clamp(8px, 1.2vw, 16px) clamp(18px, 2.2vw, 26px) clamp(8px, 1.2vw, 16px);
  border-bottom: 1px solid var(--rule);
}

/* 2 sotto affiancate (incrementate di 1.3x) */
.shot--sub,
.work__gallery .shot:nth-child(2),
.work__gallery .shot:nth-child(3) {
  grid-column: span 1;
  grid-row: 2;
  height: 100%;
  padding: clamp(6px, 0.8vw, 12px) clamp(8px, 1.2vw, 16px);
}

/* Foto non scontornate */
.shot img.is-photo, .hero__plate img.is-photo, .tile__plate img.is-photo {
  mix-blend-mode: multiply;
  filter: none !important;
}

/* ---------- Vista indice (griglia compatta) ---------- */
.tiles {
  list-style: none;
  margin: 0;
  padding: clamp(24px, 3vw, 36px) 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: clamp(20px, 2vw, 32px) clamp(12px, 1.4vw, 18px);
}
.tile button,
.tile a.tile__link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.tile__plate {
  aspect-ratio: 4 / 5;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--rule);
  padding: 6%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tile__plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 7px 14px rgba(28, 27, 25, 0.065)) drop-shadow(0 2px 5px rgba(28, 27, 25, 0.035));
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), filter .45s cubic-bezier(.16, 1, .3, 1);
  will-change: transform, filter;
}
.tile button:hover img,
.tile a.tile__link:hover img {
  transform: scale(1.04);
  filter: drop-shadow(0 14px 22px rgba(28, 27, 25, 0.10)) drop-shadow(0 4px 9px rgba(28, 27, 25, 0.05));
}
.tile__meta { display: block; padding-top: 10px; }
.tile__code { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.tile__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tile__by { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* ---------- Lightbox (Zoom a tutto schermo) ---------- */
.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: var(--bg);
  overflow: hidden;
}
.lightbox[open] { display: grid; place-items: center; animation: fade-in .25s ease both; }
.lightbox::backdrop { background: var(--bg); }
.lightbox img {
  max-width: calc(100vw - 2 * var(--gutter));
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-out;
  filter: drop-shadow(0 16px 30px rgba(28, 27, 25, 0.09));
}
.lightbox img.is-photo {
  mix-blend-mode: multiply;
  filter: none;
}
.lightbox__caption {
  position: fixed;
  left: var(--gutter);
  bottom: 22px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.lightbox__caption strong { font-family: var(--font-display); font-weight: 600; color: var(--ink); margin-right: 8px; }
.lightbox__close {
  position: fixed;
  top: 18px; right: 20px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .2s;
}
.lightbox__close:hover { border-color: var(--ink); }

/* ---------- Colophon ---------- */
.colophon { border-top: 1px solid var(--rule-strong); background: var(--bg); }
.colophon__grid {
  display: grid;
  grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr);
  gap: 32px clamp(24px, 4vw, 56px);
  padding-block: 44px 58px;
}
.colophon__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.colophon__note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); max-width: 42ch; }
.colophon__list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 200px;
  column-gap: 32px;
}
.colophon__list li { break-inside: avoid; border-bottom: 1px solid var(--rule); }
.colophon__list a {
  display: flex;
  gap: 12px;
  padding-block: 8px;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--ink-2);
}
.colophon__list a:hover { color: var(--ink); }
.colophon__list span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  :root { --sticky-offset: 140px; }
  .masthead__grid,
  .work__content,
  .chapter__head,
  .colophon__grid { grid-template-columns: 1fr; }
  .work__side { position: static; }
  .work { padding-block: clamp(30px, 4.8vw, 48px); }
  .chapter__head + .work { padding-top: clamp(20px, 3vw, 30px); }
  .work__gallery {
    grid-template-rows: auto auto;
    height: auto;
    column-gap: clamp(14px, 2.5vw, 24px);
    row-gap: clamp(14px, 2vw, 20px);
  }
  .shot--lead,
  .work__gallery .shot:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
    height: clamp(320px, 72vw, 520px);
    padding: 0 0 clamp(14px, 2vw, 20px) 0;
    border-bottom: 1px solid var(--rule);
  }
  .shot--sub,
  .work__gallery .shot:nth-child(2),
  .work__gallery .shot:nth-child(3) {
    grid-column: span 1;
    grid-row: auto;
    height: clamp(234px, 50vw, 365px);
    padding: clamp(6px, 1vw, 12px) 0 0 0;
  }
  .toolbar__row { flex-wrap: wrap; }
  .field--search { flex: 1 1 100%; }
}

@media (max-width: 760px) {
  .topbar__keys { display: none; }
  .topbar__brand { font-size: 14px; }
}

@media (max-width: 560px) {
  :root { --topbar-h: 52px; }
  .topbar__brand { display: none; }
  .topbar__inner { justify-content: flex-end; }
  .topbar .btn { padding: 7px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
