/* ==========================================================
   Costruzioni Tufano — tema nero e oro
   Token in :root, componenti sotto. Ogni blocco è indipendente.
   ========================================================== */
/* Caratteri ospitati sul sito (Barlow, licenza SIL OFL): nessuna richiesta a Google */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }

:root {
  --black: #000000;
  --coal: #0d0c0a;
  --panel: #16140f;
  --line: #2e2a20;
  --gold: #c9a24b;
  --gold-bright: #e3bf6a;
  --gold-deep: #8d6f27;
  --ink: #f1ece0;
  --muted: #b3ab98;

  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 4px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-bright); }
:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--gold); color: var(--black); padding: .6rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- Segno distintivo: nastro di cantiere ---------- */
.stripe {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 14px, var(--black) 14px 28px);
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .04em;
  text-decoration: none; border: 2px solid var(--gold); border-radius: var(--radius);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn--solid { background: var(--gold); color: var(--black); }
.btn--solid:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--black); }
.btn--ghost { background: transparent; color: var(--gold); }
.btn--ghost:hover { background: var(--gold); color: var(--black); }
.btn--sm { min-height: 40px; padding: .35rem 1rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand__mark {
  display: grid; place-items: center; width: 42px; height: 42px;
  background: var(--gold); color: var(--black);
  font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; border-radius: var(--radius);
}
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav ul a {
  display: block; padding: .5rem .9rem; color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: .04em;
  border-bottom: 3px solid transparent;
}
.nav ul a:hover { color: var(--gold-bright); }
.nav ul a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--gold); }

.nav-toggle { display: none; background: none; border: 0; color: var(--gold); width: 48px; height: 48px; padding: 8px; cursor: pointer; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--coal); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem; display: none;
  }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; }
  .nav ul a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav__call { margin-top: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5.5rem);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--coal);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 20% 40%, rgba(0,0,0,0) 0%, rgba(0,0,0,.85) 85%);
}
.hero__inner { position: relative; z-index: 1; }
.hero h1 { max-width: 14ch; color: var(--ink); }
.hero--home h1 { font-size: clamp(3.2rem, 10vw, 7rem); line-height: .95; }
.hero--home h1::first-line { color: var(--gold); }
/* Hero con foto: immagine di fondo + velo scuro per la leggibilità del testo, contenuti centrati */
.hero--photo { background: var(--coal); display: flex; align-items: center; min-height: clamp(460px, 72vh, 700px); text-align: center; }
.hero--photo .hero__inner { width: min(100% - 2 * var(--gutter), var(--wrap)); }
.hero--photo h1 { max-width: 16ch; margin-inline: auto; text-shadow: 0 2px 24px rgba(0,0,0,.5); }
.hero--photo .lead { color: #e6dfcd; margin-inline: auto; }
.hero--photo .hero__actions { justify-content: center; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero--photo::after {
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,.86) 0%, rgba(0,0,0,.72) 55%, rgba(0,0,0,.5) 100%),
    linear-gradient(0deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 40%);
}
.hero--page { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.hero--page h1 { max-width: 24ch; font-size: clamp(2.2rem, 6vw, 3.8rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--tight { padding: clamp(2rem, 5vw, 3rem) 0; }
.section--flush { padding-top: clamp(2rem, 5vw, 3.5rem); }
.section--band { background: var(--coal); border-block: 1px solid var(--line); }
.section__head { margin-bottom: 2.5rem; }
.section__head .lead { margin-bottom: 0; }

.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.highlights li { border-left: 4px solid var(--gold); padding-left: 1.1rem; }
.highlights .highlights__title { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.05; letter-spacing: .01em; margin: 0 0 .3em; color: var(--ink); }
.highlights p { color: var(--muted); margin: 0; }

/* ---------- Card servizi ---------- */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.grid--services { counter-reset: card; gap: clamp(1.1rem, 2.4vw, 1.75rem); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1b1913 0%, var(--panel) 55%, #110f0b 100%);
  border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; isolation: isolate;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -14px rgba(0, 0, 0, .8);
  transition: border-color .25s, transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
/* filo oro in alto che si allunga al passaggio */
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 2.2rem; z-index: 3;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold)); transition: width .45s cubic-bezier(.2, .7, .2, 1);
}
.card:focus-within { border-color: var(--gold); }
.card:focus-within::before { width: 100%; }
@media (hover: hover) {
  .card:hover { border-color: rgba(201, 162, 75, .7); transform: translateY(-6px); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 22px 44px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(201, 162, 75, .12), 0 18px 50px -26px rgba(201, 162, 75, .35); }
  .card:hover::before { width: 100%; }
  .card:hover .media img { transform: scale(1.06); }
  .card:hover .card__more { gap: .8rem; color: var(--gold-bright); }
}
.card__body { display: flex; flex-direction: column; flex: 1; padding: 1.35rem 1.5rem 1.5rem; }
.card__title { font-size: 1.7rem; line-height: 1.05; margin: 0 0 .5rem; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--gold-bright); }
/* tutta la card è cliccabile (comodo col dito) */
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 4; }
.card__text { color: var(--muted); flex: 1; margin: 0 0 1.2rem; font-size: 1rem; line-height: 1.55; }
.card__more {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; transition: gap .25s, color .25s;
}
.card__more svg { flex: none; }

