/* Polis Rocca Imperiale — il linguaggio comune delle pagine-racconto (Home, Contatti…):
   colori, caratteri, barra in alto, pulsanti, chiusura e piè di pagina. Stesso stile della
   presentazione dello stemma e del calendario. */
:root {
  --navy: #0F283D;
  --ink: #0B1D2E;
  --cream: #F4F1EA;
  --paper: #EAE5DA;
  --yellow: #F6D728;
  --gold: #D9AC1A;
  --blue: #3A77B2;
  --mute: #5B6774;
  --mute-dark: #9FB2C6;
  --slab: "Alfa Slab One", "Rockwell Extra Bold", Georgia, serif;
  --sans: "Oswald", "Arial Narrow", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 4.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--ink); color: var(--cream);
  font-family: var(--sans); font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem); font-weight: 300;
  line-height: 1.5; letter-spacing: .01em; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.display { font-family: var(--slab); font-weight: 400; letter-spacing: -.01em; line-height: .95; text-transform: uppercase; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.lead { max-width: 34rem; font-weight: 400; }
.rule { display: block; flex: 1; height: .5em; border-top: .09em solid var(--gold); border-bottom: .09em solid var(--gold); min-width: 1em; }

/* barra di avanzamento e intestazione */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); }
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem var(--gutter); color: var(--cream); transition: color .35s;
}
.topbar.on-light { color: var(--navy); }
.brand { display: flex; align-items: center; gap: .8rem; min-height: 44px; font-size: .85rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.brand img { width: 34px; height: auto; }

/* pulsanti */
.btn {
  display: inline-flex; align-items: center; gap: .8rem; min-height: 52px; padding: .8rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: .9rem; letter-spacing: .16em; text-transform: uppercase;
  background: var(--yellow); color: var(--navy); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .6);
  transition: background .25s;
}
.btn:hover { background: #fff07a; }
.btn .arr { font-size: 1.3em; line-height: 1; transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }
.btn.dark { background: var(--navy); color: var(--cream); }
.btn.dark:hover { background: #15334d; }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* una scena: a tutto schermo */
.scene { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; align-items: center; padding: 6rem var(--gutter) 3rem; }
.scene-inner { width: 100%; max-width: 1400px; margin: 0 auto; }
.scene.dark { background: radial-gradient(ellipse 70% 60% at 50% 45%, #163552 0%, var(--navy) 55%, var(--ink) 100%); }
.scene.light { background: var(--cream); color: var(--navy); }
.scene.lemon { background: var(--yellow); color: var(--navy); }
.scene.light .eyebrow { color: #8A6A0C; }
.scene.lemon .eyebrow { color: #6B5B0A; }

/* chiusura: lo stemma sale e si posa al centro */
.closing {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(1rem, 3vh, 2rem);
  padding: 5rem var(--gutter) 3rem; text-align: center;
  background: radial-gradient(ellipse 60% 55% at 50% 42%, #163552 0%, var(--navy) 55%, var(--ink) 100%);
}
/* niente ombra (drop-shadow): sui telefoni, durante l'entrata animata, la disegnavano dentro un
   riquadro scuro visibile sullo sfondo */
.closing-crest { width: min(62vw, 46vh, 420px); height: auto; }
.closing-line { font-weight: 600; letter-spacing: .3em; text-transform: uppercase; font-size: clamp(.8rem, .7rem + .4vw, 1.1rem); color: var(--mute-dark); padding-left: .3em; }

/* piè di pagina: dati della società, social, documenti */
.sitefoot { background: var(--ink); color: var(--mute-dark); padding: 2.6rem var(--gutter) 2.2rem; font-size: .85rem; line-height: 1.7; text-align: center; }
.sitefoot b { color: var(--cream); font-weight: 500; }
.sitefoot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.4rem; margin-top: .6rem; }
.sitefoot nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.sitefoot nav a:hover { color: var(--cream); }
.sitefoot .firma { margin-top: .3rem; font-size: .75rem; letter-spacing: .06em; opacity: .7; }

/* l'omino dell'ingresso */
.intro { display: none; }
.js .intro { display: block; position: fixed; inset: 0; z-index: 80; overflow: hidden; pointer-events: none; }
.static .intro { display: none; }
.push-man { position: absolute; left: 0; bottom: 14vh; height: var(--h, clamp(170px, 34vh, 340px)); width: calc(var(--h, clamp(170px, 34vh, 340px)) * .75); transform: translateX(-130%); will-change: transform; z-index: 3; }
.push-man svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* il contenuto dell'apertura resta nascosto finché non finisce l'ingresso (al massimo 4 secondi) */
.js .opening { visibility: hidden; animation: reveal 0s 4s forwards; }
.static .opening { visibility: visible; }
@keyframes reveal { to { visibility: visible; } }

/* lo stemma monolinea che si disegna scorrendo al centro dell'apertura (colore scelto dalla pagina) */
.linea-stemma { --cw: min(52vh, 70vw); position: absolute; z-index: 1; left: calc(50% - var(--cw) / 2); top: calc(50% - var(--cw) * .55); width: var(--cw); display: flex; flex-direction: column; align-items: center; gap: 1.2rem; pointer-events: none; }
.linea-svg { width: 100%; }
.linea-svg svg { width: 100%; height: auto; overflow: visible; }
.linea-cap { font-weight: 600; font-size: clamp(.8rem, .7rem + .4vw, 1.1rem); letter-spacing: .34em; padding-left: .34em; text-transform: uppercase; text-align: center; color: var(--mute-dark); opacity: 0; }
.static .linea-stemma { display: none; }

.scroll-hint { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); font-size: .72rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--mute-dark); }

@media (max-width: 767px) {
  .brand span { display: none; }
  .scene { padding-top: 5rem; }
  .btn { min-height: 48px; padding: .7rem 1.2rem; font-size: .8rem; }
}
@media (max-height: 760px) { .scroll-hint { display: none; } }

/* telefono: lo scroll lo guida la pagina, un gesto = una tappa */
html.stepper, html.stepper body { touch-action: none; overscroll-behavior: none; }
