/* font locali: nessuna richiesta a server esterni */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* fallback con le metriche di Inter: niente salti quando il font arriva */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.12%;
  ascent-override: 90.2%;
  descent-override: 22.48%;
  line-gap-override: 0%;
}

:root {
  --red: #A3121A;
  --black: #000000;
  --anthracite: #21201E;
  --warm: #F8E8E4;
  --grey: #DEDBD6;

  --s-big: clamp(2.25rem, 7vw, 6rem);
  --s-mid: clamp(1.25rem, 2.2vw, 1.75rem);
  --s-small: clamp(0.9375rem, 1.2vw, 1.0625rem);

  --gutter: clamp(1.25rem, 5vw, 4rem);

  /* desktop: scroll-desktop.webp montata sulla stessa inquadratura di prima (scala e spostamento
     trovati per corrispondenza con la vecchia foto, in px della vecchia foto 1920x1080) */
  --fit-c: 1.43;
  --fit-x: -210;
  --fit-y: 24;

  /* posizione e area dell'hamburger (fisso in alto a sinistra) */
  --menu-top: clamp(0.75rem, 2vw, 1.5rem);
  --menu-size: 48px;

  /* sequenza d'ingresso della home: si regola da qui */
  --t-ignite: 2.8s;       /* accensione della foto */
  --t-zoom: 26s;          /* zoom lentissimo */
  --t-breathe-luce: 7s;
  --t-breathe-base: 9s;
  --words-delay: 1.4s;
  --word-step: 0.2s;
  --word-dur: 0.4s;
  --glow-dur: 1s;
  --glow-delay: calc(var(--words-delay) + 5 * var(--word-step) + var(--word-dur));
  --glow-end: calc(var(--glow-delay) + var(--glow-dur));
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background-color: #A3121A;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: #A3121A;
  color: var(--black);
  font-family: "Inter", "Inter Fallback", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: var(--s-small);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: #A3121A; color: #F8E8E4; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 4px;
}

/* menù hamburger */
.menu-btn {
  position: fixed;
  top: var(--menu-top);
  left: calc(var(--gutter) - 0.75rem);
  z-index: 30;
  width: var(--menu-size);
  height: var(--menu-size);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--black);
  cursor: pointer;
}

.menu-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--red);
  opacity: 0;
  pointer-events: none;
}


@media (prefers-reduced-motion: no-preference) {
  .menu-btn::before { transition: opacity 200ms ease; }
}

.menu-btn span {
  position: absolute;
  left: 12px;
  width: 24px;
  height: 2px;
  background: var(--black);
}
/* hamburger chiaro sulle pagine scure (Studio, Contatti) */
html.page-dark .menu-btn span { background: var(--warm); }

.menu-btn span:nth-child(1) { top: 16px; }
.menu-btn span:nth-child(2) { top: 23px; }
.menu-btn span:nth-child(3) { top: 30px; }

.menu-btn[aria-expanded="true"] span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { top: 23px; transform: rotate(-45deg); }
html.page-dark .menu-btn[aria-expanded="true"] span { background: var(--black); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--gutter);
  background: var(--red);
  color: var(--black);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s linear, visibility 0s linear 0.15s;
}

.menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.15s linear;
}

.menu ul { margin: 0; padding: 0; list-style: none; }

