/* =========================================================================
   VALENTINA INDELICATO — Redesign "CONTRASTO (luce → buio)"
   Attrice & Modella · Sito statico (HTML + CSS + JS vanilla)
   CSS mobile-first, curato come un sito di maison.
   I font arrivano dal <link> in HTML (Bodoni Moda, Space Grotesk, Space Mono).
   NESSUN @import qui (non duplicare il caricamento).
   ========================================================================= */

/* ----------------------------- DESIGN TOKENS ----------------------------- */
:root {
  /* Colori */
  --porcelain: #F2EEE7;   /* base chiara */
  --bone:      #E7DFD2;   /* chiaro alternato */
  --ink:       #14110F;   /* testo scuro (espresso quasi nero) */
  --noir:      #0E0C0B;   /* base scura */
  --noir-2:    #17130F;   /* scuro alternato */
  --smoke:     #C9C0B3;   /* testo chiaro su scuro */
  --smoke-dim: #8B8275;   /* testo chiaro secondario su scuro */
  --accent:    #C4452D;   /* vermiglio — UNICO accento (sfondo .btn) */
  --accent-text: #D45A3F; /* accento per TESTO piccolo su scuro (~5:1 su noir) */
  --accent-deep: #A8381F; /* accento per hover su fondo CHIARO */

  --line-on-light: rgba(20, 17, 15, 0.16);
  --line-on-dark:  rgba(255, 255, 255, 0.18);

  /* Tipografia (caricata via <link> in HTML) */
  --serif: 'Bodoni Moda', Didot, 'Times New Roman', serif;
  --sans:  'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'Space Mono', ui-monospace, 'Courier New', monospace;

  /* Curve & timing */
  --ease-couture: cubic-bezier(.2, .7, .2, 1);
  --ease-drape:   cubic-bezier(.76, 0, .24, 1);
}

/* ----------------------------- RESET / BASE ------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background: var(--porcelain);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-weight: 400;
  line-height: 1;
}

/* Selezione testo con accento */
::selection {
  background: var(--accent);
  color: #fff;
}

/* Focus visibile, couture */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* Ancore: lasciano respiro sotto l'header fisso */
[id] {
  scroll-margin-top: clamp(4rem, 10vw, 6rem);
}

/* ----------------------------- TEMI ------------------------------------- */
[data-theme="light"] {
  background: var(--porcelain);
  color: var(--ink);
}
[data-theme="dark"] {
  background: var(--noir);
  color: var(--smoke);
}

/* ----------------------------- UTILITY TIPO ----------------------------- */
.mono {
  font-family: var(--mono);
}

/* Eyebrow / caption / indici: mono, maiuscolo, letter-spacing, piccoli, attenuati */
.eyebrow {
  display: block;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  line-height: 1.3;
  margin-bottom: clamp(1rem, 3vw, 1.6rem);
}
[data-theme="dark"] .eyebrow { color: var(--smoke-dim); }
[data-theme="light"] .eyebrow { color: rgba(20, 17, 15, 0.6); }

/* ----------------------------- SKIP LINK -------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--ink);
  color: #fff;
  padding: 0.85rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ----------------------------- LOADER ----------------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--porcelain);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Failsafe: se il JS non interviene, il loader sparisce comunque */
  animation: loaderFailsafe 0.01s linear 6s forwards;
}

.loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 4vw, 1.6rem);
  width: min(78vw, 420px);
  text-align: center;
}

.loader__count {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  color: rgba(20, 17, 15, 0.55);
}

.loader__name {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 7vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.loader__line {
  display: block;
  position: relative;
  width: 100%;
  height: 1px;
  background: var(--line-on-light);
  overflow: hidden;
}

.loader__line-fill {
  display: block;
  height: 100%;
  width: 0%;             /* il JS fa crescere la larghezza 0 → 100% */
  background: var(--accent);
}

/* Uscita "tendina" elegante verso l'alto */
.loader--out {
  transform: translateY(-100%);
  transition: transform 1s var(--ease-drape);
}

@keyframes loaderFailsafe {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* ----------------------------- HEADER / NAV ----------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 3.5vw, 1.7rem) clamp(1.2rem, 5vw, 2.4rem);
  /* Leggibile via tema (non più blend): default su chiaro */
  color: var(--ink);
  transition: padding 0.4s var(--ease-couture), color 0.3s ease;
}

