/* San Michele ai monti. Una pagina chiara come la calce della chiesa, con le sezioni delle riprese al buio.
   I colori vengono dal posto: la calce, il calcare grigio, l'arancio dei licheni, il verde del pino d'Aleppo,
   l'azzurro della foschia sul mare alle 17. Le capitali dei titoli guardano alle iscrizioni romane. */

@font-face { font-family: "Cinzel"; src: url("../fonts/Cinzel.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --calce: #f2eee5;
  --calce-2: #e7e1d3;
  --inchiostro: #22231e;
  --inchiostro-2: #5d5b52;
  --pietra: #8d887c;
  --lichene: #c4702b;
  --lichene-chiaro: #e7a15f;
  --lichene-testo: #9c5219;
  --pino: #2c4430;
  --foschia: #7fa0b9;
  --notte: #121411;
  --notte-2: #1c1f1a;
  --luce: #f4f1e8;
  --luce-2: rgb(244 241 232 / .74);
  --capitali: "Cinzel", "Optima", "Trajan Pro", Georgia, serif;
  /* la grana della calce: un rumore leggero, e qualche velatura più chiara come nelle pareti imbiancate a mano */
  --grana: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .34 0 0 0 0 .31 0 0 0 0 .25 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --testo: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --margine: clamp(20px, 5vw, 72px);
  --colonna: 34rem;
  --barra: var(--apulsense-bar-h, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--calce); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--calce); color: var(--inchiostro); font: 400 clamp(1.05rem, 1rem + .35vw, 1.28rem)/1.62 var(--testo); overflow-x: clip; }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--lichene); outline-offset: 3px; }
p { margin: 0 0 1em; }

