/* 01-tokens.css */
/* ============================================================
   Gettoni. Struttura di ERA Residence (avorio, inchiostro blu notte,
   azzurro polvere, un fondo profondo), toni dal filmato. Contrasti
   misurati in DESIGN.md §3.
   ============================================================ */
@font-face { font-family: 'Didone'; src: url('/assets/fonts/didone.woff2') format('woff2'); font-weight: 300 500; font-stretch: 62.5% 100%; font-display: swap; }
@font-face { font-family: 'Corsivo'; src: url('/assets/fonts/corsivo.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/assets/fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --paper: #F3F1EA;          /* l'intonaco della stanza */
  --paper-rgb: 243, 241, 234;
  --ink: #17233B;            /* inchiostro: 13,9:1 su avorio, 9,4:1 su azzurro */
  --ink-rgb: 23, 35, 59;
  --ink-soft: #545E70;       /* 5,3:1 su avorio. MAI sull'azzurro (3,6:1) */
  --cielo: #BCCBD1;          /* il cielo sopra le colline */
  --vino: #35151A;           /* caricamento, riquadri, piede */
  --vino-rgb: 53, 21, 26;
  --notte-rgb: 20, 12, 9;    /* la sfumatura calda sotto il testo sul filmato */
  --crema: #F3F1EA;          /* testo sul vino: 14,6:1 */
  --crema-soft: #C9B8B0;     /* 8,6:1 sul vino */
  --sabbia: #E6DFD2;         /* schede sull'avorio */
  --line: rgba(23, 35, 59, .22);
  --line-crema: rgba(243, 241, 234, .3);

  --f-didone: 'Didone', 'Bodoni 72', 'Didot', Georgia, serif;
  --f-corsivo: 'Corsivo', 'Snell Roundhand', cursive;
  --f-sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(20px, 5.4vw, 80px);
  --rail: clamp(0px, 7.6vw, 110px);    /* la colonna sinistra fissa */
  --maxw: 1320px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-in: cubic-bezier(.6, 0, .2, 1);
}

/* 02-base.css */
/* ============================================================
   Base: carta, caratteri, etichette, pillole e cerchi di ERA.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-sans); font-stretch: 125%; font-size: 15px; line-height: 1.45; letter-spacing: -.012em; -webkit-font-smoothing: antialiased; }
body[data-loading] { overflow: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
picture { display: block; }
/* le fotografie nei riquadri: il picture riempie il riquadro come l'img */
:is(.ps-m, .al-arch, .ln-foto, .sc-foto, .rg-shot, .rg-m, .cz-foto, .pf-foto, .ar-foto, .pw-foto, .cr-foto) > picture { width: 100%; height: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; text-decoration: none; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.skip-link:focus { top: 12px; }

/* --- il didone: tutti i titoli, in maiuscolo, condensato -------------------------- */
.tt, .cap-t, .lead-t, .ph-t, .cc-t, .sc-t, .mp-t, .pw-t, .pf-t, .ch-t, .cz-p, .ln-title, .cr-list, .ar-curve, .ft-tel {
  font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; text-transform: uppercase; line-height: .9; letter-spacing: -.02em;
}
.tt { font-size: clamp(44px, 6.4vw, 104px); }
/* la parola in corsivo intrecciata al titolo */
em.sc, .tt em, .cap-t em, .cc-t em, .mp-t em, .ch-t em, .ph-t em, .lead-t em, .pw-t em, .pf-t em {
  font-family: var(--f-corsivo); font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; line-height: 1;
  display: inline-block; font-size: .78em; margin: 0 .04em; transform: translateY(.18em) rotate(-4deg);
}

/* --- etichette: il grottesco largo a 700, maiuscolo spaziato ---------------------- */
.label, .cap-k, .lead-k, .ar-label, .ps-n, .rg-n, .ft-k, .ld-k, .hd-small, .note, .pf-sp, .sc-sp {
  font-family: var(--f-sans); font-stretch: 125%; font-weight: 700; font-size: 11.5px; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase;
}
.label { margin-bottom: 22px; }
.lede { font-size: clamp(15px, 1.15vw, 17px); line-height: 1.5; max-width: 34em; margin-top: 22px; }
.note { font-weight: 400; letter-spacing: .02em; color: var(--ink-soft); margin-top: 26px; text-transform: none; font-size: 12.5px; }

/* --- la pillola a filetto, che si riempie dal basso ------------------------------- */
.pill { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 26px; border: 1px solid currentColor; border-radius: 44px; text-decoration: none; font-weight: 400; font-size: 15px; letter-spacing: -.01em; overflow: hidden; isolation: isolate; cursor: pointer; background: none; transition: color .45s var(--ease); }
.pill::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateY(101%); border-radius: inherit; transition: transform .5s var(--ease); }
.pill:hover::before, .pill:focus-visible::before { transform: none; }
.pill:hover, .pill:focus-visible { color: var(--paper); }
[data-tone="dark"] .pill::before, [data-tone="photo"] .pill::before { background: var(--crema); }
[data-tone="dark"] .pill:hover, [data-tone="photo"] .pill:hover { color: var(--vino); }
.pill--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill--ink::before { background: var(--paper); }
.pill--ink:hover, .pill--ink:focus-visible { color: var(--ink); }

/* --- il cerchio: filetto sottile, due archi che girano ---------------------------- */
.cerchio { position: relative; display: inline-grid; place-items: center; width: clamp(150px, 15.6vw, 225px); aspect-ratio: 1; text-decoration: none; }
.cerchio span { position: relative; max-width: 62%; font-weight: 700; font-size: 11.5px; line-height: 1.35; letter-spacing: .05em; text-transform: uppercase; text-align: left; }
.cerchio-g { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; animation: giro 14s linear infinite; }
.cerchio-g circle { stroke: currentColor; stroke-opacity: .28; stroke-width: .5; vector-effect: non-scaling-stroke; }
.cerchio-a { stroke: currentColor; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.cerchio:hover .cerchio-g { animation-duration: 3.5s; }
.cerchio--light { color: var(--crema); }
.cerchio--ink { color: var(--ink); }
@keyframes giro { to { transform: rotate(360deg); } }

.ico-fr { width: 20px; height: 12px; flex: none; }
.prose p + p { margin-top: 1em; }
.prose h2 { font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; text-transform: uppercase; font-size: 36px; line-height: .95; margin: 44px 0 16px; }
.prose a { text-underline-offset: 3px; }
.dots li { position: relative; padding-left: 18px; margin-top: 6px; }
.dots li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* 03-layout.css */
/* ============================================================
   Guscio: sezioni e fondi, testata, colonna, menu, caricamento, piede.
   ============================================================ */
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) 0 calc(var(--gutter) + var(--rail) * .55); }
.wrap--narrow { max-width: calc(780px + 2 * var(--gutter)); }
.section { position: relative; padding: clamp(96px, 12vw, 180px) 0; overflow: clip; }
section[data-tone="light"], .ar-dome[data-tone="light"], .site-menu[data-tone="light"] { background: var(--paper); color: var(--ink); }
section[data-tone="cielo"], .ar-dome[data-tone="cielo"], .site-menu[data-tone="cielo"] { background: var(--cielo); color: var(--ink); }
section[data-tone="dark"] { background: var(--vino); color: var(--crema); }
section[data-tone="sabbia"] { background: var(--sabbia); color: var(--ink); }