.media { position: relative; aspect-ratio: 16 / 10; background: var(--coal); overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.card .media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, 0) 38%, rgba(22, 20, 15, .55) 82%, var(--panel) 100%);
}
/* numerino sulla foto */
.grid--services .card { counter-increment: card; }
.grid--services .card .media::before {
  content: counter(card, decimal-leading-zero); position: absolute; right: .9rem; top: .55rem; z-index: 2;
  font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1; letter-spacing: .04em;
  color: transparent; -webkit-text-stroke: 1.2px rgba(227, 191, 106, .9); text-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}

/* comparsa graduale: le card salgono e sfumano mentre arrivano nello schermo (reveal.js) */
html.js-reveal .card.reveal {
  opacity: 0; transform: translateY(42px) scale(.97);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1), border-color .25s, box-shadow .35s;
  transition-delay: var(--d, 0ms);
}
html.js-reveal .card.reveal .media img { transform: scale(1.14); transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
html.js-reveal .card.reveal.is-in { opacity: 1; transform: none; }
html.js-reveal .card.reveal.is-in .media img { transform: none; }
html.js-reveal .card.reveal.is-done { transition-delay: 0ms; }
html.js-reveal .card.reveal.is-done .media img { transition: transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: 0ms; }
@media (hover: hover) {
  html.js-reveal .card.reveal.is-done:hover { transform: translateY(-6px); }
  html.js-reveal .card.reveal.is-done:hover .media img { transform: scale(1.06); }
}

.media--placeholder {
  display: grid; place-items: center; color: var(--gold);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--coal);
  border-bottom: 1px solid var(--line);
}
.media--placeholder svg { width: 84px; height: 84px; stroke-width: 1.5; }
.media--tall { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Pagina di dettaglio ---------- */
.crumbs { background: var(--black); border-bottom: 1px solid var(--line); font-size: .95rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: .8rem 0; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--gold-deep); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold-bright); }

.detail { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.detail__text h2 { font-size: 2rem; margin-top: 1.6em; }
.detail__text .lead { color: var(--ink); font-size: 1.3rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: .75rem; align-items: start; }
.checks svg { width: 26px; height: 26px; color: var(--gold); stroke-width: 3; margin-top: 2px; }
.detail__aside { display: grid; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 1.5rem); }
@media (max-width: 900px) { .detail__aside { position: static; } }

.contact-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.contact-box h2 { font-size: 1.6rem; margin-bottom: .7rem; }
.contact-box__row {
  display: grid; grid-template-columns: 26px 1fr; gap: .75rem; align-items: center;
  padding: .6rem 0; color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
}
.contact-box__row:hover { color: var(--gold-bright); }
.contact-box__row svg { width: 26px; height: 26px; color: var(--gold); }

/* ---------- Come lavoriamo ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; position: relative; padding-top: 1.1rem; border-top: 4px solid var(--gold); }
.steps li::before {
  content: counter(step); position: absolute; top: -.2rem; right: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--gold-deep);
}
.steps p { color: var(--muted); margin: 0; }

/* ---------- Invito all'azione ---------- */
.cta { background: var(--gold); color: var(--black); }
.cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: clamp(2rem, 5vw, 3.2rem); }
.cta h2 { margin-bottom: .2em; }
.cta p { margin: 0; font-size: 1.15rem; }
.cta .btn--solid { background: var(--black); color: var(--gold); border-color: var(--black); }
.cta .btn--solid:hover { background: var(--coal); color: var(--gold-bright); }
.cta :focus-visible { outline-color: var(--black); }

