/* ==========================================================================
   Elia Vanni — foglio di stile comune («Chiaroscuro» caldo, un solo tema scuro)
   Indice:  1 variabili · 2 base e tipografia · 3 layout · 4 testata a pillola, menu e lingue · 5 pulsanti, chip, badge
            6 componenti (titoli di sezione, copertine, schede, numeri, linea del tempo, FAQ, invito, briciole, testo lungo)
            7 griglia fotografica giustificata · 8 moduli · 9 finestre (carta flottante) e avvisi · 10 mappa (Leaflet)
            11 piè di pagina · 12 movimento · 13 utilità
   Regole iPhone (skill website-creator): ogni elemento fisso o sticky vicino ai bordi è una pillola larga ≤ 86%
   (--bordo-pillola sotto i 900 px) e staccata ≥ 10 px; menu e lingue sono tendine DENTRO la testata; le finestre sono
   carte flottanti con il velo fatto da un'ombra (mai position: fixed; inset: 0); chiuse = hidden (display: none).
   Classi, variabili e componenti sono descritti in docs/ARCHITETTURA-FRONT.md.
   ========================================================================== */

/* ---------- 1. variabili (nomi fissi: docs/SPEC.md §2) ---------- */
:root {
  --bg: #0d0c0b;
  --bg-2: #141210;
  --surface: #1a1816;
  --surface-2: #221f1c;
  --line: rgba(241, 236, 228, .12);
  --line-2: rgba(241, 236, 228, .24);
  --text: #f1ece4;
  --muted: #a9a095;     /* 7,6:1 sul fondo: testo secondario */
  --faint: #7d756b;     /* 4,3:1: SOLO testo grande (≥ 24 px) o elementi non testuali */
  --accent: #d4b483;    /* ottone */
  --accent-2: #e8cfa3;
  --accent-ink: #14110d;
  --paper: #efe8dc;
  --paper-ink: #1b1713;
  --danger: #e0795f;
  --ok: #8fbf8a;
  /* derivate */
  --paper-muted: #5e554b;   /* 6:1 sulla carta */
  --paper-accent: #7a5a2c;  /* ottone scuro, 5,2:1 sulla carta */
  --placeholder: #8f877c;
  --veil: rgba(8, 7, 6, .94);
  --glass: linear-gradient(135deg, rgba(38, 34, 30, .74), rgba(13, 12, 11, .84));
  --glass-blur: blur(20px) saturate(1.4);

  --font-display: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --font-ui: 'Jost', 'Futura', 'Avenir Next', 'Century Gothic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-h1: clamp(2.8rem, 7.2vw, 6.4rem);
  --fs-h2: clamp(2rem, 4.4vw, 3.8rem);
  --fs-h3: clamp(1.4rem, 2.2vw, 1.9rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-xs: .8125rem;
  --fs-kicker: .75rem;

  --r-photo: 4px;
  --r-card: 14px;
  --r-block: 24px;
  --r-pill: 999px;
  --pad: clamp(20px, 5vw, 64px);
  --container: 1320px;
  --section-y: clamp(72px, 11vw, 160px);
  --gap: clamp(16px, 2.4vw, 32px);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --rimbalzo: cubic-bezier(.2, 1.4, .3, 1);
  --parte: cubic-bezier(.35, 0, .8, .55);

  /* iOS: margine laterale di ogni elemento fisso/sticky vicino ai bordi alto e basso. Sul computer non conta. */
  --bordo-pillola: 24px;
  --header-h: 66px;
  --header-space: calc(10px + env(safe-area-inset-top) + var(--header-h)); /* spazio che la testata occupa: la prima sezione ci passa sotto */
}
/* iOS: sotto i 900 px ogni pillola fissa/sticky è larga al massimo l'86% (anche a 320 px, iPhone con «Zoom display») */
@media (max-width: 899px) { :root { --bordo-pillola: max(26px, 7vw); --header-h: 60px; } }

/* ---------- 2. base e tipografia ---------- */
*, *::before, *::after { box-sizing: border-box; } /* iOS: la larghezza delle pillole comprende padding e bordo */
html {
  background-color: var(--bg); /* iOS: colore vero sotto la pagina (strisce di Safari, rimbalzo), mai trasparente */
  color-scheme: dark;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-space) + 16px);
  scrollbar-color: var(--surface-2) var(--bg);
}
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--bg); color: var(--text);
  font: 400 var(--fs-body)/1.65 var(--font-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-kerning: normal; overflow-x: clip;
  overflow-wrap: break-word; /* una parola più lunga della riga (tedesco, russo) va a capo invece di uscire */
}
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
:where(ul, ol)[class], :where(nav) :where(ul, ol) { padding: 0; list-style: none; } /* specificità zero: le classi dei componenti vincono */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -.005em; text-wrap: balance; overflow-wrap: break-word; }
h1, .h1 { font-size: var(--fs-h1); line-height: 1.02; font-weight: 400; letter-spacing: -.012em; }
h2, .h2 { font-size: var(--fs-h2); font-weight: 450; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.15; }
h4 { font-size: 1.375rem; line-height: 1.2; }
:is(h1, h2, h3, h4, .display) em { font-style: italic; font-weight: 400; color: var(--accent-2); } /* parole in corsivo per dare accento */
.display { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.02; font-weight: 400; letter-spacing: -.012em; text-wrap: balance; overflow-wrap: break-word; }
.display--xl { font-size: clamp(3.1rem, 8.6vw, 8rem); line-height: .98; }
p, li, dd { text-wrap: pretty; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
strong, b { font-weight: 600; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
/* lingue con parole lunghe: sillabazione dove il browser la sa fare, mai nei pulsanti e nelle etichette */
html:is(:lang(de), :lang(ru), :lang(fr)) { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 10 4 4; } /* si eredita: le eccezioni sotto valgono anche per i figli */
:is(.btn, .chip, .badge, .tag, .kicker, .label, .brand, nav, .breadcrumbs, .stat, .lang-grid) { hyphens: manual; -webkit-hyphens: manual; }

/* icone dello sprite: <svg class="i"><use href="/assets/icons.svg#nome"/></svg> */
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }
.i--sm { width: 1em; height: 1em; }
.i--lg { width: 1.6em; height: 1.6em; stroke-width: 1.4; }
.i--xl { width: 2.4em; height: 2.4em; stroke-width: 1.2; }

/* etichetta sopra i titoli (maiuscoletto spaziato, ottone) */
.kicker { display: inline-flex; align-items: center; gap: .9em; font: 500 var(--fs-kicker)/1.4 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.kicker::before { content: ''; flex: none; width: 1.9rem; height: 1px; background: currentColor; opacity: .75; }
.kicker--plain::before { display: none; }
.lead { font-size: clamp(1.125rem, 1.02rem + .45vw, 1.375rem); line-height: 1.55; font-weight: 350; color: var(--text); max-width: 62ch; }
.lead--serif { font: 400 clamp(1.5rem, 1.25rem + 1vw, 2.1rem)/1.32 var(--font-display); max-width: 30em; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.num { font-variant-numeric: lining-nums tabular-nums; }
.link { color: var(--accent-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: rgba(232, 207, 163, .45); transition: text-decoration-color .25s, color .25s; }
@media (hover: hover) { .link:hover { text-decoration-color: currentColor; color: var(--text); } }
.quote { position: relative; padding-left: clamp(20px, 2.6vw, 34px); border-left: 1px solid var(--accent); font: italic 400 clamp(1.6rem, 1.2rem + 1.8vw, 2.8rem)/1.25 var(--font-display); text-wrap: balance; max-width: 26em; }
.quote cite, .quote__by { display: block; margin-top: 1.1rem; font: 500 var(--fs-kicker)/1.4 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; font-style: normal; color: var(--muted); }

/* ---------- 3. layout ---------- */
.container { width: min(var(--container), 100% - 2 * var(--pad)); margin-inline: auto; }
.container--narrow { width: min(820px, 100% - 2 * var(--pad)); margin-inline: auto; }
.container--wide { width: min(1720px, 100% - 2 * var(--pad)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 7vw, 104px); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }
.section--alt { background: var(--bg-2); }
.section--line { border-top: 1px solid var(--line); }
/* sezioni «carta» (ritmo nelle pagine Chi sono e Metodo): i colori si ridefiniscono, i componenti li seguono */
.section--paper {
  --text: var(--paper-ink); --muted: var(--paper-muted); --faint: #6e655a; --accent: var(--paper-accent); --accent-2: #5c4219;
  --line: rgba(27, 23, 19, .13); --line-2: rgba(27, 23, 19, .26); --surface: #e6ddcf; --surface-2: #ddd2c1; --bg-2: #e9e1d4;
  background: var(--paper); color: var(--paper-ink); color-scheme: light;
}
.section--paper ::selection { background: var(--paper-ink); color: var(--paper); }
.section--paper :focus-visible { outline-color: var(--paper-ink); }
.stack { display: grid; gap: var(--stack, 1rem); align-content: start; }
.stack > * { min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--row-gap, 12px); }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 300px)), 1fr)); }
.grid > * { min-width: 0; }
.grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 640px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 720px) { .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.split { display: grid; gap: clamp(32px, 6vw, 104px); align-items: center; }
.split > * { min-width: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--wide-media { grid-template-columns: 1.25fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}
.frame { position: relative; overflow: hidden; border-radius: var(--r-card); background: var(--c, var(--surface)); }
.frame > img { width: 100%; height: 100%; object-fit: cover; }
/* intestazione semplice delle pagine senza copertina: lascia lo spazio della testata */
.page-head { padding-top: clamp(40px, 6vw, 96px); padding-bottom: clamp(32px, 5vw, 64px); } /* la testata sticky occupa già il suo spazio nel flusso */
.page-head .stack { --stack: 1.1rem; max-width: 900px; }
.page-top { padding-top: clamp(24px, 4vw, 48px); }

/* ---------- 4. testata a pillola (sticky, staccata dai bordi, larga ≤ 86% sotto i 900 px) ---------- */
.site-header {
  position: sticky; z-index: 60;
  top: calc(10px + env(safe-area-inset-top));                           /* iOS: staccata dal bordo alto */
  margin: calc(10px + env(safe-area-inset-top)) auto 0;
  width: min(1240px, calc(100% - 2 * var(--bordo-pillola)));            /* iOS: ≤ 86% sui telefoni, centrata */
  border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid rgba(241, 236, 228, .13);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  transform-origin: 50% 0;
  transition: transform .6s var(--rimbalzo), opacity .4s ease-out, visibility 0s, background-color .3s;
  view-transition-name: site-header;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .site-header { background: rgba(20, 18, 16, .97); } }
.site-header.is-hidden { /* scendendo sale e svanisce; risalendo torna (site.js) */
  transform: translate3d(0, calc(-100% - 40px - env(safe-area-inset-top)), 0) scale(.94); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .42s var(--parte), opacity .3s ease-in, visibility 0s .44s;
}
.site-header__bar { display: flex; align-items: center; gap: 8px; min-height: calc(var(--header-h) - 2px); padding: 0 7px 0 18px; }
@media (min-width: 900px) { .site-header__bar { gap: 14px; padding: 0 9px 0 24px; } }

/* marchio: simbolo del diaframma + nome in maiuscolo spaziato */
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; min-height: 44px; margin-right: auto; color: var(--text); }
.brand__mark { width: 28px; height: 28px; flex: none; color: var(--accent); transition: transform 1.2s var(--ease-out); }
.brand__name { font: 500 1.16rem/1 var(--font-display); letter-spacing: .17em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: .08em; }
@media (min-width: 420px) { .brand__name { font-size: 1.3rem; letter-spacing: .2em; } }
@media (hover: hover) { .brand:hover .brand__mark { transform: rotate(60deg); } }

.main-nav { display: none; align-items: center; gap: 2px; margin-inline: auto; }
.main-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 13px; border-radius: var(--r-pill); font-size: .9375rem; font-weight: 400; letter-spacing: .01em; color: rgba(241, 236, 228, .84); white-space: nowrap; transition: color .25s, background-color .25s; }
.main-nav a[aria-current]::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.main-nav a[aria-current] { color: var(--text); }
@media (hover: hover) { .main-nav a:hover { color: var(--accent-2); background: rgba(241, 236, 228, .05); } }
.site-header__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.site-header .header-cta { display: none; } /* sul telefono «Contatti» sta nel menu: il nome del marchio ha la precedenza */
@media (min-width: 640px) { .site-header .header-cta { display: inline-flex; } }