/* ------------------------------------------------------------------ caratteri e segni comuni */
.occhiello, .quota { font: 500 .84rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1.1rem; }
.quota { color: var(--lichene-testo); }
[data-tono="scuro"] .quota { color: var(--lichene-chiaro); }
.titolo-sezione { font: 400 clamp(2.6rem, 1.6rem + 5.4vw, 7.4rem)/.95 var(--capitali); letter-spacing: .03em; text-transform: uppercase; margin: 0 0 .5em; text-wrap: balance; }
@media (max-width: 480px) { .titolo-sezione { font-size: 2.15rem; letter-spacing: .01em; } }
.titolo-sezione--piccolo { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3.2rem); }
.titolo-tappa { font: 400 clamp(1.9rem, 1.3rem + 2.6vw, 3.6rem)/1 var(--capitali); letter-spacing: .03em; text-transform: uppercase; margin: 0 0 .55em; text-wrap: balance; }
.grande { font-size: clamp(1.3rem, 1.05rem + 1.05vw, 2rem); line-height: 1.38; text-wrap: pretty; }
.nota { margin-left: .12em; font: 600 .62em/1 var(--mono); vertical-align: super; color: var(--lichene-testo); text-decoration: none; }
.nota + .nota::before { content: "\202F"; }
[data-tono="scuro"] .nota { color: var(--lichene-chiaro); }
time { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* le sezioni chiare hanno la grana della calce */
[data-tono="chiaro"] { background-color: var(--calce); background-image: var(--grana), radial-gradient(90% 60% at 18% 12%, rgb(255 255 255 / .45), rgb(255 255 255 / 0) 70%), radial-gradient(70% 50% at 85% 70%, rgb(214 206 188 / .35), rgb(214 206 188 / 0) 70%); background-size: 240px 240px, 100% 100%, 100% 100%; }

/* il bordo fra le sezioni è il profilo vero del ciglio, nel colore della sezione che viene */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.orlo { position: absolute; z-index: 6; left: 0; right: 0; bottom: -1px; display: block; width: 100%; height: clamp(34px, 6.5vw, 104px); pointer-events: none; }
.orlo--calce { fill: var(--calce); }
.orlo--notte { fill: var(--notte); }
.orlo--specchio { transform: scaleX(-1); }
.chiesa, .pietre, .riprese, .gradino { position: relative; }

/* le sezioni scure: testo chiaro */
[data-tono="scuro"] { background: var(--notte); color: var(--luce); }

/* ------------------------------------------------------------------ l'apertura */
.apertura { position: relative; min-height: 100lvh; display: grid; align-content: end; padding: calc(var(--barra) + 12vh) var(--margine) clamp(28px, 7vh, 72px); overflow: clip; isolation: isolate; }
.apertura__media { position: absolute; inset: 0; z-index: -1; }
.apertura__media img, .apertura__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.apertura__media video { opacity: 0; transition: opacity 1.2s ease; }
.apertura__media video.suona { opacity: 1; }
/* il testo sta in basso a sinistra, sopra la chiesa bianca: lì l'immagine si scurisce davvero */
.apertura__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(12 14 11 / .66) 0%, rgb(12 14 11 / .34) 42%, rgb(12 14 11 / 0) 72%), linear-gradient(180deg, rgb(12 14 11 / .42) 0%, rgb(12 14 11 / 0) 18%, rgb(12 14 11 / .22) 36%, rgb(12 14 11 / .62) 60%, rgb(12 14 11 / .9) 100%); }
.apertura .occhiello, .apertura .titolo, .apertura__sotto, .apertura__dove { text-shadow: 0 1px 2px rgb(8 10 7 / .55), 0 2px 26px rgb(8 10 7 / .55); }
.apertura__testo { max-width: 76rem; }
/* in verticale la chiesa bianca sta proprio dietro il titolo: più scuro al centro e un'ombra sotto le lettere */
@media (max-aspect-ratio: 3/4) {
  .apertura__media::after { background: linear-gradient(180deg, rgb(12 14 11 / .42) 0%, rgb(12 14 11 / 0) 14%, rgb(12 14 11 / .45) 30%, rgb(12 14 11 / .72) 48%, rgb(12 14 11 / .92) 100%); }
}
.titolo { margin: 0 0 .32em; font: 400 clamp(2.9rem, 1rem + 7.4vw, 9.4rem)/.9 var(--capitali); letter-spacing: .02em; text-transform: uppercase; text-wrap: balance; }
.titolo span { display: block; }
.titolo span + span { padding-left: .9em; color: var(--lichene-chiaro); }
.apertura__profilo { position: relative; width: min(30rem, 78vw); height: clamp(1.8rem, 1.2rem + 1.6vw, 3rem); margin: 0 0 1.5em; }
.apertura__profilo svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.apertura__profilo path { fill: none; stroke: var(--luce-2); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.apertura__profilo span { position: absolute; left: var(--x); top: var(--y); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--lichene-chiaro); box-shadow: 0 0 0 5px rgb(231 161 95 / .25); }
.apertura__sotto { font-size: clamp(1.25rem, 1rem + 1.2vw, 2.1rem); line-height: 1.3; margin-bottom: 1.4em; max-width: 30em; }
.apertura__dove { max-width: 38em; color: rgb(244 241 232 / .92); font-size: clamp(1rem, .94rem + .22vw, 1.15rem); }
.apertura__giu { position: absolute; right: var(--margine); bottom: clamp(28px, 7vh, 72px); margin: 0; font: 500 .72rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--luce-2); writing-mode: vertical-rl; }
@media (max-width: 700px) { .apertura__giu { display: none; } }

