/* =====================================================================
   Cinzia Carroccia — Fotografa
   Redesign: fotografico · intimo · elegante · minimale · umano.
   Le fotografie sono il protagonista. Il design tace.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Variabili
--------------------------------------------------------------------- */
:root {
  /* Palette neutra e calda — il colore lo portano le fotografie */
  --ink: #1c1815;
  /* nero morbido, caldo */
  --ink-2: #3a352f;
  --paper: #f5f1ea;
  /* ivory / bianco caldo */
  --paper-2: #ebe4d8;
  --warm-grey: #8a8377;
  /* testi secondari */
  --line: rgba(28, 24, 21, 0.12);
  --line-inv: rgba(245, 241, 234, 0.16);
  --accent: #7a4a6b;
  /* prugna: solo un sussurro, mai branding */

  /* Tipografia */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Scala tipografica fluida, contenuta */
  --fs-display: clamp(2.6rem, 8vw, 6.5rem);
  --fs-h1: clamp(2rem, 5vw, 3.6rem);
  --fs-h2: clamp(1.6rem, 3.4vw, 2.6rem);
  --fs-lead: clamp(1.1rem, 1.7vw, 1.4rem);
  --fs-body: clamp(1rem, 1.05vw, 1.0625rem);
  --fs-small: 0.8rem;

  /* Spazi */
  --section: clamp(5rem, 12vw, 10rem);
  --gutter: clamp(1.5rem, 6vw, 6rem);
  --maxw: 1440px;
  --measure: 62ch;

  /* Movimento: lento, morbido, quasi invisibile */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------------------
   2. Reset
--------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

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

/* Header fisso: quando si salta a un'ancora, ferma lo scroll sotto l'header
   così il contenuto (es. la foto in About) non resta coperto. */
#hero,
#lavori,
#about,
#contatti {
  scroll-margin-top: clamp(68px, 14vw, 88px);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}

p {
  max-width: var(--measure);
}

/* ---------------------------------------------------------------------
   3. Utility
--------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-label {
  font-family: var(--sans);
  font-size: var(--fs-small);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm-grey);
}

/* CTA testuale, sobria */
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: gap 0.4s var(--ease), border-color 0.4s var(--ease);
}

.link-cta .arrow {
  transition: transform 0.4s var(--ease);
}

.link-cta:hover {
  gap: 0.9rem;
  border-color: currentColor;
}

.link-cta:hover .arrow {
  transform: translateX(3px);
}

/* ---------------------------------------------------------------------
   4. Reveal — comparsa lenta e morbida (fade + micro translate)
--------------------------------------------------------------------- */
.reveal {
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}

html.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------------
   5. Header / navigazione
--------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.6rem) var(--gutter);
  color: var(--paper);
  transition: background 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(245, 241, 234, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  border-bottom-color: var(--line);
}

/* Con il menù aperto l'header si fonde nel fondo scuro: testo chiaro e leggibile */
body.menu-open .site-header {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--paper);
  border-bottom-color: transparent;
}

.wordmark {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.005em;
}

.nav {
  display: flex;
  gap: clamp(1.4rem, 2.4vw, 2.6rem);
}

.nav a {
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  position: relative;
  padding-block: 0.2rem;
  opacity: 0.92;
  transition: opacity 0.3s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}

.nav a:hover {
  opacity: 1;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
}

/* Menu mobile a schermo intero, essenziale */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease);
  visibility: hidden;
}

.mobile-menu.open {
  transform: translateY(0);
  visibility: visible;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mobile-menu nav a {
  display: block;
  width: fit-content;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 12vw, 3.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  transition: opacity 0.3s var(--ease);
}

.mobile-menu nav a:active {
  opacity: 0.6;
}

.mobile-menu .mm-foot {
  margin-top: 2.5rem;
}

.mobile-menu .mm-foot a {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--paper-2);
}

/* ---------------------------------------------------------------------
   6. Hero — una fotografia protagonista, testo essenziale
--------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* lo specchio sta al centro dello scatto: così il taglio verticale del cover
     non gli mangia né l'angolo in alto né quello in basso, nemmeno sui monitor
     larghi e bassi. Per il taglio in verticale vedi la media query in fondo. */
  object-position: center 45%;
  animation: softIn 1.6s var(--ease) both;
}