.menu { flex: none; } /* <details data-menu>: il <summary> è il pulsante, la tendina è il suo contenuto */
.menu:not([open]) .site-menu { display: none; } /* iOS: menu chiuso = display: none (e il browser non lo impagina fuori schermo) */
.menu-btn { position: relative; display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; list-style: none; user-select: none; -webkit-tap-highlight-color: transparent; transition: border-color .25s, background-color .25s; }
.menu-btn::-webkit-details-marker { display: none; }
.menu-btn::marker { content: ''; }
.menu-btn .i { grid-area: 1 / 1; width: 22px; height: 22px; transition: transform .35s var(--ease), opacity .25s; }
.menu-btn__close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.menu[open] > .menu-btn { border-color: var(--accent); }
.menu[open] > .menu-btn .menu-btn__open { opacity: 0; transform: rotate(90deg) scale(.6); }
.menu[open] > .menu-btn .menu-btn__close { opacity: 1; transform: none; }
@media (hover: hover) { .menu-btn:hover { border-color: var(--accent); } }

/* menu del telefono: una tendina DENTRO la pillola, larga come lei (iOS: mai un pannello fisso a tutto schermo) */
.site-menu {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  display: grid; gap: 6px; padding: 10px;
  max-height: calc(100svh - var(--header-space) - 28px); overflow: auto; overscroll-behavior: contain;
  border-radius: 28px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .85);
  animation: menu-in .35s var(--ease-out) both;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