/* ------------------------------------------------------------------ riprese: foto sotto, video sopra quando suona */
.ripresa { position: relative; margin: 0; overflow: clip; background: var(--notte-2); }
.ripresa img, .ripresa video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ripresa video { opacity: 0; transition: opacity .6s ease; }
.ripresa video.suona { opacity: 1; }
.ripresa--piena { height: 100lvh; }
.ripresa.ferma::before {
  content: "Tocca per avviare"; position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 56px 0 0; width: 13rem; text-align: center; font: 500 .62rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--luce);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='23' fill='rgba(8,10,7,.35)' stroke='%23f4f1e8' stroke-opacity='.8'/%3E%3Cpath d='M19 15l14 9-14 9z' fill='%23f4f1e8'/%3E%3C/svg%3E") center top / 46px no-repeat;
}
.ripresa { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ------------------------------------------------------------------ il ciglio: video fermo, testi che scorrono */
.ciglio { position: relative; }
.ciglio__palco { position: sticky; top: 0; height: 100lvh; }
.ciglio__palco .ripresa--piena::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(12 14 11 / .72) 0%, rgb(12 14 11 / .25) 55%, rgb(12 14 11 / 0) 100%); pointer-events: none; }
.ciglio__testi { position: relative; z-index: 1; margin-top: -100lvh; padding: 0 var(--margine); }
.ciglio__tappa { min-height: 100lvh; display: grid; align-content: center; max-width: var(--colonna); padding: 14vh 0; }
.ciglio__tappa:first-child { min-height: 110lvh; }
@media (max-width: 760px) {
  .ciglio__palco .ripresa--piena::after { background: linear-gradient(0deg, rgb(12 14 11 / .84) 0%, rgb(12 14 11 / .38) 46%, rgb(12 14 11 / .18) 64%, rgb(12 14 11 / .66) 100%); }
  .ciglio__tappa { align-content: end; padding-bottom: 12vh; }
}

/* ------------------------------------------------------------------ il gradino: la sezione del terreno, disegnata scorrendo */
.gradino { padding: clamp(5rem, 14vh, 9rem) var(--margine) clamp(7rem, 18vh, 12rem); }
.gradino__testa { max-width: 46rem; margin-bottom: clamp(2rem, 6vh, 3.5rem); }
.gradino__figura { margin: 0 0 clamp(2.5rem, 7vh, 4rem); }
.sezione { position: relative; margin: 0; height: clamp(240px, 42vh, 460px); }
.sezione svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sezione__linea { fill: none; stroke: var(--inchiostro); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sezione__mare { fill: var(--foschia); opacity: .38; }
.sezione__livello { stroke: var(--foschia); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sezione__segno { position: absolute; left: var(--x); top: var(--y); margin: 0; transform: translate(-50%, calc(-100% - 2.9rem)); font: 500 .68rem/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--inchiostro-2); text-align: center; white-space: nowrap; transition: opacity .6s ease, translate .6s ease; }
.sezione__segno b { display: block; font-weight: 600; color: var(--inchiostro); font-size: 1.15em; }
.sezione__segno::after { content: ""; position: absolute; left: 50%; top: calc(100% + .45rem); width: 1px; height: 2.1rem; background: currentColor; opacity: .45; }
.sezione__segno::before { content: ""; position: absolute; left: 50%; top: calc(100% + 2.9rem); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--inchiostro); }
.sezione__segno--chiesa, .sezione__segno--chiesa b { color: var(--lichene-testo); }
.sezione__segno--chiesa::before { width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; background: var(--lichene); box-shadow: 0 0 0 7px rgb(196 112 43 / .2); }
/* sotto la linea, dentro il tratteggio: un alone di calce le fa leggere senza riquadro */
.sezione__segno--sotto { transform: translate(-.4rem, 1.4rem); text-align: left; text-shadow: 0 0 3px var(--calce), 0 0 6px var(--calce), 0 0 12px var(--calce); }
.sezione__segno--sotto::after { display: none; }
.sezione__segno--sotto::before { left: .4rem; top: -1.4rem; }
/* a destra del pendio, sopra la linea che scende */
.sezione__segno--basso { transform: translate(.9rem, calc(-100% - .5rem)); text-align: left; }
.sezione__segno--basso::after { display: none; }
.sezione__segno--basso::before { left: -.9rem; top: calc(100% + .5rem); }
/* più in alto, con una guida lunga, per non toccare l'etichetta del chilometro */
.sezione__segno--alto { transform: translate(-50%, calc(-100% - 5.4rem)); }
.sezione__segno--alto::after { height: 4.6rem; }
.sezione__segno--alto::before { top: calc(100% + 5.4rem); }
@media (max-width: 700px) { .sezione__segno--alto { display: none; } }
.sezione__segno--destra { transform: translate(calc(-100% + .4rem), calc(-100% - 2.9rem)); text-align: right; }
.sezione__segno--destra::after, .sezione__segno--destra::before { left: auto; right: .4rem; }
.sezione__segno--destra::before { margin: -4.5px -4.5px 0 0; }
.sezione__penna { display: none; }
html.gradino-attivo .sezione__penna { display: block; position: absolute; left: 0; top: 0; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--lichene); box-shadow: 0 0 0 6px rgb(196 112 43 / .22); will-change: transform; }
html.gradino-attivo .sezione__segno:not(.acceso) { opacity: 0; translate: 0 10px; }
.gradino__nota { max-width: 44rem; margin: 1.2rem 0 0; font-size: .84rem; line-height: 1.5; color: var(--inchiostro-2); }
.gradino__tappe { max-width: var(--colonna); }
.gradino .tappa { padding: 0 0 1.6rem; }
/* sul computer il disegno resta fermo a destra e il testo scorre a sinistra, senza passargli sotto */
@media (min-width: 1000px) {
  .gradino { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.6fr); grid-template-rows: auto 1fr; column-gap: clamp(2.5rem, 5vw, 6rem); padding-top: 0; }
  .gradino__testa { grid-column: 1; grid-row: 1; margin: 0; padding-top: 30vh; }
  .gradino__testa .titolo-sezione { font-size: clamp(2.6rem, 4.1vw, 4.8rem); }
  .gradino__tappe { grid-column: 1; grid-row: 2; padding-bottom: 30vh; }
  .gradino .tappa { min-height: 62lvh; display: grid; align-content: center; padding: 0; }
  .gradino__figura { grid-column: 2; grid-row: 1 / span 2; align-self: start; position: sticky; top: var(--barra); height: calc(100lvh - var(--barra)); margin: 0; display: flex; flex-direction: column; justify-content: center; }
  .sezione { height: min(48lvh, 25vw); }
}
@media (max-width: 600px) {
  .sezione { height: 34lvh; }
  .sezione__segno { font-size: .7rem; letter-spacing: .05em; }
}