/* Schermi verticali (telefoni, tablet in portrait): lo scatto è 3:2, in un hero
   a tutta altezza il cover ne mostra sì e no un terzo in larghezza — lo specchio
   intero non ci sta comunque. Tanto vale scegliere il primo piano buono:
   spostando il taglio a sinistra si centra l'angolo del telaio, con i due lati
   dorati a V e il riflesso delle nuvole al centro. */
@media (max-aspect-ratio: 4 / 5) {
  .hero__media img {
    object-position: 38% center;
  }
}

/* velo discreto solo per la leggibilità del nome */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 17, 14, 0.6) 0%, rgba(20, 17, 14, 0.12) 40%, rgba(20, 17, 14, 0) 70%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--gutter);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.hero__role {
  font-size: var(--fs-small);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.85);
  margin-bottom: 1rem;
}

.hero__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.hero__line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: var(--fs-lead);
  color: rgba(245, 241, 234, 0.92);
  margin-top: 1.4rem;
  max-width: 34ch;
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: clamp(2rem, 5vw, 3.2rem);
  font-size: var(--fs-small);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.9;
  transition: gap 0.4s var(--ease), opacity 0.3s;
}

.hero__scroll:hover {
  gap: 1rem;
  opacity: 1;
}

@keyframes softIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ---------------------------------------------------------------------
   7. (Galleria unica: stili in sezione 14)
--------------------------------------------------------------------- */
/* placeholder discreto se una foto non è disponibile */
.is-empty {
  background: linear-gradient(135deg, var(--paper-2), #ddd3c3);
  min-height: 320px;
}

.is-empty img {
  display: none;
}

/* ---------------------------------------------------------------------
   8. About — umana, semplice, con spazio per il ritratto
--------------------------------------------------------------------- */
/* Capitolo distinto: banda calda (paper-2), filetti di confine, ritratto immersivo */
.about {
  background: var(--paper-2);
  overflow: hidden;
}

.about__grid {
  display: grid;
}

.about__media {
  overflow: hidden;
  background: var(--ink);
  min-height: 62vh;
}

.about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 34% 22%;
  display: block;
}

.about__copy {
  display: grid;
  gap: 1.4rem;
  align-content: center;
  padding: clamp(3rem, 9vw, 6rem) clamp(1.5rem, 5vw, 4.5rem);
  max-width: 640px;
}

.about__copy h2 {
  font-size: var(--fs-h2);
  font-weight: 400;
  margin-top: 0.4rem;
}

.about__copy p {
  color: var(--ink-2);
}

.about__copy em {
  font-family: var(--serif);
  font-style: italic;
}

.about__copy .link-cta {
  margin-top: 0.8rem;
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    min-height: min(85vh, 820px);
  }

  .about__media {
    min-height: 0;
  }
}

/* ---------------------------------------------------------------------
   10. Contatti — chiusura scura, Instagram in risalto, email discreta
--------------------------------------------------------------------- */
.contact {
  position: relative;
  overflow: hidden;
  /* atmosfera calda: bagliori morbidi prugna + clay sul fondo scuro */
  background:
    radial-gradient(70% 60% at 88% 12%, rgba(122, 74, 107, 0.30), transparent 62%),
    radial-gradient(65% 60% at 6% 96%, rgba(138, 111, 104, 0.20), transparent 62%),
    var(--ink);
  color: var(--paper);
  padding-block: var(--section);
}

.contact__inner {
  display: grid;
  gap: clamp(2.8rem, 6vw, 4rem);
}

@media (min-width: 860px) {
  .contact__inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(3rem, 7vw, 6rem);
  }
}

.contact .section-label {
  color: var(--greige);
}

.contact__title {
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: 1.0;
  margin-top: 1rem;
}

.contact__lead {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: var(--fs-lead);
  color: rgba(245, 241, 234, 0.82);
  margin-top: 1.4rem;
  max-width: 32ch;
}

/* Instagram — elemento focale: riquadro sottile che si solleva */
.ig-card {
  display: block;
  border: 1px solid var(--line-inv);
  background: rgba(245, 241, 234, 0.02);
  padding: clamp(1.5rem, 3.2vw, 2.3rem);
  transition: border-color 0.45s var(--ease), background-color 0.45s var(--ease), transform 0.5s var(--ease);
}