.site-menu__list { display: grid; }
.site-menu__list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 4px 16px; border-radius: 18px; font: 450 1.6rem/1.15 var(--font-display); color: var(--text); }
.site-menu__list a .i { color: var(--faint); width: 20px; height: 20px; }
.site-menu__list a[aria-current] { color: var(--accent-2); }
.site-menu__list a[aria-current] .i { color: var(--accent); }
.site-menu__list a:active { background: var(--surface-2); }
@media (hover: hover) { .site-menu__list a:hover { background: var(--surface-2); } }
.site-menu__foot { display: grid; gap: 14px; padding: 12px 6px 6px; border-top: 1px solid var(--line); }
/* lingue nel menu del telefono: i sei nomi nativi in una griglia 2×3, voci da 46 px */
.lang-grid { display: grid; gap: 10px; }
.lang-grid__label { font: 500 var(--fs-kicker)/1.4 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); padding-inline: 4px; }
.lang-grid ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.lang-grid a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--line); font-size: .9375rem; line-height: 1.2; color: var(--text); }
.lang-grid a .i { width: 16px; height: 16px; color: var(--accent); }
.lang-grid a[aria-current] { border-color: rgba(212, 180, 131, .6); color: var(--accent-2); background: rgba(212, 180, 131, .06); }
.lang-grid a:active { background: var(--surface-2); }
@media (hover: hover) { .lang-grid a:hover { border-color: var(--line-2); background: var(--surface-2); } }
@media (min-width: 1100px) {
  .main-nav { display: flex; }
  .menu { display: none !important; }
}
@media (min-width: 1100px) and (max-width: 1279px) { .main-nav a { padding: 0 9px; font-size: .9rem; } .site-header__bar { gap: 10px; } }

/* selettore della lingua nella testata (da 1100 px): <details>, la lista è una tendina sotto la pillola */
.lang { position: relative; display: none; }
@media (min-width: 1100px) { .lang { display: block; } }
.lang > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: var(--r-pill); cursor: pointer; color: rgba(241, 236, 228, .84); font: 500 .8125rem/1 var(--font-ui); letter-spacing: .1em; user-select: none; transition: color .25s, background-color .25s; }
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary .i { width: 18px; height: 18px; }
.lang__chev { width: 14px !important; height: 14px !important; opacity: .7; transition: transform .3s var(--ease); }
.lang[open] .lang__chev { transform: rotate(180deg); }
@media (hover: hover) { .lang > summary:hover { color: var(--accent-2); background: rgba(241, 236, 228, .05); } }
.lang__list { position: absolute; z-index: 5; right: -6px; top: calc(100% + 14px); min-width: 200px; display: grid; gap: 2px; padding: 8px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .85); animation: menu-in .3s var(--ease-out) both; }
.lang__list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: .9375rem; color: var(--text); }
.lang__list a small { font: 500 .6875rem/1 var(--font-ui); letter-spacing: .14em; color: var(--muted); }
.lang__list a[aria-current] { color: var(--accent-2); }
@media (hover: hover) { .lang__list a:hover { background: var(--surface-2); } }

/* collegamento per saltare al contenuto (tastiera) */
.skip-link { position: absolute; z-index: 200; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -160%); padding: 12px 20px; border-radius: var(--r-pill); background: var(--text); color: var(--bg); font-weight: 500; transition: transform .25s var(--ease); }
.skip-link:focus { transform: translate(-50%, 0); outline-offset: 2px; }

/* ---------- 5. pulsanti, chip, badge, etichette ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 50px; padding: 12px 26px; border-radius: var(--r-pill); border: 1px solid transparent;
  font: 500 .9688rem/1.2 var(--font-ui); letter-spacing: .02em; text-align: center; text-wrap: balance;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn .i { width: 1.15em; height: 1.15em; transition: transform .35s var(--ease); }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--text); color: var(--bg); }                 /* avorio su scuro */
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--brass { background: transparent; color: var(--accent-2); border-color: rgba(212, 180, 131, .55); }
.btn--sm { min-height: 44px; padding: 8px 18px; font-size: .9063rem; }
.btn--lg { min-height: 58px; padding: 14px 34px; font-size: 1.0313rem; }
.btn--block { width: 100%; }
.btn--icon { width: 46px; min-height: 46px; height: 46px; padding: 0; border-radius: 50%; }
.btn--icon .i { width: 20px; height: 20px; }
@media (hover: hover) {
  .btn--primary:hover, .btn--accent:hover { background: var(--accent-2); color: var(--accent-ink); }
  .btn--ghost:hover { border-color: var(--accent); color: var(--accent-2); background: rgba(212, 180, 131, .06); }
  .btn--brass:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .btn:hover .i--move { transform: translateX(4px); }
}
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; pointer-events: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bg); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn--ghost.is-loading::after, .btn--brass.is-loading::after { border-color: var(--text); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
/* collegamento con sottolineatura animata: una linea sottile sempre visibile e una d'ottone che si allunga al passaggio */
.btn--link {
  min-height: 44px; padding: 6px 0; border: 0; border-radius: 0; color: var(--text);
  background: linear-gradient(var(--accent), var(--accent)) 0 calc(100% - 8px) / 0 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 0 calc(100% - 8px) / 100% 1px no-repeat;
  transition: background-size .55s var(--ease-out), color .3s;
}
@media (hover: hover) { .btn--link:hover { background-size: 100% 1px, 100% 1px; color: var(--accent-2); } }
.section--paper .btn--primary { background: var(--paper-ink); color: var(--paper); }
.section--paper .btn--ghost { color: var(--paper-ink); }
@media (hover: hover) { .section--paper .btn--primary:hover { background: #3a3128; color: var(--paper); } .section--paper .btn--ghost:hover { color: var(--paper-ink); border-color: var(--paper-ink); background: rgba(27, 23, 19, .05); } }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }

/* chip dei filtri: <button class="chip" aria-pressed="true|false"> */
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; max-width: 100%; padding: 6px 16px; text-align: left; line-height: 1.2; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--muted); font: 450 .9063rem/1.2 var(--font-ui); letter-spacing: .01em; cursor: pointer; transition: color .25s, border-color .25s, background-color .25s; }
.chip .i { width: 17px; height: 17px; }
.chip__n { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed='true'], .chip.is-active, .chip[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip[aria-pressed='true'] .chip__n, .chip.is-active .chip__n, .chip[aria-current] .chip__n { color: #4d463e; }
@media (hover: hover) { .chip:hover:not([aria-pressed='true']):not(.is-active):not([aria-current]) { color: var(--text); border-color: var(--accent); } }
@media (pointer: coarse) { .chip { min-height: 44px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font: 500 .6875rem/1.25 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); max-width: 100%; }
.badge .i { width: 13px; height: 13px; }
.badge--accent { border-color: rgba(212, 180, 131, .5); color: var(--accent-2); }
.badge--solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.badge--ok { border-color: rgba(143, 191, 138, .45); color: var(--ok); }
.badge--ok::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(143, 191, 138, .2); }
.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-xs); color: var(--muted); line-height: 1.2; transition: color .25s, background-color .25s; }
.tag .i { width: 14px; height: 14px; }
a.tag { min-height: 32px; }
@media (hover: hover) { a.tag:hover { color: var(--text); background: #2c2824; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 6. componenti ---------- */
/* titolo di sezione: etichetta + titolo + testo, link a destra (sotto, sui telefoni) */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; margin-bottom: clamp(36px, 5vw, 72px); }
.section-head__text { display: grid; gap: 18px; max-width: 760px; min-width: 0; }
.section-head__lead { color: var(--muted); font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); max-width: 60ch; }
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head--center .section-head__text { justify-items: center; }
.section-head--center .section-head__lead { margin-inline: auto; }

