/* ============================================================
   ALEX RUSSO — VERSIONE 2 (one-page)
   Ricostruita dal mockup Figma "alex_russo_hp_desk.pdf" (1440px).
   Tutte le misure in commento sono quelle lette dal PDF a scala 1:1.

   TOKEN (dal brief):
     sfondo  #060606
     titoli / CTA  #FFFFFF
     testo   #A0A0A0
     font    Inter (PP Neue Montreal rimandato: senza i file licenziati
             il browser non lo userebbe comunque)
   ============================================================ */

:root {
  --bg: #060606;
  --bg-card-about: #030303;   /* riquadro ritratto, fill 0.0118 nel PDF */
  --fg: #FFFFFF;
  --text: #A0A0A0;
  --pill: #232323;            /* fill 0.137 nel PDF: pill nav e filtri inattivi */
  --line: rgba(255, 255, 255, 0.45);   /* bordo dei riquadri: 1px, campionato #9b9b9b */
  --radius: 20px;
  --container: 1144px;        /* 1440 - 148 - 148 */
  --gutter: 24px;

  /* Scala degli spazi verticali, usata ovunque per tenere il ritmo uguale:
     --space-section tra una sezione e l'altra, --space-block tra un titolo
     e il suo contenuto. Cambiando questi due valori cambia tutto insieme. */
  --space-section: 120px;
  --space-section-lg: 160px;  /* respiro maggiore: usato prima dei brand */
  --space-block: 40px;
  --header-clear: 136px;      /* ancore: il titolo atterra sotto la sfumatura dell'header (126px) */
  --font: 'Inter', Arial, Helvetica, sans-serif;
}

/* --- FONT --------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('fonts/inter/inter-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('fonts/inter/inter-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;            /* corpo testo nel PDF: 15px */
  line-height: 1.45;          /* nel PDF 19px (1,27): troppo stretto su web, alzato */
  -webkit-font-smoothing: antialiased;
  animation: page-fade-in 600ms ease both;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

img,
video {
  max-width: 100%;
  display: block;
}

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

h1, h2, h3, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Ancore del menu: scroll-margin-top lascia all'header fisso il suo spazio,
   così il titolo atterra per intero e leggibile, non nascosto sotto la barra. */
.anchor {
  scroll-margin-top: var(--header-clear);
}

/* Le sezioni hanno già il proprio padding superiore (--space-section):
   l'ancora lo sconta, altrimenti il titolo atterrerebbe troppo in basso. */
.anchor--section {
  scroll-margin-top: calc(var(--header-clear) - var(--space-section));
}

/* titoli di sezione: 39px nel PDF, peso leggero, bianchi */
.section-title {
  font-size: 39px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--fg);
}

/* --- PILL / CTA ------------------------------------------------------------
   Tutte le CTA del mockup sono pillole alte 39px, testo 15px maiuscolo.     */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 39px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 400;         /* nel mockup le pillole sono in peso regolare */
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 300ms ease, color 300ms ease, transform 300ms ease;
}

.pill--solid {
  background: var(--fg);
  color: var(--bg);
}

.pill--solid:hover {
  background: #e6e6e6;
  transform: translateY(-1px);
}

.pill--ghost {
  background: var(--pill);
  color: var(--text);
}

.pill--ghost:hover {
  color: var(--fg);
}

.pill.is-active {
  background: var(--text);
  color: var(--bg);
}

/* --- HEADER ----------------------------------------------------------------
   Dal PDF "costruzione_nav_menu": sfumatura dal nero in alto al trasparente
   in basso, alta ~126px. Logo a sinistra, pill a destra alta 42px.          */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 126px;
  /* Header sempre visibile: i contenuti scorrono sotto. La parte alta della
     sfumatura è piena fin oltre il logo, così il testo che passa sotto non
     traspare attraverso il wordmark; poi muore nel trasparente. */
  background: linear-gradient(to bottom, rgba(6, 6, 6, 1) 0%, rgba(6, 6, 6, 0.96) 50%, rgba(6, 6, 6, 0) 100%);
  pointer-events: none;       /* la sfumatura non deve catturare i click sulla hero */
}

.header > * {
  pointer-events: auto;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;               /* logo e pill centrati a y≈63 nel PDF */
  padding-top: 21px;
}

.header__logo img {
  height: 15px;               /* wordmark 21px di corpo ≈ 15px di altezza glifi */
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--pill);
  font-size: 14.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header__nav a {
  color: var(--text);
  transition: color 250ms ease;
}

.header__nav a:hover,
.header__nav a.is-cta {
  color: var(--fg);
}

.header__nav a.is-cta {
  font-weight: 500;
}

.header__langs {
  display: flex;
  gap: 22px;                /* stesso passo delle voci del menu */
  margin-left: 2px;
}