.menu a {
  display: inline-block;
  padding: 0.1em 0;
  font-size: var(--s-big);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* contenuto */
main {
  flex: 1;
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.big {
  margin: 0;
  max-width: 16ch;
  font-size: var(--s-big);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.small {
  margin: 0;
  color: var(--black);
  font-size: var(--s-small);
  font-weight: 400;
}

/* home */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.hero {
  flex: none;
  height: 190svh;
  position: relative;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #000000;
}

.hero-stick {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  container-type: size;
}

@media (max-width: 899px) {
  .hero { height: 170svh; }
}

.hero .mark {
  opacity: clamp(0, calc(1 - var(--p, 0) / 0.1), 1);
  position: absolute;
  top: calc(clamp(0.75rem, 2vw, 1.5rem) + 24px);
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 0;
}

.hero .mark img {
  display: block;
  width: clamp(308px, 56vw, 728px);
  height: auto;
}

.hero .line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90vw;
  max-width: 24ch;
  margin: 0;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #DEDBD6;
  font-size: clamp(1.75rem, 4.5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  opacity: clamp(0, calc(1 - var(--p, 0) / 0.08), 1);
}

.hero .line .w {
  display: inline-block;
  text-shadow: 0 5px 16px rgba(248, 232, 228, 0.3), 0 12px 34px rgba(248, 232, 228, 0.18);
}

.hero .glow {
  color: #FFFFFF;
  text-shadow:
    0 0 14px rgba(255, 244, 240, 0.55),
    0 6px 18px rgba(248, 232, 228, 0.85),
    0 14px 40px rgba(248, 232, 228, 0.65);
}

.hero .more {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(1rem + 16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: var(--warm);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  opacity: clamp(0, calc(1 - var(--p, 0) / 0.08), 1);
}

.hero .more a {
  display: inline-block;
  padding: 0.75rem 1rem;
}

.hero .more::after {
  content: "";
  display: block;
  width: 1px;
  height: 24px;
  background: #D2222B;
  transform-origin: top;
}

@media (prefers-reduced-motion: no-preference) {
  /* scrittura parola per parola */
  .hero .line .w {
    animation: word-in var(--word-dur) cubic-bezier(0.45, 0, 0.25, 1)
      calc(var(--words-delay) + var(--i) * var(--word-step)) both;
  }

  /* "luce" si accende, poi respira */
  .hero .glow {
    animation:
      glow-on var(--glow-dur) cubic-bezier(0.45, 0, 0.25, 1) var(--glow-delay) both,
      glow-breathe 5.5s ease-in-out var(--glow-end) infinite;
  }

  /* compare a accensione finita */
  .hero .more a {
    animation: fade-in 0.6s ease-out var(--glow-end) both;
  }

  .hero .more::after {
    animation: line-run 2s ease-in-out var(--glow-end) infinite both;
  }
}

@keyframes word-in {
  from { opacity: 0; transform: translateY(0.25em); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glow-on {
  from {
    color: #DEDBD6;
    text-shadow:
      0 0 0 rgba(248, 232, 228, 0),
      0 0 0 rgba(248, 232, 228, 0);
  }
  to {
    color: #FFFFFF;
    text-shadow:
      0 0 14px rgba(255, 244, 240, 0.55),
      0 6px 18px rgba(248, 232, 228, 0.85),
      0 14px 40px rgba(248, 232, 228, 0.65);
  }
}

@keyframes glow-breathe {
  0%, 100% {
    text-shadow:
      0 0 14px rgba(255, 244, 240, 0.55),
      0 6px 18px rgba(248, 232, 228, 0.85),
      0 14px 40px rgba(248, 232, 228, 0.65);
  }
  50% {
    text-shadow:
      0 0 18px rgba(255, 244, 240, 0.7),
      0 7px 22px rgba(248, 232, 228, 0.95),
      0 16px 50px rgba(248, 232, 228, 0.8);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes line-run {
  0%   { transform: scaleY(0); opacity: 1; }
  60%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* hero con la cattedrale: due strati identici, la luce si vede solo dove arriva la maschera */
.hero-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000000;
}

.hero-media {
  position: absolute;
  inset: 0;
  --x: 64%;
  --y: 30%;
  --r: 55vw;
}

.hero-base,
.hero-luce {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* telefono: la foto di prima, con zoom uniforme guidato dallo scroll (--z) */
.hero-img {
  position: absolute;
  inset: 0;
  background: url("images/cattedrale-mobile.webp") 50% 40% / cover no-repeat;
  transform: translate3d(0, 0, 0) scale(var(--z, 1));
  transform-origin: 60% 32%;
}

.hero-base { filter: brightness(var(--bb, 0.4)) contrast(1.05); }

/* esposizione durante lo scroll: livello nero al posto del filtro (--dim da scroll.js) */
.hero-dim {
  position: absolute;
  inset: 0;
  background: #000000;
  opacity: var(--dim, 0);
  pointer-events: none;
}

/* appena si scorre: niente animazioni di accensione e respiro, niente brightness */
.hero.is-scrolling .hero-base,
.hero.lit.is-scrolling .hero-base { animation: none; filter: contrast(1.05); }
.hero.is-scrolling .hero-luce,
.hero.lit.is-scrolling .hero-luce { animation: none; opacity: var(--lo, 1); }
.hero.luce-off .hero-luce { visibility: hidden; }

.hero-luce {
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
}

@media (min-width: 900px) {
  .hero-media { --x: 57%; --y: 36%; --r: 22vw; --bb: 0.55; }

  /* desktop: immagine lunga che scorre (--ty da scroll.js); a scroll 0 l'inquadratura è quella di prima */
  .hero-img {
    --L: max(100cqw, 177.7778cqh);
    inset: auto;
    left: calc((100cqw - var(--L)) / 2 + var(--L) * var(--fit-x) / 1920);
    top: min(0px, calc((100cqh - var(--L) * 0.5625) * 0.45 + var(--L) * var(--fit-y) / 1920));
    width: calc(var(--L) * 1672 * var(--fit-c) / 1920);
    aspect-ratio: 1672 / 1330;
    background: url("images/scroll-desktop.webp") 0 0 / 100% 100% no-repeat;
    transform: translate3d(0, var(--ty, 0px), 0) scale(var(--z, 1));
    transform-origin: 56% 28%;
  }
}

/* sfumature per leggere logo, frase e "Scopri di più"; il bordo basso è nero pieno */
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.8) 92%, #000000 100%);
  opacity: var(--vs, 1);
  pointer-events: none;
}

.hero-veil {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100%, 760px);
  height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 70%);
  opacity: var(--vs, 1);
  pointer-events: none;
}

/* dissolvenza al nero a fine corsa (--fade da scroll.js) */
.hero-fade {
  position: absolute;
  inset: 0;
  background: #000000;
  opacity: var(--fade, 0);
  pointer-events: none;
}

/* hamburger e busta sempre chiari, senza cerchio rosso */
body.home .menu-btn span { background: var(--warm); }
body.home .menu-btn[aria-expanded="true"] span { background: var(--black); }

body.home { background-color: #000000; }

@media (prefers-reduced-motion: no-preference) {
  .hero-media {
    animation: hero-zoom var(--t-zoom) ease-out both;
  }

  .hero.is-moving .hero-media { animation-play-state: paused; }

  .hero-base {
    animation:
      base-on var(--t-ignite) ease-in-out both,
      base-breathe var(--t-breathe-base) ease-in-out var(--t-ignite) infinite;
  }

  .hero-luce {
    animation:
      luce-on var(--t-ignite) ease-in-out both,
      luce-breathe var(--t-breathe-luce) ease-in-out var(--t-ignite) infinite;
  }
}

/* a accensione finita resta solo il respiro: tornando in cima l'accensione non riparte */
@media (prefers-reduced-motion: no-preference) {
  .hero.lit .hero-base { animation: base-breathe var(--t-breathe-base) ease-in-out infinite; }
  .hero.lit .hero-luce { animation: luce-breathe var(--t-breathe-luce) ease-in-out infinite; }
}

@keyframes hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

@keyframes base-on {
  from { filter: brightness(0) contrast(1.05); }
  to   { filter: brightness(var(--bb, 0.4)) contrast(1.05); }
}

@keyframes base-breathe {
  0%, 100% { filter: brightness(var(--bb, 0.4)) contrast(1.05); }
  50%      { filter: brightness(calc(var(--bb, 0.4) + 0.04)) contrast(1.05); }
}

@keyframes luce-on {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes luce-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.88; }
}

/* pagina due: tutta nera */
.page-two {
  position: relative;
  z-index: 1;
  flex: none;
  margin-top: -110svh;
  padding-bottom: 12svh;
  pointer-events: none; /* la parte che copre l'hero non deve bloccare "Scopri di più" e la luce */
  background: transparent;
  color: var(--warm);
}

@media (max-width: 899px) {
  .page-two { margin-top: -100svh; }
}

.wrap {
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.intro { padding: 51.5svh 0 30vh; }

@media (max-width: 899px) {
  .intro { padding-top: 54.5svh; }
}

.stage-wrap, .partner, .closing { pointer-events: auto; }

.statement {
  margin: 0;
  max-width: 14ch;
  color: var(--warm);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
  font-size: clamp(2.3rem, 6.2vw, 5.5rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.statement .sw { display: inline-block; }

/* i tre punti: stage a scroll. Di base (senza JavaScript o con movimento ridotto) è una colonna normale */
.stage-wrap { padding: clamp(4rem, 10vh, 8rem) var(--gutter) 0; }

.glass {
  position: relative;
  width: min(78vw, 420px);
  aspect-ratio: 0.7;
  margin: 0 auto 3rem;
  background: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 80%, transparent);
  mask-composite: intersect;
}

.glass-dim {
  position: absolute;
  inset: 0;
  background: #000000;
  opacity: 0;
}

.point { margin: 0 0 3rem; max-width: 28ch; }

.point::before {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin-bottom: 14px;
  background: #3A3835;
}

.point .num {
  display: block;
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.point h3 {
  margin: 10px 0 0;
  color: var(--warm);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.point p {
  margin: 14px 0 0;
  max-width: 28ch;
  color: var(--grey);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.5;
}

@media (min-width: 900px) {
  .glass {
    width: min(calc(70svh * 0.7), 440px);
    aspect-ratio: 0.7;
    background: none;
  }
  .point { max-width: none; }
}

/* con JavaScript (classe live da scroll.js) e senza movimento ridotto: stage sticky, testi laterali che si rivelano con lo scroll (scroll.js) */
@media (prefers-reduced-motion: no-preference) {
  .stage-wrap.live { height: 300svh; padding: 0; }

  .stage-wrap.live .stage {
    position: sticky;
    top: 0;
    height: 100svh;
    overflow: hidden;
    background: #000000;
  }

  .stage-wrap.live .glass {
    position: absolute;
    inset: 0;
    margin: auto;
    transform: translate3d(0, 0, 0);
  }

  .stage-wrap.live .point {
    position: absolute;
    opacity: 0;
    margin: 0;
  }

  .stage-wrap.live .point .num::after { content: ""; }

  @media (min-width: 900px) {
    .stage-wrap.live .stage { --gw: min(calc(80svh * 0.7), 500px); --gap: clamp(2rem, 4vw, 4.5rem); }
    .stage-wrap.live .glass { width: var(--gw); height: auto; }
    /* i testi stanno attaccati alla foto, ai due lati, centrati sull'asse della pagina */
    .stage-wrap.live .point { width: min(24vw, 340px); }
    .stage-wrap.live .p1,
    .stage-wrap.live .p3 { right: calc(50% + var(--gw) / 2 + var(--gap)); text-align: right; }
    .stage-wrap.live .p1::before,
    .stage-wrap.live .p3::before { margin-left: auto; }
    .stage-wrap.live .p1 p,
    .stage-wrap.live .p3 p { margin-left: auto; }
    .stage-wrap.live .p1 { top: calc(50% - 27svh); }
    .stage-wrap.live .p3 { top: calc(50% + 7svh); }
    .stage-wrap.live .p2 { left: calc(50% + var(--gw) / 2 + var(--gap)); top: 0; bottom: 0; height: fit-content; margin: auto 0; }
  }

  @media (max-width: 899px) {
    .stage-wrap.live { height: 260svh; }
    .stage-wrap.live .glass {
      top: 8svh;
      bottom: auto;
      width: auto;
      height: 46svh;
      aspect-ratio: 0.7;
    }
    .stage-wrap.live .point { left: var(--gutter); right: var(--gutter); top: 58svh; max-width: none; }
    .stage-wrap.live .point .num::after { content: " / 03"; }
  }
  @media (max-width: 899px) and (max-height: 720px) {
    .stage-wrap.live .point { top: 50svh; }
    .stage-wrap .stage-label, .stage-label { top: calc(50svh - 46px); }
  }
}

/* spazio partner: struttura pronta, nascosta finché c'è l'attributo hidden */
.partner { margin-top: 40px; padding-top: 40px; }

.partner[hidden] { display: none; }

.partner-griglia {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 64px;
  place-items: center;
}

.partner-griglia img {
  display: block;
  max-height: 28px;
  max-width: 100%;
  width: auto;
  filter: brightness(0) invert(1);
}

@media (min-width: 900px) {
  .partner-griglia { grid-template-columns: repeat(4, 1fr); }
}

/* chiusura con la foto, fusa nel nero sopra e sotto */
.closing {
  position: relative;
  display: grid;
  place-items: center;
  height: 70svh;
  min-height: 420px;
  margin-top: clamp(6rem, 16vh, 10rem);
  overflow: hidden;
  background: #000000;
}

.closing-photo {
  position: absolute;
  inset: 0;
  background: url("images/cattedrale-mobile.webp") 50% 35% / cover no-repeat;
  filter: brightness(0.5);
}

.closing-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #000000 0%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0) 62%, #000000 100%);
}

@media (min-width: 900px) {
  .closing-photo { background-image: url("images/cattedrale-desktop.webp"); background-position: 50% 40%; }
}

.pill {
  position: relative;
  display: inline-block;
  padding: 1.1rem 2.6rem;
  border-radius: 999px;
  background: var(--red);
  color: #000000;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1;
}

.pill:hover,
.pill:focus-visible { background: var(--warm); }

@media (prefers-reduced-motion: no-preference) {
  .reveal.will-animate { opacity: 0; transform: translateY(12px); }

  .reveal.will-animate.in-view {
    opacity: 1;
    transform: none;
    transition: opacity 600ms ease-out, transform 600ms ease-out;
  }

}


/* contatti (home e pagina) */
.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list li + li { margin-top: 0.5rem; }

.contact-list a {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--warm);
  font-size: var(--s-mid);
  font-weight: 400;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.contact-list a:hover { color: var(--grey); }

/* ingresso */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero .mark img {
  animation: rise 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* home, telefono */
@media (max-width: 600px) {
  .hero .mark img { width: 154px; }
}

@media (min-width: 601px) {
  .hero .mark img { width: 210px; }
}

/* pagine scure: studio e contatti */
html.page-dark,
html.page-dark body {
  background: #000000;
  color: var(--warm);
}

.page-mark {
  position: absolute;
  top: calc(clamp(0.75rem, 2vw, 1.5rem) + 24px);
  left: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  line-height: 0;
}

.page-mark img {
  display: block;
  width: clamp(308px, 56vw, 728px);
  height: auto;
}

@media (max-width: 600px) {
  .page-mark img { width: 154px; }
}

@media (min-width: 601px) {
  .page-mark img { width: 210px; }
}

.page-dark .small { color: var(--grey); }

.studio,
.contatti {
  padding-top: clamp(9rem, 22vh, 14rem);
  padding-bottom: clamp(5rem, 12vh, 9rem);
}

.group { margin-top: clamp(7rem, 24vh, 14rem); }

.principle + .principle { margin-top: clamp(2.5rem, 7vh, 4rem); }

.principle h2,
.process .name {
  margin: 0;
  font-size: var(--s-mid);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.principle .small,
.process .small { margin-top: 0.5rem; max-width: 40ch; }

.process .sub { margin: 0 0 2.5rem; }

.process ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }

.process li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  counter-increment: step;
}

.process li + li { margin-top: 2rem; }

.process li::before {
  content: counter(step);
  color: var(--grey);
  font-size: var(--s-small);
  line-height: 2;
}

.closing {
  min-height: 80svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.closing .big { max-width: 18ch; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: clamp(4rem, 12vh, 8rem) 0 0;
  padding: 0;
  list-style: none;
  color: var(--grey);
  font-size: var(--s-small);
}

.links a { display: inline-block; padding: 0.75rem 0; }

.contatti .contact-list { margin-top: clamp(4rem, 14vh, 9rem); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .hero { height: 100svh; }
  .page-two { margin-top: 0; }
}

/* contatto in alto a destra: cerchio uguale all'hamburger */
.contact-btn {
  position: fixed;
  top: var(--menu-top);
  right: calc(var(--gutter) - 0.75rem);
  z-index: 30;
  display: block;
  width: var(--menu-size);
  height: var(--menu-size);
  color: var(--warm);
  border-radius: 50%;
  text-decoration: none;
}

.contact-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--red);
  opacity: 0;
  pointer-events: none;
}


.contact-btn svg {
  position: absolute;
  left: 12px;
  top: 15px;
  width: 24px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu.is-open + .contact-btn { opacity: 0; pointer-events: none; }

/* home: nascosti scorrendo verso il basso, tornano scorrendo verso l'alto o in cima (reveal.js) */
body.home.scrolled:not(.nav-up) .menu-btn:not([aria-expanded="true"]),
body.home.scrolled:not(.nav-up) .contact-btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .menu-btn { transition: opacity 450ms ease; }
  .contact-btn { transition: opacity 450ms ease; }
  .contact-btn::before { transition: opacity 200ms ease; }

  body.home.scrolled:not(.nav-up) .menu-btn:not([aria-expanded="true"]) { transition: opacity 450ms ease, visibility 0s linear 450ms; }
  body.home.scrolled:not(.nav-up) .contact-btn { transition: opacity 450ms ease, visibility 0s linear 450ms; }
}

/* riga sotto il logo nella hero: cosa siamo */
.hero .mark .tag {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin: 16px 0 0;
  color: #D2222B;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1.7;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero .mark .tag span { display: block; }
@media (min-width: 900px) {
  .hero .mark .tag { font-size: 11.5px; }
  .hero .mark .tag span { display: inline; }
  .hero .mark .tag span + span::before { content: "\00a0\00a0·\00a0\00a0"; }
}

/* cosa siamo: tre blocchi da tre righe, righe spezzate a mano per avere la stessa larghezza, sinistra, destra, sinistra */
.intro .statement {
  width: 10.2em;
  max-width: 100%;
  font-size: clamp(1.7rem, 7.4vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.intro .statement { text-align: center; }
.intro .statement .ln { display: block; white-space: nowrap; }
.intro .statement + .statement { margin-top: clamp(3rem, 9vh, 5.5rem); }
.intro .st-r { margin-left: auto; }
.intro .statement .k { color: var(--red); }
@media (min-width: 900px) {
  .intro .statement { font-size: clamp(2.4rem, 3.9vw, 3.5rem); }
}
@media (max-width: 899px) {
  .intro .st-r { margin-right: 0; }
}

/* una sola pagina: etichette di sezione e contatti in chiusura */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.eyebrow {
  margin: 0 0 1.4rem;
  color: #B9B3AE;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
}
.intro .eyebrow { scroll-margin-top: 30svh; }

.stage-label { position: absolute; top: calc(58svh - 46px); left: var(--gutter); right: var(--gutter); margin: 0; text-align: left; }
@media (min-width: 900px) { .stage-label { top: calc(50% - 27svh - 50px); font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .stage-label { position: static; } }
@media (min-width: 900px) { .eyebrow { font-size: 17px; } }

.closing { height: auto; min-height: 90svh; padding: 12svh var(--gutter); }
.closing-in { position: relative; width: 100%; max-width: none; margin: 0; }
.closing-in .big { max-width: 14ch; color: var(--warm); text-shadow: 0 1px 18px rgba(0, 0, 0, 0.6); font-weight: 400; }
.closing-in .contact-list { margin-top: clamp(2.2rem, 7vh, 4rem); }
.closing-in .contact-list a { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7); }

.intro .statement { will-change: transform; }
@media (prefers-reduced-motion: reduce) { .intro .statement { will-change: auto; } }
.page-two { overflow-x: clip; }

.intro .statement { position: relative; }

/* tutte le sezioni partono dallo stesso margine sinistro, come menù e Come lavoriamo, anche su schermi larghi */
.page-two .wrap { max-width: none; }

/* ---- font di prova: GT Super Display (serif) + Neue Haas Grotesk (sans) ---- */
@font-face { font-family: "GT Super"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/gt-super-display-400.woff2") format("woff2"); }
@font-face { font-family: "Neue Haas"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/neue-haas-300.woff2") format("woff2"); }
@font-face { font-family: "Neue Haas"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/neue-haas-400.woff2") format("woff2"); }
@font-face { font-family: "Neue Haas"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/neue-haas-500.woff2") format("woff2"); }
:root {
  --serif: "GT Super", "Bodoni Moda", Georgia, "Times New Roman", serif;
  --sans: "Neue Haas", "Inter", "Inter Fallback", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
body, button, input, textarea { font-family: var(--sans); }
.hero .line, .intro .statement, .point h3, .big, .closing-in .big {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
}
.hero .line { letter-spacing: -0.02em; }
.intro .statement .k { color: #A3121A; }
@media (min-width: 900px) { .hero .line { font-size: clamp(2.6rem, 4.8vw, 4.4rem); } }

/* tag sotto il logo: entra dopo il logo, riga per riga, le lettere si aprono e si mettono a fuoco */
@keyframes tag-in {
  from { opacity: 0; transform: translateY(8px); letter-spacing: 0.5em; filter: blur(5px); }
  to   { opacity: 1; transform: translateY(0); letter-spacing: 0.24em; filter: blur(0); }
}
.hero .mark .tag span { display: block; }
@media (min-width: 900px) { .hero .mark .tag span { display: inline-block; } }
@media (prefers-reduced-motion: no-preference) {
  .hero .mark .tag span { animation: tag-in 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.9s both; }
  .hero .mark .tag span + span { animation-delay: 1.3s; }
}

/* cosa siamo: testo piu grande e blocchi piu stretti e vicini */
@media (min-width: 900px) {
  .intro .statement { font-size: clamp(3rem, 5vw, 4.9rem); width: 8.7em; }
  .intro .statement + .statement { margin-top: clamp(2.5rem, 6vh, 4.5rem); }
}

/* cosa siamo, desktop: piu piccolo e piu verso l'interno */
@media (min-width: 900px) {
  .intro .statement { font-size: clamp(2.5rem, 3.9vw, 3.6rem); }
  .intro .st-l { margin-left: clamp(0px, 13vw, 300px); }
  .intro .st-r { margin-right: clamp(0px, 13vw, 300px); }
}

/* mobile: gerarchia del hero. la frase domina, il logo e la riga rossa passano in secondo piano */
@media (max-width: 899px) {
  .hero .mark img { width: clamp(170px, 46vw, 230px); }
  .hero .mark .tag { margin-top: 12px; font-size: 9px; letter-spacing: 0.2em; line-height: 1.9; }
  @keyframes tag-in-m {
    from { opacity: 0; transform: translateY(8px); letter-spacing: 0.42em; filter: blur(5px); }
    to   { opacity: 1; transform: translateY(0); letter-spacing: 0.2em; filter: blur(0); }
  }
  .hero .line { width: 92vw; max-width: none; font-size: clamp(2.2rem, 10.8vw, 3.4rem); line-height: 1.04; letter-spacing: -0.025em; }
  .hero .more { font-size: 0.9375rem; }
}
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  .hero .mark .tag span { animation-name: tag-in-m; }
}

/* ---- sezioni chiare: avorio per Cosa siamo e Come lavoriamo, hero e contatti restano scuri ---- */
:root { --ivory: #F1ECE4; --ink: #16130F; }
.light {
  position: relative;
  isolation: isolate;
  color: var(--ink);
  pointer-events: none;  /* i figli che servono (stage, contatti) riattivano i click */
}
/* la luce che si accende: lo strato avorio si apre con --lamp (0 -> 1), scritto da reveal.js */
.light::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ivory);
  opacity: var(--lamp, 1);
  pointer-events: none;
}
/* grana di carta, finissima: l'avorio smette di essere piatto (sale con la luce, sta dietro a testi e immagini) */
.light::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .075 0 0 0 0 .06 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: calc(var(--lamp, 1) * 0.07);
}
/* desktop, "Cosa siamo": una luce morbida che cade da sinistra, come quella dell'hero; svanisce prima dei bordi della scena, quindi non lascia stacchi */
@media (min-width: 900px) {
  .intro-scene::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      radial-gradient(ellipse 58% 62% at 24% 38%, rgba(255, 252, 245, 0.62), rgba(255, 252, 245, 0) 100%),
      radial-gradient(ellipse 46% 60% at 96% 62%, rgba(110, 86, 60, 0.07), rgba(110, 86, 60, 0) 100%);
    opacity: var(--lamp, 1);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);   /* sfuma ai bordi alto e basso: nessuno stacco quando la scena entra o esce */
  }
}
.light .statement, .light .point h3 { color: var(--ink); text-shadow: none; }
.light .statement .sw { text-shadow: none !important; }
.light .statement .k { color: #A3121A; }
.light .eyebrow { color: #7A7168; }
.light .point p { color: #4B453F; }
.light .point::before { background: #B9B0A4; }
.light .glass-dim { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .light .stage-wrap.live .stage { background: transparent; }
}
.closing { margin-top: 0; }

/* hamburger e busta scuri quando sono sopra l'avorio */
body.home.on-light .menu-btn span { background: var(--ink); }
body.home.on-light .contact-btn { color: var(--ink); }
.menu-btn span, .contact-btn { transition: background-color 300ms ease, color 300ms ease; }

/* hero: meno alone, resta una luce morbida (stesso rosso, stessi testi) */
.hero .line .w { text-shadow: 0 4px 12px rgba(248, 232, 228, 0.18), 0 10px 26px rgba(248, 232, 228, 0.1); }
@keyframes glow-on {
  from { color: #DEDBD6; text-shadow: 0 0 0 rgba(248,232,228,0), 0 0 0 rgba(248,232,228,0); }
  to   { color: #FFFFFF; text-shadow: 0 0 10px rgba(255,244,240,0.3), 0 5px 14px rgba(248,232,228,0.45), 0 12px 30px rgba(248,232,228,0.3); }
}
@keyframes glow-breathe {
  0%, 100% { text-shadow: 0 0 10px rgba(255,244,240,0.3), 0 5px 14px rgba(248,232,228,0.45), 0 12px 30px rgba(248,232,228,0.3); }
  50%      { text-shadow: 0 0 13px rgba(255,244,240,0.4), 0 6px 17px rgba(248,232,228,0.55), 0 14px 36px rgba(248,232,228,0.4); }
}


/* pagina due piu lunga: piu respiro tra i tre blocchi di "Cosa siamo" e piu scroll per i tre punti di "Come lavoriamo" */
.intro { padding-top: 58svh; padding-bottom: 38vh; }
.intro .statement + .statement { margin-top: clamp(4rem, 12vh, 8rem); }
@media (max-width: 899px) { .intro { padding-top: 61svh; } }
@media (prefers-reduced-motion: no-preference) {
  .stage-wrap.live { height: 380svh; }
  @media (max-width: 899px) { .stage-wrap.live { height: 330svh; } }
}

/* menu: nero caldo, voci in serif, numeri in rosso (stesso rosso del sito) */
.menu { background: #0B0A09; color: var(--warm); transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
.menu.is-open { transition: opacity 0.25s ease; }
.menu ul { counter-reset: voce; }
.menu li { counter-increment: voce; display: flex; align-items: baseline; gap: clamp(1rem, 2.4vw, 2rem); }
.menu li::before {
  content: "0" counter(voce);
  min-width: 2em;
  color: #C8202A;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.menu a {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7.4vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--warm);
  transition: color 200ms ease;
}
.menu a:hover, .menu a:focus-visible { color: #C8202A; }
body.home .menu-btn[aria-expanded="true"] span,
body.home.on-light .menu-btn[aria-expanded="true"] span { background: var(--warm); }

/* foschia e pulviscolo (fog.js): sopra la foto, sotto le sfumature e i testi; sparisce con lo scroll come la frase */
.hero-fog {
  position: absolute;
  inset: 0;
  opacity: var(--vs, 1);
  pointer-events: none;
  display: none;
}
.hero-fog.on { display: block; }
.hero-fog canvas {
  display: block;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-fog canvas { animation: fade-in 4s ease-out 2.2s both; }
}
@media (prefers-reduced-motion: reduce) { .hero-fog { display: none !important; } }

/* nebbia in video (fog-video.js): schermo sulla foto, concentrata attorno alla vetrata, sfuma con lo scroll */
.hero-fog {
  mix-blend-mode: screen;
  opacity: calc(var(--vs, 1) * 0.34);
  -webkit-mask-image: radial-gradient(ellipse 33% 52% at 54% 46%, #000 0, rgba(0, 0, 0, 0.65) 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 33% 52% at 54% 46%, #000 0, rgba(0, 0, 0, 0.65) 40%, transparent 100%);
}
@media (max-width: 899px) {
  .hero-fog {
    -webkit-mask-image: radial-gradient(ellipse 62% 36% at 52% 42%, #000 0, rgba(0, 0, 0, 0.65) 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 62% 36% at 52% 42%, #000 0, rgba(0, 0, 0, 0.65) 40%, transparent 100%);
  }
}
.hero-fog video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .hero-fog video { animation: fade-in 4s ease-out 1.5s both; }
}

/* nebbia di Kling dentro la foto: stessa inquadratura, segue lo zoom lento; solo le parti che si muovono si sommano alla luce */
.hero-fog {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  opacity: calc(var(--vs, 1) * 0.9);
  -webkit-mask-image: none;
  mask-image: none;
  pointer-events: none;
}
.hero-fog video { position: absolute; display: block; }
.hero-fog[data-kind="desktop"] video {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(-1.4%) scale(1.045);   /* stessa inquadratura della foto lunga a scroll 0 */
}
.hero-fog[data-kind="mobile"] video {
  left: 0;
  top: 5.34%;                                  /* il video è il ritaglio 9:16 della foto verticale */
  width: 100%;
  height: auto;
}

/* video di Kling a tutto campo: sta dentro .hero-img, quindi segue zoom, scroll e luce come la foto.
   il rettangolo e' il fotogramma allineato alla foto (SIFT): desktop dentro scroll-desktop.webp, telefono dentro cattedrale-mobile.webp */
.hero-vid { position: absolute; inset: 0; pointer-events: none; }
.hero-vid video { position: absolute; display: block; opacity: 0; transition: opacity 1.8s ease; }
.hero-vid.on video { opacity: 1; }
.hero-vid video { left: 7.038%; top: -2.145%; width: 83.89%; height: 59.32%; }
@media (max-width: 899px) {
  .hero-vid {
    --W: max(100cqw, calc(100cqh * 0.462085));
    inset: auto;
    width: var(--W);
    aspect-ratio: 1170 / 2532;
    left: calc((100cqw - var(--W)) * 0.5);
    top: calc((100cqh - var(--W) * 2.164103) * 0.4);
  }
  .hero-vid video { left: 0; top: 5.33%; width: 100%; height: 82.15%; }
}
/* bordi del video sfumati: il nero del video e quello della foto non coincidono al livello, cosi' non si vede il rettangolo */
.hero-vid video {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%), linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* desktop: la foto di base e' il primo fotogramma del video (cattedrale-desktop, stessa inquadratura), cosi' al caricamento non si sposta nulla.
   scorrendo: zoom sulla vetrata e dissolvenza, senza la scivolata lungo il pavimento (l'immagine lunga ha una composizione diversa dal video) */
@media (min-width: 900px) {
  .hero-img {
    inset: 0;
    left: 0;
    top: 0;
    width: auto;
    aspect-ratio: auto;
    background: url("images/cattedrale-desktop.webp") 50% 45% / cover no-repeat;
    transform: translate3d(0, 0, 0) scale(var(--z, 1));
    transform-origin: 56% 30%;
  }
  .hero-vid {
    --W: max(100cqw, calc(100cqh * 1.777778));
    inset: auto;
    width: var(--W);
    aspect-ratio: 16 / 9;
    left: calc((100cqw - var(--W)) * 0.5);
    top: calc((100cqh - var(--W) * 0.5625) * 0.45);
  }
  .hero-vid video { left: 0; top: 0; width: 100%; height: 100%; }
}

/* niente zoom automatico: l'inquadratura resta ferma al caricamento, si muove solo la nebbia del video (e lo zoom guidato dallo scroll) */
.hero-media { animation: none !important; }

/* riga sotto il logo: rosso com'era */
.hero .mark .tag { color: #D2222B; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85); }

/* "Ogni cosa merita la sua" in grigio, "luce" resta bianca con il suo glow */
.hero .line { color: #C9C6C1; }
.hero .line .w { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); }
.hero .glow {
  color: #FFFFFF;
  text-shadow: 0 0 14px rgba(255, 244, 240, 0.55), 0 6px 18px rgba(248, 232, 228, 0.85), 0 14px 40px rgba(248, 232, 228, 0.65);
}
@keyframes glow-on {
  from { color: #C9C6C1; text-shadow: 0 0 0 rgba(248, 232, 228, 0), 0 0 0 rgba(248, 232, 228, 0); }
  to   { color: #FFFFFF; text-shadow: 0 0 14px rgba(255, 244, 240, 0.55), 0 6px 18px rgba(248, 232, 228, 0.85), 0 14px 40px rgba(248, 232, 228, 0.65); }
}
@keyframes glow-breathe {
  0%, 100% { text-shadow: 0 0 10px rgba(255,244,240,0.3), 0 5px 14px rgba(248,232,228,0.45), 0 12px 30px rgba(248,232,228,0.3); }
  50%      { text-shadow: 0 0 13px rgba(255,244,240,0.4), 0 6px 17px rgba(248,232,228,0.55), 0 14px 36px rgba(248,232,228,0.4); }
}

/* frase tutta bianca, "luce" senza glow */
.hero .line { color: #FFFFFF; }
.hero .line .w { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55); }
.hero .glow { color: #FFFFFF; text-shadow: none; }
@keyframes glow-on {
  from { color: #FFFFFF; text-shadow: none; }
  to   { color: #FFFFFF; text-shadow: none; }
}
@keyframes glow-breathe {
  0%, 50%, 100% { text-shadow: none; }
}

/* "luce" in evidenza senza alone: compare per ultima, piu lenta, e un filo rosso le si disegna sotto */
.hero .glow { position: relative; display: inline-block; }
.hero .glow::after {
  content: "";
  position: absolute;
  left: 0.03em;
  right: 0.03em;
  bottom: 0.05em;
  height: 1px;
  background: #D2222B;
  transform-origin: left center;
}
@media (prefers-reduced-motion: no-preference) {
  :root { --luce-delay: calc(var(--words-delay) + 5 * var(--word-step) + 0.6s); }
  .hero .line .w:last-child {
    animation-duration: 1.2s;
    animation-delay: var(--luce-delay);
  }
  .hero .glow { animation: none; }
  .hero .glow::after {
    animation: filo-luce 1.3s cubic-bezier(0.45, 0, 0.25, 1) calc(var(--luce-delay) + 0.9s) both;
  }
  .hero .more a { animation-delay: calc(var(--luce-delay) + 2.2s); }
  .hero .more::after { animation-delay: calc(var(--luce-delay) + 2.2s); }
}
@keyframes filo-luce {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* "luce" in corsivo (GT Super Display Regular Italic): l'enfasi della frase, senza alone */
@font-face { font-family: "GT Super"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/gt-super-display-400-italic.woff2") format("woff2"); }
.hero .glow { font-style: italic; }

/* "luce" in rosso, senza il filo */
.hero .glow { color: #C8202A; }
.hero .glow::after { display: none; }
.hero .more a { animation-delay: calc(var(--luce-delay, 3s) + 1.2s); }
.hero .more::after { animation-delay: calc(var(--luce-delay, 3s) + 1.2s); }

/* "luce" bianca in corsivo, senza filo e senza alone */
.hero .glow { color: #FFFFFF; }

/* "luce" compare insieme alle altre parole, stesso ritmo, nessun rallentamento */
@media (prefers-reduced-motion: no-preference) {
  .hero .line .w:last-child {
    animation-duration: var(--word-dur);
    animation-delay: calc(var(--words-delay) + var(--i) * var(--word-step));
  }
  .hero .more a { animation-delay: var(--glow-end); }
  .hero .more::after { animation-delay: var(--glow-end); }
}

/* un solo avorio per tutto il chiaro su nero: lo stesso della seconda pagina (#F1ECE4) */
:root { --warm: #F1ECE4; }
::selection { background: #A3121A; color: #F1ECE4; }
.hero .line, .hero .glow { color: #F1ECE4; }
@keyframes glow-on {
  from { color: #F1ECE4; text-shadow: none; }
  to   { color: #F1ECE4; text-shadow: none; }
}

/* "Come lavoriamo" subito dopo l'ultimo blocco di "Cosa siamo": niente voragine.
   l'etichetta sta a distanza di un blocco (come tra un blocco e l'altro) dalla fine dell'ultima frase */
.intro { padding-bottom: 0; }
.stage-wrap { margin-top: calc(clamp(4rem, 12vh, 8rem) - (58svh - 46px)); }
@media (min-width: 900px) {
  .stage-wrap { margin-top: calc(clamp(4rem, 12vh, 8rem) - (23svh - 50px)); }
}

/* telefono: la luce parte gia' ferma sul soggetto (hero.js la tiene li') */
@media (max-width: 899px) { .hero-media { --x: 16%; --y: 77%; } }

/* telefono: base piu luminosa, la vetrata mostra i suoi dettagli; la luce sul soggetto resta ferma */
@media (max-width: 899px) { .hero-media { --bb: 0.66; --r: 66vw; } }

/* ================= fase 1: hero, cosa siamo, capitoli ================= */
@font-face { font-family: "Aston"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/aston-script-pro-bold.woff2") format("woff2"); }

/* hero: la riga rossa resta leggibile anche dove passa sopra la vetrata (alone scuro solo attorno alle lettere) */
.hero .mark .tag { text-shadow: 0 0 5px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.9), 0 0 26px rgba(0, 0, 0, 0.75); }

/* hero: "luce" gigante in corsivo, tagliata dal bordo destro, nascosta nel buio: la rivela la luce che segue il mouse
   (sul telefono la luce sta ferma sul soggetto e la illumina). Il testo intero è già nella frase, quindi il taglio non toglie niente */
.hero-word {
  position: absolute;
  left: 64vw;
  bottom: 4svh;
  margin: 0;
  font-family: "GT Super", "Bodoni Moda", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 21vw;
  line-height: 0.8;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: #F1ECE4;
  pointer-events: none;
}
.hero-word span { display: block; }
.hero-base .hero-word { opacity: calc(0.16 * clamp(0, calc(1 - var(--p, 0) / 0.08), 1)); }
.hero-luce .hero-word { opacity: clamp(0, calc(1 - var(--p, 0) / 0.08), 1); }
@media (max-width: 899px) {
  .hero-word { left: 34vw; bottom: 19svh; font-size: 54vw; }
}
@keyframes big-in { from { opacity: 0; transform: translate3d(5vw, 0, 0); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-word span { animation: big-in 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) calc(var(--words-delay) + 6 * var(--word-step) + 0.4s) both; }
}

/* hero: didascalia firma, piccola, in basso a sinistra */
.hero .hero-cap {
  position: absolute;
  left: var(--gutter);
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  margin: 0;
  color: rgba(241, 236, 228, 0.66);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.8;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
  opacity: clamp(0, calc(1 - var(--p, 0) / 0.08), 1);
  pointer-events: none;
}
.hero .hero-cap span { display: inline; }
.hero .hero-cap span + span::before { content: "\00a0\00a0·\00a0\00a0"; }
@media (max-width: 899px) {
  .hero .hero-cap { font-size: 8.5px; letter-spacing: 0.18em; }
  .hero .hero-cap span { display: block; }
  .hero .hero-cap span + span::before { content: none; }
  .hero .hero-cap .c3 { display: none; }
}
@keyframes cap-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .hero .hero-cap span { animation: cap-in 1.6s ease calc(var(--words-delay) + 6 * var(--word-step) + 1.6s) both; }
}

/* capitoli: numero romano rosso + filetto + nome in maiuscolo spaziato */
.chap-label { display: flex; align-items: center; }
.chap-label .cn { display: inline-flex; align-items: center; color: #C8202A; letter-spacing: 0.14em; }
.chap-label .cn::after { content: ""; display: inline-block; width: 30px; height: 1px; margin: 0 0.95em 0 0.8em; background: #B9B0A4; }

/* parole giganti dei capitoli: Aston Script, tagliate dal bordo, entrano una volta */
.chap-big {
  position: absolute;
  z-index: 0;
  margin: 0;
  font-family: "Aston", "GT Super", Georgia, serif;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
}
.chap-big.in { opacity: 1; transform: none; transition: opacity 1.4s ease, transform 1.9s cubic-bezier(0.22, 0.61, 0.36, 1); }
.chap-b { transform: translate3d(0, 0.3em, 0); }
@media (prefers-reduced-motion: reduce) { .chap-big { opacity: 1; transform: none; } }
.stage-wrap:not(.live) .chap-b { display: none; }

.intro { position: relative; counter-reset: stm; }
.chap-b { left: 31vw; bottom: -0.02em; font-size: 10.2vw; }
.chap-b span { display: inline; }
@media (max-width: 899px) {
  .chap-b { left: var(--gutter); bottom: 0.1em; font-size: calc((100vw - 2 * var(--gutter)) / 4.65); line-height: 0.82; }
  .chap-b span { display: block; }
}

/* cosa siamo: testo a sinistra dentro ogni blocco, numerazione con filetto, primo blocco in primo piano */
.intro .statement { display: flex; flex-direction: column; align-items: flex-start; text-align: left; counter-increment: stm; }
.intro .statement::before { content: ""; order: -2; width: 48px; height: 1px; margin-bottom: 12px; background: #B9B0A4; }
.intro .statement::after {
  content: counter(stm, decimal-leading-zero);
  order: -1;
  margin-bottom: 1.1rem;
  color: #7A7168;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
}
@media (min-width: 900px) {
  .intro h2.statement:nth-of-type(1) { font-size: clamp(2.6rem, 5vw, 4.6rem); }
  .intro h2.statement:nth-of-type(2), .intro h2.statement:nth-of-type(3) { font-size: clamp(2.1rem, 3.5vw, 3.2rem); }
}
@media (max-width: 899px) {
  .intro h2.statement:nth-of-type(1) { font-size: clamp(1.9rem, 8.6vw, 3.8rem); }
  .intro h2.statement:nth-of-type(2), .intro h2.statement:nth-of-type(3) { font-size: clamp(1.55rem, 6.7vw, 3rem); }
}

/* riga di dettaglio nel vuoto a destra dell'ultimo blocco (solo desktop) */
.intro-meta { display: none; }
@media (min-width: 900px) {
  .intro-meta {
    display: block;
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 0;
    color: #7A7168;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    line-height: 1.9;
    text-align: right;
    text-transform: uppercase;
  }
}

/* hero: banda scura in alto un po' più decisa, così la riga rossa si legge anche sopra la vetrata */
.hero-shade { background: linear-gradient(180deg, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.5) 9%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.8) 92%, #000000 100%); }

.intro { --s1: clamp(2.6rem, 5vw, 4.6rem); }
@media (min-width: 900px) { .intro h2.statement:nth-of-type(1) { font-size: var(--s1); } }

/* ================= "Cosa siamo": una scena ferma, animazioni a tempo, nessun effetto legato allo scroll =================
   la scena resta ferma sullo schermo (sticky). I tre blocchi arrivano da sinistra, da destra, da sinistra; per ultima
   entra "Cosa siamo" in basso. Poi, scorrendo, la parola scivola via verso sinistra (chapters.js) e la scena riparte. */
.intro { padding: 50svh 0 0; }
.intro::after { content: ""; display: block; height: 100svh; }
.intro.scrub::after { height: 340svh; }   /* scroll in cui la scena resta ferma: tutta l'animazione segue lo scroll */
.intro-scene { position: sticky; top: 0; height: 100svh; overflow: hidden; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }   /* a tutto schermo, oltre i margini della pagina */
.stage-wrap { margin-top: 0; }
@media (min-width: 900px) { .stage-wrap { margin-top: 0; } }
@media (max-width: 899px) { .intro { padding-top: 24svh; } }

.intro .intro-scene .chap-label { position: absolute; top: 8svh; left: var(--gutter); margin: 0; }
.intro .intro-scene h2.statement { position: absolute; margin: 0; }
.intro .intro-scene h2.statement:nth-of-type(1) { left: calc(var(--gutter) + clamp(0px, 13vw, 300px)); top: 13svh; --d: 0.1s; }
.intro .intro-scene h2.statement:nth-of-type(2) { right: calc(var(--gutter) + clamp(0px, 13vw, 300px)); left: auto; top: 31svh; --d: 0.9s; }
.intro .intro-scene h2.statement:nth-of-type(3) { left: calc(var(--gutter) + clamp(0px, 13vw, 300px)); top: 49svh; --d: 1.7s; }
@media (max-width: 899px) {
  /* mobile: i tre blocchi stanno in colonna uno sotto l'altro (sfalsati come su desktop), senza posizioni fisse che si toccano */
  .intro .intro-scene { display: flex; flex-direction: column; padding-top: calc(8svh + 3.4rem); }
  .intro .intro-scene h2.statement:nth-of-type(n) { position: relative; left: auto; right: auto; top: auto; width: auto; max-width: calc(100% - 2 * var(--gutter)); }
  .intro .intro-scene h2.statement:nth-of-type(1) { margin-left: var(--gutter); }
  .intro .intro-scene h2.statement:nth-of-type(2) { margin-left: calc(var(--gutter) + 18vw); margin-top: clamp(1.4rem, 4.2svh, 3rem); }
  .intro .intro-scene h2.statement:nth-of-type(3) { margin-left: var(--gutter); margin-top: clamp(1.4rem, 4.2svh, 3rem); }
}
@media (max-width: 899px) and (max-height: 720px) {
  .intro .intro-scene { padding-top: calc(6svh + 3rem); }
  .intro .intro-scene h2.statement { font-size: clamp(1.45rem, 6.2vw, 1.8rem); }
  .intro .intro-scene h2.statement:nth-of-type(1) { font-size: clamp(1.9rem, 7.6vw, 2.3rem); }
}

/* "Cosa siamo" in basso, tagliata dal bordo destro; il blocco esterno scivola via a sinistra con lo scroll */
.intro-scene .chap-a { left: auto; right: var(--gutter); bottom: -0.3em; top: auto; font-size: min(12vw, 20svh); opacity: 1; transform: none; will-change: transform; }
.intro-scene .chap-a span { display: block; }
.intro-scene .chap-a { color: var(--red); }   /* rosso Saint Studio, come "Come lavoriamo" */
@media (max-width: 899px) { .intro-scene .chap-a { left: var(--gutter); right: auto; bottom: -0.3em; font-size: 15vw; } }

/* telefono: "Cosa siamo" a blocchi (una pagina per frase), niente scena incollata: ogni blocco compare quando entra nello schermo */
.intro.blocks { padding-top: 80svh; }   /* la luce si accende prima, poi compare il testo */
.intro.blocks::after { display: none; }
.intro.blocks .intro-scene { position: relative; height: auto; overflow: hidden; display: flex; flex-direction: column; padding: 0 0 70svh; }   /* in fondo resta lo spazio libero per i video */
/* "Cosa siamo" in corsivo in verticale, tagliata a metà dal bordo destro come sul desktop; si legge dal basso verso l'alto, sta ferma nella pagina e sale con lo scroll */
.intro.blocks .intro-scene .chap-a { writing-mode: vertical-rl; transform: rotate(180deg); left: auto; right: -0.42em; top: auto; bottom: calc((70svh - 6em) / 2); font-size: 18vw; line-height: 1.15; will-change: auto; }
.intro.blocks.js-anim .intro-scene .chap-a span { transform: none; }
.intro.blocks .intro-scene .chap-label { position: relative; top: auto; left: auto; margin: 0 var(--gutter) 1.2rem; }
.intro.blocks .intro-scene h2.statement:nth-of-type(n) { --d: 0s; min-height: 62svh; justify-content: center; }
.intro.blocks.js-anim .intro-scene .chap-label.show { opacity: 1; transition: opacity 1s ease; }
.intro.blocks.js-anim .intro-scene .statement.show { opacity: 1; transform: none; transition: opacity 1s ease, transform 1.7s cubic-bezier(0.22, 0.61, 0.36, 1); }
.intro.blocks.js-anim .intro-scene .statement.show .sw { opacity: 1; transition: opacity 0.8s ease calc(0.15s + var(--k, 0) * 0.07s); }
.intro.blocks.js-anim .intro-scene .chap-a.show span { opacity: 1; transform: none; transition: opacity 1.2s ease 0.1s, transform 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s; }

/* desktop: la scritta in corsivo ha un'ombra morbidissima sulla carta, spostata verso destra (la luce viene da sinistra); sta nel testo, quindi si muove con lui senza pesare */
@media (min-width: 900px) {
  .intro-scene .chap-a span { text-shadow: 9px 7px 20px rgba(86, 62, 38, 0.2); }
}

/* desktop, "Come lavoriamo": tre finestre ad arco, una per punto. L'arco centrale nasce a tutto schermo, si chiude nella sua finestra, le altre due salgono; a ogni punto lo sfondo cambia tono; alla fine l'arco centrale si apre di nuovo fino a riempire lo schermo e diventa la pagina dei contatti (scroll.js). Sostituisci le immagini con i lavori veri: --opera (centro) e --img su .a1 e .a3 */
:root { --opera: url("images/arco-regia.webp"); }
.arches, .arch { display: contents; }
.arch-img, .arch-zoom { display: none; }
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .stage-wrap.live { height: 520svh; }
  .stage-wrap.live .glass { display: none; }
  .stage-wrap.live .stage-label { top: 7svh; color: var(--lab, #7A7168); }
  .light .stage-wrap.live .stage-label { color: var(--lab, #7A7168); }
  .stage-wrap.live .stage { --aw: min(24vw, 42svh); --ag: clamp(1.4rem, 3vw, 3.4rem); --cb: min(11vw, 20svh); }

  /* la parola gigante: stesso taglio di "Cosa siamo" (a metà, dal bordo in basso), rosso Saint Studio; gli archi finiscono sopra la parte che si vede */
  .stage-wrap.live .chap-b { left: auto; right: var(--gutter); bottom: -0.3em; font-size: var(--cb); color: var(--red); }

  /* la stessa grana della seconda pagina, sul fondo che cambia colore (sta dietro ad archi e testi) */
  .stage-wrap.live .stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    mix-blend-mode: overlay;
    opacity: 0.32;
  }
  .stage-wrap.live .arch-zoom { display: block; position: absolute; inset: 0; clip-path: inset(0); }
  .stage-wrap.live .arch-zoom::before { content: ""; position: absolute; inset: 0; background: var(--opera) center / cover no-repeat; transform: scale(var(--gz, 1.18)); will-change: transform; }
  .stage-wrap.live .arch-zoom::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--zd, 0); }

  .stage-wrap.live .arches { display: flex; position: absolute; inset: 0; align-items: flex-end; justify-content: center; gap: var(--ag); padding-bottom: calc(0.7 * var(--cb) + 3svh); }
  .stage-wrap.live .arch {
    display: block;
    position: relative;
    flex: none;
    width: var(--aw);
    height: 58svh;
    clip-path: inset(0 round calc(var(--aw) / 2) calc(var(--aw) / 2) 0 0);
    will-change: transform, opacity;
  }
  .stage-wrap.live .arch.a2 { height: 66svh; }
  .stage-wrap.live .arch.a1, .stage-wrap.live .arch.a3 { opacity: 0; }
  .stage-wrap.live .arch.a1 { --img: url("images/arco-scelta.webp?v=3"); --pos: 50% 40%; }
  .stage-wrap.live .arch.a3 { --img: url("images/arco-risultati.webp"); --pos: 60% 40%; }
  .stage-wrap.live .arch-img { display: block; position: absolute; inset: 0; background: var(--img) var(--pos, 50% 50%) / cover no-repeat; transform: scale(var(--gs, 1.1)); }
  .stage-wrap.live .arch-img::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--dim, 0.6); }
  .stage-wrap.live .arch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.66) 36%, rgba(0, 0, 0, 0) 70%); opacity: var(--ta, 0); pointer-events: none; }

  .stage-wrap.live .arch .point {
    position: absolute; z-index: 1;
    left: 0; right: 0; top: auto; bottom: 0; width: auto; height: auto; margin: 0;
    padding: 0 clamp(1.3rem, 2vw, 2rem) clamp(1.6rem, 3.4svh, 2.6rem);
    text-align: left;
  }
  .stage-wrap.live .arch .point::before { margin-left: 0; background: rgba(241, 236, 228, 0.45); }
  .stage-wrap.live .arch .point p { margin: 12px 0 0; max-width: 28ch; color: rgba(241, 236, 228, 0.82); font-size: clamp(0.8rem, 0.95vw, 0.92rem); }
  .stage-wrap.live .arch .point .num { color: #E0454E; }
  .light .stage-wrap.live .arch .point h3 { color: var(--warm); font-size: clamp(1.35rem, 1.9vw, 1.9rem); line-height: 1.08; }
  .light .stage-wrap.live .arch .point p { color: rgba(241, 236, 228, 0.82); }
  .light .stage-wrap.live .arch .point::before { background: rgba(241, 236, 228, 0.45); }

  /* i contatti scorrono sopra lo stage fermo: la foto è fissa allo schermo, quindi è la stessa dell'arco aperto e non si vede nessuno stacco */
  html.has-stage .closing { margin-top: -130svh; min-height: 100svh; clip-path: inset(0); }
  html.has-stage .closing-photo { position: fixed; inset: 0; background-position: 50% 50%; }
  html.has-stage .closing-shade { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 80%, #000000 100%); }
  body.home.on-light.stage-dark .menu-btn span { background: var(--warm); }
  body.home.on-light.stage-dark .contact-btn { color: var(--warm); }
}

/* riga di dettaglio in basso a sinistra (solo desktop) */
@media (min-width: 900px) {
  .intro-meta { left: auto; right: var(--gutter); top: 8svh; bottom: auto; text-align: right; }
}

/* entrata a tempo: parte quando la scena è tutta sullo schermo (classe play); senza JavaScript tutto resta visibile */
.intro.js-anim .intro-scene .statement,
.intro.js-anim .intro-scene .sw,
.intro.js-anim .intro-scene .chap-label,
.intro.js-anim .intro-scene .intro-meta,
.intro.js-anim .intro-scene .chap-a span { opacity: 0; }
.intro.js-anim .intro-scene .st-l { transform: translate3d(-14vw, 0, 0); }
.intro.js-anim .intro-scene .st-r { transform: translate3d(14vw, 0, 0); }
.intro.js-anim .intro-scene .chap-a span { transform: translate3d(0, 0.3em, 0); }

.intro.js-anim .intro-scene.play .statement {
  opacity: 1;
  transform: none;
  transition: opacity 1s ease var(--d, 0s), transform 1.7s cubic-bezier(0.22, 0.61, 0.36, 1) var(--d, 0s);
}
.intro.js-anim .intro-scene.play .sw {
  opacity: 1;
  transition: opacity 0.8s ease calc(var(--d, 0s) + 0.15s + var(--k, 0) * 0.07s);
}
.intro.js-anim .intro-scene.play .chap-label { opacity: 1; transition: opacity 1s ease 0s; }
.intro.js-anim .intro-scene.play .chap-a span {
  opacity: 1;
  transform: none;
  transition: opacity 1.4s ease 2.5s, transform 1.9s cubic-bezier(0.22, 0.61, 0.36, 1) 2.5s;
}
.intro.js-anim .intro-scene.play .intro-meta { opacity: 1; transition: opacity 1.2s ease 3.2s; }

/* movimento ridotto: niente scena ferma, niente animazioni; i blocchi stanno in colonna come prima */
@media (prefers-reduced-motion: reduce) {
  .intro { padding: 50svh 0 0; }
  .intro::after { display: none; }
  .intro-scene { position: static; height: auto; overflow: visible; margin-left: 0; margin-right: 0; padding: 0 0 12svh; }
  .intro .intro-scene .chap-label,
  .intro .intro-scene h2.statement,
  .intro-scene .chap-a,
  .intro-meta { position: static; }
  .intro .intro-scene h2.statement { margin-top: clamp(3rem, 9vh, 5.5rem); }
  .intro .intro-scene h2.statement:nth-of-type(2) { margin-left: auto; margin-right: clamp(0px, 13vw, 300px); }
  .intro .intro-scene h2.statement:nth-of-type(1),
  .intro .intro-scene h2.statement:nth-of-type(3) { margin-left: clamp(0px, 13vw, 300px); }
  .intro-scene .chap-a { display: block; margin-top: 2rem; }
}


/* ================= contatti: titolo grande + modulo a righe sottili, sulla stessa foto ================= */
.closing-in .big { max-width: 14ch; font-size: clamp(2.6rem, 7.4vw, 7.2rem); line-height: 1; }
.closing-body { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vh, 4rem); margin-top: clamp(2.4rem, 7vh, 4.5rem); }
.closing-body .contact-list { margin: 0; }
@media (min-width: 900px) {
  .closing-body { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(3rem, 7vw, 8rem); align-items: start; }
  .closing-body .contact-list { padding-top: 1.7rem; }
}
.cform { max-width: 62rem; }
.cform-row { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 700px) { .cform-row { grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.4rem); } }
.cf { display: block; margin-bottom: clamp(1.4rem, 3.6svh, 2.3rem); }
.cf span { display: block; color: rgba(241, 236, 228, 0.66); font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.cf span em { margin-left: 0.9em; font-style: normal; letter-spacing: 0.04em; text-transform: none; opacity: 0.75; }
.cf input, .cf textarea {
  display: block; width: 100%; margin: 0; padding: 0.7rem 0 0.8rem;
  background: transparent; border: 0; border-bottom: 1px solid rgba(241, 236, 228, 0.34); border-radius: 0; outline: none; resize: none;
  color: var(--warm); font-family: var(--sans); font-size: 1.15rem; font-weight: 400; line-height: 1.4;
  transition: border-color 250ms ease;
}
.cf textarea { min-height: 7.5rem; }
.cf input:focus, .cf textarea:focus { border-bottom-color: var(--warm); }
.cf input:-webkit-autofill { -webkit-text-fill-color: var(--warm); transition: background-color 9999s ease-in-out 0s; }
.cform-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform-end { display: flex; align-items: center; gap: 1.6rem; margin-top: 0.4rem; }
.cform .pill { border: 0; cursor: pointer; font-family: var(--sans); color: var(--warm); }
.cform .pill:hover, .cform .pill:focus-visible { color: #000000; }
.cform .pill[disabled] { opacity: 0.55; cursor: default; }
.cform-msg { margin: 0; color: var(--warm); font-size: 0.95rem; }
html.has-stage .closing-shade { background: linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 62%, rgba(0, 0, 0, 0) 100%), linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 85%, #000000 100%); }
@media (max-width: 899px) { .closing-photo { filter: brightness(0.34); } }   /* telefono: foto più scura, il modulo si legge sopra la vetrata */

/* icone dei contatti: tratto sottile, stesso colore del testo */
.contact-list a { display: inline-flex; align-items: center; gap: 0.85rem; }
.contact-list svg { flex: none; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.contact-list svg circle:last-child { fill: currentColor; stroke: none; }


/* ================= contatti, versione pulita: nero pieno, niente foto (la foto si cambia senza toccare il layout) ================= */
.closing { background: #000000; padding: 16svh var(--gutter) 12svh; }
.closing-photo, .closing-shade { display: none; }   /* per rimettere una foto: togli questa riga */
.closing-in .big { max-width: none; font-size: clamp(3.1rem, 9.2vw, 9.6rem); line-height: 0.98; letter-spacing: -0.03em; text-shadow: none; }
.closing-body { margin-top: clamp(3.5rem, 11vh, 7rem); }
@media (min-width: 900px) {
  .closing-body { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: clamp(3rem, 8vw, 9rem); }
  .closing-body .contact-list { padding-top: 2.1rem; }
}
.cf { margin-bottom: clamp(1.8rem, 5svh, 3rem); }
.cf span { font-size: 13px; color: rgba(241, 236, 228, 0.55); }
.cf input, .cf textarea { font-size: 1.3rem; padding: 0.9rem 0 1rem; border-bottom-color: rgba(241, 236, 228, 0.26); }
.cf textarea { min-height: 8.5rem; }
.cform-end { margin-top: 1rem; }
.closing-in .contact-list a { text-shadow: none; }

/* contatti: tutto in una schermata e lo scroll finisce qui. Le misure seguono l'altezza dello schermo (svh), così titolo e modulo stanno sempre interi */
@media (min-width: 900px) {
  .closing { min-height: 100svh; padding: 9svh var(--gutter) 6svh; }
  .closing-in { flex: 1 1 auto; display: flex; flex-direction: column; }
  .closing-in .big { font-size: clamp(2.6rem, min(8.4vw, 13svh), 9rem); }
  .closing-body { margin-top: auto; padding-top: 3.5svh; }
  .cf { margin-bottom: 2.8svh; }
  .cf span { font-size: clamp(11px, 1.5svh, 13px); }
  .cf input, .cf textarea { font-size: clamp(1.05rem, 2.2svh, 1.3rem); padding: 0.55rem 0 0.7rem; }
  .cf textarea { min-height: 9svh; }
  .cform-end { margin-top: 0.4rem; }
  .closing-body .contact-list { padding-top: 1.6rem; }
}

.page-two { padding-bottom: 0; }   /* la pagina finisce con i contatti: nessuno spazio dopo, lo scroll si ferma lì */

/* contatti, desktop: righe dei campi che si disegnano da sinistra con lo scroll (contact.js); il campo attivo si illumina */
.closing-anim .cf input, .closing-anim .cf textarea { border-bottom-color: transparent; }
.closing-anim .cf::after { content: ""; display: block; height: 1px; background: rgba(241, 236, 228, 0.26); transform: scaleX(var(--ln, 0)); transform-origin: left; transition: background-color 250ms ease; }
.closing-anim .cf:focus-within::after { background: var(--warm); }
.closing-anim .cw { display: inline-block; }
.closing-anim .closing-in .eyebrow, .closing-anim .cw, .closing-anim .cf span, .closing-anim .cf input, .closing-anim .cf textarea, .closing-anim .cform-end, .closing-anim .contact-list li { opacity: 0; }

/* contatti, desktop: la pagina resta ferma (sticky) mentre l'entrata segue lo scroll, molto più lenta (contact.js) */
.closing-hold { display: none; }
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  html.has-stage .closing { position: sticky; top: 0; }
  html.has-stage .closing-hold { display: block; height: 200svh; }
}

/* ultima pagina: una parola in rosso e la stessa grana delle altre pagine, chiara sul nero */
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .93 0 0 0 0 .9 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.07;
}
.closing-in { z-index: 1; }

/* privacy: riga sotto al modulo */
.cform-priv { margin: .2rem 0 0; font-family: var(--sans); font-size: .85rem; font-weight: 300; color: rgba(241,236,228,.55); }
.cform-priv a { color: rgba(241,236,228,.8); text-underline-offset: 3px; text-decoration-color: rgba(241,236,228,.35); }
.cform-priv a:hover, .cform-priv a:focus-visible { color: var(--warm); }
