/* ==========================================================================
   Studio Legale & Business Advisor R&B — style.css
   Direzione grafica: prugna + cammello (presi dai materiali reali della cliente)
   Stack: CSS puro, zero dipendenze, zero richieste esterne.
   I font sono di sistema: nessuna chiamata a Google Fonts (velocità + GDPR).
   ========================================================================== */

/* ---------- 1 · TOKEN ---------------------------------------------------- */

:root {
  /* colore — tema chiaro (default) */
  --c-bg:            #faf7f3;
  --c-bg-alt:        #f3ede5;
  --c-surface:       #ffffff;
  --c-text:          #1b1316;
  --c-text-muted:    #6b5c62;
  --c-brand:         #6e1f4b;
  --c-brand-strong:  #4d1233;
  --c-brand-soft:    #f5e9ef;
  --c-accent:        #b08a5c;
  --c-accent-soft:   #f2e8db;
  --c-border:        rgba(27, 19, 22, .12);
  --c-border-strong: rgba(27, 19, 22, .24);
  --c-focus:         #6e1f4b;
  --c-shadow:        rgba(27, 19, 22, .10);
  --logo-filter:     none;

  /* tipografia */
  --f-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --f-text:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-100: .75rem;
  --fs-200: .8125rem;
  --fs-300: .9375rem;
  --fs-400: 1rem;
  --fs-500: 1.0625rem;
  --fs-600: clamp(1.15rem, .95rem + .8vw, 1.5rem);
  --fs-700: clamp(1.5rem, 1.15rem + 1.5vw, 2.15rem);
  --fs-800: clamp(1.9rem, 1.35rem + 2.3vw, 2.9rem);
  --fs-900: clamp(2.4rem, 1.65rem + 3.2vw, 4.1rem);

  --lh-tight:  1.06;
  --lh-snug:   1.28;
  --lh-normal: 1.62;

  --tracking-tight: -.025em;
  --tracking-wide:  .14em;

  /* spazio e layout */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 2.75rem; --sp-8: 3.5rem;
  --sp-9: 4.5rem;  --sp-10: 6rem;   --sp-12: 8rem;

  --container:        1240px;
  --container-narrow: 760px;
  --gutter:           clamp(1.25rem, 4vw, 3rem);
  --section-y:        clamp(4rem, 9vw, 8rem);

  /* forma e movimento */
  --r-sm: 4px; --r-md: 10px; --r-lg: 20px; --r-pill: 999px;
  --sh-sm: 0 1px 2px var(--c-shadow);
  --sh-md: 0 8px 28px -12px var(--c-shadow);
  --sh-lg: 0 30px 60px -30px var(--c-shadow);

  --dur-fast: .18s; --dur-base: .34s; --dur-slow: .72s;
  --ease-out: cubic-bezier(.22, .8, .3, 1);

  --z-nav: 100; --z-overlay: 200; --z-banner: 300;
}

[data-theme="dark"] {
  --c-bg:            #161013;
  --c-bg-alt:        #1e1620;
  --c-surface:       #241a27;
  --c-text:          #f5efea;
  --c-text-muted:    #b3a2ab;
  --c-brand:         #cf7ba7;
  --c-brand-strong:  #e8aecb;
  --c-brand-soft:    rgba(207, 123, 167, .14);
  --c-accent:        #d6ae7f;
  --c-accent-soft:   rgba(214, 174, 127, .12);
  --c-border:        rgba(245, 239, 234, .14);
  --c-border-strong: rgba(245, 239, 234, .3);
  --c-focus:         #e8aecb;
  --c-shadow:        rgba(0, 0, 0, .6);
  --logo-filter:     invert(1);
}

/* ---------- 2 · BASE ---------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-text);
  font-size: var(--fs-500);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-900); }
h2 { font-size: var(--fs-800); }
h3 { font-size: var(--fs-700); }
h4 { font-size: var(--fs-600); line-height: var(--lh-snug); }

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: var(--c-border-strong); text-underline-offset: .22em; }
a:hover { text-decoration-color: currentColor; }

img, video { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: var(--c-brand); color: #fff; }

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px;
  background: var(--c-brand); color: #fff;
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-md);
  z-index: var(--z-banner); transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3 · LAYOUT --------------------------------------------------- */

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--c-bg-alt); }
.section--tight { padding-block: clamp(2.75rem, 6vw, 5rem); }