/* ------------------------------------------------------------------ la salita */
.salita { position: relative; }
.salita__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(12 14 11 / .86) 0%, rgb(12 14 11 / .2) 55%, rgb(12 14 11 / 0) 80%); pointer-events: none; }
.salita__testo { position: relative; z-index: 1; margin-top: -60lvh; padding: 0 var(--margine) 14vh; max-width: calc(var(--colonna) + 2 * var(--margine) + 8rem); }

/* ------------------------------------------------------------------ mille anni: sette strati della stessa veduta */
.tempo { position: relative; }
/* il velo viene prima e occupa il suo spazio, così a fine sezione se ne va con lei; il palco gli sta sotto */
.tempo__velo { position: sticky; top: 0; z-index: 4; height: 100lvh; overflow: clip; pointer-events: none; }
.tempo__palco { position: sticky; top: 0; height: 100lvh; margin-top: -100lvh; overflow: clip; background: var(--notte); }
.tempo__strati, .tempo__strato, .tempo__strato img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tempo__strato img { object-fit: cover; object-position: 47% 50%; }
.tempo__strato { opacity: 0; will-change: opacity; }
.tempo__strato:first-child { opacity: 1; }
.tempo__palco::after { content: ""; position: absolute; inset: 0; z-index: 3; background: linear-gradient(90deg, rgb(12 14 11 / 0) 34%, rgb(12 14 11 / .55) 62%, rgb(12 14 11 / .8) 100%), linear-gradient(0deg, rgb(12 14 11 / .55) 0%, rgb(12 14 11 / 0) 30%); pointer-events: none; }
.tempo .tappa .testo, .giro .tappa .testo, .ciglio__tappa { text-shadow: 0 1px 14px rgb(0 0 0 / .45); }
.tempo__anno { position: absolute; z-index: 2; left: var(--margine); bottom: clamp(18px, 5vh, 48px); margin: 0; font: 300 clamp(3rem, 2rem + 6vw, 8.5rem)/.9 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--luce); text-shadow: 0 2px 24px rgb(0 0 0 / .35); }
.tempo__dichiara { position: absolute; z-index: 2; left: var(--margine); top: calc(var(--barra) + 16px); max-width: 24rem; margin: 0; font: 500 .7rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--luce-2); text-shadow: 0 1px 8px rgb(0 0 0 / .5); }
/* il carotaggio: la colonna del tempo */
.carota { position: absolute; z-index: 2; left: calc(var(--margine) + 4px); top: calc(var(--barra) + 70px); bottom: calc(clamp(18px, 5vh, 48px) + clamp(3rem, 2rem + 6vw, 8.5rem) + 24px); width: 2px; }
.carota__asta { position: absolute; inset: 0; background: linear-gradient(180deg, var(--luce-2), rgb(244 241 232 / .2)); }
.carota__tacca { position: absolute; left: 12px; top: calc(var(--p) * 100%); transform: translateY(-50%); font: 500 .66rem/1 var(--mono); letter-spacing: .06em; color: var(--luce-2); white-space: nowrap; }
.carota__tacca::before { content: ""; position: absolute; left: -16px; top: 50%; width: 8px; height: 1px; background: currentColor; }
.carota__segno { position: absolute; left: -5px; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--lichene-chiaro); box-shadow: 0 0 0 5px rgb(231 161 95 / .25); transform: translateY(calc(var(--y, 0px) - 50%)); will-change: transform; }
.tempo__tappe { position: relative; z-index: 3; margin-top: -100lvh; }
.tempo .tappa { min-height: 140lvh; display: grid; align-content: center; justify-items: end; padding: 12vh var(--margine); }
.tempo .tappa:first-child { min-height: 120lvh; }
.tempo .tappa .testo { max-width: var(--colonna); }
.tempo .tappa--ritorno { min-height: 120lvh; }
.tappa__fermo { display: none; }
@media (max-width: 760px) {
  .tempo__palco::after { background: linear-gradient(0deg, rgb(12 14 11 / .82) 0%, rgb(12 14 11 / .55) 30%, rgb(12 14 11 / .12) 56%, rgb(12 14 11 / 0) 70%); }
  .tempo .tappa { justify-items: start; align-content: end; padding: 12vh calc(var(--margine) + 22px) 18vh var(--margine); min-height: 120lvh; }
  .tempo .tappa .grande { font-size: 1.2rem; }
  .tempo .tappa p { font-size: 1rem; }
  .tempo .tappa .titolo-tappa { font-size: 1.85rem; }
  .tempo__anno { top: calc(var(--barra) + 48px); bottom: auto; left: auto; right: var(--margine); font-size: clamp(2.2rem, 1.4rem + 7vw, 3.6rem); }
  .tempo__dichiara { top: calc(var(--barra) + 12px); right: var(--margine); left: auto; text-align: right; max-width: 17.5rem; font-size: .7rem; letter-spacing: .05em; }
  .carota { left: auto; right: 12px; top: calc(var(--barra) + 112px); bottom: auto; height: 30vh; }
  /* le righe che salgono sfumano nel buio prima di arrivare all'anno */
  .tempo__velo::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--barra) + 300px); background: linear-gradient(180deg, rgb(12 14 11 / .94) 0%, rgb(12 14 11 / .84) 34%, rgb(12 14 11 / .42) 68%, rgb(12 14 11 / 0) 100%); }
  .carota__tacca { left: auto; right: 6px; font-size: 0; }
  .carota__tacca::before { left: auto; right: -10px; width: 6px; }
}
/* senza animazioni, o senza script: ogni tappa ha la sua immagine */
html:not(.tempo-attivo) .tempo__palco, html:not(.tempo-attivo) .tempo__velo { display: none; }
html:not(.tempo-attivo) .tempo__tappe { margin-top: 0; }
html:not(.tempo-attivo) .tempo .tappa { min-height: 0; display: block; padding: 0 0 clamp(3rem, 8vh, 6rem); }
html:not(.tempo-attivo) .tappa__fermo { display: block; margin-bottom: 1.6rem; }
html:not(.tempo-attivo) .tappa__fermo img { width: 100%; height: auto; }
html:not(.tempo-attivo) .tempo .tappa .testo { margin: 0 var(--margine); }