.ig-card:hover,
.ig-card:focus-visible {
  border-color: rgba(245, 241, 234, 0.42);
  background: rgba(245, 241, 234, 0.05);
  transform: translateY(-4px);
  outline: none;
}

/* provino a contatto: mostra che il lavoro vive lì */
.ig-card__strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: clamp(1.3rem, 3vw, 1.8rem);
}

.ig-card__strip img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--ink-80);
  opacity: 0.82;
  transition: opacity 0.5s var(--ease);
}

.ig-card:hover .ig-card__strip img,
.ig-card:focus-visible .ig-card__strip img {
  opacity: 1;
}

.ig-card__label {
  display: block;
  font-size: var(--fs-small);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d7b6c1;
  /* prugna schiarita, leggibile sul scuro */
  margin-bottom: 0.9rem;
}

.ig-card__handle {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--paper);
}

.ig-card__handle .arrow {
  font-size: 0.5em;
  transition: transform 0.4s var(--ease);
}

.ig-card:hover .ig-card__handle .arrow,
.ig-card:focus-visible .ig-card__handle .arrow {
  transform: translate(3px, -3px);
}

.ig-card__meta {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: var(--greige);
}

.contact__mail {
  margin-top: clamp(1.6rem, 3.5vw, 2.2rem);
}

.contact__mail-label {
  display: block;
  font-size: var(--fs-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-grey);
  margin-bottom: 0.4rem;
}

.contact__mail a {
  font-size: 1.05rem;
  color: var(--paper-2);
  border-bottom: 1px solid var(--line-inv);
  transition: border-color 0.3s;
}

.contact__mail a:hover {
  border-color: var(--paper);
}

/* ---------------------------------------------------------------------
   11. Footer — minimale
--------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--line-inv);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.footer__grid {
  display: grid;
  gap: 1.6rem;
  align-items: baseline;
}

.footer__brand {
  font-family: var(--serif);
  font-size: 1.3rem;
}

.footer__nav,
.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.site-footer a {
  color: var(--paper-2);
  transition: color 0.3s;
}

.site-footer a:hover {
  color: var(--paper);
}

.footer__nav a,
.footer__social a {
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-inv);
  font-size: var(--fs-small);
  color: var(--warm-grey);
}

@media (min-width: 800px) {
  .footer__grid {
    grid-template-columns: 1fr auto auto;
    gap: 2.5rem;
  }
}

/* ---------------------------------------------------------------------
   12. Responsive — navigazione mobile
--------------------------------------------------------------------- */
@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .nav-toggle {
    display: inline-block;
  }
}

/* ---------------------------------------------------------------------
   13. Accessibilità
--------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0.5rem;
  transform: translateX(-50%) translateY(-160%);
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-size: var(--fs-small);
  letter-spacing: 0.06em;
  transition: transform 0.3s;
}

.skip-link:focus {
  transform: translateX(-50%) translateY(0);
}

/* Con ?reveal (screenshot/test) mostra subito tutto e comprime l'hero
   per catturare l'intera pagina in un solo screenshot */
html.reveal-all .reveal {
  opacity: 1 !important;
  transform: none !important;
}

html.reveal-all .gallery-item {
  opacity: 1 !important;
  transform: none !important;
}

html.reveal-all .hero {
  min-height: 620px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------------------------------------------------------------------
   14. Galleria — archivio completo, griglia masonry + filtro + lightbox
--------------------------------------------------------------------- */
.gallery-section {
  padding-block: var(--section);
}

.gallery-head {
  max-width: var(--measure);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.gallery-head p:nth-of-type(1)+p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--ink-2);
  margin-top: 1rem;
}

/* filtro discreto */
.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-bottom: clamp(1.6rem, 4vw, 2.4rem);
}

.gallery-filter__btn {
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: var(--warm-grey);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.gallery-filter__btn:hover {
  color: var(--ink);
}

.gallery-filter__btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* masonry a colonne esplicite: il JS assegna ogni blocco alla colonna più
   corta (vedi layoutColumns in main.js). Serve il calcolo manuale perché le
   serie di scatti sono blocchi indivisibili, che il bilanciamento automatico
   di `column-count` non riesce a compensare: lasciava il fondo sfilacciato. */
.gallery-grid {
  --gallery-gap: clamp(1rem, 2.5vw, 1.6rem);
  display: flex;
  align-items: flex-start;
  gap: var(--gallery-gap);
}

.gallery-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gallery-gap);
}