/* copertina delle pagine interne: immagine a tutta larghezza sotto la testata, velo scuro, testo in basso a sinistra */
.page-hero {
  position: relative; isolation: isolate; display: grid; align-items: end; overflow: hidden;
  margin-top: calc(-1 * var(--header-space)); /* passa sotto la pillola: niente fascia vuota in cima */
  padding-top: calc(var(--header-space) + 56px); padding-bottom: clamp(44px, 6vw, 96px);
  min-height: clamp(460px, 72vh, 780px); min-height: clamp(460px, 72svh, 780px);
  background: var(--bg-2);
}
.page-hero--tall { min-height: max(560px, 92vh); min-height: max(560px, 92svh); }
.page-hero--short { min-height: clamp(400px, 56vh, 600px); min-height: clamp(400px, 56svh, 600px); }
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; background: var(--c, var(--bg-2)); animation: hero-settle 2.6s var(--ease-out) both; }
@keyframes hero-settle { from { transform: scale(1.06); } }
.page-hero::after { /* velo: leggibile sopra qualunque foto, più scuro in basso dove sta il testo */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 12, 11, .62) 0, rgba(13, 12, 11, .12) 26%, rgba(13, 12, 11, .3) 52%, rgba(13, 12, 11, .94) 100%),
    linear-gradient(90deg, rgba(13, 12, 11, .55) 0, rgba(13, 12, 11, 0) 62%);
}
.page-hero__body { display: grid; gap: clamp(16px, 2vw, 24px); justify-items: start; min-width: 0; }
.page-hero__body > * { max-width: 940px; }
.page-hero__title { font-size: var(--fs-h1); }
.page-hero--tall .page-hero__title { font-size: clamp(3rem, 8vw, 7.4rem); }
.page-hero__lead { font-size: clamp(1.125rem, 1.02rem + .45vw, 1.375rem); line-height: 1.55; font-weight: 350; max-width: 58ch; color: rgba(241, 236, 228, .92); }
.page-hero .kicker { color: var(--accent-2); }
.page-hero__actions { margin-top: 8px; }

/* tessera con copertina e testo sopra (discipline, «sul campo»): <a class="tile" href="…"><img …><span class="tile__body">…</span></a> */
.tile { position: relative; isolation: isolate; display: grid; align-items: end; min-width: 0; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--r-card); background: var(--c, var(--surface)); color: var(--text); }
.tile--wide { aspect-ratio: 3 / 2; }
.tile > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10, 9, 8, .9) 0, rgba(10, 9, 8, .35) 45%, rgba(10, 9, 8, .05) 75%); transition: opacity .5s var(--ease); }
.tile__body { display: grid; gap: 6px; padding: clamp(18px, 2.4vw, 28px); }
.tile__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 50%; border: 1px solid rgba(232, 207, 163, .45); color: var(--accent-2); }
.tile__icon .i { width: 19px; height: 19px; }
.tile__title { font: 450 clamp(1.6rem, 1.3rem + 1vw, 2.2rem)/1.08 var(--font-display); }
.tile__meta { font-size: var(--fs-small); color: rgba(241, 236, 228, .82); }
.tile__count { font: 500 .6875rem/1.4 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); }
@media (hover: hover) { .tile:hover > img { transform: scale(1.045); } }

/* scheda generica */
.card { position: relative; display: grid; gap: 14px; align-content: start; padding: clamp(22px, 3vw, 34px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color .35s var(--ease), background-color .35s var(--ease), transform .45s var(--ease); }
.card__title { font-size: 1.6rem; line-height: 1.15; }
.card__text { color: var(--muted); }
@media (hover: hover) { .card--link:hover { border-color: rgba(212, 180, 131, .4); background: var(--surface-2); } }
/* collegamento «stirato»: tutta la scheda è cliccabile con un solo elemento nel giro dei tasti */
.stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card :is(.btn, a:not(.stretched)) { position: relative; z-index: 2; }

/* scheda sessione */
.shoot-card { position: relative; display: grid; gap: 16px; align-content: start; min-width: 0; }
.shoot-card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--r-photo); background: var(--c, var(--surface)); }
.shoot-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.shoot-card__count { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-pill); background: rgba(13, 12, 11, .78); color: var(--text); font: 500 .75rem/1 var(--font-ui); letter-spacing: .06em; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.shoot-card__count .i { width: 14px; height: 14px; }
.shoot-card__body { display: grid; gap: 8px; }
.shoot-card__meta { font: 500 var(--fs-kicker)/1.4 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.shoot-card__title { font-size: clamp(1.5rem, 1.3rem + .7vw, 1.9rem); line-height: 1.12; }
.shoot-card__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease-out); }
.shoot-card__place { color: var(--muted); font-size: var(--fs-small); }
@media (hover: hover) { .shoot-card:hover .shoot-card__media img { transform: scale(1.04); } .shoot-card:hover .shoot-card__title a { background-size: 100% 1px; } }