.eyebrow {
  font-size: var(--fs-200);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-brand);
  font-weight: 600;
  margin: 0 0 var(--sp-4);
  display: flex; align-items: center; gap: var(--sp-3);
}
.eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--c-border);
  max-width: 5rem;
}

.lede {
  font-size: var(--fs-600);
  line-height: 1.5;
  color: var(--c-text-muted);
  max-width: 46ch;
}

.section-head { max-width: 62ch; margin-bottom: var(--sp-8); }
.section-head p { color: var(--c-text-muted); margin-top: var(--sp-4); }

/* ---------- 4 · NAVIGAZIONE ---------------------------------------------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: var(--z-nav);
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.nav.is-scrolled {
  background: var(--c-bg);
  border-bottom-color: var(--c-border);
  box-shadow: var(--sh-sm);
}
.nav__inner {
  display: flex; align-items: center; gap: var(--sp-5);
  min-height: 4.75rem;
}
.nav__logo { display: flex; align-items: center; text-decoration: none; margin-right: auto; flex: none; }
.nav__logo img {
  height: 56px; width: auto; filter: var(--logo-filter);
  transition: filter var(--dur-base) var(--ease-out);
}
@media (max-width: 520px) { .nav__logo img { height: 46px; } }
.nav__links { display: flex; align-items: center; gap: var(--sp-5); }
.nav__links a {
  font-size: var(--fs-300); text-decoration: none; color: var(--c-text-muted);
  position: relative; padding-block: var(--sp-2);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--c-brand); transition: width var(--dur-base) var(--ease-out);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--c-text); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { width: 100%; }

.nav__tools { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

.lang {
  display: flex; align-items: center; gap: 2px;
  font-size: var(--fs-200); letter-spacing: .06em;
  border: 1px solid var(--c-border); border-radius: var(--r-pill);
  padding: 3px;
}
.lang a {
  text-decoration: none; padding: .3rem .6rem; border-radius: var(--r-pill);
  color: var(--c-text-muted); transition: all var(--dur-fast) var(--ease-out);
}
.lang a[aria-current="true"] { background: var(--c-brand); color: #fff; }

.icon-btn {
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem; padding: 0;
  background: none; border: 1px solid var(--c-border); border-radius: var(--r-pill);
  color: var(--c-text); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { border-color: var(--c-border-strong); background: var(--c-bg-alt); }
.icon-btn svg { width: 17px; height: 17px; }
[data-theme="dark"] .icon-sun { display: none; }
:root:not([data-theme="dark"]) .icon-moon { display: none; }

.nav__toggle { display: none; }

/* menu mobile */
@media (max-width: 1000px) {
  .nav__links {
    position: fixed; inset: 4.75rem 0 auto; flex-direction: column;
    align-items: stretch; gap: 0;
    background: var(--c-bg); border-bottom: 1px solid var(--c-border);
    padding: var(--sp-4) var(--gutter) var(--sp-6);
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
    max-height: calc(100dvh - 4.75rem); overflow-y: auto;
  }
  .nav__links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links a {
    font-size: var(--fs-600); font-family: var(--f-display); color: var(--c-text);
    padding-block: var(--sp-4); border-bottom: 1px solid var(--c-border);
  }
  .nav__links a::after { display: none; }
  .nav__toggle { display: grid; }
}

/* ---------- 5 · PULSANTI ------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-3);
  font-family: var(--f-text); font-size: var(--fs-300); font-weight: 600;
  letter-spacing: .01em; text-decoration: none; cursor: pointer;
  padding: .85rem 1.6rem; border-radius: var(--r-pill);
  border: 1px solid transparent; background: none; color: inherit;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--c-brand); color: #fff; box-shadow: var(--sh-md); }
.btn--primary:hover { background: var(--c-brand-strong); }
[data-theme="dark"] .btn--primary { color: #1a1014; }

.btn--ghost { border-color: var(--c-border-strong); color: var(--c-text); }
.btn--ghost:hover { border-color: var(--c-brand); color: var(--c-brand); }

.btn--sm { padding: .55rem 1.1rem; font-size: var(--fs-200); }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-300); font-weight: 600; color: var(--c-brand);
  text-decoration: none;
}
.link-arrow span { transition: transform var(--dur-base) var(--ease-out); }
.link-arrow:hover span { transform: translateX(5px); }

/* Pulsante di contatto della barra: sopra i 1000px sta nella nav, sotto viene
   clonato dal JS in fondo al menu mobile.
   Queste regole devono stare DOPO `.btn`, altrimenti `display:inline-flex` le batte. */