/* --- testata, senza barra ------------------------------------------------------ */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; justify-content: space-between; align-items: flex-start; padding: 26px clamp(18px, 3.6vw, 56px); pointer-events: none; color: var(--ink); transition: color .4s var(--ease), transform .5s var(--ease); }
.site-header > * { pointer-events: auto; }
.site-header[data-tone="dark"], .site-header[data-tone="photo"] { color: var(--crema); }
.hd-seal { display: block; width: clamp(78px, 7.4vw, 112px); aspect-ratio: 1; text-decoration: none; }
.sigillo { position: relative; display: block; width: 100%; height: 100%; }
.sigillo-anello { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(var(--giro, 0deg)); }
.sigillo-anello text { fill: currentColor; font-family: var(--f-sans); font-stretch: 125%; font-weight: 700; font-size: 11.2px; letter-spacing: .08em; }
.sigillo-rosa { position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; }
.hd-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.hd-main { display: flex; flex-direction: column; align-items: flex-end; text-decoration: none; font-family: var(--f-didone); font-stretch: 62.5%; text-transform: uppercase; font-size: clamp(20px, 1.75vw, 27px); line-height: 1.02; letter-spacing: -.01em; margin-bottom: 14px; }
.hd-main span { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.hd-small { text-decoration: none; font-size: 9.5px; letter-spacing: .3em; }
.hd-small:hover, .hd-main:hover span { opacity: .7; }
/* sul filmato il sigillo e le voci hanno un bagliore d'intonaco dietro:
   in alto a sinistra ci sono le travi scure */
body[data-first-tone="film"] .site-header[data-tone="film"] .hd-seal,
body[data-first-tone="film"] .site-header[data-tone="film"] .hd-right { filter: drop-shadow(0 0 10px rgba(var(--paper-rgb), .95)) drop-shadow(0 0 22px rgba(var(--paper-rgb), .8)); }

/* --- la colonna sinistra: riga, contatore, «scorri» ---------------------------------- */
.rail { position: fixed; left: clamp(18px, 3.6vw, 56px); top: 0; bottom: 0; width: clamp(78px, 7.4vw, 112px); z-index: 30; pointer-events: none; color: var(--ink); display: flex; flex-direction: column; align-items: center; transition: color .4s var(--ease); }
.rail[data-tone="dark"], .rail[data-tone="photo"] { color: var(--crema); }
.rail-line { position: absolute; top: 29vh; height: 30vh; width: 1px; background: currentColor; opacity: .35; }
.rail-n { position: absolute; top: calc(29vh + 30vh * var(--r, 0) - 12px); padding: 4px 0; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; background: none; }
.rail-scroll { position: absolute; bottom: 44px; display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 9.5px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.rail-scroll span { writing-mode: vertical-rl; transform: rotate(180deg); }
.rail-scroll i { width: 1px; height: 40px; background: currentColor; position: relative; }
.rail-scroll i::after { content: ''; position: absolute; left: -3px; bottom: 0; width: 7px; height: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.rail-up { display: none; }
.rail.is-end .rail-go { display: none; }
.rail.is-end .rail-up { display: inline; }
.rail.is-end .rail-scroll i { transform: rotate(180deg); }
@media (max-width: 900px) { .rail { display: none; } }

/* --- il menu a tutto schermo: le linee in didone ------------------------------------- */
.site-menu { position: fixed; inset: 0; z-index: 60; background: var(--cielo); color: var(--ink); visibility: hidden; opacity: 0; transition: opacity .5s var(--ease), visibility 0s .5s; overflow: auto; }
.site-menu.is-open, .site-menu:target { visibility: visible; opacity: 1; transition: opacity .5s var(--ease); }
.mn-in { min-height: 100%; padding: 120px var(--gutter) 48px calc(var(--gutter) + var(--rail) * .55); display: flex; flex-direction: column; }
.mn-close { position: absolute; right: clamp(18px, 3.6vw, 56px); top: 30px; font-family: var(--f-didone); font-stretch: 62.5%; font-size: 27px; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; }
.mn-linee li { border-top: 1px solid var(--line); }
.mn-linee a { display: flex; align-items: baseline; gap: 22px; padding: 10px 0 6px; text-decoration: none; font-family: var(--f-didone); font-stretch: 62.5%; text-transform: uppercase; font-size: clamp(46px, 8.4vw, 124px); line-height: .92; letter-spacing: -.02em; }
.mn-linee em { font-style: normal; font-family: var(--f-sans); font-stretch: 125%; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; transform: translateY(-2.2em); }
.mn-linee a:hover span, .mn-linee a[aria-current] span { font-weight: 300; }
.mn-foot { margin-top: auto; padding-top: 48px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.mn-altre { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.mn-altre a, .mn-langs a { font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.mn-altre a[aria-current], .mn-langs a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
.mn-tel { font-family: var(--f-didone); font-stretch: 62.5%; font-size: 44px; text-decoration: none; }
.mn-langs { display: flex; gap: 18px; }
html.menu-open { overflow: hidden; }

/* --- il caricamento: vino, cornice smussata, corsivo in filigrana --------------------- */
.loader { position: fixed; inset: 0; z-index: 80; background: var(--vino); color: var(--crema); display: grid; place-items: center; transition: opacity .6s var(--ease), visibility 0s .6s; }
.js .loader[hidden] { display: grid; }
.loader:not(.is-done) { opacity: 1; }
.loader.is-done { opacity: 0; visibility: hidden; }
html:not(.js) .loader { display: none; }
.ld-frame { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); fill: none; stroke: rgba(var(--paper-rgb), .16); stroke-width: 1; }
.ld-script { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-corsivo); font-size: min(40vw, 62vh); color: rgba(var(--paper-rgb), .045); line-height: 1; pointer-events: none; white-space: nowrap; overflow: hidden; }
.ld-rosa { position: absolute; top: 12vh; width: 44px; height: 44px; color: rgba(var(--paper-rgb), .45); left: calc(50% - 22px); }
.ld-name { position: relative; font-family: var(--f-didone); font-stretch: 62.5%; text-transform: uppercase; font-size: clamp(44px, 7vw, 96px); letter-spacing: .02em; animation: ld-in 1.4s var(--ease) both; }
.loader-bar { position: absolute; bottom: 22vh; left: calc(50% - 90px); width: 180px; height: 1px; background: rgba(var(--paper-rgb), .2); }
.loader-bar i { position: absolute; left: 0; top: 0; height: 1px; width: 0; background: var(--crema); transition: width .3s var(--ease); }
.ld-k { position: absolute; bottom: 44px; color: var(--crema-soft); }
@keyframes ld-in { from { opacity: 0; letter-spacing: .3em; } to { opacity: 1; letter-spacing: .02em; } }

/* --- il piede: vino, la rosa, il numero enorme ------------------------------------------ */
.site-footer { position: relative; background: var(--vino); color: var(--crema); padding: clamp(110px, 14vw, 200px) var(--gutter) 40px; text-align: center; overflow: hidden; }
.ft-in { display: flex; flex-direction: column; align-items: center; }
.ft-rosa { width: 64px; height: 64px; margin-bottom: 26px; }
.ft-tel { display: block; font-size: clamp(64px, 11vw, 176px); line-height: .9; text-decoration: none; white-space: nowrap; }
.ft-k { margin-top: 30px; }
.ft-addr { margin-top: 8px; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5; }
.ft-mail { margin-top: 18px; font-size: 13px; }
.ft-mail a { text-underline-offset: 3px; }
.ft-bottom { max-width: 900px; margin: clamp(80px, 11vw, 150px) auto 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px 40px; text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.ft-legal { display: flex; flex-direction: column; gap: 4px; }
.ft-legal span:last-child { text-transform: none; color: var(--crema-soft); letter-spacing: 0; max-width: 34em; margin-top: 8px; }
.ft-links { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 30px; font-weight: 700; }
.ft-links a { text-decoration: none; }
.ft-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-header.is-hidden { transform: translateY(-130%); }
.rail[data-tone="film"] .rail-scroll { color: var(--crema); }
@media (max-width: 760px) {
  .site-header[data-tone="film"] { color: var(--crema); }
  body[data-first-tone="film"] .site-header[data-tone="film"] .hd-seal, body[data-first-tone="film"] .site-header[data-tone="film"] .hd-right { filter: none; }
}

/* 04-film.css */
/* ============================================================
   Il piano sequenza, a tutto campo. Il filmato e' tutto nei toni medi
   (luce calda di tardo pomeriggio): ne' l'inchiostro ne' il crema reggono
   senza aiuto. Testo in crema in basso, su una sfumatura calda dal bordo
   basso che vive solo con l'apertura e con il capitolo in scena. Niente
   aloni ne' schede (Piero, 27 settembre 2026). Il palco in lvh (memoria
   palco-lvh-iphone).
   ============================================================ */
.scrolly { position: relative; height: 1000vh; background: var(--paper); color: var(--ink); }
.scrolly-stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; }
.scrolly-canvas, .scrolly-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.scrolly-poster img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.scrolly-canvas { opacity: 0; transition: opacity .6s var(--ease); }
[data-painted="true"] .scrolly-canvas { opacity: 1; }
[data-painted="true"] .scrolly-poster { opacity: 0; transition: opacity .6s var(--ease) .6s; }
/* solo un velo leggero dall'alto per la testata: le travi sono scure */
.scrolly-veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(var(--paper-rgb), .28) 0%, rgba(var(--paper-rgb), 0) 20%); }

/* --- l'apertura (27 settembre 2026, seconda versione) --------------------------------
   Piero: «the hero is very ugly». La prima apertura metteva tre righe e un
   corsivo AL CENTRO, sopra la porta del bagno che e' il punto focale della
   stanza, piu' due frasi ai lati e un secondo «Scorri». Ora come le foto di
   ERA: il testo chiaro sta dove la foto scurisce, qui il pavimento in basso,
   e la stanza (porta, arco, travi) resta libera sopra. A sinistra il
   titolo, a destra la riga e i due bottoni, allineati sul fondo.
   La sfumatura calda dal basso e' la stessa dei capitoli (tools/sfumatura.py):
   0,58 piena fino al 31% dell'altezza, a zero al 62%; il crema regge 6,7:1
   sul titolo e 5,6:1 sulla riga a destra. Nessun alone, nessuna scheda. */
.scrolly-lead { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 23rem); align-items: end; align-content: end; gap: 40px 6vw; padding: 0 calc(var(--gutter) + 2vw) 84px calc(var(--rail) + var(--gutter) + 2vw); pointer-events: none; color: var(--crema); }
.scrolly-lead::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(var(--notte-rgb), .58) 0%, rgba(var(--notte-rgb), .58) 31%, rgba(var(--notte-rgb), .49) 38.75%, rgba(var(--notte-rgb), .29) 46.5%, rgba(var(--notte-rgb), .09) 54.25%, rgba(var(--notte-rgb), 0) 62%); }
.lead-k { margin-bottom: 22px; color: var(--crema); }
.lead-t { font-size: clamp(52px, min(6.4vw, 10.4vh), 104px); line-height: .88; letter-spacing: -.015em; }
.lead-t .wd { white-space: nowrap; }
.lead-t em.sc { display: block; font-size: .6em; line-height: 1; margin: .02em 0 .16em .95em; transform: rotate(-4deg); }
.lead-side { padding-bottom: 10px; }
.lead-p { font-size: 16px; line-height: 1.5; max-width: 22rem; }
.lead-act { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin-top: 28px; pointer-events: auto; }
.lead-act .pill::before { background: var(--crema); }
.lead-act .pill:hover, .lead-act .pill:focus-visible { color: var(--vino); }
.lead-tel { font-family: var(--f-didone); font-stretch: 62.5%; font-size: 28px; line-height: 1; text-decoration: none; border-bottom: 1px solid rgba(var(--paper-rgb), .5); padding-bottom: 3px; }
.lead-tel:hover { border-bottom-color: currentColor; }
@keyframes goccia { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* --- le didascalie ---------------------------------------------------------------------
   Nessuna scheda sopra il filmato: la didascalia sta in basso a sinistra, in
   crema, sulla stessa sfumatura calda dell'apertura, che entra ed esce con il
   capitolo (e' il ::before della fase, quindi segue la sua opacita'). Fra un
   capitolo e l'altro il filmato e' pulito. La posizione l'ha scelta
   tools/posti.py: nessun punto del fotogramma resta vuoto e chiaro per tutto
   un capitolo, il pavimento in basso e' l'unico che si puo' scurire senza
   coprire il soggetto. Densita' 0,58 fino al 31%, zero al 62%: il capitolo
   peggiore regge 5,3:1 sotto il titolo e sotto il testo. */
.scrolly-phase { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; padding: 0 calc(var(--gutter) + 3vw) 96px calc(var(--rail) + var(--gutter) + 2vw); pointer-events: none; color: var(--crema); }
.scrolly-phase::before { content: ''; position: absolute; inset: 0 0 -20px; z-index: -1; background: linear-gradient(0deg, rgba(var(--notte-rgb), .58) 0%, rgba(var(--notte-rgb), .58) 31%, rgba(var(--notte-rgb), .49) 38.75%, rgba(var(--notte-rgb), .29) 46.5%, rgba(var(--notte-rgb), .09) 54.25%, rgba(var(--notte-rgb), 0) 62%); }
[data-mode="scrub"] .scrolly-phase { opacity: 0; }
.scrolly-phase[data-side="right"] { justify-content: flex-end; padding-right: calc(var(--gutter) + 1vw); }
.scrolly-phase[data-side="right"] .cap { max-width: 25rem; }
.scrolly-phase[data-side="right"] .cap-t { font-size: clamp(36px, 3.3vw, 52px); }
.cap { position: relative; max-width: 36rem; }
.cap-k { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.cap-k b { font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; font-size: 30px; letter-spacing: 0; line-height: 1; }
.cap-t { font-size: clamp(40px, 3.9vw, 62px); line-height: .9; }
.cap-p { margin-top: 18px; max-width: 30rem; font-size: clamp(15px, 1.12vw, 17px); line-height: 1.5; }
.cap-link { pointer-events: auto; display: inline-flex; align-items: center; gap: 14px; margin-top: 20px; text-decoration: none; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.cap-link:hover .ico-fr { transform: translateX(4px); }
.cap-link .ico-fr { transition: transform .3s var(--ease); }
/* le righe entrano una dopo l'altra quando il capitolo e' attivo */
.js [data-mode="scrub"] .scrolly-phase .cap > :not(.cap-k) { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-mode="scrub"] .scrolly-phase.is-active .cap > :not(.cap-k) { opacity: 1; transform: none; }
.js [data-mode="scrub"] .is-active .cap > :nth-child(2) { transition-delay: 180ms; }
.js [data-mode="scrub"] .is-active .cap > :nth-child(3) { transition-delay: 300ms; }
.js [data-mode="scrub"] .is-active .cap > :nth-child(4) { transition-delay: 400ms; }

/* --- l'avanzamento: una riga sottile in basso al centro, il capitolo accanto ---------- */
.scrolly-hud { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 16px; opacity: 0; transition: opacity .5s var(--ease); }
.scrolly:has(.scrolly-phase.is-active) .scrolly-hud { color: var(--crema); }
.scrolly:has(.scrolly-phase.is-active) .scrolly-progress { background: rgba(var(--paper-rgb), .3); }
.scrolly:has(.scrolly-phase.is-active) .scrolly-progress i { background: var(--crema); }
.scrolly-hud { transition: opacity .5s var(--ease), color .4s var(--ease); }
.scrolly-counter { font-weight: 700; font-size: 11px; letter-spacing: .08em; }
.scrolly-counter span { opacity: .55; }
.scrolly-progress { position: relative; width: 180px; height: 1px; background: rgba(var(--ink-rgb), .25); }
.scrolly-progress i { position: absolute; left: 0; top: -.5px; height: 2px; width: 0; background: var(--ink); }
[data-painted="true"] .scrolly-hud { opacity: 1; }
[data-mode="static"] .scrolly-hud { display: none; }

/* --- il ripiego statico: il poster con l'apertura, poi i capitoli in colonna --------- */
.scrolly[data-mode="static"] { height: auto; }
[data-mode="static"] .scrolly-stage { position: relative; height: auto; overflow: visible; }
[data-mode="static"] .scrolly-poster { position: relative; height: 100vh; height: 100svh; }
[data-mode="static"] .scrolly-veil, [data-mode="static"] .scrolly-lead { height: 100vh; height: 100svh; bottom: auto; }
[data-mode="static"] .scrolly-canvas { display: none; }
[data-mode="static"] .scrolly-captions { padding: 100px 0; display: grid; gap: 100px; }
[data-mode="static"] .scrolly-phase { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px; align-items: center; opacity: 1; padding: 0 var(--gutter) 0 calc(var(--rail) + var(--gutter)); }
[data-mode="static"] .scrolly-phase { color: var(--ink); }
[data-mode="static"] .scrolly-phase::before { display: none; }
[data-mode="static"] .scrolly-still img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
[data-mode="scrub"] .scrolly-still { display: none; }

@media (max-width: 760px) {
  .scrolly { height: 820vh; }
  /* sul telefono in alto ci sono le travi scure: la testata passa al crema
     su una sfumatura calda dal bordo alto, invece del velo chiaro */
  .scrolly-veil { background: linear-gradient(180deg, rgba(var(--notte-rgb), .5) 0%, rgba(var(--notte-rgb), .2) 12%, rgba(var(--notte-rgb), 0) 20%); }
  .scrolly-lead { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 0 var(--gutter) 64px; }
  .scrolly-lead::before { background: linear-gradient(0deg, rgba(var(--notte-rgb), .6) 0%, rgba(var(--notte-rgb), .6) 35%, rgba(var(--notte-rgb), .5) 43.75%, rgba(var(--notte-rgb), .3) 52.5%, rgba(var(--notte-rgb), .1) 61.25%, rgba(var(--notte-rgb), 0) 70%); }
  .lead-k { margin-bottom: 16px; }
  .lead-t { font-size: clamp(40px, 12.4vw, 64px); }
  .lead-t em.sc { font-size: .78em; margin: .06em 0 .12em .7em; }
  .lead-p { font-size: 15px; }
  .lead-act { margin-top: 18px; }
  .scrolly-phase, .scrolly-phase[data-side="right"] { padding: 0 var(--gutter) 64px; justify-content: flex-start; }
  .scrolly-phase::before { background: linear-gradient(0deg, rgba(var(--notte-rgb), .6) 0%, rgba(var(--notte-rgb), .6) 35%, rgba(var(--notte-rgb), .5) 43.75%, rgba(var(--notte-rgb), .3) 52.5%, rgba(var(--notte-rgb), .1) 61.25%, rgba(var(--notte-rgb), 0) 70%); }
  .cap-t { font-size: 38px; }
  .cap-p { font-size: 15px; }
  .scrolly-hud { bottom: 18px; }
  .scrolly-progress { width: 110px; }
  [data-mode="static"] .scrolly-phase { grid-template-columns: 1fr; gap: 24px; padding: 0 var(--gutter); }
}
.scrolly-poster picture { width: 100%; height: 100%; }

/* 05-home.css */
/* ============================================================
   I blocchi della home, dal riferimento.
   ============================================================ */

/* --- i rami scontornati che entrano dai bordi (la buganvillea di ERA) ------------ */
.pianta { position: absolute; z-index: 1; pointer-events: none; height: auto; transform: translateY(var(--par, 0px)); will-change: transform; }
.pianta--tl { left: -4vw; top: -6vw; width: clamp(160px, 22vw, 360px); }
.pianta--br { right: -3vw; bottom: -6vw; width: clamp(200px, 32vw, 500px); }
.pianta--bl { left: -3vw; bottom: -8vw; width: clamp(200px, 30vw, 480px); }
.pianta--tr { right: -2vw; top: 3vw; width: clamp(180px, 24vw, 400px); }
.pianta--r { right: -4vw; top: 30%; width: clamp(200px, 30vw, 460px); }
@media (max-width: 760px) { .pianta { opacity: .9; } .pianta--tl, .pianta--tr { width: 44vw; } .pianta--br, .pianta--bl, .pianta--r { width: 52vw; } }

/* --- l'arco: la fotografia ferma, il semicerchio che sale sopra ------------------ */
.arco { position: relative; background: var(--cielo); color: var(--ink); }
.ar-foto { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; z-index: 0; }
.ar-foto img { width: 100%; height: 100%; object-fit: cover; }
.ar-dome { position: relative; z-index: 1; margin-top: -16vh; width: 100vw; background: var(--cielo); border-radius: 50vw 50vw 0 0; padding: 14.5vw var(--gutter) clamp(90px, 10vw, 150px); text-align: center; }
.ar-curve { position: absolute; left: 0; top: 0; width: 100%; height: 50vw; overflow: visible; }
.ar-curve text { fill: var(--ink); font-size: 40px; letter-spacing: 2px; }
.ar-in { position: relative; max-width: 1060px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.ar-mark { display: flex; align-items: center; gap: 22px; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.ar-rosa { width: 46px; height: 46px; }
.ar-line { display: block; width: 1px; height: clamp(70px, 9vw, 130px); background: var(--ink); opacity: .5; margin: 26px 0 30px; }
.ar-label { margin-bottom: 44px; }
.ar-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); text-align: left; margin-bottom: 64px; }
.ar-list li { border-top: 1px solid var(--line); padding-top: 22px; }
.ar-n { font-family: var(--f-didone); font-stretch: 62.5%; font-size: 30px; line-height: 1; display: block; margin-bottom: 18px; }
.ar-list h3 { font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; text-transform: uppercase; font-size: clamp(28px, 2.5vw, 38px); line-height: .92; margin-bottom: 14px; }
.ar-list p { max-width: 22em; }
@media (max-width: 900px) {
  .ar-dome { margin-top: -12vh; border-radius: 50vw 50vw 0 0; padding-top: 24vw; }
  .ar-curve text { font-size: 50px; }
  .ar-list { grid-template-columns: 1fr; }
}

/* --- le linee: il carosello su azzurro --------------------------------------------- */
.linee { padding-bottom: clamp(60px, 7vw, 110px); }
.label--c { text-align: center; }
.ln { position: relative; }
.ln-track { display: grid; grid-template-columns: minmax(0, 1fr); }
.ln-slide { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px) minmax(0, 1fr); grid-template-areas: 'facts foto text' 'title title title'; min-width: 0; gap: 0 clamp(24px, 3.6vw, 60px); align-items: center; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s .7s; }
.ln-slide.is-on { opacity: 1; visibility: visible; transition: opacity .7s var(--ease); }
.ln-facts { grid-area: facts; display: grid; gap: 26px; align-self: center; justify-self: end; text-align: right; max-width: 20rem; }
.ln-facts dt { font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.ln-facts dd { font-family: var(--f-didone); font-stretch: 62.5%; font-size: clamp(26px, 2.4vw, 38px); line-height: .95; text-transform: uppercase; }
.ln-foto { grid-area: foto; aspect-ratio: 4 / 5; overflow: hidden; }
.ln-foto img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.4s var(--ease); }
.ln-slide.is-on .ln-foto img { transform: none; }
.ln-text { grid-area: text; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 19rem; }
.ln-title { grid-area: title; font-size: clamp(56px, 11.4vw, 176px); line-height: .84; text-align: center; margin-top: -.34em; position: relative; z-index: 1; pointer-events: none; }
.ln-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 44px; }
.ln-b { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.ln-b:first-child .ico-fr { transform: rotate(180deg); }
.ln-n { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 11.5px; }
.ln-n i { position: relative; width: 150px; height: 1px; background: rgba(var(--ink-rgb), .25); }
.ln-n em { position: absolute; left: 0; top: -.5px; height: 2px; width: var(--w); background: var(--ink); transform: translateX(calc(var(--pos, 0) * 100%)); transition: transform .6s var(--ease); }
@media (max-width: 900px) {
  .ln-slide { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'foto' 'title' 'facts' 'text'; gap: 22px; }
  .ln-facts { justify-self: stretch; text-align: left; max-width: none; }
  .ln-title { margin-top: -.5em; }
  .ln-facts { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .ln-facts dd { font-size: 22px; }
}

/* --- la citazione sulla fotografia a tutta pagina ----------------------------------- */
.citazione { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; color: var(--crema); background: var(--vino); overflow: hidden; }
.cz-foto { position: absolute; inset: 0; }
.cz-foto img { width: 100%; height: 100%; object-fit: cover; }
.cz-veil { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 12, 10, .72) 0%, rgba(20, 12, 10, .32) 42%, rgba(20, 12, 10, 0) 70%); }
.cz-in { position: relative; z-index: 1; margin: 0 0 clamp(70px, 9vw, 130px) calc(var(--rail) + var(--gutter) + 8vw); max-width: 44rem; }
.cz-q { position: absolute; left: -.1em; top: -.62em; font-family: var(--f-didone); font-size: 150px; line-height: 1; opacity: .9; }
.cz-p { font-size: clamp(34px, 3.6vw, 58px); line-height: .95; }
.cz-in figcaption { margin-top: 24px; display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.cz-in figcaption span { font-weight: 400; }
.cz-cerchio { position: absolute; right: clamp(24px, 12vw, 200px); bottom: clamp(60px, 16vh, 180px); z-index: 1; }
@media (max-width: 760px) { .cz-in { margin-left: var(--gutter); margin-right: var(--gutter); margin-bottom: 200px; } .cz-cerchio { right: var(--gutter); bottom: 30px; width: 140px; } }

/* --- il concetto su avorio, con i rami -------------------------------------------------- */
.concetto { padding: clamp(150px, 18vw, 280px) 0; }
.cc { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cc-t { font-size: clamp(34px, 3.6vw, 56px); line-height: .96; }
.cc-p { margin-top: 44px; max-width: 24rem; font-size: 14.5px; line-height: 1.5; }
.cc-rosa { width: 46px; height: 46px; margin: 34px 0 30px; }
.cc--c { margin: 0 auto; }

/* --- la scala di parole, la fotografia accanto ---------------------------------------- */
.scala { padding-top: clamp(80px, 9vw, 140px); }
.sc { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 40px clamp(24px, 4vw, 70px); align-items: center; }
.sc-sp { position: absolute; left: 0; top: 50%; letter-spacing: .9em; font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; font-size: 22px; line-height: 1; transform: translateY(-50%); }
.sc-t { display: flex; flex-direction: column; font-size: clamp(60px, 7.8vw, 128px); line-height: .88; z-index: 2; position: relative; }
.sc-l:nth-child(1) { padding-left: 4%; }
.sc-l:nth-child(2) { padding-left: 30%; }
.sc-l:nth-child(3) { padding-left: 12%; }
.sc-side { display: flex; flex-direction: column; gap: 26px; }
.sc-foto { aspect-ratio: 4 / 5; overflow: hidden; }
.sc-foto img { width: 100%; height: 100%; object-fit: cover; }
.sc-text { max-width: 24rem; }
.sc-text h3 { font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; text-transform: uppercase; font-size: 34px; line-height: .95; margin-bottom: 12px; }
@media (max-width: 900px) { .sc { grid-template-columns: 1fr; } .sc-sp { position: static; transform: none; margin-bottom: 12px; font-size: 18px; } .sc-l:nth-child(n) { padding-left: 0; } .sc-l:nth-child(2) { padding-left: 18%; } }

/* --- la mappa disegnata ----------------------------------------------------------------- */
.mappa { padding-top: clamp(70px, 8vw, 120px); }
.mp-t { position: relative; z-index: 2; font-size: clamp(46px, 6.2vw, 100px); text-align: center; max-width: min(10em, 900px); margin: 0 auto; }
.mp { position: relative; margin: clamp(40px, 6vw, 90px) auto 0; width: min(100%, 1180px); aspect-ratio: 1000 / 300; }
.mp-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mp-line { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .mp-line { stroke-dashoffset: 1; transition: stroke-dashoffset 2.8s var(--ease); }
.js .mp.is-drawn .mp-line { stroke-dashoffset: 0; }
.mp-pts li { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, calc(-100% + 4px)); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.mp-pts li > i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); margin-top: 8px; box-shadow: 0 0 0 4px var(--paper); }
.mp-pts b { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.mp-pts span { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.mp-rosa { width: 34px; height: 34px; margin-top: 4px; background: var(--paper); border-radius: 50%; transform: translateY(13px); }
.js .mp-pts li { opacity: 0; transition: opacity .6s var(--ease); }
.js .mp.is-drawn .mp-pts li { opacity: 1; }
.js .mp.is-drawn .mp-pts li:nth-child(n) { transition-delay: calc(var(--x) * 0.02s); }
.mp-note { text-align: center; margin-top: 60px; font-size: 12.5px; color: var(--ink-soft); }
@media (max-width: 760px) { .mp { aspect-ratio: 1000 / 520; } .mp-pts b, .mp-pts span { font-size: 9px; letter-spacing: .02em; } }

/* --- la parola dentro la fotografia, che si allarga --------------------------------------- */
.parola-b { position: relative; height: 240vh; background: var(--paper); color: var(--crema); }
.pw-stage { position: sticky; z-index: 2; top: 0; height: 100vh; height: 100lvh; overflow: hidden; display: grid; place-items: center; }
.pw-foto { position: absolute; left: 50%; top: 50%; width: calc(64vw + 36vw * var(--p)); height: calc(64vh + 36vh * var(--p)); transform: translate(-50%, -50%); overflow: hidden; z-index: 2; }
.pw-foto img { width: 100%; height: 100%; object-fit: cover; }
.pw-foto::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 12, 10, calc(.62 * var(--p))) 0%, rgba(20, 12, 10, 0) 60%); }
.pw-word { position: absolute; left: 0; right: 0; top: 0; text-align: center; font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; text-transform: uppercase; font-size: calc(19vw + 4vw * var(--p)); line-height: .74; letter-spacing: .02em; color: rgba(255, 255, 255, .92); transform: translateY(-.1em); white-space: nowrap; mix-blend-mode: normal; }
.pw-over { position: absolute; z-index: 3; left: calc(var(--rail) + var(--gutter) + 4vw); right: var(--gutter); bottom: clamp(50px, 9vh, 110px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: end; opacity: clamp(0, calc((var(--p) - .6) * 3), 1); }
.pw-t { font-size: clamp(30px, 3vw, 50px); line-height: .96; max-width: 20em; grid-column: 1; }
.pw-by { grid-column: 1; margin-top: 16px; display: flex; flex-direction: column; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.pw-over .cerchio { grid-column: 2; grid-row: 1 / span 2; }
.parola-b .pianta { z-index: 1; }
.pw-over { color: var(--crema); }
@media (max-width: 760px) { .parola-b { height: 200vh; } .pw-foto { width: calc(84vw + 16vw * var(--p)); height: calc(60vh + 40vh * var(--p)); } .pw-over { grid-template-columns: 1fr; left: var(--gutter); } .pw-over .cerchio { grid-column: 1; grid-row: auto; width: 130px; } }

/* --- l'elenco a croci ------------------------------------------------------------------------ */
.croci { padding-bottom: 0; }
.cr-list { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; font-size: clamp(46px, 7.2vw, 116px); line-height: .9; text-align: center; margin-bottom: clamp(70px, 9vw, 130px); }
.cr-list li { position: relative; }
.cr-list i { position: absolute; right: -.5em; top: -.05em; font-style: normal; font-family: var(--f-sans); font-weight: 300; font-size: .26em; }
.cr-foto { position: relative; height: 100vh; overflow: hidden; }
.cr-foto img { width: 100%; height: 100%; object-fit: cover; }
.cr-note { width: min(92vw, 34rem); margin: 0 auto clamp(70px, 8vw, 120px); text-align: center; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }

/* --- i professionisti su fotografia -------------------------------------------------------------- */
.prof { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; color: var(--crema); overflow: hidden; background: var(--vino); }
.pf-foto { position: absolute; inset: 0; }
.pf-foto img { width: 100%; height: 100%; object-fit: cover; }
.pf-veil { position: absolute; inset: 0; background: radial-gradient(ellipse 62% 48% at 50% 48%, rgba(22, 14, 12, .84) 0%, rgba(22, 14, 12, .74) 100%); }
.pf-in { position: relative; z-index: 1; text-align: center; padding: 0 var(--gutter); }
.pf-t { font-size: clamp(56px, 9vw, 150px); line-height: .84; }
.pf-sp { margin-top: 26px; letter-spacing: .6em; font-weight: 400; font-family: var(--f-didone); font-stretch: 62.5%; font-size: clamp(16px, 1.6vw, 24px); }
.pf-p { margin: 26px auto 0; max-width: 30rem; font-size: 15px; }
.pf-list { position: absolute; z-index: 1; right: calc(var(--gutter) + 2vw); bottom: 9vh; text-align: right; display: flex; flex-direction: column; font-family: var(--f-didone); font-stretch: 62.5%; font-size: clamp(22px, 2.4vw, 38px); line-height: 1.02; text-transform: uppercase; }
.pf-list p { opacity: .55; }
.pf-list p:first-child { opacity: 1; }
.pf-cerchio { position: absolute; z-index: 1; left: 50%; bottom: 7vh; transform: translateX(-50%); }
@media (max-width: 900px) { .pf-list { display: none; } .pf-cerchio { width: 140px; } }
/* senza JavaScript il carosello diventa un elenco: tutte le linee, una sotto l'altra */
html:not(.js) .ln-slide { grid-area: auto; opacity: 1; visibility: visible; margin-bottom: 90px; }
html:not(.js) .ln-nav { display: none; }
html:not(.js) .parola-b { height: auto; } html:not(.js) .pw-stage { position: relative; }

/* 06-pagine.css */
/* ============================================================
   Le pagine interne: apertura, righe, passi, domande, altre linee,
   chiusa, aziende, testo, contatto, modulo.
   ============================================================ */

/* --- apertura con il tratto del filmato ----------------------------------------------- */
.ph { position: relative; }
/* Titolo su avorio, il tratto del filmato sotto a tutta larghezza: niente
   testo sopra il filmato, quindi niente velature (27 settembre 2026). */
.ph--media { background: var(--paper); color: var(--ink); padding-top: clamp(150px, 17vw, 230px); }
.ph-in { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 var(--gutter); }
.ph-k { margin-bottom: 2.4vh; }
.ph-t { font-size: clamp(64px, min(11vw, 19vh), 190px); line-height: .86; }
.ph-t em.sc { display: block; font-size: .46em; margin-top: -.12em; transform: rotate(-5deg) translateX(.8em); }
.ph-lede { margin-top: 3.4vh; max-width: 30rem; font-size: clamp(15px, 1.15vw, 17px); }
.ph-media { position: relative; margin-top: clamp(50px, 6vw, 90px); height: min(78vh, 56.25vw); overflow: hidden; }
.ph-media .clip { position: absolute; inset: 0; }
.clip img, .clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip video { opacity: 0; transition: opacity .8s var(--ease); }
.clip video[data-playing] { opacity: 1; }
.ph-media > picture, .ph-media > picture img { width: 100%; height: 100%; object-fit: cover; }
.ph--plain { padding: clamp(190px, 22vw, 290px) 0 clamp(70px, 8vw, 120px); text-align: center; }
.ph-plain { display: flex; flex-direction: column; align-items: center; }
.ph-plain .lede { margin-left: auto; margin-right: auto; }

/* --- le righe: la colonna ferma cambia fotografia ---------------------------------------- */
.rg-head { max-width: 900px; margin-bottom: clamp(50px, 6vw, 90px); }
.rg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(30px, 5vw, 90px); align-items: start; }
.rg-list li.rg-i { display: grid; grid-template-columns: 60px 1fr; gap: 0 12px; padding: 34px 0; border-top: 1px solid var(--line); transition: opacity .5s var(--ease); }
.rg-list li.rg-i:last-child { border-bottom: 1px solid var(--line); }
.js .rg-list li.rg-i { opacity: .38; }
.js .rg-list li.rg-i.is-on { opacity: 1; }
.rg-n { padding-top: 10px; }
.rg-i h3 { font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; text-transform: uppercase; font-size: clamp(34px, 3.6vw, 58px); line-height: .9; margin-bottom: 14px; }
.rg-i p { max-width: 30rem; }
.rg-f { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rg-f li { border: 1px solid var(--line); border-radius: 44px; padding: 5px 13px; font-size: 12.5px; }
.rg-m { display: none; grid-column: 1 / -1; margin-top: 20px; aspect-ratio: 4 / 3; overflow: hidden; }
.rg-m img { width: 100%; height: 100%; object-fit: cover; }
.rg-media { position: sticky; top: 14vh; aspect-ratio: 4 / 5; overflow: hidden; }
.rg-shot { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
.rg-shot.is-on { opacity: 1; }
.rg-shot img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 1.6s var(--ease); }
.rg-shot.is-on img { transform: none; }
@media (max-width: 900px) { .rg { grid-template-columns: 1fr; } .rg-media { display: none; } .rg-m { display: block; } .js .rg-list li.rg-i { opacity: 1; } }

/* --- i passi con la fotografia in testa ---------------------------------------------------- */
.ps-head { max-width: 900px; margin-bottom: clamp(50px, 6vw, 90px); }
.ps-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 2.4vw, 36px); }
.ps-list--3 { grid-template-columns: repeat(3, 1fr); }
.ps-m { aspect-ratio: 3 / 4; overflow: hidden; margin-bottom: 20px; border-radius: 50vw 50vw 0 0; }
.ps-m img { width: 100%; height: 100%; object-fit: cover; }
.ps-n { display: block; margin-bottom: 10px; }
.ps-list h3 { font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 2.2vw, 34px); line-height: .92; margin-bottom: 10px; }
@media (max-width: 900px) { .ps-list, .ps-list--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ps-list, .ps-list--3 { grid-template-columns: 1fr; } .ps-m { aspect-ratio: 4 / 3; } }