/* scheda prodotto (attrezzatura) */
.gear-card { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); scroll-margin-top: calc(var(--header-space) + 24px); }
.gear-card__media { position: relative; aspect-ratio: 1; background: radial-gradient(80% 70% at 50% 40%, #2a2622, #171513); overflow: hidden; }
.gear-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.gear-card__media .i { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; color: var(--faint); stroke-width: 1.1; }
.gear-card__year { position: absolute; top: 14px; left: 14px; }
.gear-card__body { display: grid; gap: 14px; align-content: start; padding: clamp(20px, 2.4vw, 28px); }
.gear-card__brand { font: 500 var(--fs-kicker)/1.4 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.gear-card__title { font-size: clamp(1.5rem, 1.35rem + .5vw, 1.85rem); line-height: 1.12; font-variant-numeric: lining-nums; }
.gear-card__summary { color: var(--muted); font-size: var(--fs-small); }
.gear-card__why { padding-left: 14px; border-left: 1px solid var(--accent); font-size: var(--fs-small); }
.gear-card__why strong { display: block; margin-bottom: 4px; font: 500 .6875rem/1.4 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.gear-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 4px; }
@media (hover: hover) { .gear-card:hover .gear-card__media img { transform: scale(1.04); } }
/* specifiche e dati di scatto: elenco di coppie etichetta/valore */
.specs { display: grid; gap: 0; font-size: var(--fs-small); }
.specs > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { color: var(--text); overflow-wrap: anywhere; }
.exif { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--line); }
.exif > div { display: grid; gap: 4px; align-content: start; padding: 14px 16px; background: var(--surface); }
.exif dt { font: 500 .6875rem/1.3 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.exif dd { font-size: var(--fs-small); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (min-width: 560px) { .exif--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* scheda servizio */
.service-card { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); transition: border-color .35s var(--ease); }
.service-card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--c, var(--surface-2)); }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.service-card__body { display: grid; gap: 16px; align-content: start; padding: clamp(22px, 2.6vw, 32px); }
.service-card__title { font-size: clamp(1.6rem, 1.4rem + .6vw, 2rem); line-height: 1.1; }
.service-card__tagline { color: var(--muted); }
.service-card__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-block: 14px; border-block: 1px solid var(--line); }
.service-card__price strong { font: 400 2.1rem/1 var(--font-display); color: var(--accent-2); font-variant-numeric: lining-nums; }
.service-card__price span, .service-card__price small { color: var(--muted); font-size: var(--fs-small); }
.service-card__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: var(--fs-small); }
.service-card__meta span { display: inline-flex; align-items: center; gap: 7px; }
.service-card__foot { margin-top: auto; padding-top: 6px; }
@media (hover: hover) { .service-card:hover { border-color: rgba(212, 180, 131, .4); } .service-card:hover .service-card__media img { transform: scale(1.035); } }
.checklist { display: grid; gap: 10px; font-size: var(--fs-small); }
.checklist li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.checklist .i { width: 18px; height: 18px; margin-top: .2em; color: var(--accent); }

/* fase del metodo */
.step { position: relative; display: grid; gap: 12px; align-content: start; min-width: 0; }
.step__num { font: 300 clamp(2.6rem, 2rem + 2vw, 3.6rem)/1 var(--font-display); color: var(--accent); font-variant-numeric: lining-nums; letter-spacing: .02em; }
.step__when { font: 500 var(--fs-kicker)/1.4 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.step__title { display: flex; align-items: center; gap: 12px; font-size: clamp(1.45rem, 1.3rem + .6vw, 1.9rem); line-height: 1.15; }
.step__title .i { color: var(--accent); width: 24px; height: 24px; }
.step__text { color: var(--muted); max-width: 62ch; }
.step__media { overflow: hidden; border-radius: var(--r-card); aspect-ratio: 3 / 2; background: var(--c, var(--surface)); margin-bottom: 6px; }
.step__media img { width: 100%; height: 100%; object-fit: cover; }

/* numeri (foto, sessioni, paesi, continenti) */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) var(--gap); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 1px solid var(--line-2); min-width: 0; }
.stat__value { font: 300 clamp(3.2rem, 2.4rem + 3.6vw, 6rem)/.9 var(--font-display); letter-spacing: -.02em; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.stat__label { font: 500 var(--fs-kicker)/1.45 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* linea del tempo (cronologia, fasi del metodo): <ol class="timeline"><li>…</li></ol> */
.timeline { position: relative; display: grid; gap: clamp(40px, 6vw, 80px); padding-left: 36px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(180deg, var(--accent), var(--line-2) 18%, var(--line-2) 82%, transparent); }
.timeline > li { position: relative; min-width: 0; }
.timeline > li::before { content: ''; position: absolute; left: -36px; top: .45rem; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); box-shadow: 0 0 0 5px var(--bg); }
.section--alt .timeline > li::before { background: var(--bg-2); box-shadow: 0 0 0 5px var(--bg-2); }
.section--paper .timeline > li::before { background: var(--paper); box-shadow: 0 0 0 5px var(--paper); }
.timeline__when { font: 400 clamp(1.6rem, 1.4rem + 1vw, 2.4rem)/1 var(--font-display); color: var(--accent); font-variant-numeric: lining-nums; margin-bottom: 10px; }
.timeline__title { font-size: var(--fs-h3); margin-bottom: 8px; }
.timeline__text { color: var(--muted); max-width: 62ch; }
@media (min-width: 900px) {
  .timeline--split > li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 48px; }
  .timeline--split .timeline__when { margin-bottom: 0; }
}

/* domande frequenti: <details> senza JavaScript */
.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__item > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 18px 0; cursor: pointer; font: 500 clamp(1.375rem, 1.25rem + .5vw, 1.65rem)/1.25 var(--font-display); transition: color .25s; }
.accordion__item > summary::-webkit-details-marker { display: none; }
.accordion__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); transition: transform .45s var(--ease), border-color .3s, background-color .3s; }
.accordion__icon .i { width: 18px; height: 18px; }
.accordion__item[open] .accordion__icon { transform: rotate(45deg); border-color: var(--accent); }
@media (hover: hover) { .accordion__item > summary:hover { color: var(--accent-2); } .accordion__item > summary:hover .accordion__icon { border-color: var(--accent); } }
.accordion__body { padding: 0 56px 26px 0; color: var(--muted); max-width: 75ch; }
.accordion__body > * + * { margin-top: .9em; }
.accordion__group { margin-top: clamp(32px, 4vw, 56px); margin-bottom: 14px; }
@supports (interpolate-size: allow-keywords) {
  .accordion { interpolate-size: allow-keywords; }
  .accordion__item::details-content { block-size: 0; overflow-y: clip; transition: block-size .45s var(--ease), content-visibility .45s allow-discrete; }
  .accordion__item[open]::details-content { block-size: auto; }
}

/* invito finale */
.cta-band { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(88px, 13vw, 190px); text-align: center; background: radial-gradient(ellipse 70% 70% at 50% 0%, rgba(212, 180, 131, .11), transparent 70%), var(--bg-2); border-top: 1px solid var(--line); }
.cta-band__inner { display: grid; justify-items: center; gap: 22px; }
.cta-band__mark { width: 44px; height: 44px; color: var(--accent); }
.cta-band__title { font-size: var(--fs-h2); max-width: 18em; }
.cta-band__text { color: var(--muted); max-width: 56ch; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); }
.cta-band .actions { justify-content: center; margin-top: 8px; }

/* briciole di pane */
.breadcrumbs { font-size: var(--fs-xs); color: var(--muted); letter-spacing: .02em; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: '/'; margin-inline: 10px; color: var(--faint); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; transition: color .25s; }
.breadcrumbs [aria-current] { color: var(--text); }
@media (hover: hover) { .breadcrumbs a:hover { color: var(--accent-2); } }