/* ------------------------------------------------------------------ la chiesa */
.chiesa { padding: clamp(5rem, 14vh, 10rem) var(--margine) clamp(4rem, 10vh, 8rem); }
.chiesa__testa { max-width: 52rem; margin-bottom: clamp(2.5rem, 7vh, 5rem); }
.chiesa__corpo { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: start; margin-bottom: clamp(3rem, 9vh, 6rem); }
@media (min-width: 960px) { .chiesa__corpo { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.chiesa__testo { max-width: var(--colonna); }
.pianta { margin: 0; }
.pianta svg { width: 100%; height: auto; overflow: visible; }
.pianta .traccia { fill: none; stroke: var(--inchiostro); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1600; stroke-dashoffset: 1600; transition: stroke-dashoffset 1.6s cubic-bezier(.3, 0, .2, 1) var(--d, 0s); }
.pianta .traccia--fine { stroke-width: 1.2; stroke: var(--pietra); stroke-dasharray: 6 5; stroke-dashoffset: 0; opacity: 0; transition: opacity 1s ease var(--d, 0s); }
.pianta .traccia--murato { stroke: var(--lichene); stroke-width: 6; stroke-linecap: butt; }
.pianta .traccia--porta { stroke: var(--lichene); stroke-width: 1.6; }
.pianta__poche { opacity: 0; transition: opacity 1.2s ease 1.2s; }
.pianta.disegna .pianta__poche { opacity: .75; }
.pianta__nomi text { font: 500 12px var(--mono); fill: var(--inchiostro-2); letter-spacing: .04em; opacity: 0; transition: opacity .8s ease 2.4s; }
@media (max-width: 600px) { .pianta__nomi text { font-size: 17px; } }
.pianta__freccia { fill: none; stroke: var(--inchiostro-2); stroke-width: 1.4; opacity: 0; transition: opacity .8s ease 2.4s; }
.pianta.disegna .traccia { stroke-dashoffset: 0; }
.pianta.disegna .traccia--fine, .pianta.disegna .pianta__nomi text, .pianta.disegna .pianta__freccia { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pianta .traccia { stroke-dashoffset: 0; transition: none; } .pianta .traccia--fine, .pianta__nomi text, .pianta__freccia { opacity: 1; transition: none; } .pianta__poche { opacity: .75; transition: none; } }
.pianta figcaption, .foto figcaption { margin-top: .9rem; font-size: .85rem; line-height: 1.5; color: var(--inchiostro-2); max-width: 40rem; }
.foto { margin: 0; }
.foto picture, .foto img { display: block; width: 100%; height: auto; }
.foto figcaption time { display: inline-block; margin-right: .6em; color: var(--lichene); }
.foto--larga { max-width: 72rem; }

/* ------------------------------------------------------------------ il giro d'orizzonte */
.giro { position: relative; }
.giro__palco { position: sticky; top: 0; height: 100lvh; overflow: clip; background: var(--notte); }
.giro__palco canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.giro__palco::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(12 14 11 / .7) 0%, rgb(12 14 11 / 0) 55%); pointer-events: none; }
.giro__dove { position: absolute; z-index: 2; right: var(--margine); top: calc(var(--barra) + 16px); margin: 0; font: 500 .7rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--luce-2); }
.giro__tappe { position: relative; z-index: 3; margin-top: -100lvh; padding: 0 var(--margine); }
.giro .tappa { min-height: 110lvh; display: grid; align-content: center; }
.giro .tappa .testo { max-width: var(--colonna); }
@media (max-width: 760px) {
  /* il testo sale fino al cielo: anche in alto l'immagine si scurisce */
  .giro__palco::after { background: linear-gradient(0deg, rgb(12 14 11 / .85) 0%, rgb(12 14 11 / .3) 45%, rgb(12 14 11 / .12) 62%, rgb(12 14 11 / .7) 100%); }
  .giro .tappa { align-content: end; padding-bottom: 14vh; }
}
html:not(.giro-attivo) .giro__palco { display: none; }
html:not(.giro-attivo) .giro__tappe { margin-top: 0; padding: clamp(4rem, 10vh, 7rem) 0; }
html:not(.giro-attivo) .giro .tappa { min-height: 0; display: block; padding: 0 0 2rem; }
html:not(.giro-attivo) .giro .tappa .testo { margin: 0 var(--margine); }