/* una serie di scatti dello stesso servizio: sta tutta nella stessa colonna,
   le foto una sotto l'altra con lo stesso passo del resto della griglia */
.gallery-series {
  display: flex;
  flex-direction: column;
  gap: var(--gallery-gap);
}

.gallery-item {
  margin: 0;
  width: 100%;
  display: block;
  cursor: zoom-in;
  background: var(--paper-2);
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1.4s var(--ease), opacity 0.8s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* comparsa morbida degli elementi renderizzati da JS */
html.js .gallery-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

html.js .gallery-item.in-view {
  opacity: 1;
  transform: none;
}

.gallery-item[hidden] {
  display: none;
}

/* Mobile: righe orizzontali per categoria (evitano lo scroll verticale lungo).
   Nascoste di default: da tablet in su vale la griglia masonry qui sopra. */
.gallery-rows {
  display: none;
}

@media (max-width: 619px) {
  .gallery-grid {
    display: none;
  }

  .gallery-filter {
    display: none;
  }

  /* le categorie sono già separate in righe */
  .gallery-rows {
    display: block;
  }

  .gallery-rowsection {
    margin-bottom: clamp(2rem, 8vw, 3rem);
  }

  .gallery-rowsection:last-child {
    margin-bottom: 0;
  }

  .gallery-rowsection__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
  }

  .gallery-rowsection__title {
    font-size: var(--fs-small);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0;
  }

  .gallery-rowsection__hint {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--warm-grey);
  }

  /* la striscia scorre in orizzontale, con snap morbido */
  .gallery-track {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .gallery-track::-webkit-scrollbar {
    display: none;
  }

  /* card uniformi: la successiva "sbircia" dal bordo → si capisce che si scorre */
  .gallery-track .gallery-item {
    flex: 0 0 72%;
    width: 72%;
    aspect-ratio: 4 / 5;
    scroll-snap-align: start;
    cursor: pointer;
  }

  .gallery-track .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(20, 17, 14, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: min(100%, 1200px);
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox__cap {
  position: absolute;
  left: 50%;
  bottom: clamp(1rem, 3vw, 2rem);
  transform: translateX(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--paper-2);
  text-align: center;
  max-width: 40ch;
}

.lightbox__btn {
  position: absolute;
  color: var(--paper);
  opacity: 0.75;
  font-size: 2rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.lightbox__btn:hover {
  opacity: 1;
}

.lightbox__close {
  top: clamp(0.5rem, 2vw, 1.4rem);
  right: clamp(0.5rem, 2vw, 1.4rem);
}

.lightbox__prev {
  left: clamp(0.3rem, 2vw, 1.2rem);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: clamp(0.3rem, 2vw, 1.2rem);
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 620px) {

  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: clamp(3rem, 12vw, 4.5rem);
    transform: none;
  }
}

/* ---------------------------------------------------------------------
   15. Cursore custom — discreto, solo desktop con puntatore fine
   Un punto + un anello che segue con dolcezza. Il mix-blend-mode
   lo rende leggibile sia sulle foto chiare che su quelle scure.
   Su touch/mobile non viene mai attivato (nessuna classe .has-cursor).
--------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  html.has-cursor,
  html.has-cursor * { cursor: none; }

  .cursor-dot,
  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 300;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0;                 /* nascosto finché il mouse non si muove */
    mix-blend-mode: difference; /* sempre leggibile sopra le fotografie */
  }
  .cursor-dot {
    width: 7px;
    height: 7px;
    background: #fff;
  }
  .cursor-ring {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: width 0.3s var(--ease), height 0.3s var(--ease),
                border-color 0.3s var(--ease), opacity 0.3s var(--ease);
  }
  /* Sopra un elemento cliccabile: l'anello cresce */
  html.cursor-hover .cursor-ring {
    width: 52px;
    height: 52px;
    border-color: rgba(255, 255, 255, 0.95);
  }
  /* Sopra una foto della galleria: suggerisce lo zoom */
  html.cursor-zoom .cursor-ring {
    width: 66px;
    height: 66px;
  }
}