/* testo lungo (pagine legali, storie) */
.prose { max-width: 68ch; font-size: 1.0625rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.4rem); margin-top: 2em; }
.prose h3 { font-size: clamp(1.4rem, 1.3rem + .5vw, 1.65rem); margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .5em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.4em; }
.prose ul > li::before { content: ''; position: absolute; left: 0; top: .78em; width: .55em; height: 1px; background: var(--accent); }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.prose strong { color: var(--text); }
.prose blockquote { padding-left: 1.2em; border-left: 1px solid var(--accent); font: italic 400 1.5rem/1.4 var(--font-display); }
.prose--dropcap > p:first-of-type::first-letter { float: left; margin: .06em .12em 0 0; font: 400 4.2em/.8 var(--font-display); color: var(--accent); }

/* ---------- 7. griglia fotografica giustificata (puro CSS, niente colonne né librerie) ----------
   Ogni scheda ha --ar (larghezza/altezza), --w e --h impostati inline. flex-basis = --ar × altezza di riga e flex-grow = --ar × 100:
   in ogni riga lo spazio avanzato si divide in proporzione al rapporto d'aspetto, quindi le foto di una riga hanno la stessa altezza
   (×100 perché con fattori sotto 1 flexbox distribuirebbe solo una parte dello spazio). L'ultima riga non si stira: lo pseudo-elemento
   ::after prende tutto lo spazio libero. Altezza di riga --row: telefono = due orizzontali per riga, tablet = tre, computer ≈ 300 px. */