/* ------------------------------------------------------------------ pietre, licheni e zafferanastri */
.pietre { padding: clamp(5rem, 14vh, 10rem) var(--margine); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 5vh, 3.5rem) clamp(1.5rem, 4vw, 4rem); }
.pietre__testa { max-width: 50rem; }
.pietre__testo { max-width: var(--colonna); align-self: center; }
@media (min-width: 960px) {
  .pietre { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .pietre__testa { grid-column: 1 / 10; }
  .pietre__a { grid-column: 1 / 6; }
  .pietre__t1 { grid-column: 7 / 12; }
  .pietre__b { grid-column: 4 / 13; }
  .pietre__t2 { grid-column: 1 / 6; }
  .pietre__c { grid-column: 2 / 7; }
  .pietre__t3 { grid-column: 8 / 12; }
  .pietre__d { grid-column: 1 / 5; }
  .pietre__f { grid-column: 5 / 9; }
  .pietre__e { grid-column: 3 / 13; }
}

/* ------------------------------------------------------------------ la piana */
.piana { position: relative; }
.piana__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(12 14 11 / .88) 0%, rgb(12 14 11 / .3) 50%, rgb(12 14 11 / 0) 80%); pointer-events: none; }
.piana__testo { position: relative; z-index: 1; margin-top: -70lvh; padding: 0 var(--margine) 14vh; max-width: calc(var(--colonna) + 2 * var(--margine) + 10rem); }