/* --- le domande ------------------------------------------------------------------------------- */
.fq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 5vw, 90px); }
.fq-head .tt { font-size: clamp(44px, 5vw, 80px); }
.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; display: flex; justify-content: space-between; gap: 20px; padding: 24px 0; cursor: pointer; font-family: var(--f-didone); font-stretch: 62.5%; text-transform: uppercase; font-size: clamp(22px, 2vw, 30px); line-height: 1; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary i { position: relative; flex: none; width: 16px; height: 16px; margin-top: 4px; }
.qa summary i::before, .qa summary i::after { content: ''; position: absolute; left: 0; right: 0; top: 7.5px; height: 1px; background: currentColor; transition: transform .35s var(--ease); }
.qa summary i::after { transform: rotate(90deg); }
.qa[open] summary i::after { transform: none; }
.qa-b { padding: 0 0 26px; max-width: 36rem; }
.qa-b p + p { margin-top: .8em; }
@media (max-width: 900px) { .fq { grid-template-columns: 1fr; } }

/* --- le altre linee: quattro archi ---------------------------------------------------------------- */
.al-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 40px); margin-top: 50px; }
.al-list a { display: flex; flex-direction: column; gap: 16px; text-decoration: none; }
.al-arch { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 50vw 50vw 0 0; }
.al-arch img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.al-list a:hover .al-arch img { transform: scale(1.05); }
.al-list b { font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; text-transform: uppercase; font-size: clamp(28px, 2.6vw, 40px); line-height: .92; }
.al-go { display: inline-flex; gap: 12px; align-items: center; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 760px) { .al-list { grid-template-columns: 1fr 1fr; } .al-list li:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* --- la chiusa su vino ---------------------------------------------------------------------------- */
.chiusa { position: relative; padding: clamp(120px, 15vw, 220px) var(--gutter); background: var(--vino); color: var(--crema); text-align: center; overflow: hidden; }
.ch-in { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.ch-rosa { width: 48px; height: 48px; margin-bottom: 30px; }
.ch-t { font-size: clamp(56px, 8vw, 130px); line-height: .86; max-width: 11em; }
.ch-p { margin-top: 28px; max-width: 28rem; color: var(--crema-soft); }
.ch-act { margin-top: 50px; display: flex; align-items: center; gap: 40px; flex-wrap: wrap; justify-content: center; }
.ch-tel { font-family: var(--f-didone); font-stretch: 62.5%; font-size: clamp(32px, 3vw, 48px); text-decoration: none; border-bottom: 1px solid currentColor; line-height: 1; }
.pianta--notte { opacity: .5; }

/* --- le aziende rappresentate ---------------------------------------------------------------------- */
.md { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(30px, 5vw, 90px); }
.md-head p { max-width: 30rem; margin-top: 18px; }
.md-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 20px 0; border-top: 1px solid rgba(var(--ink-rgb), .3); }
.md-list li:last-child { border-bottom: 1px solid rgba(var(--ink-rgb), .3); }
.md-list b { font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; text-transform: uppercase; font-size: clamp(28px, 2.6vw, 42px); line-height: 1; }
.md-list span { font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; text-align: right; }
[data-tone="cielo"] .note { color: var(--ink); }
@media (max-width: 900px) { .md { grid-template-columns: 1fr; } }

/* --- il testo lungo ---------------------------------------------------------------------------------- */
.testo { padding-top: 40px; }
.testo .prose { font-size: 15.5px; line-height: 1.6; }

/* --- il contatto e il modulo --------------------------------------------------------------------------- */
.ct { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(40px, 6vw, 110px); }
.ct-list li { padding: 20px 0; border-top: 1px solid var(--line); }
.ct-list span { display: block; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.ct-list p { font-size: 16px; }
.ct-big { font-family: var(--f-didone); font-stretch: 62.5%; font-size: 46px; line-height: 1; text-decoration: none; }
.form { margin-top: 40px; }
.chips { border: 0; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips legend { width: 100%; margin-bottom: 14px; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 10px 18px; border: 1px solid var(--ink); border-radius: 44px; font-size: 14px; transition: background .3s, color .3s; }
.chip input:checked + span { background: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.fld { position: relative; }
.fld--wide { grid-column: 1 / -1; }
.fld input, .fld select, .fld textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid rgba(var(--ink-rgb), .55); padding: 26px 0 10px; border-radius: 0; appearance: none; }
.fld textarea { resize: vertical; min-height: 110px; }
.fld label { position: absolute; left: 0; top: 26px; font-size: 16px; color: var(--ink-soft); transition: transform .25s var(--ease), font-size .25s var(--ease); pointer-events: none; transform-origin: left top; }
.fld input:focus + label, .fld input:not(:placeholder-shown) + label, .fld textarea:focus + label, .fld textarea:not(:placeholder-shown) + label, .fld--select label { transform: translateY(-22px); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-bottom-color: var(--ink); border-bottom-width: 2px; }
.fld em { font-style: normal; }
.fld--select::after { content: ''; position: absolute; right: 4px; top: 34px; width: 8px; height: 8px; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg); pointer-events: none; }
.fld-err { display: block; min-height: 18px; font-size: 12.5px; color: #8A1F1F; margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.consents { margin-top: 24px; display: grid; gap: 12px; }
.chk { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.chk input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.form .actions { margin-top: 30px; }
.form-ok { margin-top: 24px; padding: 20px 22px; background: var(--sabbia); font-size: 15px; }
@media (max-width: 900px) { .ct { grid-template-columns: 1fr; } .fields { grid-template-columns: 1fr; } }
.md-head .tt, .rg-head .tt, .ps-head .tt, .altre .tt { font-size: clamp(44px, 5.4vw, 88px); }


/* 07-diagrammi.css */
/* ============================================================
   I diagrammi animati delle pagine di servizio. Si tracciano quando
   entrano a un terzo in vista (.is-drawn da app.js). Senza JavaScript o
   con movimento ridotto sono gia' completi.
   ============================================================ */
.dg { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(30px, 5vw, 90px); align-items: center; }
.dg-text p { max-width: 30rem; margin-top: 16px; }
.dg-text .tt { font-size: clamp(44px, 5vw, 80px); }
.dg-leg { margin-top: 30px; display: grid; gap: 12px; }
.dg-leg li { display: flex; gap: 16px; align-items: baseline; }
.dg-leg b { font-family: var(--f-didone); font-stretch: 62.5%; font-weight: 400; font-size: 22px; }
.js .dg-leg li { opacity: .3; transition: opacity .5s var(--ease); transition-delay: calc(var(--i) * .5s + .4s); }
.js .is-drawn ~ * .dg-leg li, .js .dg.is-drawn .dg-leg li, .js [data-dg].is-drawn .dg-leg li { opacity: 1; }
.dg-fig { margin: 0; }
.dg-fig figcaption { margin-top: 16px; font-size: 12.5px; color: var(--ink-soft); }
[data-tone="cielo"] .dg-fig figcaption { color: var(--ink); }
.dg-svg { width: 100%; height: auto; overflow: visible; }
.dg-svg text { font-family: var(--f-sans); font-stretch: 125%; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; fill: var(--ink); }
.dg-frame, .dg-wall, .dg-axis, .dg-dim path, .dg-door, .dg-glass, .dg-hatch, .dg-grid { fill: none; stroke: var(--ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.dg-axis { stroke-dasharray: 6 5; stroke-width: 1; }
.dg-wall { stroke-width: 3; }
.dg-hatch { stroke-width: 1; opacity: .5; }
.dg-grid { stroke-width: 1; opacity: .18; }
.dg-dim path { stroke-width: 1; }

/* spina: i listelli si posano in ordine */
.dg-spina .pk { fill: #C9A57A; stroke: var(--paper); stroke-width: 1.5; }
.dg-spina .pk--b { fill: #B48D62; }
.js .dg-spina .pk { opacity: 0; transition: opacity .5s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.js .is-drawn .dg-spina .pk { opacity: 1; }

/* i tratti che si disegnano (pathLength="1") */
.js .dg-frame, .js .dg-wall, .js .dg-axis, .js .dg-dim path, .js .dg-door, .js .dg-glass, .js .dg-hatch { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease); }
.js .dg-axis { stroke-dasharray: 1; }
.js .is-drawn .dg-frame, .js .is-drawn .dg-wall, .js .is-drawn .dg-axis, .js .is-drawn .dg-dim path, .js .is-drawn .dg-door, .js .is-drawn .dg-glass, .js .is-drawn .dg-hatch { stroke-dashoffset: 0; }
.js .dg-dim text, .js .dg-tag, .js .dg-unit, .js .dg-wk, .js .dg-bl, .js .dg-bv { opacity: 0; transition: opacity .6s var(--ease) 1.2s; }
.js .is-drawn .dg-dim text, .js .is-drawn .dg-tag, .js .is-drawn .dg-unit, .js .is-drawn .dg-wk, .js .is-drawn .dg-bl, .js .is-drawn .dg-bv { opacity: 1; }
.js .dg-tag { transition-delay: calc(var(--i) * .35s + 1s); }

/* i pezzi del bagno e del decking arrivano dall'alto, uno per volta */
.dg-pc { fill: var(--sabbia); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.dg-pc--l { fill: var(--paper); }
.dg-pc--m { fill: #9B7A58; }
.dg-decking .dg-pc { fill: #8C8A84; }
.dg-decking .dg-pc--m { fill: #6E5B45; }
.js .dg-pc { opacity: 0; transform: translateY(-14px); transition: opacity .5s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i) * .28s + .5s); }
.js .is-drawn .dg-pc { opacity: 1; transform: none; }
.dg-tag { font-size: 11px !important; }

/* le barre: si allungano */
.dg-track { fill: rgba(var(--ink-rgb), .08); }
.dg-fill { fill: var(--ink); }
.dg-isola .dg-bar:nth-child(1) .dg-fill { fill: #B48D62; }
.dg-isola .dg-bar:nth-child(2) .dg-fill { fill: #6E5B45; }
.dg-isola .dg-bar:nth-child(3) .dg-fill { fill: var(--ink); }
.dg-bv { font-family: var(--f-didone) !important; font-stretch: 62.5% !important; font-weight: 400 !important; font-size: 22px !important; letter-spacing: 0 !important; }
.js .dg-fill { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); transition: transform 1.2s var(--ease); transition-delay: calc(var(--i) * .25s + .3s); }
.js .is-drawn .dg-fill { transform: none; }
.dg-ordine .dg-fill { fill: var(--ink); }
.dg-ordine .dg-row:nth-child(odd) .dg-fill { fill: #6E5B45; }

@media (max-width: 900px) { .dg { grid-template-columns: 1fr; } }

/* 08-motion.css */
/* ============================================================
   Movimento. I titoli entrano lettera per lettera come in ERA: dal
   sottile e trasparente al pieno. Le sezioni salgono appena. Tutto
   dietro .js: senza JavaScript la pagina e' completa. Con movimento
   ridotto nessuna animazione.
   ============================================================ */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js section.arco[data-reveal], .js .ar-dome[data-reveal] { transform: none; }

.ch { display: inline-block; }
.wd { display: inline-block; white-space: nowrap; }
.js [data-letters] .ch, .js [data-letters] .sc { opacity: .08; font-weight: 300; transition: opacity .7s var(--ease), font-weight .9s var(--ease); transition-delay: calc(var(--k) * 28ms); }
.js [data-letters].is-lit .ch, .js [data-letters].is-lit .sc { opacity: 1; font-weight: 400; }
.js [data-letters] em.sc { transform: translateY(.18em) rotate(-4deg) translateX(-.2em); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--k) * 28ms + .2s); }
.js [data-letters].is-lit em.sc { transform: translateY(.18em) rotate(-4deg); }
.js .lead-t[data-letters] em.sc, .js .ph-t[data-letters] em.sc { transform: rotate(-5deg) translateX(-.3em); }
.js .lead-t[data-letters].is-lit em.sc { transform: rotate(-5deg); }
.js .ph-t[data-letters].is-lit em.sc { transform: rotate(-5deg) translateX(.8em); }
.js .cr-list[data-letters] li { opacity: .12; transition: opacity .8s var(--ease); transition-delay: calc(var(--i) * .18s); }
.js .cr-list[data-letters].is-lit li { opacity: 1; }
.js .sc-t[data-letters] .sc-l { opacity: .1; transform: translateX(-24px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--i) * .16s); }
.js .sc-t[data-letters].is-lit .sc-l { opacity: 1; transform: none; }
.js .ar-list li { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i) * .15s); }
.js .ar-dome.is-in .ar-list li { opacity: 1; transform: none; }
.js .ar-curve { opacity: 0; transition: opacity 1.2s var(--ease) .1s; }
.js .ar-dome.is-in .ar-curve { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js [data-letters] .ch, .js [data-letters] .sc, .js .cr-list li, .js .sc-t .sc-l, .js .ar-list li, .js .ar-curve, .js .mp-pts li { opacity: 1 !important; transform: none !important; font-weight: 400 !important; }
  .js .mp-line, .js .dg-frame, .js .dg-wall, .js .dg-axis, .js .dg-dim path, .js .dg-door, .js .dg-glass, .js .dg-hatch { stroke-dashoffset: 0 !important; }
  .js .dg-pc, .js .dg-spina .pk, .js .dg-fill, .js .dg-dim text, .js .dg-tag, .js .dg-unit, .js .dg-wk, .js .dg-bl, .js .dg-bv, .js .dg-leg li { opacity: 1 !important; transform: none !important; }
  .pianta { transform: none !important; }
  .parola-b { height: auto; }
  .pw-stage { position: relative; }
  .parola-b { --p: 1 !important; }
  .pw-over { opacity: 1; }
}