.gallery { --gutter: 6px; --row: calc((100% - var(--gutter)) / 3.02); display: flex; flex-wrap: wrap; gap: var(--gutter); }
.gallery::after { content: ''; flex: 999999 1 0px; height: 0; }
@media (min-width: 600px) { .gallery { --gutter: 8px; --row: calc((100% - 2 * var(--gutter)) / 4.6); } }
@media (min-width: 1100px) { .gallery { --gutter: 10px; --row: 250px; } }
@media (min-width: 1600px) { .gallery { --row: 280px; } }
.gallery--dense { --row: calc((100% - 2 * var(--gutter)) / 4.6); }
@media (min-width: 600px) { .gallery--dense { --row: calc((100% - 3 * var(--gutter)) / 6.2); } }
@media (min-width: 1100px) { .gallery--dense { --row: 180px; } }
.photo {
  position: relative; display: block; min-width: 0; overflow: hidden;
  flex-grow: calc(var(--ar, 1.5) * 100); flex-basis: calc(var(--ar, 1.5) * var(--row));
  aspect-ratio: var(--w, 3) / var(--h, 2);
  border-radius: var(--r-photo); background: var(--c, var(--surface)); color: var(--text);
}
.photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out), opacity .7s var(--ease); }
.photo__caption { position: absolute; inset: auto 0 0 0; display: grid; gap: 2px; padding: 40px 14px 12px; background: linear-gradient(0deg, rgba(10, 9, 8, .84) 0, rgba(10, 9, 8, .5) 55%, rgba(10, 9, 8, 0) 100%); pointer-events: none; transition: opacity .45s var(--ease), transform .55s var(--ease-out); }
.photo__title { font: 500 .9375rem/1.3 var(--font-ui); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo__meta { font: 400 .75rem/1.3 var(--font-ui); letter-spacing: .06em; color: rgba(241, 236, 228, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo:focus-visible { outline-offset: 2px; }
@media (hover: hover) {
  .photo__caption { opacity: 0; transform: translateY(8px); }
  .photo:hover .photo__caption, .photo:focus-visible .photo__caption { opacity: 1; transform: none; }
  .photo:hover > img { transform: scale(1.035); }
}
@media (hover: none) { /* sul telefono la didascalia si vede sempre, ma più piccola */
  .photo__caption { padding: 28px 10px 8px; }
  .photo__title { font-size: .8125rem; }
  .photo__meta { display: none; }
}
.gallery--plain .photo__caption { display: none; }
.photo[hidden] { display: none !important; }
/* foto che sfumano quando arrivano (site.js aggiunge .is-loaded; senza JavaScript o dopo 3 s si vedono comunque) */
.js :is(.photo, .fade-in) > img:not(.is-loaded) { opacity: 0; animation: show-anyway 0s 3s forwards; }
@keyframes show-anyway { to { opacity: 1; } }

/* pagina d'errore (404 e 500, server/routes/pages.mjs): una foto a tutta altezza dietro il testo */
.error-page { position: relative; isolation: isolate; display: grid; align-items: end; overflow: hidden; min-height: 100vh; min-height: 100svh; margin-top: calc(-1 * var(--header-space)); padding-top: calc(var(--header-space) + 56px); padding-bottom: clamp(72px, 9vw, 128px); background: var(--bg-2); }
.error-page__media { position: absolute; inset: 0; z-index: -2; margin: 0; }
.error-page__media img { width: 100%; height: 100%; object-fit: cover; background: var(--c, var(--bg-2)); }
.error-page::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(13, 12, 11, .6) 0, rgba(13, 12, 11, .2) 30%, rgba(13, 12, 11, .55) 60%, rgba(13, 12, 11, .95) 100%); }
.error-page__caption { position: absolute; z-index: 1; left: var(--pad); right: var(--pad); bottom: 18px; text-align: right; font-size: var(--fs-xs); color: rgba(241, 236, 228, .8); }
.error-page__caption a { display: inline-flex; min-height: 32px; align-items: center; }
@media (hover: hover) { .error-page__caption a:hover { color: var(--accent-2); } }
.error-page__text { display: grid; gap: 20px; justify-items: start; }
.error-page__text > * { max-width: 780px; }
.error-page__actions { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 8px; }

/* ---------- 8. moduli (campi ≥ 16 px: iOS non ingrandisce la pagina) ---------- */
.form-grid { display: grid; gap: 22px; }
.form-grid > * { min-width: 0; }
@media (min-width: 640px) { .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .span-2 { grid-column: 1 / -1; } }
.field { display: grid; gap: 9px; align-content: start; min-width: 0; }
.label { font: 500 .75rem/1.35 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.label .req { color: var(--accent); margin-left: 2px; }
.hint { font-size: var(--fs-xs); color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 54px; padding: 14px 16px;
  font: 400 1rem/1.4 var(--font-ui); /* iOS: almeno 16 px */
  color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.textarea { min-height: 168px; resize: vertical; line-height: 1.6; }
.select { padding-right: 48px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9a095' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 18px; }
.select option { background: var(--surface); color: var(--text); }
.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }
@media (hover: hover) { .input:hover, .select:hover, .textarea:hover { border-color: rgba(241, 236, 228, .38); } }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); background-color: var(--surface); box-shadow: 0 0 0 3px rgba(212, 180, 131, .22); }
.input:-webkit-autofill, .textarea:-webkit-autofill { -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 100px var(--surface) inset; }
.field.is-invalid :is(.input, .select, .textarea), :is(.input, .select, .textarea)[aria-invalid='true'] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(224, 121, 95, .16); }
.field.is-valid :is(.input, .select, .textarea) { border-color: rgba(143, 191, 138, .65); }
.field__error { display: none; align-items: flex-start; gap: 8px; font-size: var(--fs-xs); color: var(--danger); }
.field__error .i { width: 16px; height: 16px; margin-top: 1px; }
.field.is-invalid .field__error, .field__error.is-shown { display: flex; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; font-size: var(--fs-small); line-height: 1.5; color: var(--muted); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; display: grid; place-content: center; width: 24px; height: 24px; margin: 0; border: 1px solid var(--line-2); border-radius: 7px; background: var(--bg-2); cursor: pointer; transition: background-color .2s, border-color .2s; }
.check input::after { content: ''; width: 12px; height: 7px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .2s var(--ease); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.check a { color: var(--accent-2); text-decoration: underline; text-underline-offset: .2em; }
.field.is-invalid .check input { border-color: var(--danger); }
/* trappola anti-spam: un campo che le persone non vedono e i robot riempiono */
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.alert { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 16px 18px; border-radius: var(--r-card); border: 1px solid var(--line-2); background: var(--surface); font-size: var(--fs-small); }
.alert .i { width: 20px; height: 20px; margin-top: 2px; }
.alert--ok { border-color: rgba(143, 191, 138, .45); background: rgba(143, 191, 138, .07); }
.alert--ok .i { color: var(--ok); }
.alert--error { border-color: rgba(224, 121, 95, .5); background: rgba(224, 121, 95, .07); }
.alert--error .i { color: var(--danger); }
.alert--info .i { color: var(--accent); }

/* ---------- 9. finestre come carta flottante (lightbox, dialoghi) e avvisi ----------
   iOS: niente elemento fisso a tutto schermo. La carta è larga ≤ 86% sui telefoni e staccata dai bordi; il velo è la sua ombra enorme.
   Chiusa = attributo hidden. Si apre con public/assets/js/sheet.js (focus, Esc, tocco fuori, resto della pagina «inert»). */
.sheet, .modal {
  position: fixed; z-index: 100; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(var(--sheet-w, 640px), calc(100% - 2 * var(--bordo-pillola)));
  max-height: calc(100vh - 2 * (12px + max(env(safe-area-inset-top), env(safe-area-inset-bottom))));
  max-height: calc(100svh - 2 * (12px + max(env(safe-area-inset-top), env(safe-area-inset-bottom))));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-block);
  box-shadow: 0 0 0 100vmax var(--veil), 0 40px 120px -30px rgba(0, 0, 0, .9);
  animation: sheet-in .45s var(--ease-out) both;
}
.sheet[hidden], .modal[hidden] { display: none !important; }
@keyframes sheet-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(.985); } }
.sheet--sm { --sheet-w: 460px; }
.sheet--lg { --sheet-w: 920px; }
.sheet--photo { --sheet-w: 1480px; background: #0a0908; height: calc(100svh - 2 * (12px + max(env(safe-area-inset-top), env(safe-area-inset-bottom)))); }
.sheet__head, .modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 6px 24px; flex: none; }
.sheet__title, .modal__head h2 { font-size: 1.6rem; line-height: 1.15; }
.sheet__body, .modal__body { flex: 1 1 auto; min-height: 0; padding: 8px 24px 24px; overflow: auto; overscroll-behavior: contain; display: grid; grid-auto-rows: max-content; gap: 16px; align-content: start; } /* righe a misura: il contenuto scorre, non si schiaccia */
.sheet__foot { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
.sheet__close, .modal__x { flex: none; display: inline-grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(13, 12, 11, .55); color: var(--text); transition: border-color .25s, background-color .25s; }
.sheet__close .i, .modal__x .i { width: 20px; height: 20px; }
@media (hover: hover) { .sheet__close:hover, .modal__x:hover { border-color: var(--accent); background: rgba(13, 12, 11, .8); } }
html.has-sheet { overflow: hidden; }
/* impaginazione della lightbox del portfolio (il modulo è di pagina): foto a sinistra, scheda a destra; sui telefoni una sotto l'altra */
.lightbox { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; min-height: 0; }
.lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 12px; background: #0a0908; }
.lightbox__stage img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; background: var(--c, transparent); }
.lightbox__info { display: grid; grid-auto-rows: max-content; gap: 16px; align-content: start; min-height: 0; max-height: 46svh; padding: 20px 22px 24px; overflow: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); background: var(--surface); }
.lightbox__close { position: absolute; z-index: 3; top: 12px; right: 12px; }
.lightbox__nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1px solid rgba(241, 236, 228, .22); background: rgba(13, 12, 11, .6); color: var(--text); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color .25s, border-color .25s; }
.lightbox__nav .i { width: 22px; height: 22px; }
.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }
.lightbox__count { font: 500 .75rem/1 var(--font-ui); letter-spacing: .14em; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .lightbox__nav:hover { background: rgba(13, 12, 11, .85); border-color: var(--accent); } }
@media (min-width: 1000px) {
  .lightbox { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) 380px; }
  .lightbox__stage { padding: 24px; }
  .lightbox__info { max-height: none; border-top: 0; border-left: 1px solid var(--line); padding: 72px 30px 30px; }
}
/* avvisi brevi (link copiato…): UNA colonna fissa in basso, larga come una pillola e staccata dal bordo */
.toasts {
  position: fixed; z-index: 120; pointer-events: none;
  left: max(var(--bordo-pillola), env(safe-area-inset-left)); right: max(var(--bordo-pillola), env(safe-area-inset-right)); /* iOS: ≤ 86% */
  bottom: calc(10px + env(safe-area-inset-bottom));
  max-width: 460px; margin-inline: auto; display: grid; justify-items: center; gap: 8px;
}
@media (min-width: 900px) { .toasts { left: auto; right: 24px; bottom: 24px; width: 380px; margin-inline: 0; justify-items: end; } }
.toast { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 12px 18px; border-radius: var(--r-pill); background: var(--text); color: var(--bg); font-size: var(--fs-small); font-weight: 500; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8); animation: toast-in .45s var(--rimbalzo) both; }
.toast .i { width: 18px; height: 18px; }
.toast.err { background: var(--danger); color: var(--accent-ink); }
.toast.out { animation: toast-out .3s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.96); } }
@media (max-width: 899px) { body:has(input:focus, textarea:focus, select:focus) .toasts { display: none; } } /* con la tastiera aperta non coprono i campi */

/* ---------- 10. mappa Leaflet scura (tessere OSM scurite con un filtro: SOLO il livello delle tessere) ----------
   I selettori partono da :root perché leaflet.css si carica dopo, quando la mappa sta per entrare nello schermo. */