.lang-button {
  font-size: 16px;
  line-height: 1;
  opacity: 0.45;
  transition: opacity 250ms ease;
}

.lang-button.active,
.lang-button:hover {
  opacity: 1;
}

/* menu mobile e barra rapida: esistono solo sotto i 900px (vedi media query) */
.header__mobile,
.header__quick {
  display: none;
}

.header__burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--pill);
  position: relative;
}

.header__burger span {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 300ms ease, opacity 300ms ease;
}

.header__burger span:first-child { top: 17px; }
.header__burger span:last-child  { top: 24px; }

.header.is-open .header__burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
.header.is-open .header__burger span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* --- HERO ------------------------------------------------------------------
   Ripresa tale e quale dalla v1: a tutto schermo, foto con movimento lento
   (Ken Burns), CTA bianca in basso. L'header le sta sopra con la sfumatura. */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #000;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-kenburns 18s ease-in-out infinite alternate;
}

@keyframes hero-kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1%, -1%); }
}

/* CTA: nessun override di font/peso/misura — è la stessa .pill delle altre
   due ("Richiedi maggiori info", "Scopri come posso aiutarti"). */
.hero__cta {
  position: absolute;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  z-index: 2;
}

.hero__cta:hover {
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* --- SERVIZI -----------------------------------------------------------------
   Due righe da due riquadri: testo (323px) | contenuto (808px), gap 13px,
    riga alta 590px (come nel mockup), gap tra le righe 29px. Bordo 1px,
   raggio 20. Le foto sono grandi (3 colonne) e la griglia scorre dentro
   il riquadro con una barra visibile.                                      */
.services {
  padding-top: var(--space-section);
  display: grid;
  grid-template-columns: 323fr 808fr;
  column-gap: 13px;
  row-gap: 29px;
}

.card {
  /* ALTEZZA FISSA, non minima. Con min-height il riquadro gallery cresceva
     fino a contenere tutte le foto (1080px con ALL) e lo scorrimento interno
     non partiva mai: un'area overflow:auto scorre solo se la sua altezza è
     definita, e dentro un riquadro "almeno 590" non lo era. */
  height: 590px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  position: relative;
}

.card--text {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 28px;    /* titolo a 20px dal bordo alto, 22px dal sinistro */
}

.card--text .section-title {
  margin-bottom: 24px;
}

.card__body {
  color: var(--text);
  max-width: 250px;
}

.card__body + .card__body {
  margin-top: 1.45em;
}

.card__foot {
  margin-top: auto;
  padding-top: 32px;
}

/* filtri della gallery: due righe di pillole, gap 9px */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 5px;             /* 9px tra le righe, 5px tra le pillole: dal PDF */
}

.filters .pill {
  padding: 0 15px;          /* "FIGHTING" = 99px nel PDF: 68px di testo + 15+15 */
}

/* riquadro gallery: nel PDF il padding era 31px / 57px; ridotto a 28 / 36
   per allargare la griglia — le foto sono il contenuto, non la cornice. */
.card--gallery {
  padding: 28px 36px;
  display: flex;
}

/* La griglia vive in un'area a scorrimento interno: il riquadro ha
   un'altezza fissa e non deve cambiare quando cambi filtro. Si scorre con
   la rotella, col trackpad o trascinando la barra: è sottile, scura e si
   accende quando il mouse è sul riquadro — lo stesso comportamento che
   già c'era su mobile, reso visibile anche su desktop. */
.gallery-scroll {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;              /* permette al flex item di scendere sotto il contenuto */
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding-right: 14px;        /* spazio per la barra: non copre le foto */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  transition: scrollbar-color 300ms ease;
}

.card--gallery:hover .gallery-scroll {
  scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

.gallery-scroll::-webkit-scrollbar {
  width: 4px;
}

.gallery-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.card--gallery:hover .gallery-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.45);
}

.pin-gallery__grid {
  position: relative;
  width: 100%;
}

.pin-gallery__item {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1), opacity 400ms ease;
  will-change: transform;
  cursor: zoom-in;           /* le foto si aprono a schermo intero (lightbox) */
}

.pin-gallery__item--hidden {
  opacity: 0;
  pointer-events: none;
}

.pin-gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1);
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), filter 500ms ease;
}

.pin-gallery__item:hover img {
  transform: scale(1.06);
}

/* micro-interazione: quando il mouse è sulla griglia, le foto non attive si
   attenuano leggermente — mette a fuoco quella che stai guardando */
.pin-gallery__grid:hover .pin-gallery__item img {
  filter: brightness(0.72);
}

.pin-gallery__grid .pin-gallery__item:hover img {
  filter: brightness(1);
}

/* riquadro video: player 16:9 centrato, 22px dai bordi laterali.
   Sfondo nero pieno: il video ha bande nere ai lati (è 2,35:1 in una
   cornice 16:9) e così cornice e player diventano un'unica cosa. */