/* Tema header impostato dal JS in base alla sezione sotto */
.header--on-light { color: var(--ink); }
.header--on-dark  { color: var(--smoke); }

.header--scrolled {
  padding-top: clamp(0.6rem, 2vw, 1rem);
  padding-bottom: clamp(0.6rem, 2vw, 1rem);
}

.header__logo {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: currentColor;
  white-space: nowrap;
  padding-block: 12px;
  margin-block: -12px;
}

.nav__link {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.74rem;
  color: currentColor;
  transition: opacity 0.3s ease;
}
.nav__link:hover {
  opacity: 0.55;
}

/* Hamburger (3 span → X) */
.nav__toggle {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease-couture), opacity 0.25s ease, background 0.3s ease;
}

/* --- BASE (mobile-first): nav come overlay FULL-SCREEN --- */
.nav {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--noir);
  mix-blend-mode: normal;          /* l'overlay è pieno, niente blend */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.5rem);
  transition: opacity 0.4s ease,
              transform 0.55s var(--ease-couture),
              visibility 0s linear 0.55s;
}

.nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.2rem, 4vw, 2rem);
  text-align: center;
}

/* Stato aperto */
body.menu-open {
  overflow: hidden;
}
body.menu-open .header {
  color: var(--smoke);             /* logo/X chiari sopra l'overlay pieno */
}
body.menu-open .header__logo {
  color: var(--smoke);
}
body.menu-open .nav {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.4s ease, transform 0.55s var(--ease-couture);
}
body.menu-open .nav__link {
  font-family: var(--serif);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  color: var(--smoke);
}
body.menu-open .nav__link:hover {
  opacity: 1;
  color: var(--accent);
}
body.menu-open .nav__toggle span {
  background: var(--smoke);
}
body.menu-open .nav__toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
body.menu-open .nav__toggle span:nth-child(2) {
  opacity: 0;
}
body.menu-open .nav__toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- DESKTOP: nav in linea, niente overlay, niente hamburger --- */
@media (min-width: 860px) {
  .nav {
    position: static;
    inset: auto;
    z-index: auto;
    display: block;
    background: none;
    mix-blend-mode: normal;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .nav__list {
    flex-direction: row;
    gap: clamp(1.4rem, 3vw, 2.6rem);
  }
  .nav__toggle {
    display: none;
  }
}

/* ----------------------------- REVEAL ----------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease,
              transform 0.8s cubic-bezier(.2, .7, .2, 1);
}

/* Lettere animate dal JS (stagger). Qui solo stato iniziale + transizione */
[data-reveal-chars] .char {
  display: inline-block;
  will-change: transform, opacity;
}
.js [data-reveal-chars] .char {
  opacity: 0;
  transform: translateY(0.6em);
  transition: opacity 0.6s ease,
              transform 0.8s cubic-bezier(.2, .7, .2, 1);
}

/* ----------------------------- HERO ------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero__media::after {
  /* velo chiaro per leggibilità del nome scuro */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(242, 238, 231, 0.88) 0%,
    rgba(242, 238, 231, 0.42) 45%,
    rgba(242, 238, 231, 0.45) 100%
  );
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;   /* inquadratura — regolabile dopo la verifica */
  /* fade couture: schiarito e desaturato per fondersi con la porcellana */
  filter: saturate(0.7) brightness(1.08) contrast(0.95);
}

.hero__eyebrow,
.hero__meta,
.hero__caption,
.hero__scroll,
.hero__side {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: rgba(20, 17, 15, 0.7);
  z-index: 3;
}

.hero__eyebrow {
  position: absolute;
  top: clamp(5.4rem, 19vw, 7rem);
  left: clamp(1.2rem, 5vw, 2.2rem);
}
.hero__meta {
  position: absolute;
  top: clamp(5.4rem, 19vw, 7rem);
  right: clamp(1.2rem, 5vw, 2.2rem);
  text-align: right;
}