/* ---------- Contatti e form ---------- */
.contact-layout { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info .contact-box__row { border-bottom: 1px solid var(--line); }
.contact-simple { display: grid; gap: 1rem; max-width: 40rem; }
.contact-box__row--big {
  display: flex; align-items: center; gap: 1.1rem; padding: 1.1rem 1.3rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.35rem, 4.6vw, 1.9rem); line-height: 1.15; letter-spacing: .02em;
  transition: border-color .2s, transform .25s;
}
.contact-box__row--big:hover { border-color: var(--gold); }
.contact-box__row--big small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .15rem; }
.contact-box__row--big svg { flex: none; width: 34px; height: 34px; }

.form { display: grid; gap: 1.2rem; }
.field { display: grid; gap: .35rem; }
.field-row { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  background: var(--coal); color: var(--ink);
  border: 1px solid var(--gold-deep); border-radius: var(--radius);
  font: inherit;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold-bright); }
.field--check { grid-template-columns: 24px 1fr; align-items: start; gap: .75rem; }
.field--check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--gold); }
.field--check label { font-weight: 400; color: var(--muted); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #ff8a70; }
.field__error { color: #ff9d86; font-size: .95rem; }
.form__status { min-height: 1.5em; margin: 0; }
.form__status.is-ok { color: var(--gold-bright); }
.form__status.is-error { color: #ff9d86; }
.form .btn { justify-self: start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--coal); margin-top: 0; }
.footer__grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); padding-block: 3rem; }
.footer__brand { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; margin-bottom: .3rem; }
.footer__legal { color: var(--muted); }
.footer__title { font-size: 1.3rem; color: var(--gold); }
.site-footer address { font-style: normal; line-height: 1.9; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--gold-bright); text-decoration: underline; }
.footer__links, .footer__social { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .98rem; }
.footer__links a { color: var(--muted); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.footer__bottom p { margin: 0; }
.footer__bottom a { color: var(--gold); }

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  /* l'animazione della home resta attiva anche con "riduci movimento" (scelta voluta) */
  html.has-scrolly .scrolly__step { transition: opacity .55s ease, transform .55s ease !important; }
  html.has-scrolly .scrolly__loader { transition: opacity .5s .25s !important; }
  html.js-reveal .card.reveal { transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1) !important; transition-delay: var(--d, 0ms) !important; }
  html.js-reveal .card.reveal .media img { transition: transform 1.4s cubic-bezier(.2, .7, .2, 1) !important; transition-delay: var(--d, 0ms) !important; }
  html.has-scrolly .scrolly__loader i { transition: width .25s !important; }
}
h2.card__title { font-size: 1.6rem; }

/* Logo nella hero della Home (dentro l'h1, per la SEO) */
.hero__logo { margin: 0 auto; line-height: 0; }
.hero__logo img { width: clamp(200px, 30vw, 310px); height: auto; margin-inline: auto; filter: drop-shadow(0 4px 28px rgba(0,0,0,.65)); }
.hero--home .hero__actions { margin-top: 2rem; }

/* Hero Home: sfondo nero pieno, contenuti centrati */
.hero--home { background: #1e1c1c url("../img/sfondo-hero-800.jpg") center / cover no-repeat; text-align: center; display: flex; align-items: center; min-height: clamp(460px, 72vh, 700px); }
.hero--home::after { background: radial-gradient(ellipse 48% 62% at 50% 50%, rgba(30,28,28,.94) 0%, rgba(30,28,28,.82) 55%, rgba(30,28,28,0) 100%); }
.hero--home .hero__actions { justify-content: center; }
@media (min-width: 801px) { .hero--home { background-image: url("../img/sfondo-hero-1600.jpg"); } }

/* ---------- Ottimizzazione mobile ---------- */
@media (max-width: 820px) {

  .hero__actions { flex-direction: column; align-items: stretch; width: min(100%, 340px); margin-inline: auto; }
  .hero__actions .btn { width: 100%; }
  .cta__inner .btn { width: 100%; }
  .form .btn { justify-self: stretch; width: 100%; }
  .card .btn { min-height: 48px; }
  .footer__links { gap: 0; }
  .footer__links a { display: block; padding: .5rem 0; }
  .site-footer address a { display: inline-block; padding: .2rem 0; }
  .crumbs a { display: inline-block; padding: .25rem 0; }
  .contact-box__row { min-height: 48px; }
  .brand__name { font-size: 1.3rem; }
}
@media (max-width: 360px) {
  .brand__name { font-size: 1.1rem; letter-spacing: .02em; }
}

/* =====================================================================
   HOME: video a scroll (fotogrammi su canvas) + 3 step di testo
   Senza JavaScript, o con "riduci animazioni", resta una versione statica.
   ===================================================================== */
.scrolly { --stage: #1f1f1f; background: var(--stage); }
.scrolly__stage { position: relative; background: var(--stage); }
.scrolly__canvas, .scrolly__shade, .scrolly__rail, .scrolly__hint, .scrolly__loader { display: none; }

/* --- versione statica (default) --- */
.scrolly__stage { padding: clamp(1.5rem, 5vw, 3rem) 0 clamp(2rem, 6vw, 4rem); text-align: center; }
.scrolly__poster {
  display: block; width: min(560px, 100%); height: auto; margin: 0 auto -1rem;
  -webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 60% 62% at 50% 50%, #000 55%, transparent 100%);
}
.scrolly__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; text-align: left; }
.scrolly__step[data-step="0"] { grid-column: 1 / -1; text-align: center; margin-bottom: 1rem; }
.scrolly__step:not([data-step="0"]) { border-left: 4px solid var(--gold); padding-left: 1.1rem; }
.scrolly__title { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.02; margin: 0 0 1rem; }
.scrolly__lead { max-width: 46rem; margin: 0 auto 1.5rem; color: #d9d2c0; }
.scrolly__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.scrolly__step:not([data-step="0"]) .scrolly__actions { justify-content: flex-start; margin-top: 1rem; }
.scrolly__heading { font-size: 1.5rem; margin: 0 0 .3em; }
.scrolly__text-p { color: var(--muted); margin: 0; }
.scrolly__num { margin: 0 0 .4rem; font-family: var(--font-display); letter-spacing: .12em; color: var(--gold); font-size: .95rem; }

/* --- versione animata --- */
html.has-scrolly .scrolly__track { position: relative; height: 480vh; height: 480svh; }
html.has-scrolly .scrolly__stage {
  position: sticky; top: var(--header-h); overflow: hidden; padding: 0; text-align: left;
  height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); min-height: 440px;
}
/* telefono in orizzontale: lo schermo è basso, l'area non deve superarlo (altrimenti il testo finisce tagliato) */
@media (max-height: 520px) {
  html.has-scrolly .scrolly__stage { min-height: 0; }
  html.has-scrolly .scrolly__num { margin-bottom: .15rem; }
  html.has-scrolly .scrolly__num span { font-size: 1.7rem; }
}
html.has-scrolly .scrolly__poster { display: none; }
html.has-scrolly .scrolly__loader { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: rgba(255, 255, 255, .08); transition: opacity .5s .25s; pointer-events: none; }
html.has-scrolly .scrolly__loader i { display: block; height: 100%; width: calc(var(--load, 0) * 100%); background: var(--gold); transition: width .25s; }
html.has-scrolly .scrolly.is-ready .scrolly__loader { opacity: 0; }
html.has-scrolly .scrolly__canvas {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%;
}
html.has-scrolly .scrolly__shade { display: block; position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
html.has-scrolly .scrolly__rail {
  display: block; position: absolute; right: var(--gutter); top: 22%; bottom: 22%; width: 2px;
  background: rgba(201, 162, 77, .22); border-radius: 2px;
}
html.has-scrolly .scrolly__rail i { display: block; width: 100%; height: calc(var(--p, 0) * 100%); background: var(--gold); border-radius: 2px; }
html.has-scrolly .scrolly__hint {
  display: block; position: absolute; left: max(var(--gutter), calc((100% - var(--wrap)) / 2)); bottom: 1.5rem;
  font-family: var(--font-display); letter-spacing: .22em; text-transform: uppercase; font-size: .85rem; color: var(--gold);
  transition: opacity .4s; text-align: left;
}
html.has-scrolly .scrolly__hint::after {
  content: ""; display: block; width: 1px; height: 34px; margin: .5rem 0 0 .35rem; background: linear-gradient(var(--gold), transparent);
  animation: scrolly-hint 1.8s ease-in-out infinite;
}
@keyframes scrolly-hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.scrolly:not(.is-top) .scrolly__hint { opacity: 0; }

html.has-scrolly .scrolly__text { position: absolute; inset: 0; display: flex; align-items: center; margin: 0 auto; pointer-events: none; z-index: 2; }
html.has-scrolly .scrolly__steps { display: grid; width: min(31rem, 44%); }
html.has-scrolly .scrolly__step {
  grid-area: 1 / 1; align-self: center; pointer-events: none;
  opacity: 0; transform: translateY(26px); transition: opacity .55s ease, transform .55s ease;
  border: 0 !important; padding: 0 !important; margin: 0 !important; text-align: left !important;
}
html.has-scrolly .scrolly__step.is-active { opacity: 1; transform: none; pointer-events: auto; }
html.has-scrolly .scrolly__title { font-size: clamp(2.3rem, 4.2vw, 3.9rem); text-shadow: 0 2px 22px rgba(0, 0, 0, .55); }
html.has-scrolly .scrolly__lead { margin: 0 0 1.5rem; max-width: 30rem; }
html.has-scrolly .scrolly__actions, html.has-scrolly .scrolly__step:not([data-step="0"]) .scrolly__actions { justify-content: flex-start; margin-top: 1.4rem; }
html.has-scrolly .scrolly__num { font-size: 1rem; }
html.has-scrolly .scrolly__num span { font-size: 3.6rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--gold); display: inline-block; margin-right: .15em; vertical-align: -.08em; }
html.has-scrolly .scrolly__heading { font-size: clamp(2.1rem, 3.6vw, 3.2rem); line-height: 1.02; margin: .2rem 0 .5rem; text-shadow: 0 2px 22px rgba(0, 0, 0, .55); }
html.has-scrolly .scrolly__heading::before { content: ""; display: block; width: 3.2rem; height: 4px; background: var(--gold); margin-bottom: 1rem; }
html.has-scrolly .scrolly__text-p { font-size: 1.15rem; color: #d9d2c0; max-width: 22rem; }

/* tablet e telefono: video in alto, testo in basso */
@media (max-width: 999px) {
  html.has-scrolly .scrolly__track { height: 440vh; height: 440svh; }
  html.has-scrolly .scrolly__rail { top: 8%; bottom: auto; height: 22%; right: .6rem; }
  html.has-scrolly .scrolly__hint { display: none; }
  html.has-scrolly .scrolly__text { align-items: flex-end; padding-bottom: 1.5rem; }
  html.has-scrolly .scrolly__steps { width: 100%; position: relative; }
  html.has-scrolly .scrolly__steps::before {
    content: ""; position: absolute; left: -50vw; right: -50vw; bottom: -3rem; top: -5.5rem; z-index: -1;
    background: linear-gradient(180deg, rgba(31,31,31,0) 0%, rgba(31,31,31,.9) 42%, #1f1f1f 100%); pointer-events: none;
  }
  html.has-scrolly .scrolly__step { align-self: end; }
  html.has-scrolly .scrolly__title { font-size: clamp(1.55rem, 6.6vw, 2.4rem); line-height: 1.02; margin-bottom: .45rem; }
  html.has-scrolly .scrolly__lead { font-size: .88rem; line-height: 1.4; margin-bottom: .6rem; }
  html.has-scrolly .scrolly__actions { flex-wrap: nowrap; gap: .5rem; margin-top: .6rem; }
  html.has-scrolly .scrolly__actions .btn { flex: 1 1 0; padding-inline: .35rem; font-size: .86rem; letter-spacing: .01em; white-space: nowrap; min-height: 46px; }
  html.has-scrolly .scrolly__num span { font-size: 2.6rem; }
  html.has-scrolly .scrolly__heading { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  html.has-scrolly .scrolly__text-p { font-size: 1.02rem; }
}
@media (max-width: 820px) {
  html.has-scrolly .scrolly__text { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1.5rem); }
}

/* Logo nella barra in alto (al posto del quadratino con la T) */
.brand__logo { height: 56px; width: auto; display: block; flex: none; }
@media (max-width: 360px) { .brand__logo { height: 46px; } }

/* Pagina informativa privacy */
.legal { max-width: 46rem; }
.legal h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 2rem 0 .6rem; }
.legal h3 { font-size: 1.1rem; margin: 1.4rem 0 .4rem; color: var(--gold); }
.legal p, .legal li { color: #d9d2c0; line-height: 1.65; }
.legal ul { padding-left: 1.2rem; }
.legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.field--check label a { color: var(--gold); text-decoration: underline; }

/* ---------- Zone servite e domande frequenti ---------- */
.scrolly__stage picture { display: contents; }
.areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.areas li {
  padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: .04em; color: var(--ink);
}
.areas li:first-child { border-color: var(--gold); color: var(--gold); }
.areas__note { margin: 1.4rem 0 0; color: var(--muted); }
.faq { display: grid; gap: .75rem; max-width: 52rem; }
.faq__item { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; transition: border-color .2s; }
.faq__item[open] { border-color: var(--gold-deep); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.2rem; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: .02em; color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  font-size: 1.7rem; line-height: 1; color: var(--gold); transition: transform .2s;
}
.faq__item[open] summary::after { content: "–"; }
.faq__item p { margin: 0; padding: 0 1.2rem 1.2rem; color: var(--muted); }

/* ---------- Galleria ---------- */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(.6rem, 1.6vw, 1rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.gallery--preview { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .gallery--preview { grid-template-columns: repeat(2, 1fr); } }
.tile { position: relative; border-radius: 8px; overflow: hidden; background: var(--coal); border: 1px solid var(--line); }
.tile a { display: block; position: relative; aspect-ratio: 4 / 3; color: var(--ink); text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tile a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.72)); pointer-events: none; opacity: .9; }
.tile__cap { position: absolute; left: .9rem; right: .9rem; bottom: .7rem; z-index: 2; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; letter-spacing: .03em; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.tile__play { position: absolute; z-index: 2; right: .6rem; top: .6rem; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(15,14,11,.72); border: 2px solid var(--gold); color: var(--gold-bright); }
.tile__play svg { width: 19px; height: 19px; fill: currentColor; stroke: none; margin-left: 2px; }
.tile a:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: -3px; }
@media (hover: hover) { .tile:hover { border-color: rgba(201,162,75,.7); } .tile:hover img { transform: scale(1.06); } }
.gallery__more { margin: 2rem 0 0; text-align: center; }

html.js-reveal .tile.reveal { opacity: 0; transform: translateY(30px) scale(.98); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
html.js-reveal .tile.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .tile.reveal { transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1) !important; transition-delay: var(--d, 0ms) !important; }
  .tile img { transition: transform .6s cubic-bezier(.2,.7,.2,1) !important; }
}

/* a schermo intero */
.lb { border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: rgba(8, 7, 5, .96); color: var(--ink); overscroll-behavior: contain; }
.lb::backdrop { background: rgba(8, 7, 5, .96); }
.lb[open] { display: grid; grid-template-rows: 1fr auto; }
.lb__stage { display: grid; place-items: center; min-height: 0; padding: 3.5rem 1rem .5rem; }
.lb__stage img, .lb__stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; background: #000; }
.lb__cap { margin: 0; padding: .4rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--muted); font-size: 1rem; min-height: 1.5em; }
.lb__btn { position: absolute; z-index: 3; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: rgba(22,20,15,.85); color: var(--ink); font-size: 2rem; line-height: 1; cursor: pointer; }
.lb__btn:hover, .lb__btn:focus-visible { border-color: var(--gold); color: var(--gold-bright); }
.lb__close { top: calc(.8rem + env(safe-area-inset-top, 0px)); right: .8rem; }
.lb__prev, .lb__next { top: 50%; margin-top: -26px; }
.lb__prev { left: .6rem; } .lb__next { right: .6rem; }
@media (max-width: 700px) { .lb__prev, .lb__next { top: auto; bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)); margin-top: 0; } }

.contact-box__row--mail span { font-size: clamp(.95rem, 4.9vw, 1.5rem); overflow-wrap: anywhere; }

.gallery + .gallery { margin-top: 1rem; }