.card--video {
  padding: 22px;
  display: flex;
  align-items: center;
  background: #000;
}

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.player video {
  width: 100%;
  height: 100%;
  /* il file è 2,35:1 (bande nere tolte in codifica) dentro una cornice 16:9:
     con "cover" perderebbe i lati, con "contain" resta intero su fondo nero,
     esattamente come nel mockup (il poster MAYHEM ha le bande nel file) */
  object-fit: contain;
  background: #000;
}

/* controllo audio: unico controllo visibile, in basso a destra */
.player__sound {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: rgba(6, 6, 6, 0.72);
  color: var(--fg);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 300ms ease, transform 300ms ease, background-color 300ms ease;
}

.player:hover .player__sound,
.player__sound:focus-visible,
.player.is-unmuted .player__sound {
  opacity: 1;
  transform: translateY(0);
}

.player__sound:hover {
  background: rgba(6, 6, 6, 0.9);
}

.player__sound svg {
  width: 16px;
  height: 16px;
}

.player__sound .ico-on  { display: none; }
.player.is-unmuted .player__sound .ico-on  { display: block; }
.player.is-unmuted .player__sound .ico-off { display: none; }

/* --- ABOUT -------------------------------------------------------------------
   Riquadro 1143×645 a 124px dai servizi, ritratto centrato con i lati che
   sfumano nel nero. Sotto: titolo a sinistra, testo e CTA a destra.         */
.about {
  padding-top: var(--space-section);
}

.about__frame {
  position: relative;
  height: 645px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card-about);
}

.about__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.02);
  transition: transform 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.about__frame:hover img {
  transform: scale(1.05);
}

/* i due lati sfumano al nero come nel mockup (fasce di 130 e 165px) */
.about__frame::before,
.about__frame::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  pointer-events: none;
}

.about__frame::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-card-about), transparent);
}

.about__frame::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-card-about), transparent);
}

.about__row {
  display: grid;
  grid-template-columns: 1fr 536px;   /* testo a destra largo 536px nel PDF */
  align-items: start;
  gap: 40px;
  padding-top: 52px;          /* riquadro finisce a 2915, titolo a 2967 */
}

.about__row .section-title {
  padding-top: 0;             /* allineato in alto con la prima riga del paragrafo */
}

.about__text {
  color: var(--text);
}

.about__cta {
  display: flex;
  justify-content: flex-start;    /* allineata all'inizio del paragrafo */
  padding-top: 28px;
}

/* --- BRAND ---------------------------------------------------------------- */
.brands {
  padding-top: var(--space-section-lg);
}

.brands .section-title {
  margin-bottom: var(--space-block);
}

/* carosello ripreso dalla v1: loghi bianchi a 56px su fondo pagina, niente
   fascia scura. La versione del mockup era un'immagine di riferimento.     */
.gallery-carousel {
  width: 100%;
  overflow: hidden;
  /* sopra i loghi un passo, sotto il doppio: il separatore del footer deve
     restare lontano */
  padding: var(--space-block) 0 calc(var(--space-block) * 2);
  opacity: 0;
  transition: opacity 400ms ease;
}

.gallery-carousel.is-ready {
  opacity: 1;
}

.gallery-carousel__track {
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  animation: gallery-scroll 26s linear infinite;
}

.gallery-carousel:hover .gallery-carousel__track {
  animation-play-state: paused;
}

@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.gallery-carousel__item {
  flex: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
}

.gallery-carousel__item img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

/* --- FOOTER ---------------------------------------------------------------- */
.footer {
  padding: 64px 0 90px;
  text-align: center;
}

.footer__rule {
  height: 1px;
  background: var(--text);
  opacity: 0.6;
  margin-bottom: 56px;
}

.footer__logo img {
  height: 15px;
  width: auto;
  margin: 0 auto 40px;        /* era 22px: il logo respira prima delle info */
}

.footer p {
  color: var(--text);
  line-height: 19px;
}

.footer p.is-white {
  color: var(--fg);
}

.footer__block + .footer__block {
  margin-top: 19px;
}