/* ------------------------------------------------------------------ le riprese */
.riprese { padding: clamp(5rem, 14vh, 9rem) 0 clamp(2rem, 6vh, 4rem); }
.riprese__testa { padding: 0 var(--margine); max-width: 54rem; margin-bottom: clamp(2.5rem, 7vh, 5rem); }
.ripresa--figura { height: min(88lvh, 56.25vw); min-height: 70vh; margin-bottom: clamp(14px, 2.4vw, 32px); }
.ripresa--figura::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(8 10 7 / .62) 0%, rgb(8 10 7 / 0) 38%); pointer-events: none; }
.ripresa figcaption { position: absolute; z-index: 1; left: var(--margine); right: var(--margine); bottom: clamp(20px, 5vh, 52px); display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem clamp(1rem, 2.5vw, 2rem); }
.ripresa figcaption time { font: 300 clamp(2.6rem, 1.6rem + 5vw, 6rem)/.9 var(--mono); letter-spacing: -.03em; }
.ripresa figcaption small { font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--lichene-chiaro); }
.ripresa figcaption span { flex-basis: 100%; max-width: 30em; color: var(--luce-2); }

/* ------------------------------------------------------------------ andarci, come è fatto, fonti */
.andare, .come, .fonti { padding: clamp(4rem, 12vh, 8rem) var(--margine) 0; }
.andare > *, .come > *, .fonti > * { max-width: 44rem; }
.andare .grande { max-width: 40rem; }
.andare > .foto { max-width: 72rem; margin: clamp(2rem, 6vh, 3.5rem) 0; }
.come { color: var(--inchiostro-2); }
.fonti { padding-bottom: clamp(4rem, 12vh, 8rem); }
.fonti ol { margin: 0; padding: 0; list-style: none; counter-reset: fonte; }
.fonti li { counter-increment: fonte; position: relative; padding: .9rem 0 .9rem 3rem; border-top: 1px solid rgb(34 35 30 / .14); font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; scroll-margin-top: calc(var(--barra) + 20px); }
.fonti li::before { content: counter(fonte, decimal-leading-zero); position: absolute; left: 0; top: .95rem; font: 500 .85rem/1 var(--mono); color: var(--lichene); }
.fonti li:target { background: rgb(196 112 43 / .08); }

/* ------------------------------------------------------------------ i testi che entrano */
.entra { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.entra.visto { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .entra { opacity: 1; transform: none; transition: none; } }