.map { position: relative; z-index: 0; width: 100%; height: min(78vh, 760px); height: min(78svh, 760px); min-height: 360px; overflow: hidden; border-radius: var(--r-block); background: var(--bg-2); border: 1px solid var(--line); }
.map--sm { height: clamp(260px, 42svh, 420px); min-height: 260px; border-radius: var(--r-card); }
:root .leaflet-container { background: #191816; font: 400 .875rem/1.4 var(--font-ui); color: var(--text); -webkit-tap-highlight-color: transparent; }
:root .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.35); }
:root .leaflet-container a { color: var(--accent-2); }
:root .leaflet-bar { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .8); }
:root .leaflet-bar a, :root .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font: 300 1.4rem/44px var(--font-ui); background: rgba(26, 24, 22, .94); color: var(--text); border-bottom: 1px solid var(--line); }
:root .leaflet-bar a:last-child { border-bottom: 0; }
:root .leaflet-bar a:hover, :root .leaflet-bar a:focus-visible { background: var(--surface-2); color: var(--accent-2); }
:root .leaflet-bar a.leaflet-disabled { background: rgba(26, 24, 22, .94); color: var(--faint); }
:root .leaflet-control-attribution { padding: 3px 10px; border-radius: 10px 0 0 0; background: rgba(13, 12, 11, .82); color: var(--muted); font-size: .6875rem; }
:root .leaflet-control-attribution a { color: var(--accent-2); }
:root .leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: var(--r-card); background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .9); }
:root .leaflet-popup-content { width: 240px; margin: 0; font: 400 .875rem/1.45 var(--font-ui); }
:root .leaflet-popup-tip { background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
:root .leaflet-container a.leaflet-popup-close-button { top: 6px; right: 6px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; background: rgba(13, 12, 11, .7); color: var(--text); font: 300 22px/1 var(--font-ui); }
/* contenuto dei popup: <div class="pop"><img class="pop__img"><div class="pop__body">…</div></div> */
.pop { display: grid; }
.pop__img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--c, var(--surface-2)); }
.pop__body { display: grid; gap: 4px; padding: 14px 16px 16px; }
.pop__meta { font: 500 .6875rem/1.4 var(--font-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.pop__title { font: 500 1.375rem/1.15 var(--font-display); color: var(--text); }
.pop__place { color: var(--muted); font-size: var(--fs-xs); }
.pop__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; min-height: 36px; font-weight: 500; color: var(--accent-2) !important; }
/* segnaposto: cerchio d'ottone con anello e numero di foto (L.divIcon con className 'pin-wrap' e html '<span class="pin">12</span>') */
.pin-wrap, .cluster-wrap { background: none !important; border: 0 !important; }
.pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--bg); font: 600 .8125rem/1 var(--font-ui); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 4px rgba(212, 180, 131, .28), 0 8px 18px -6px rgba(0, 0, 0, .8); transition: transform .3s var(--rimbalzo), box-shadow .3s, background-color .3s; }
.pin--sm { width: 26px; height: 26px; font-size: .6875rem; }
.pin.is-active, .leaflet-marker-icon:hover .pin, .leaflet-marker-icon:focus-visible .pin { background: var(--accent-2); transform: scale(1.18); box-shadow: 0 0 0 7px rgba(212, 180, 131, .32), 0 10px 22px -6px rgba(0, 0, 0, .9); }
.cluster { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(13, 12, 11, .88); color: var(--accent-2); border: 1px solid var(--accent); font: 500 1.05rem/1 var(--font-display); font-variant-numeric: lining-nums; box-shadow: 0 0 0 6px rgba(212, 180, 131, .16), 0 10px 22px -8px rgba(0, 0, 0, .9); }
.leaflet-marker-icon:focus-visible { outline: none; }

/* ---------- 11. piè di pagina ---------- */
.site-footer { position: relative; padding-top: clamp(72px, 10vw, 140px); padding-bottom: calc(28px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-small); }
.footer__brand { display: inline-flex; align-items: center; gap: .32em; max-width: 100%; color: var(--text); font: 400 clamp(2.3rem, 9.4vw, 8.6rem)/.95 var(--font-display); letter-spacing: .08em; text-transform: uppercase; flex-wrap: wrap; }
.footer__brand .brand__mark { width: .62em; height: .62em; color: var(--accent); }
.footer__tagline { margin-top: 18px; font: italic 400 clamp(1.4rem, 1.2rem + 1vw, 2.1rem)/1.25 var(--font-display); color: var(--accent-2); }
.footer__role { margin-top: 8px; color: var(--muted); }
.footer__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 28px; margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 44px clamp(28px, 4vw, 64px); } }
.footer__col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.footer__groups { gap: 34px; }
.footer__group { display: grid; gap: 16px; }
.footer__contact { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer__contact { grid-column: auto; } }
.footer__title { font: 500 var(--fs-kicker)/1.4 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.footer__links { display: grid; gap: 2px; }
.footer__links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--text); opacity: .86; transition: color .25s, opacity .25s; }
@media (hover: hover) { .footer__links a:hover { color: var(--accent-2); opacity: 1; } }
.footer__contacts { display: grid; gap: 4px; }
.footer__contacts a, .footer__contacts span { display: inline-flex; align-items: center; gap: 12px; min-height: 36px; color: var(--text); overflow-wrap: anywhere; }
.footer__contacts .i { color: var(--accent); width: 18px; height: 18px; }
@media (hover: hover) { .footer__contacts a:hover { color: var(--accent-2); } }
.footer__note { color: var(--muted); font-size: var(--fs-xs); }
/* stato breve con il puntino verde (disponibilità): va a capo, a differenza dei badge */
.status { display: inline-flex; align-items: baseline; gap: 10px; color: var(--text); font-size: var(--fs-small); line-height: 1.45; }
.status::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(143, 191, 138, .18); transform: translateY(-1px); }
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text); transition: color .25s, border-color .25s, background-color .25s; }
.social .i { width: 19px; height: 19px; }
@media (hover: hover) { .social a:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); } }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: clamp(48px, 6vw, 80px); padding-top: 26px; border-top: 1px solid var(--line); font-size: var(--fs-xs); }
.footer__langs ul, .footer__legal ul { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.footer__langs a, .footer__legal a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); transition: color .25s; }
.footer__langs a[aria-current] { color: var(--accent-2); }
@media (hover: hover) { .footer__langs a:hover, .footer__legal a:hover { color: var(--text); } }
.footer__copy { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; color: var(--muted); }

/* ---------- 12. movimento: comparsa allo scorrimento, passaggi tra le pagine, movimento ridotto ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal:not(.is-in) { animation: show-revealed 0s 4.5s forwards; } /* rete di sicurezza: se lo script non parte, dopo qualche secondo tutto si vede */
@keyframes show-revealed { to { opacity: 1; transform: none; } }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; animation: none; }
  .js :is(.photo, .fade-in) > img:not(.is-loaded) { opacity: 1; animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 13. utilità ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; text-overflow: ellipsis; border: 0; } /* ellipsis: invisibile per scelta, non «tagliato» */
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-s { margin-top: 12px; } .mt-m { margin-top: 24px; } .mt-l { margin-top: clamp(40px, 5vw, 72px); }
.divider { height: 1px; background: var(--line); border: 0; }