/* --- ANIMAZIONI DI INGRESSO (riuso dalla v1: classe .watch + .in-page) ---- */
.watch {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.watch.in-page {
  opacity: 1;
  transform: none;
}

/* Gli elementi raggiunti da un'ancora entrano solo in dissolvenza, senza lo
   scostamento verticale: il browser calcola la posizione di arrivo sul
   riquadro già spostato di 18px, e dopo la rivelazione il titolo finirebbe
   18px più in alto del punto voluto. Misurato, non teorico. */
.anchor.watch {
  transform: none;
}

/* ============================================================
   MOBILE — ricavato per deduzione: il mockup è solo desktop.
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --gutter: 16px;
    --space-section: 64px;
    --space-section-lg: 88px;
    --space-block: 28px;
    --header-clear: 104px;
  }

  .header {
    height: 96px;
    background: linear-gradient(to bottom, rgba(6, 6, 6, 0.96) 0%, rgba(6, 6, 6, 0) 100%);
  }

  .header__inner {
    height: 66px;
    padding: 14px 24px 0;     /* più aria ai lati: logo e hamburger non toccano i bordi */
  }

  .header__nav {
    display: none;
  }

  .header__burger {
    display: block;
  }

  /* barra mobile: logo a sinistra, bandiere + hamburger a destra (come v1) */
  .header__quick {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .header__quick .header__langs {
    margin: 0;
    gap: 18px;
  }

  /* MENU MOBILE — stesso comportamento della v1: pannello che si apre sotto
     la barra con fade + leggero slide, voci con divisori, SERVIZI ad
     accordion (Photography / Video Editing), CTA bianca a tutta larghezza.
     Cambia solo l'estetica: scuro come il resto di questa versione.        */
  .header__mobile {
    display: block;
    position: absolute;
    top: calc(66px + 12px);
    left: 24px;               /* allineato alla barra */
    right: 24px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
    padding: 8px 16px 16px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 250ms ease, transform 250ms ease;
  }

  .header.is-open .header__mobile {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .header__mobile li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header__mobile li.is-last {
    border-bottom: 0;
  }

  .header__mobile li > a,
  .header__mobile .header__menu-row > a {
    display: block;
    padding: 14px 0;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fg);
  }

  .header__menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header__submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-right: -8px;
    color: var(--fg);
  }

  .header__submenu-chevron {
    transition: transform 300ms cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  .header__menu-item--open .header__submenu-chevron {
    transform: rotate(180deg);
  }

  .header__submenu-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height 350ms cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  .header__menu-item--open .header__submenu-wrap {
    max-height: 200px;
  }

  .header__submenu {
    padding: 0 0 8px 16px;
  }

  .header__submenu li {
    border-bottom: 0;
  }

  .header__submenu li a {
    display: block;
    padding: 7px 0;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
  }

  .header__mobile-cta {
    margin-top: 12px;
    width: 100%;
    font-weight: 600;
  }

  .hero__cta {
    bottom: 64px;
  }

  .services {
    grid-template-columns: 1fr;
    row-gap: 13px;
  }

  .card {
    height: auto;             /* su mobile i riquadri si adattano al contenuto */
  }

  .card--text {
    padding: 22px 20px 24px;
  }

  .card__body {
    max-width: none;
  }

  .card__foot {
    padding-top: 24px;
  }

  .card--gallery {
    padding: 16px;
  }

  .gallery-scroll {
    max-height: 560px;
    padding-right: 10px;
  }

  .card--video {
    padding: 12px;
  }

  .player__sound {
    opacity: 1;
    transform: none;          /* su touch non c'è hover: il controllo resta visibile */
  }

  .about__frame {
    height: 420px;
  }

  .about__row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 28px;
  }

  .about__row .section-title {
    padding-top: 0;
  }

  .about__cta {
    padding-top: 28px;        /* la CTA non deve stare incollata al testo */
  }

  .section-title {
    font-size: 30px;
  }

  .gallery-carousel__track {
    gap: 40px;
  }

  .gallery-carousel__item {
    height: 36px;
  }

  .footer {
    padding: 44px 0 64px;
  }

  .footer__rule {
    margin-bottom: 40px;
  }

  .footer__logo img {
    margin-bottom: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .watch {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   LIGHTBOX — foto a schermo intero, desktop e mobile.
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 6, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__figure {
  margin: 0;
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  transform: scale(0.96);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease;
}

.lightbox.is-open .lightbox__img {
  transform: scale(1);
}

.lightbox__img.is-swapping {
  opacity: 0;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(35, 35, 35, 0.8);
  color: var(--fg);
  transition: background-color 250ms ease, transform 250ms ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(60, 60, 60, 0.95);
  transform: scale(1.05);
}

.lightbox__close {
  top: 22px;
  right: 22px;
}

.lightbox__nav--prev { left: 22px; }
.lightbox__nav--next { right: 22px; }

.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text);
}

@media (max-width: 900px) {
  .lightbox__figure {
    max-width: 100vw;
    max-height: 100vh;
  }

  .lightbox__img {
    max-height: 80vh;
    border-radius: 8px;
  }

  .lightbox__close {
    top: 14px;
    right: 14px;
  }

  /* su touch le frecce ingombrano: resta lo swipe + i bordi dello schermo */
  .lightbox__nav {
    width: 40px;
    height: 40px;
    bottom: 14px;
    top: auto;
  }

  .lightbox__nav--prev { left: 14px; }
  .lightbox__nav--next { right: 14px; }

  .lightbox__counter {
    bottom: 26px;
  }
}