.nav__links .nav__cta--mobile { display: none; }
@media (max-width: 1000px) {
  .nav__inner > .nav__tools .nav__cta { display: none; }
  .nav__links .nav__cta--mobile {
    display: inline-flex; justify-content: center;
    margin-top: var(--sp-5); border-bottom: 0;
    font-family: var(--f-text); font-size: var(--fs-300);
  }
}

/* ---------- 6 · HERO ----------------------------------------------------- */

.hero {
  position: relative; padding-top: calc(4.75rem + clamp(3rem, 8vw, 7rem));
  padding-bottom: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: auto -20% 0 auto;
  width: 60vw; height: 60vw; max-width: 820px; max-height: 820px;
  background: radial-gradient(circle at 50% 50%, var(--c-brand-soft), transparent 68%);
  pointer-events: none; z-index: 0;
}
.hero__inner { position: relative; z-index: 1; }
.hero .eyebrow::after { display: none; }
.hero h1 { max-width: 19ch; margin-bottom: var(--sp-6); }
.hero .lede { max-width: 52ch; margin-bottom: var(--sp-7); font-size: var(--fs-600); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.hero__rule {
  width: 4.5rem; height: 2px; background: var(--c-accent);
  margin-bottom: var(--sp-6); transform-origin: left;
}

/* orologi delle tre sedi — dettaglio reale, non decorazione */
.clocks {
  display: flex; flex-wrap: wrap; gap: var(--sp-6);
  margin-top: var(--sp-9); padding-top: var(--sp-5);
  border-top: 1px solid var(--c-border);
}
.clock__city {
  font-size: var(--fs-100); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--c-text-muted);
  display: block; margin-bottom: var(--sp-1);
}
.clock__time {
  font-family: var(--f-display); font-size: var(--fs-600);
  font-variant-numeric: tabular-nums; letter-spacing: 0;
}

/* ---------- 7 · CREDENZIALI ---------------------------------------------- */

.credentials {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  background: var(--c-border); border-block: 1px solid var(--c-border);
}
.credential { background: var(--c-bg); padding: var(--sp-6) var(--sp-5); }
.credential strong {
  display: block; font-family: var(--f-display); font-size: var(--fs-600);
  font-weight: 400; color: var(--c-brand); margin-bottom: var(--sp-1);
}
.credential span { font-size: var(--fs-300); color: var(--c-text-muted); }

/* ---------- 8 · TESTO EDITORIALE ----------------------------------------- */

.prose { max-width: 68ch; }
.prose p { font-size: var(--fs-500); }
.prose p + h3 { margin-top: var(--sp-7); }
.prose h3 { margin-bottom: var(--sp-4); }

.statement {
  font-family: var(--f-display); font-size: var(--fs-700);
  line-height: var(--lh-snug); color: var(--c-brand);
  border-left: 2px solid var(--c-accent);
  padding-left: var(--sp-5); margin-top: var(--sp-7);
  max-width: 34ch;
}

/* ---------- 9 · RITRATTO / SPLIT ----------------------------------------- */

.split {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split--reverse > :first-child { order: 2; }
}

.portrait {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--c-bg-alt); box-shadow: var(--sh-lg);
}
.portrait img { width: 100%; }
.portrait--frame { border: 1px solid var(--c-border); }

/* ---------- 10 · SCHEDE AREE --------------------------------------------- */

