@charset "UTF-8";
/* ============================================================
   Annarita Camassa — Pittrice · annaritacamassa.it
   Foglio di stile unico, scritto a mano. Nessun framework.
   ============================================================ */

/* ---------- Font self-hosted (subset latin) ---------- */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/playfair-display-v37-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/playfair-display-v37-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/playfair-display-v37-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/playfair-display-v37-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/montserrat-v31-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/montserrat-v31-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/montserrat-v31-latin-600.woff2') format('woff2');
}

/* ---------- Token ---------- */
:root {
  --bg:        #ffffff;
  --bg-alt:    #f7f5f1;
  --ink:       #2b2a28;
  --ink-soft:  #6f6a63;
  --bronze:      #a98a6c; /* decorativo: bordi, icone (contrasto 3.2:1) */
  --bronze-d:    #8c6f52; /* link su bianco (4.7:1) */
  --bronze-text: #85684c; /* testo piccolo su bianco e avorio (≥4.7:1) */
  --line:      #e9e5df;
  --serif:     'Playfair Display', 'Times New Roman', serif;
  --sans:      'Montserrat', -apple-system, 'Segoe UI', sans-serif;
  --header-h:  76px;
  --ease:      cubic-bezier(0.25, 0.6, 0.3, 1);
}

/* ---------- Reset essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* le ancore (#intro, #contenuto) non devono finire sotto l'header sticky */
  scroll-padding-top: calc(var(--header-h) + 1px);
  /* niente scatto orizzontale quando menu/lightbox bloccano lo scroll (Windows) */
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--bronze-d); text-decoration: none; transition: color .25s var(--ease), opacity .25s var(--ease); }
a:hover { color: var(--bronze-text); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, figure, p { margin: 0; }
p + p { margin-top: 1em; }
::selection { background: var(--bronze-d); color: #fff; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }

/* ---------- Utility ---------- */
.wrap        { max-width: 1200px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.wrap-narrow { max-width: 780px;  margin-inline: auto; padding-inline: clamp(20px, 4vw, 40px); }
.align-center { text-align: center; }
.mt-1 { margin-top: 1.6rem; }
.section       { padding-block: clamp(4rem, 9vw, 6.5rem); }
.section-alt   { background: var(--bg-alt); }
.section-top-0 { padding-top: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.2rem;
  font-size: .82rem;
  letter-spacing: .06em;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Tipografia ---------- */
.kicker {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bronze-text);
  margin-bottom: 1.1rem;
}
.title-xl, .title-lg, .title-md {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: .005em;
  color: var(--ink);
  text-wrap: balance; /* titoli su due righe bilanciate, dove supportato */
}
.title-xl { font-size: clamp(2.4rem, 5vw, 3.4rem); }
.title-lg { font-size: clamp(2rem, 4vw, 2.7rem); }
.title-md { font-size: clamp(1.45rem, 2.6vw, 1.8rem); }
.section-sub {
  color: var(--ink-soft);
  max-width: 56ch;
  margin-top: 1.1rem;
  text-wrap: pretty; /* niente parole orfane a fine paragrafo, dove supportato */
}
.align-center .section-sub { margin-inline: auto; }
.prose { color: var(--ink-soft); }
.prose + .prose { margin-top: 1.1em; }

.text-link {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--bronze);
  padding-bottom: .35em;
}
.text-link:hover { color: var(--bronze-d); }

.btn {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 1em 2.6em;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.btn:hover, .btn:active { background: var(--ink); color: #fff; }
/* feedback al tap sui touch, dove il hover non esiste */
.site-nav a:active, .footer-nav a:active, .opera-cta:active, .text-link:active { color: var(--bronze-d); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
/* Il blur vive su uno pseudo-elemento: backdrop-filter sull'header creerebbe
   un containing block e il menu mobile (position: fixed) resterebbe ancorato
   all'header invece che al viewport, aprendosi "a striscia". */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header.is-scrolled { box-shadow: 0 8px 30px -18px rgba(43, 42, 40, .25); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
}
.brand:hover { color: var(--ink); opacity: .75; }
.brand-icon { width: 30px; height: auto; }
.brand-text {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .01em;
  display: flex;
  flex-direction: column;
}
.brand-sub {
  font-family: var(--sans);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--bronze-text);
  margin-top: .18em;
}
.site-nav ul {
  display: flex;
  gap: clamp(1.2rem, 2.5vw, 2.4rem);
}
.site-nav a {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  padding-block: .4em;
}
.site-nav a:hover { color: var(--bronze-d); }
.site-nav a[aria-current="page"] {
  color: var(--bronze-d);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-decoration-thickness: 1px;
  text-underline-offset: .4em;
}
.header-tools { display: flex; align-items: center; gap: 1.2rem; }
.lang-switch {
  display: flex;
  align-items: center;
  gap: .15rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
}
.lang-switch span { color: var(--line); }
/* padding generoso: su touch due link di 2 lettere sarebbero impossibili da centrare */
.lang-switch a { color: var(--ink-soft); padding: .8em .55em; }
.lang-switch a:hover { color: var(--bronze-d); }
/* underline invece di border-bottom: col padding touch il bordo finirebbe
   staccato ~9px sotto le lettere (e cambierebbe l'altezza del solo link attivo) */
.lang-switch a[aria-current="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-decoration-thickness: 1px;
  text-underline-offset: .45em;
}

/* Menu mobile */
.menu-toggle {
  display: none;
  position: relative;
  z-index: 220;
  width: 44px;
  height: 44px;
}
.menu-toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 1.6px;
  background: var(--ink);
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 25px; }
html.nav-open .menu-toggle span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
html.nav-open .menu-toggle span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  /* Senza JavaScript il toggle non può funzionare: la nav resta in linea
     nell'header (spartana ma navigabile); il footer fa da seconda via. */
  html:not(.js) .menu-toggle { display: none; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; justify-content: flex-end; gap: .9rem 1.3rem; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 210;
    background: rgba(255, 255, 255, .98);
    display: grid;
    place-items: center;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility 0s linear .35s;
  }
  html.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }
  html.nav-open, html.nav-open body { overflow: hidden; }
  .site-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 2.2rem;
  }
  .site-nav a {
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: none;
  }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  height: calc(100vh - var(--header-h)); /* fallback per browser senza svh */
  height: calc(100svh - var(--header-h));
  min-height: 540px;
  max-height: 900px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.hero-card {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 30px 80px -30px rgba(20, 19, 18, .45);
  padding: clamp(1.3rem, 2.8vw, 2rem) clamp(1.2rem, 3vw, 2.2rem);
  margin-inline: 20px;
  max-width: min(600px, calc(100% - 40px));
  text-align: center;
  animation: hero-in 1.1s var(--ease) both;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.hero-logo { width: min(460px, 76vw); height: auto; margin-inline: auto; }
.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}
.hero-scroll {
  position: absolute;
  z-index: 2;
  bottom: 26px;
  left: 50%;
  /* centratura statica: i keyframes animano solo l'asse Y, così con
     prefers-reduced-motion il cerchio resta centrato */
  translate: -50% 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  box-shadow: 0 10px 30px -12px rgba(20, 19, 18, .4);
  animation: scroll-hint 2.6s ease-in-out infinite;
}
.hero-scroll:hover { color: var(--bronze-d); }
@keyframes scroll-hint {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* ---------- Layout a due colonne ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.split-bio { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: start; }
/* La foto in chi-sono resta alla sua dimensione naturale (mai stirata):
   con un'immagine più grande della colonna torna a riempirla come le altre. */
.split-bio .split-media img {
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}
.split-media img {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
  box-shadow: 0 30px 70px -40px rgba(43, 42, 40, .35);
}
.intro .split-media img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
@media (max-width: 860px) {
  .split, .split-bio { grid-template-columns: 1fr; gap: 2.5rem; }
  .intro .split-media img { aspect-ratio: 16 / 10; }
  .split-media { max-width: 520px; margin-inline: auto; }
}

/* ---------- Sezioni ---------- */
.section-head { text-align: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head .section-sub { margin-inline: auto; }
.page-head { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.page-head .kicker { margin-bottom: .9rem; }
.opere-more { margin-top: clamp(2.5rem, 6vw, 4rem); }

/* ---------- Galleria opere (masonry) ---------- */
.opere-grid {
  columns: 3 300px;
  column-gap: clamp(1.6rem, 3vw, 2.4rem);
}
.opera {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: clamp(2rem, 4vw, 2.8rem);
}
.opera-link {
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.opera-link:hover {
  border-color: var(--bronze);
  box-shadow: 0 18px 40px -28px rgba(43, 42, 40, .4);
}
.opera-img {
  width: 100%;
  transition: transform .7s var(--ease);
}
/* zoom solo dove il hover esiste davvero: su touch resterebbe "incollato" dopo il tap */
@media (hover: hover) {
  .opera-link:hover .opera-img { transform: scale(1.025); }
}
.opera-caption {
  padding-top: .9rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  text-align: center;
}
.opera-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
}
.opera-meta {
  font-size: .74rem;
  letter-spacing: .05em;
  color: var(--ink-soft);
}
.opera-cta {
  align-self: center;
  margin-top: .3rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bronze-text);
  border-bottom: 1px solid var(--line);
  padding: .35em .3em .3em;
}
.opera-cta:hover { color: var(--bronze-d); border-color: var(--bronze); }
.opere-empty {
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  padding-block: 3rem;
}

/* ---------- Contatti ---------- */
.contact-strip { border-top: 1px solid var(--line); }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 3rem;
  margin-top: 2.2rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere; /* l'email non deve mai sfondare la card sui viewport stretti */
}
.contact-link svg { color: var(--bronze); flex: none; }
.contact-link:hover { color: var(--bronze-d); }
.banner {
  height: clamp(240px, 36vh, 420px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
.contact-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2.6rem;
}
.contact-card .contact-link {
  border: 1px solid var(--line);
  padding: 1.4rem 2.2rem;
  background: #fff;
  width: min(340px, 100%); /* larghezza uguale per le due card, non dettata dal contenuto */
  justify-content: center;
  text-align: left;
}
.contact-card .contact-link:hover { border-color: var(--bronze); }
.contact-card .contact-label {
  display: block;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .25em;
}
.contact-note {
  margin-top: 2.4rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------- Chi sono: mostre ---------- */
.mostre {
  max-width: 640px;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
}
.mostre li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  color: var(--ink);
}
.mostre li:first-child { border-top: 1px solid var(--line); }
.mostra-anno {
  font-family: var(--serif);
  font-style: italic;
  color: var(--bronze-text);
  flex: none;
  font-variant-numeric: tabular-nums;
}

/* ---------- Privacy / pagine di testo ---------- */
.prose-page { color: var(--ink-soft); }
.prose-page h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 2.2em 0 .7em;
}
.prose-page h2:first-child { margin-top: 0; }
.prose-page ul { list-style: none; padding-left: 1.2em; margin: 1em 0; }
.prose-page li { position: relative; margin-bottom: .45em; }
.prose-page li::before {
  /* em dash in escape ASCII: non dipende dal charset con cui è servito il CSS */
  content: '\2014';
  position: absolute;
  left: -1.2em;
  color: var(--bronze);
}
.prose-page a { border-bottom: 1px solid var(--line); }

/* ---------- 404 ---------- */
.p404 { padding-block: clamp(5rem, 14vw, 9rem); }
.p404-icon { margin: 0 auto 1.6rem; opacity: .8; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 7vw, 4.5rem) 0 2.4rem;
  text-align: center;
}
.footer-icon { margin: 0 auto 1rem; opacity: .85; }
.footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-soft);
}
.footer-nav { margin-top: 1.8rem; }
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .9rem 2rem;
}
.footer-nav a {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.footer-nav a:hover { color: var(--bronze-d); }
.footer-copy {
  margin-top: 2rem;
  font-size: .72rem;
  letter-spacing: .03em;
  line-height: 1.9;
  color: var(--ink-soft);
}
.footer-copy a { color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.footer-copy a:hover { color: var(--bronze-d); }

/* ---------- Lightbox ---------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(22, 21, 19, .96);
  display: grid;
  place-items: center;
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.lightbox.is-open { opacity: 1; }
.lb-stage {
  margin: 0;
  max-width: min(1400px, 94vw);
  text-align: center;
}
.lb-img {
  max-width: 94vw;
  max-height: 78vh; /* fallback per browser senza svh */
  max-height: 78svh;
  width: auto;
  height: auto;
  margin-inline: auto;
  object-fit: contain; /* durante il cambio quadro il frame precedente non va stirato */
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .8);
  background: #201f1d;
  transition: opacity .25s var(--ease);
}
.lb-img.is-loading { opacity: .25; }
.lb-caption {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.lb-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  color: #f4f1ec;
}
.lb-title:empty, .lb-meta:empty, .lb-count:empty { display: none; }
.lb-meta { font-size: .76rem; letter-spacing: .05em; color: rgba(244, 241, 236, .68); }
.lb-count { font-size: .72rem; letter-spacing: .14em; color: rgba(244, 241, 236, .62); font-variant-numeric: tabular-nums; }
.lb-cta {
  margin-top: .7rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .45rem 1.2rem;
}
.lb-cta-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: .98rem;
  color: rgba(244, 241, 236, .85);
}
.lb-cta-link {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #f4f1ec;
  border-bottom: 1px solid rgba(169, 138, 108, .8);
  padding: .35em .25em .25em;
}
.lb-cta-link:hover { color: #fff; border-color: #fff; }
.lb-btn[hidden] { display: none; }
.lb-btn {
  position: fixed;
  z-index: 410;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: rgba(244, 241, 236, .75);
  transition: color .25s var(--ease);
}
.lb-btn:hover { color: #fff; }
/* sul fondo scuro l'outline bronzo si perderebbe */
.lightbox :focus-visible { outline-color: rgba(244, 241, 236, .9); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; translate: 0 -50%; }
.lb-next { right: 10px; top: 50%; translate: 0 -50%; }
@media (max-width: 640px) {
  .lb-img { max-height: 62vh; max-height: 62svh; }
  .lb-prev { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); left: 22vw; translate: 0 0; }
  .lb-next { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); right: 22vw; translate: 0 0; }
  .lb-close { top: 8px; right: 8px; }
}
/* Telefono in orizzontale: meno altezza all'immagine o la caption esce dallo schermo */
@media (max-height: 520px) {
  .lb-img { max-height: 52vh; max-height: 52svh; }
  .lb-caption { margin-top: .6rem; }
}
body.lb-locked { overflow: hidden; }

/* ---------- Animazioni reveal ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
html.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- Motion ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    /* senza azzerare i delay, il velo del menu resterebbe visibile
       (e cliccabile) per 350ms dopo la chiusura */
    transition-delay: 0s !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
}

/* ---------- Schermi piccoli ---------- */
@media (max-width: 560px) {
  body { font-size: 15px; }
  .brand-text { font-size: 1rem; }
  .hero { min-height: 480px; }
  .contact-card .contact-link { width: 100%; }
}