.hero__title {
  position: absolute;
  bottom: clamp(4.6rem, 17vw, 7rem);
  left: clamp(1.2rem, 5vw, 2.2rem);
  right: clamp(1.2rem, 5vw, 2.2rem);
  z-index: 3;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 15vw, 13rem);
  line-height: 0.84;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero__word {
  display: block;
}
.hero__word--italic {
  font-style: italic;
}

.hero__caption {
  position: absolute;
  bottom: clamp(2.4rem, 9vw, 3.5rem);
  left: clamp(1.2rem, 5vw, 2.2rem);
  max-width: 70vw;
}

.hero__side {
  position: absolute;
  top: 50%;
  right: clamp(0.4rem, 2vw, 1rem);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.3em;
  color: rgba(20, 17, 15, 0.5);
}

.hero__scroll {
  position: absolute;
  bottom: clamp(1rem, 5vw, 1.6rem);
  right: clamp(1.2rem, 5vw, 2.2rem);
  padding: 12px 0;
  margin: -12px 0;
  transition: color 0.3s ease;
}
.hero__scroll:hover {
  color: var(--accent-deep);
}

/* Desktop: griglia asimmetrica, nome che scavalca la foto */
@media (min-width: 860px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 100svh;
    align-items: center;
  }
  /* Opzione B: video verticale grande e centrale, il nome lo scavalca (poster) */
  .hero__media {
    position: relative;
    inset: auto;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    height: min(94svh, 1000px);
    aspect-ratio: 9 / 16;
    margin: 0;
    z-index: 1;
    box-shadow: 0 40px 110px rgba(20, 17, 15, 0.24);
  }
  .hero__media::after {
    /* schiarisce la fascia dove passa il nome, lascia vivo il resto del video */
    background: linear-gradient(
      to right,
      rgba(242, 238, 231, 0.74) 0%,
      rgba(242, 238, 231, 0.24) 36%,
      rgba(242, 238, 231, 0) 70%
    );
  }
  .hero__title {
    position: relative;
    inset: auto;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: start;
    align-self: end;
    padding: 0 0 11vh clamp(2rem, 6vw, 5rem);
    font-size: clamp(3.4rem, 11vw, 11rem);
    z-index: 4;
  }
  .hero__eyebrow {
    top: clamp(7rem, 9vw, 8.5rem);
    left: clamp(2rem, 6vw, 5rem);
  }
  .hero__meta {
    top: clamp(7rem, 9vw, 8.5rem);
    right: clamp(2rem, 6vw, 5rem);
  }
  .hero__caption {
    bottom: clamp(2.4rem, 6vw, 4rem);
    left: clamp(2rem, 6vw, 5rem);
    max-width: 32ch;
  }
  .hero__scroll {
    bottom: clamp(2.4rem, 6vw, 4rem);
    right: clamp(2rem, 6vw, 5rem);
  }
  .hero__side {
    left: clamp(1rem, 3vw, 2rem);
    right: auto;
  }
}

/* Schermi molto stretti: etichette hero più compatte (no overlap) */
@media (max-width: 360px) {
  .hero__eyebrow,
  .hero__meta {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }
}

/* ----------------------------- MARQUEE ---------------------------------- */
.marquee {
  overflow: hidden;
  padding: clamp(1.1rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--line-on-dark);
  border-bottom: 1px solid var(--line-on-dark);
}
.marquee__track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee__item {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  line-height: 1.1;
  color: var(--smoke);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ----------------------------- GALLERIA (FIRMA) ------------------------- */
.gallery {
  position: relative;
}

/* Aggancio orizzontale di DEFAULT su tutti i device: scroll verticale → sfilata orizzontale */
.gallery__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.gallery__hud {
  position: absolute;
  top: clamp(4rem, 9vw, 4.5rem);   /* libera l'header fisso (mobile + desktop) */
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: clamp(1.2rem, 6vw, 8rem);
}

/* barra di avanzamento (l'elemento lo crea il JS) */
.gallery__bar {
  position: absolute;
  left: clamp(1.2rem, 6vw, 8rem);
  right: clamp(1.2rem, 6vw, 8rem);
  bottom: clamp(2.2rem, 6vw, 3rem);
  height: 1px;
  background: var(--line-on-dark);
  z-index: 3;
}
.gallery__bar-fill {
  display: block;
  height: 100%;
  background: var(--smoke);
  transform: scaleX(0);
  transform-origin: left center;
}
.gallery__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 3.4rem);
  line-height: 0.95;
  color: var(--smoke);
}
.gallery__progress {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  color: var(--smoke-dim);
  white-space: nowrap;
}

.gallery__track {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 4vw, 2.5rem);
  padding-inline: clamp(1.2rem, 6vw, 8rem);
  will-change: transform;
}

.gallery__slide {
  position: relative;
  flex: 0 0 auto;
  width: clamp(15rem, 74vw, 27rem);
  text-align: left;
  color: var(--smoke);
  cursor: pointer;
}

.gallery__num {
  position: absolute;
  top: -0.35em;
  left: -0.05em;
  z-index: 2;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(3rem, 4.5vw, 4.5rem);
  line-height: 1;
  color: var(--smoke-dim);
  opacity: 0.6;
  pointer-events: none;
}

.gallery__imgwrap {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line-on-dark);
  background: var(--noir-2);
}
.gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);   /* margine per la parallasse interna (gestita dal JS) */
}

.gallery__cap {
  display: block;
  margin-top: 0.85rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--smoke-dim);
}

.gallery__hint {
  position: absolute;
  bottom: clamp(2.2rem, 6vw, 3rem);
  right: clamp(1.2rem, 6vw, 8rem);
  z-index: 3;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--smoke-dim);
}

/* Nota: la galleria usa l'aggancio orizzontale (scroll verticale → sfilata) su TUTTI
   i device, anche con "riduci movimento" attivo — scelta voluta dal proprietario. */

/* ----------------------------- ABOUT / BIO ------------------------------ */
.about {
  padding: clamp(4rem, 11vw, 8rem) clamp(1.2rem, 5vw, 3rem);
  background: var(--bone);
}
.about__grid {
  display: grid;
  gap: clamp(2.2rem, 6vw, 4rem);
}
@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

.about__media img {
  width: 100%;
  height: auto;
}
.about__media figcaption {
  margin-top: 0.8rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: rgba(20, 17, 15, 0.7);
}

.about__quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: clamp(1.5rem, 4vw, 2.4rem);
}

.about__text p {
  font-family: var(--sans);
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.7;
  color: rgba(20, 17, 15, 0.85);
  max-width: 48ch;
}
.about__text p + p {
  margin-top: 1rem;
}
.about__text em {
  font-style: italic;
  color: rgba(20, 17, 15, 0.7);
}

.specs {
  margin-top: clamp(1.8rem, 5vw, 2.8rem);
  border-bottom: 1px solid var(--line-on-light);
}
.specs__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line-on-light);
}
.specs dt {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: rgba(20, 17, 15, 0.7);
}
.specs dd {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ----------------------------- REEL ------------------------------------- */
.reel {
  padding: clamp(4rem, 11vw, 8rem) clamp(1.2rem, 5vw, 3rem);
}
.reel__head {
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}
.reel__title {
  font-family: var(--serif);
  font-size: clamp(3rem, 12vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--smoke);
}

.reel__grid {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  /* Il clip orizzontale e' 848px nativi: oltre questa larghezza si vedrebbe morbido */
  max-width: 1400px;
  margin-inline: auto;
}
@media (min-width: 820px) {
  .reel__grid {
    /* Colonne diseguali: il 16:9 respira, il 9:16 resta una lama verticale.
       align-items:center fa galleggiare il clip basso accanto a quello alto. */
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: center;
  }
}

.reel__item {
  /* L'ombra vive sul contenitore: la parallasse con overflow:hidden
     sul video non la clippa */
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.reel__video {
  display: block;
  width: 100%;
  object-fit: cover;
  background: var(--noir-2);
  border: 1px solid var(--line-on-dark);
}
.reel__video--landscape {
  aspect-ratio: 16 / 9;
}
.reel__video--portrait {
  aspect-ratio: 9 / 16;
  /* Senza tetto, su desktop la colonna verticale sfonderebbe lo schermo.
     Quando il tetto vince, object-fit:cover rifila sopra e sotto. */
  max-height: min(76svh, 720px);
}

.reel__hint {
  margin-top: clamp(1.4rem, 4vw, 2rem);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--smoke-dim);
}

/* ----------------------------- CONTATTI --------------------------------- */
.contact {
  padding: clamp(4rem, 12vw, 9rem) clamp(1.2rem, 5vw, 3rem) clamp(3rem, 8vw, 5rem);
}

.contact__link {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 8vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--smoke);
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 0.5rem 0 clamp(2rem, 5vw, 3rem);
  transition: color 0.3s ease;
}
.contact__link:hover,
.contact__link:focus-visible {
  color: var(--accent);
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--smoke-dim);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.contact__details a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--smoke);
  transition: color 0.3s ease;
}
.contact__details a:hover {
  color: var(--accent-text);
}

/* Form "ghost" su scuro */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 3vw, 1.5rem);
  max-width: 580px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field span {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.7rem;
  color: var(--smoke-dim);
}
.contact__form input,
.contact__form textarea {
  font-family: var(--sans);
  font-size: 1rem;            /* 16px: niente zoom su iOS */
  line-height: 1.4;
  color: var(--smoke);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-on-dark);
  padding: 0.85rem 0;
  width: 100%;
  transition: border-color 0.3s ease;
}
.contact__form textarea {
  resize: vertical;
  min-height: 8rem;
}
.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: var(--smoke-dim);
  opacity: 0.7;
}
.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.contact__form input:focus-visible,
.contact__form textarea:focus-visible {
  border-bottom-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn {
  align-self: flex-start;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 1rem 1.8rem;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

/* Feedback invio form */
.contact__feedback {
  margin-top: 1rem;
  font: 400 0.9rem/1.4 var(--mono);
  color: var(--accent-text);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.contact__feedback.is-visible {
  opacity: 1;
}

/* ----------------------------- FOOTER ----------------------------------- */
.footer {
  padding: clamp(3rem, 8vw, 5rem) clamp(1.2rem, 5vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer__name {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  line-height: 1.05;
  color: var(--smoke);
}
.footer__meta {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--smoke-dim);
}

/* ----------------------------- LIGHTBOX --------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 7, 6, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.lightbox--open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90svh;
  object-fit: contain;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease;
}
.lightbox__img--fading {
  opacity: 0;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--smoke);
  background: rgba(14, 12, 11, 0.5);
  border: 1px solid var(--line-on-dark);
  border-radius: 50%;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: color 0.3s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  color: var(--accent);
}

.lightbox__close {
  top: 1.1rem;
  right: 1.1rem;
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 2.2rem;
  line-height: 1;
}
.lightbox__prev { left: 1.1rem; }
.lightbox__next { right: 1.1rem; }

.lightbox__counter {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--smoke-dim);
}

/* Su mobile: frecce SOTTO la foto */
@media (max-width: 600px) {
  .lightbox__nav {
    top: auto;
    bottom: 1.1rem;
    transform: none;
  }
  .lightbox__prev { left: 25%; }
  .lightbox__next { right: 25%; }
  .lightbox__counter {
    bottom: 4.4rem;
  }
}

body.no-scroll {
  overflow: hidden;
}

/* ----------------------------- CURSORE CUSTOM --------------------------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;                 /* il JS lo porta a 1 al primo movimento */
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s, opacity 0.25s;
  mix-blend-mode: difference;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nascondi il cursore nativo SOLO quando il motore custom è attivo */
@media (hover: hover) and (pointer: fine) {
  html.has-cursor,
  html.has-cursor a,
  html.has-cursor button,
  html.has-cursor [data-cursor] {
    cursor: none;
  }
}
.cursor__label {
  font: 600 0.62rem/1 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cursor--active {
  width: 74px;
  height: 74px;
  background: rgba(255, 255, 255, 0.0);
}
.cursor--active .cursor__label {
  opacity: 1;
}

/* Niente cursore custom su touch / puntatore coarse */
@media (hover: none), (pointer: coarse) {
  .cursor {
    display: none;
  }
}

/* ----------------------------- REDUCED MOTION --------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html {
    scroll-behavior: auto;
  }
  .marquee__track {
    animation: none !important;
    transform: none !important;
  }
  .cursor {
    display: none !important;
  }
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .js [data-reveal-chars] .char {
    opacity: 1 !important;
    transform: none !important;
  }
  .gallery__img {
    transition: none !important;
  }
}