.cards {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.card {
  display: flex; flex-direction: column; gap: var(--sp-3);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: var(--sp-6);
  text-decoration: none; position: relative; overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 2px;
  background: var(--c-accent); transform: scaleY(0); transform-origin: top;
  transition: transform var(--dur-base) var(--ease-out);
}
.card:hover { transform: translateY(-4px); border-color: var(--c-border-strong); box-shadow: var(--sh-md); }
.card:hover::before { transform: scaleY(1); }
.card__num {
  font-family: var(--f-display); font-size: var(--fs-200);
  color: var(--c-accent); letter-spacing: var(--tracking-wide);
}
.card h3 { font-size: var(--fs-600); }
.card p { font-size: var(--fs-300); color: var(--c-text-muted); margin: 0; }

/* ---------- 11 · PASSAGGI NUMERATI --------------------------------------- */

.steps { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.step { border-top: 2px solid var(--c-border); padding-top: var(--sp-5); }
.step__num {
  font-family: var(--f-display); font-size: clamp(2.2rem, 4.4vw, 3rem);
  line-height: 1; color: var(--c-accent); opacity: .8;
  display: block; margin-bottom: var(--sp-3);
}
[data-theme="dark"] .step__num { opacity: .6; }
.step h3 { font-size: var(--fs-600); margin-bottom: var(--sp-3); }
.step p { font-size: var(--fs-300); color: var(--c-text-muted); margin: 0; }

/* ---------- 12 · AREE — pagina dettaglio --------------------------------- */

/* min-width:0 obbligatorio: senza, l'indice a scorrimento orizzontale allarga
   la traccia della griglia e fa sfondare la pagina su mobile. */
.area-layout { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.area-layout > * { min-width: 0; }
@media (min-width: 1000px) {
  .area-layout { grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
  .area-index { position: sticky; top: 7rem; }
}
.area-index ul { display: flex; flex-direction: column; gap: var(--sp-1); }
.area-index a {
  display: block; font-size: var(--fs-300); color: var(--c-text-muted);
  text-decoration: none; padding: var(--sp-2) var(--sp-3);
  border-left: 2px solid var(--c-border); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: all var(--dur-fast) var(--ease-out);
}
.area-index a:hover, .area-index a.is-active {
  color: var(--c-text); border-left-color: var(--c-brand); background: var(--c-bg-alt);
}
@media (max-width: 999px) {
  .area-index ul { flex-direction: row; overflow-x: auto; gap: var(--sp-2); padding-bottom: var(--sp-2); }
  .area-index a { white-space: nowrap; border-left: 0; border-bottom: 2px solid var(--c-border); border-radius: 0; }
  .area-index a:hover, .area-index a.is-active { border-left: 0; border-bottom-color: var(--c-brand); }
}

.area { scroll-margin-top: 7rem; padding-bottom: var(--sp-9); }
.area + .area { border-top: 1px solid var(--c-border); padding-top: var(--sp-9); }
.area h2 { font-size: var(--fs-700); margin-bottom: var(--sp-5); }
.area p { max-width: 68ch; color: var(--c-text); }
.area .area__note { color: var(--c-text-muted); font-size: var(--fs-300); }

.list-check { display: grid; gap: var(--sp-3); margin: var(--sp-6) 0; }
.list-check li {
  position: relative; padding-left: var(--sp-6);
  font-size: var(--fs-400); color: var(--c-text-muted); max-width: 68ch;
}
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 12px; height: 1px; background: var(--c-accent);
}
.list-label {
  font-size: var(--fs-200); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--c-text); font-weight: 600;
  display: block; margin-bottom: var(--sp-2);
}

/* ---------- 13 · SEDI ---------------------------------------------------- */

.offices { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.office {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: var(--sp-6);
}
.office h3 { font-size: var(--fs-600); margin-bottom: var(--sp-3); }
.office p { font-size: var(--fs-300); color: var(--c-text-muted); margin-bottom: var(--sp-2); }
.office a { color: var(--c-brand); text-decoration: none; font-size: var(--fs-300); }
.office a:hover { text-decoration: underline; }

/* ---------- 14 · VIDEO --------------------------------------------------- */

.video-block { display: grid; place-items: center; }
.video-frame {
  width: min(340px, 78vw); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-lg); background: #000; position: relative;
  aspect-ratio: 9 / 16;
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 15 · RECENSIONI ---------------------------------------------- */

.quotes { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 760px) { .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quote {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.quote blockquote {
  margin: 0; font-family: var(--f-display); font-size: var(--fs-500);
  line-height: 1.5; color: var(--c-text);
}
.quote cite {
  font-style: normal; font-size: var(--fs-200); font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--c-text-muted);
  margin-top: auto;
}
.quotes-note { font-size: var(--fs-200); color: var(--c-text-muted); margin-top: var(--sp-5); }

/* ---------- 16 · FAQ ----------------------------------------------------- */

.faq { max-width: 860px; }
.faq__item { border-bottom: 1px solid var(--c-border); }
.faq__q {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-5); text-align: left; cursor: pointer;
  background: none; border: 0; color: inherit;
  font-family: var(--f-display); font-size: var(--fs-600); line-height: var(--lh-snug);
  padding: var(--sp-5) 0;
  transition: color var(--dur-fast) var(--ease-out);
}
.faq__q:hover { color: var(--c-brand); }
.faq__sign { flex: none; position: relative; width: 16px; height: 16px; margin-top: .45em; }
.faq__sign::before, .faq__sign::after {
  content: ""; position: absolute; inset: 50% 0 auto; height: 1.5px;
  background: currentColor; transition: transform var(--dur-base) var(--ease-out);
}
.faq__sign::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: rotate(0); }
.faq__a {
  overflow: hidden; max-height: 0;
  transition: max-height var(--dur-base) var(--ease-out);
}
.faq__a p {
  padding-bottom: var(--sp-5); color: var(--c-text-muted);
  max-width: 68ch; font-size: var(--fs-400);
}

/* ---------- 17 · CONTATTO E FORM ----------------------------------------- */

.contact { background: var(--c-brand); color: #fff; }
.contact h2, .contact .eyebrow { color: #fff; }
.contact .eyebrow { opacity: .78; }
.contact .eyebrow::after { background: rgba(255, 255, 255, .28); }
.contact p { color: rgba(255, 255, 255, .82); }
.contact a { color: #fff; }
[data-theme="dark"] .contact { background: var(--c-bg-alt); border-block: 1px solid var(--c-border); }
[data-theme="dark"] .contact h2 { color: var(--c-text); }
[data-theme="dark"] .contact .eyebrow { color: var(--c-brand); opacity: 1; }
[data-theme="dark"] .contact p { color: var(--c-text-muted); }
[data-theme="dark"] .contact a { color: var(--c-text); }

.contact__grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); }
@media (min-width: 900px) { .contact__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); } }

.contact__facts { display: grid; gap: var(--sp-4); margin-top: var(--sp-7); }
.contact__facts div span {
  display: block; font-size: var(--fs-100); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; opacity: .7; margin-bottom: 2px;
}
.contact__facts div a { font-size: var(--fs-600); font-family: var(--f-display); text-decoration: none; }
.contact__facts div a:hover { text-decoration: underline; }

.form { display: grid; gap: var(--sp-4); }
.form__row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label { font-size: var(--fs-200); letter-spacing: .04em; text-transform: uppercase; opacity: .82; }
.field input, .field textarea {
  font-family: inherit; font-size: var(--fs-400); color: #fff;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--r-sm);
  padding: .8rem .9rem; width: 100%;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: #fff; background: rgba(255, 255, 255, .14);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ffb4a8; }
[data-theme="dark"] .field input, [data-theme="dark"] .field textarea {
  color: var(--c-text); background: var(--c-surface); border-color: var(--c-border);
}
[data-theme="dark"] .field input:focus, [data-theme="dark"] .field textarea:focus { border-color: var(--c-brand); }

.consent { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: var(--fs-300); }
.consent input { margin-top: .3em; accent-color: var(--c-accent); flex: none; width: 1rem; height: 1rem; }
.consent a { text-decoration: underline; }

.form .btn--primary { background: #fff; color: var(--c-brand); justify-self: start; }
.form .btn--primary:hover { background: var(--c-accent-soft); }
[data-theme="dark"] .form .btn--primary { background: var(--c-brand); color: #1a1014; }

.form__note { font-size: var(--fs-200); opacity: .7; }
.form__status { font-size: var(--fs-300); padding: var(--sp-3) 0; display: none; }
.form__status.is-visible { display: block; }
.form__status[data-state="ok"] { color: #bff2d8; }
.form__status[data-state="error"] { color: #ffcfc7; }
[data-theme="dark"] .form__status[data-state="ok"] { color: #7fd6a8; }
[data-theme="dark"] .form__status[data-state="error"] { color: #ec8a7c; }
.field__error { font-size: var(--fs-200); color: #ffcfc7; min-height: 1em; }
[data-theme="dark"] .field__error { color: #ec8a7c; }

/* ---------- 18 · MAPPA --------------------------------------------------- */

.map-holder {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--c-border); background: var(--c-bg-alt);
  aspect-ratio: 16 / 8; display: grid; place-items: center; text-align: center;
  padding: var(--sp-6);
}
.map-holder iframe { width: 100%; height: 100%; border: 0; }
.map-holder p { color: var(--c-text-muted); font-size: var(--fs-300); max-width: 40ch; }
@media (max-width: 700px) { .map-holder { aspect-ratio: 4 / 3; } }

/* ---------- 19 · FOOTER -------------------------------------------------- */

.footer { background: var(--c-bg-alt); border-top: 1px solid var(--c-border); padding-block: var(--sp-9) var(--sp-6); }
.footer__grid { display: grid; gap: var(--sp-7); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.footer__brand img { height: 68px; width: auto; filter: var(--logo-filter); margin-bottom: var(--sp-4); }
.footer__brand p { font-size: var(--fs-300); color: var(--c-text-muted); max-width: 32ch; }
.footer h4 {
  font-family: var(--f-text); font-size: var(--fs-100); font-weight: 700;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--c-text); margin-bottom: var(--sp-4);
}
.footer ul { display: grid; gap: var(--sp-2); }
.footer li, .footer address {
  font-size: var(--fs-300); color: var(--c-text-muted); font-style: normal; line-height: 1.7;
}
.footer a { color: var(--c-text-muted); text-decoration: none; }
.footer a:hover { color: var(--c-brand); }
.footer__legal {
  margin-top: var(--sp-8); padding-top: var(--sp-5); border-top: 1px solid var(--c-border);
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); justify-content: space-between;
  font-size: var(--fs-200); color: var(--c-text-muted);
}

/* ---------- 20 · BANNER COOKIE ------------------------------------------- */

.cookie {
  position: fixed; inset: auto var(--sp-4) var(--sp-4); z-index: var(--z-banner);
  max-width: 460px; margin-inline: auto;
  background: var(--c-surface); border: 1px solid var(--c-border-strong);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  padding: var(--sp-5); display: grid; gap: var(--sp-4);
  transform: translateY(140%); transition: transform var(--dur-slow) var(--ease-out);
}
.cookie.is-visible { transform: translateY(0); }
.cookie p { font-size: var(--fs-300); color: var(--c-text-muted); margin: 0; }
.cookie a { color: var(--c-brand); }
.cookie__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ---------- 21 · 404 ----------------------------------------------------- */

.error-page {
  min-height: 76vh; display: grid; place-items: center; text-align: center;
  padding-top: 4.75rem;
}
.error-page .code {
  font-family: var(--f-display); font-size: clamp(5rem, 18vw, 11rem);
  line-height: 1; color: var(--c-brand-soft); margin-bottom: var(--sp-4);
}
[data-theme="dark"] .error-page .code { color: var(--c-brand); opacity: .3; }

/* ---------- 22 · REVEAL -------------------------------------------------- */

.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

/* Nell'hero l'ingresso NON dipende dall'IntersectionObserver: parte da CSS al primo
   paint, così la prima schermata non resta mai vuota se il JS tarda o non parte. */
.hero .reveal { animation: rb-rise .7s var(--ease-out) both; }
.hero .reveal[data-delay="1"] { animation-delay: .07s; }
.hero .reveal[data-delay="2"] { animation-delay: .14s; }
.hero .reveal[data-delay="3"] { animation-delay: .21s; }
.hero .reveal[data-delay="4"] { animation-delay: .3s; }
@keyframes rb-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 23 · UTILITÀ ------------------------------------------------- */

.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mt-8 { margin-top: var(--sp-8); }
.text-muted { color: var(--c-text-muted); }
@media print { .nav, .cookie, .contact { display: none; } }

/* ==========================================================================
   24 · SEZIONI CON IDENTITÀ PROPRIA
   Ogni blocco qui sotto ha un trattamento grafico diverso dagli altri: serve a
   evitare che il sito sia una sequenza di fasce tutte uguali.
   ========================================================================== */

/* --- 24.1 · HERO CON COMPOSIZIONE DI IMMAGINI ----------------------------- */

.hero--split .hero__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
@media (min-width: 960px) {
  .hero--split .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); }
}

.stack { position: relative; }
.stack__main {
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-lg);
  aspect-ratio: 4 / 3;
}
.stack__main img { width: 100%; height: 100%; object-fit: cover; }
.stack__card {
  position: absolute; left: -6%; bottom: -12%;
  width: 46%; max-width: 230px; aspect-ratio: 3 / 4;
  border-radius: var(--r-md); overflow: hidden;
  border: 6px solid var(--c-bg); box-shadow: var(--sh-lg);
}
.stack__card img { width: 100%; height: 100%; object-fit: cover; }
.stack__badge {
  position: absolute; right: -4%; top: -7%;
  background: var(--c-accent); color: #1b1316;
  font-size: var(--fs-100); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; font-weight: 700;
  padding: .6rem 1.1rem; border-radius: var(--r-pill); box-shadow: var(--sh-md);
}
@media (max-width: 620px) {
  .stack__card { width: 42%; left: -3%; bottom: -8%; border-width: 4px; }
  .stack__badge { right: 0; top: -5%; }
}

/* --- 24.2 · FASCIA SCURA A TUTTA LARGHEZZA -------------------------------- */

.band {
  position: relative; overflow: hidden;
  background: var(--c-brand-strong); color: #fff;
  padding-block: clamp(4.5rem, 10vw, 9rem);
}
.band__bg {
  position: absolute; inset: 0; opacity: .13;
  background-size: cover; background-position: center;
  filter: grayscale(1);
}
.band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, var(--c-brand-strong) 8%, transparent 62%);
}
.band > .wrap { position: relative; z-index: 2; }
.band .split { align-items: start; }
.band .split h2 { margin-top: var(--sp-2); }
.band h2, .band h3 { color: #fff; }
.band p { color: rgba(255, 255, 255, .8); }
.band .eyebrow { color: var(--c-accent); }
.band .eyebrow::after { background: rgba(255, 255, 255, .25); }
.band__lead {
  font-family: var(--f-display); font-size: var(--fs-700);
  line-height: 1.3; color: #fff; max-width: 22ch;
  border-left: 2px solid var(--c-accent); padding-left: var(--sp-5);
  margin-top: var(--sp-8);
}
[data-theme="dark"] .band { background: #120b0f; }
[data-theme="dark"] .band::after { background: linear-gradient(105deg, #120b0f 8%, transparent 62%); }

/* --- 24.3 · STRISCIA DEI NUMERI ------------------------------------------- */

.stats {
  display: grid; gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  text-align: center;
}
.stat__n {
  display: block; font-family: var(--f-display);
  font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1;
  color: var(--c-brand); font-variant-numeric: tabular-nums;
}
.stat__l {
  display: block; margin-top: var(--sp-3);
  font-size: var(--fs-200); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--c-text-muted);
}

/* --- 24.4 · ELENCO EDITORIALE DELLE AREE ---------------------------------- */
/* Righe con numero grande; su desktop l'immagine segue il puntatore. */

.idx { border-top: 1px solid var(--c-border); position: relative; }
.idx__row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--sp-5); align-items: center;
  padding: clamp(1.4rem, 3vw, 2.3rem) 0;
  border-bottom: 1px solid var(--c-border);
  text-decoration: none; position: relative;
  transition: color var(--dur-base) var(--ease-out);
}
.idx__row::before {
  content: ""; position: absolute; inset: 0 -1.25rem;
  background: var(--c-brand-soft); border-radius: var(--r-md);
  opacity: 0; transition: opacity var(--dur-base) var(--ease-out); z-index: -1;
}
.idx__row:hover::before { opacity: 1; }
.idx__n {
  font-family: var(--f-display); font-size: var(--fs-300);
  color: var(--c-accent); min-width: 2.4ch;
}
.idx__t {
  font-family: var(--f-display); font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.2; color: var(--c-text);
  transition: transform var(--dur-base) var(--ease-out);
}
.idx__row:hover .idx__t { transform: translateX(8px); color: var(--c-brand); }
.idx__d {
  grid-column: 2; font-size: var(--fs-300); color: var(--c-text-muted);
  margin-top: var(--sp-2); max-width: 58ch;
}
.idx__go {
  font-size: 1.3rem; color: var(--c-accent);
  transition: transform var(--dur-base) var(--ease-out);
}
.idx__row:hover .idx__go { transform: translateX(6px); }

.idx__peek {
  position: fixed; width: 230px; aspect-ratio: 3 / 2; pointer-events: none;
  border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-lg);
  opacity: 0; transform: translate(-50%, -50%) scale(.94);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
  z-index: 60;
}
.idx__peek.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.idx__peek img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px), (hover: none) { .idx__peek { display: none; } }

/* --- 24.5 · METODO CON TITOLO FISSO --------------------------------------- */

.method { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 960px) {
  .method { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
  .method__head { position: sticky; top: 8rem; }
}
.method__list { display: grid; gap: 0; }
.method__item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-5);
  padding: var(--sp-6) 0; border-top: 1px solid var(--c-border);
}
.method__item:last-child { border-bottom: 1px solid var(--c-border); }
.method__k {
  font-family: var(--f-display); font-size: var(--fs-600);
  color: var(--c-accent); line-height: 1.1;
}
.method__item h3 { font-size: var(--fs-600); margin-bottom: var(--sp-3); }
.method__item p { font-size: var(--fs-400); color: var(--c-text-muted); margin: 0; }

/* --- 24.6 · COLLAGE DI IMMAGINI ------------------------------------------- */

.collage { position: relative; display: grid; gap: var(--sp-4); }
@media (min-width: 700px) {
  .collage { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
  .collage__a { transform: translateY(-1.8rem); }
  .collage__b { transform: translateY(1.8rem); }
}
.collage figure { margin: 0; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-lg); }
.collage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.collage__a { aspect-ratio: 3 / 4; }
.collage__b { aspect-ratio: 4 / 3; }

/* --- 24.7 · SCHEDE SEDE CON FOTO ------------------------------------------ */

.cities { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.city {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  aspect-ratio: 3 / 4; display: flex; align-items: flex-end;
  color: #fff; text-decoration: none; box-shadow: var(--sh-md);
}
.city img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.city:hover img { transform: scale(1.05); }
.city::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 10, 15, .92) 6%, rgba(20, 10, 15, .35) 46%, rgba(20, 10, 15, .1) 100%);
}
.city__body { position: relative; z-index: 2; padding: var(--sp-5); width: 100%; }
.city__name {
  font-family: var(--f-display); font-size: var(--fs-600);
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.city__time { font-size: var(--fs-300); font-variant-numeric: tabular-nums; color: var(--c-accent); }
.city__body p { font-size: var(--fs-300); color: rgba(255, 255, 255, .84); margin: 0 0 var(--sp-1); }
.city__body a { color: #fff; text-decoration: none; font-size: var(--fs-300); }
.city__body a:hover { text-decoration: underline; }

/* --- 24.8 · CITAZIONE GRANDE ---------------------------------------------- */

.pull { max-width: 30ch; }
.pull__mark {
  font-family: var(--f-display); font-size: clamp(4rem, 10vw, 7rem);
  line-height: .6; color: var(--c-accent); display: block; margin-bottom: var(--sp-4);
}
.pull blockquote {
  margin: 0; font-family: var(--f-display);
  font-size: clamp(1.35rem, 1.05rem + 1.2vw, 1.95rem); line-height: 1.38;
}
.pull cite {
  display: block; margin-top: var(--sp-5); font-style: normal;
  font-size: var(--fs-200); letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-text-muted);
}
.pull-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) { .pull-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.quotes--small { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.quotes--small .quote { padding: var(--sp-5); }
.quotes--small blockquote { font-family: var(--f-text); font-size: var(--fs-300); }

/* --- 24.9 · FIGURA CON CORNICE SFALSATA ----------------------------------- */

.framed { position: relative; }
.framed::before {
  content: ""; position: absolute; inset: 1.6rem -1.6rem -1.6rem 1.6rem;
  border: 1px solid var(--c-accent); border-radius: var(--r-lg); z-index: 0;
}
.framed .portrait { position: relative; z-index: 1; }
@media (max-width: 620px) { .framed::before { inset: 1rem -1rem -1rem 1rem; } }

/* --- 24.10 · NASTRO SCORREVOLE -------------------------------------------- */

.ticker {
  overflow: hidden; border-block: 1px solid var(--c-border);
  padding-block: var(--sp-4); background: var(--c-bg);
}
.ticker__track {
  display: flex; gap: var(--sp-8); width: max-content;
  animation: rb-ticker 42s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span {
  font-family: var(--f-display); font-size: var(--fs-500);
  color: var(--c-text-muted); white-space: nowrap;
  display: flex; align-items: center; gap: var(--sp-8);
}
.ticker span::after { content: "·"; color: var(--c-accent); }
@keyframes rb-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }
