/* =========================================================
   NIVOLAR — foglio di stile del sito statico
   Palette e tipografia derivate dal logo e dal kit originale
   ========================================================= */

/* Caratteri ospitati sul sito (nessun collegamento a Google Fonts) */
@font-face { font-family: "Fraunces"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-display: swap; font-weight: 100 900; src: url("../fonts/fraunces-latin-opsz-italic.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2"); }

:root {
  --navy-950: #040a22;
  --navy-900: #0b1230;
  --navy-800: #1b1d3a;   /* blu del logo */
  --navy-700: #1b2846;   /* Blu Nivolar */
  --navy-line: #263156;
  --gold: #c9a24b;
  --gold-deep: #dcb867;
  --cream: #f0d4ac;      /* tartaruga del logo */
  --paper: #efe9dd;
  --paper-ink: #24201a;
  --soft: #0f1b44;
  --white: #ffffff;
  --ink: #eef0f8;
  --ink-soft: #a9b1ca;
  --mute: #8790ab;
  --line: #1f2c5c;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  /* tema blu notte */
  --bg: #071030;
  --surface: #0c1739;
  --surface-2: #101e48;
  --np-gold: #a8842f;

  --wrap: 1240px;
  --gutter: clamp(16px, 5vw, 64px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 700; color: inherit; }
::selection { background: var(--gold); color: var(--navy-950); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 900px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--gold); color: var(--navy-950); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 16px; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  font-variation-settings: "opsz" 144;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 5.6rem); font-weight: 400; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.8rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
h4 { font-size: 1.35rem; }
h1 i, h2 i, h3 i, .display i { font-style: italic; font-weight: 300; }
.gold { color: var(--gold); }
.gold-strong { color: var(--gold); font-weight: 600; font-style: italic; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .8em;
  font-family: var(--f-body);
  font-size: .74rem; font-weight: 800;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }

.lead { font-size: clamp(1.08rem, 1.4vw, 1.25rem); line-height: 1.65; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

/* ---------- Pulsanti ---------- */
.btn {
  --bg: transparent; --fg: var(--ink); --bd: currentColor;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .7em;
  padding: 1em 1.8em;
  border: 1px solid var(--bd); border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font: 700 .82rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--gold); transform: translateX(-101%);
  transition: transform .5s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateX(0); }
.btn:hover, .btn:focus-visible { color: var(--navy-950); border-color: var(--gold); }
.btn--gold { --bg: var(--gold); --fg: var(--navy-950); --bd: var(--gold); }
.btn--gold::before { background: var(--white); }
.btn--light { --fg: var(--white); --bd: rgba(255,255,255,.45); }
.btn--lg { padding: 1.35em 2.6em; font-size: .9rem; }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 1px solid var(--gold); padding-bottom: .35em;
  transition: gap .3s var(--ease), color .3s;
}
.link-arrow:hover { gap: 1em; color: var(--gold-deep); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--header-h);
  transition: background .45s var(--ease), box-shadow .45s var(--ease), height .45s var(--ease), transform .45s var(--ease);
}
.site-header.is-solid {
  background: rgba(11, 18, 48, .94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
  --header-h: 70px;
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner {
  height: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.main-nav { display: flex; gap: clamp(18px, 2.2vw, 34px); align-items: center; }
.main-nav--right { justify-content: flex-end; }
.main-nav a {
  position: relative; color: rgba(255,255,255,.86);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 0; white-space: nowrap;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--white); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.brand { display: block; width: clamp(128px, 12vw, 158px); }
.brand img { width: 100%; height: auto; }
.header-cta {
  padding: .75em 1.3em; border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  color: var(--white) !important;
}
.header-cta::after { display: none; }
.header-cta:hover { border-color: var(--gold); background: var(--gold); color: var(--navy-950) !important; }

.menu-toggle {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35); background: transparent; cursor: pointer;
  display: grid; place-items: center; padding: 0; flex: none;
  transition: background .3s, border-color .3s;
}
.menu-toggle:hover { background: var(--gold); border-color: var(--gold); }
.menu-toggle span { display: block; width: 18px; height: 1.5px; background: var(--white); position: relative; transition: background .3s; }
.menu-toggle span::before, .menu-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--white); transition: transform .3s;
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; width: 11px; }
.menu-toggle:hover span::after { width: 18px; }

/* Header su pagine chiare senza hero scuro */
.site-header.on-light:not(.is-solid) .main-nav a { color: var(--ink); }
.site-header.on-light:not(.is-solid) .header-cta { color: var(--ink) !important; border-color: rgba(0,0,0,.25); }
.site-header.on-light:not(.is-solid) .menu-toggle { border-color: rgba(0,0,0,.25); }
.site-header.on-light:not(.is-solid) .menu-toggle span,
.site-header.on-light:not(.is-solid) .menu-toggle span::before,
.site-header.on-light:not(.is-solid) .menu-toggle span::after { background: var(--ink); }

@media (max-width: 1080px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .main-nav--left { display: none; }
  .main-nav--right a:not(.header-cta) { display: none; }
  .brand { order: -1; }
}
@media (max-width: 560px) {
  .header-cta { display: none !important; }
}

/* ---------- Off-canvas ---------- */
.offcanvas {
  position: fixed; inset: 0; z-index: 120;
  background: var(--navy-950);
  color: var(--white);
  display: grid; grid-template-columns: 1.1fr .9fr;
  clip-path: circle(0% at calc(100% - 60px) 42px);
  visibility: hidden;
  transition: clip-path .8s var(--ease), visibility 0s linear .8s;
}
.offcanvas.is-open {
  clip-path: circle(150% at calc(100% - 60px) 42px);
  visibility: visible;
  transition: clip-path .8s var(--ease), visibility 0s;
}
.offcanvas__close {
  position: absolute; top: 20px; right: var(--gutter); z-index: 3;
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3); background: transparent; color: var(--white);
  font-size: 1.2rem; cursor: pointer; transition: transform .5s var(--ease), background .3s, border-color .3s;
}
.offcanvas__close:hover { transform: rotate(90deg); background: var(--gold); border-color: var(--gold); color: var(--navy-950); }
.offcanvas__nav { padding: 120px var(--gutter) 48px; display: flex; flex-direction: column; justify-content: center; }
.offcanvas__nav ol { list-style: none; margin: 0; padding: 0; counter-reset: nav; }
.offcanvas__nav li { counter-increment: nav; overflow: hidden; }
.offcanvas__nav a {
  display: flex; align-items: baseline; gap: 18px;
  font-family: var(--f-display); font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.22;
  color: rgba(255,255,255,.88);
  transform: translateY(110%);
  transition: transform .8s var(--ease), color .3s;
}
.offcanvas__nav a::before {
  content: "0" counter(nav);
  font-family: var(--f-body); font-size: .75rem; font-weight: 700; letter-spacing: .14em; color: var(--gold);
}
.offcanvas__nav a:hover, .offcanvas__nav a[aria-current="page"] { color: var(--gold); font-style: italic; }
.offcanvas.is-open .offcanvas__nav a { transform: none; }
.offcanvas.is-open li:nth-child(2) a { transition-delay: .05s; }
.offcanvas.is-open li:nth-child(3) a { transition-delay: .1s; }
.offcanvas.is-open li:nth-child(4) a { transition-delay: .15s; }
.offcanvas.is-open li:nth-child(5) a { transition-delay: .2s; }
.offcanvas.is-open li:nth-child(6) a { transition-delay: .25s; }
.offcanvas__side {
  position: relative; overflow: hidden;
  background: var(--navy-800);
  padding: 120px var(--gutter) 48px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.offcanvas__side .brand { width: 190px; }
.offcanvas__side .mark-bg { position: absolute; right: -12%; bottom: -10%; width: 70%; opacity: .07; pointer-events: none; }
.offcanvas__mail { font-family: var(--f-display); font-size: clamp(1.3rem, 2vw, 1.8rem); color: var(--cream); }
.offcanvas__mail:hover { color: var(--gold); }
.socials { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; }
.socials a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.22); color: var(--white); font-size: 1rem;
  transition: background .3s, border-color .3s, color .3s, transform .3s var(--ease);
}
.socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-950); transform: translateY(-3px); }
@media (max-width: 860px) {
  .offcanvas { grid-template-columns: 1fr; overflow-y: auto; }
  .offcanvas__nav { padding-top: 100px; padding-bottom: 24px; }
  .offcanvas__side { padding-top: 40px; }
  .offcanvas__side > .brand { display: none; }
}
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--white);
  background: var(--navy-950);
  overflow: hidden;
}
.hero--short { min-height: 78vh; min-height: 78svh; }
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); animation: heroZoom 18s var(--ease) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__video {
  position: absolute; top: 50%; left: 50%;
  width: max(100vw, 177.78svh); height: max(56.25vw, 100svh);
  transform: translate(-50%, -50%);
  pointer-events: none; border: 0;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero__video.is-ready { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(4,10,34,.55) 0%, rgba(4,10,34,.15) 35%, rgba(4,10,34,.82) 100%),
    linear-gradient(90deg, rgba(4,10,34,.65) 0%, rgba(4,10,34,0) 70%);
}
.hero__content { padding-top: calc(var(--header-h) + 60px); padding-bottom: clamp(64px, 11vh, 120px); width: 100%; }
.hero h1 { max-width: 15ch; margin-bottom: .45em; }
.hero h1 .gold { font-style: italic; font-weight: 500; }
.hero h1 strong { font-weight: 600; }
.hero__text { max-width: 640px; font-size: clamp(1.02rem, 1.3vw, 1.2rem); font-weight: 300; color: rgba(255,255,255,.88); }
.hero__text b, .hero__text strong { font-weight: 700; color: var(--white); }
.hero__meta {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap;
  margin-top: clamp(36px, 6vh, 64px); padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18);
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.6);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 14px; }
.scroll-cue i {
  position: relative; width: 1px; height: 46px; background: rgba(255,255,255,.25); overflow: hidden; display: block;
}
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }
.sound-toggle {
  display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit;
  font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; padding: 0;
}
.sound-toggle:hover { color: var(--gold); }

/* Titoli ad apparizione per parole */
.split-line { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.split-line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.is-in .split-line > span, .split-line.is-in > span { transform: none; }

/* ---------- Sezioni ---------- */
.section { position: relative; padding: clamp(80px, 12vw, 160px) 0; }
.section--tight { padding: clamp(56px, 8vw, 100px) 0; }
.section--soft { background: var(--soft); }
.section--paper { background: var(--paper); color: var(--paper-ink); }
.section--navy { background: var(--navy-700); color: var(--white); }
.section--deep { background: var(--navy-950); color: var(--white); }
.section--navy .muted, .section--deep .muted { color: #b9b9c2; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.split--wide-left { grid-template-columns: 1.15fr .85fr; }
.split--top { align-items: start; }
@media (max-width: 900px) {
  .split, .split--wide-left { grid-template-columns: 1fr; }
  .split .order-first-mobile { order: -1; }
}

.text-col p { color: var(--ink-soft); }
.text-col p strong { color: var(--ink); }
.section--navy .text-col p, .section--deep .text-col p { color: #c9cad6; }
.section--navy .text-col p strong, .section--deep .text-col p strong { color: var(--white); }

/* Immagine con cornice */
.media-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 5; background: var(--navy-800);
}
.media-frame--land { aspect-ratio: 4 / 3; }
.media-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12); transition: transform 1.6s var(--ease);
}
.media-frame.is-in img { transform: scale(1.02); }
.media-frame:hover img { transform: scale(1.06); }
.media-frame::after {
  content: ""; position: absolute; inset: 0; background: var(--navy-950);
  transform-origin: top; transition: transform 1.2s var(--ease);
}
.media-frame.is-in::after { transform: scaleY(0); }
.media-frame__tag {
  position: absolute; left: 20px; bottom: 20px; z-index: 2;
  background: var(--gold); color: var(--navy-950);
  font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
}
.media-offset { position: relative; }
.media-offset::before {
  content: ""; position: absolute; inset: 28px -28px -28px 28px; border: 1px solid var(--gold); border-radius: var(--radius); z-index: -1;
}
@media (max-width: 900px) { .media-offset::before { inset: 16px -12px -16px 12px; } }

/* Grafica sentiero tratteggiato (asset originali) */
.trail { position: absolute; pointer-events: none; opacity: .9; }
.trail--a { width: clamp(90px, 10vw, 150px); }
.trail--b { width: clamp(80px, 9vw, 130px); }

/* Tartaruga (marchio) */
.mark { color: var(--cream); }
.mark-watermark { position: absolute; pointer-events: none; opacity: .05; color: var(--white); }

/* ---------- Statement ---------- */
.statement h2 { max-width: 20ch; }
.statement h2 .gold { font-style: italic; }
.statement .lead { max-width: 640px; }

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden; border-block: 1px solid var(--line);
  background: var(--surface); padding: 26px 0;
}
.ticker--dark { background: var(--navy-950); border-color: var(--navy-line); color: var(--white); }
.ticker__track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; align-items: center; gap: 48px; padding-right: 48px; }
.ticker__item {
  font-family: var(--f-display); font-size: clamp(1.8rem, 3.6vw, 3.2rem); font-weight: 300; white-space: nowrap;
}
.ticker__item:nth-child(4n+3) { font-style: italic; color: var(--gold); }
.ticker__sep { width: 26px; color: var(--gold); flex: none; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Processo (3 step) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); counter-reset: step; }
.step {
  position: relative; padding-top: 28px; border-top: 1px solid var(--line);
}
.step::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: var(--gold);
  transition: width 1.4s var(--ease);
}
.step.is-in::before { width: 100%; }
.step__num {
  font-family: var(--f-display); font-weight: 300; font-size: clamp(3.6rem, 6vw, 5.4rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--gold); margin-bottom: 18px;
}
.step h3 { font-size: 1.6rem; margin-bottom: .45em; }
.step p { color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Card griglia ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  position: relative; background: var(--surface); padding: clamp(28px, 3vw, 44px);
  transition: background .5s var(--ease), color .5s var(--ease);
  overflow: hidden;
}
.card__icon {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft); color: var(--gold-deep); font-size: 1.15rem; margin-bottom: 26px;
  transition: background .5s, color .5s, transform .6s var(--ease);
}
.card h3, .card h4 { font-size: 1.4rem; margin-bottom: .55em; }
.card p { color: var(--ink-soft); font-size: .98rem; transition: color .5s; }
.card:hover { background: var(--navy-700); color: var(--white); }
.card:hover p { color: #c9cad6; }
.card:hover .card__icon { background: var(--gold); color: var(--navy-950); transform: rotate(-8deg) scale(1.06); }
@media (max-width: 1000px) { .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cards--4 { grid-template-columns: 1fr; } }

/* Hover cards scure (A chi ci rivolgiamo) */
.hcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hcard {
  position: relative; min-height: 340px; padding: 32px 28px;
  border: 1px solid var(--navy-line); border-radius: var(--radius);
  display: flex; flex-direction: column; justify-content: flex-start; gap: 56px;
  overflow: hidden; isolation: isolate;
  transition: border-color .5s, transform .6s var(--ease);
}
.hcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold);
  transform: translateY(101%); transition: transform .6s var(--ease);
}
.hcard__idx { font-size: .72rem; font-weight: 800; letter-spacing: .2em; color: var(--gold); transition: color .5s; }
.hcard h3 { font-size: 1.85rem; margin: 0 0 .5em; color: var(--white); transition: color .5s; }
.hcard p { color: #b9b9c2; font-size: .96rem; transition: color .5s; }
.hcard p strong { color: var(--white); transition: color .5s; }
.hcard:hover { transform: translateY(-6px); border-color: var(--gold); }
.hcard:hover::before { transform: none; }
.hcard:hover h3, .hcard:hover p, .hcard:hover p strong, .hcard:hover .hcard__idx { color: var(--navy-950); }
@media (max-width: 1080px) { .hcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .hcards { grid-template-columns: 1fr; } .hcard { min-height: 0; gap: 40px; } }

/* ---------- Fasi servizi ---------- */
.phase-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 60px); align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.phase-num {
  font-family: var(--f-display); font-weight: 300; font-size: clamp(5rem, 13vw, 11rem); line-height: .8;
  color: transparent; -webkit-text-stroke: 1px var(--gold);
}
.phase-head h2 { margin: 0 0 .25em; }
.phase-head .eyebrow { margin-bottom: .6rem; }
.phase-intro { max-width: 640px; color: var(--ink-soft); }
.phase-items { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.phase-item {
  display: grid; grid-template-columns: 76px 1fr; gap: 26px; align-items: start;
  padding: clamp(28px, 3vw, 44px); background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .6s;
}
.section--soft .phase-item { background: var(--surface); }
.phase-item:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(11,18,48,.35); border-color: var(--gold); }
.phase-item__icon { width: 76px; height: 76px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; padding: 14px; }
.phase-item__icon img { width: 100%; height: 100%; }
.phase-item h3 { font-size: 1.55rem; margin-bottom: .5em; }
.phase-item p { color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 900px) { .phase-items { grid-template-columns: 1fr; } .phase-head { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .phase-item { grid-template-columns: 1fr; } }

/* ---------- Metodo: timeline 4 momenti ---------- */
.moments { position: relative; }
.moments::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line);
}
.moments__progress { position: absolute; left: 50%; top: 0; width: 1px; height: 0; background: var(--gold); }
.moment {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 140px); align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
}
.moment::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--gold); transform: translate(-50%, -50%);
  transition: background .5s;
}
.moment.is-in::after { background: var(--gold); }
.moment__num { font-family: var(--f-display); font-size: clamp(3.4rem, 6vw, 5rem); font-weight: 300; line-height: 1; color: var(--gold); }
.moment h3 { font-size: clamp(2rem, 3.4vw, 3rem); font-style: italic; font-weight: 300; margin: .1em 0 .5em; }
.moment p { color: var(--ink-soft); }
.moment__art {
  aspect-ratio: 1; max-width: 340px; width: 100%; justify-self: center;
  border-radius: 50%; background: var(--soft); display: grid; place-items: center; padding: 22%;
  position: relative;
}
.moment__art img { width: 100%; height: auto; }
.moment__art::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(201,162,75,.6); animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.moment--rev .moment__body { order: 2; }
@media (max-width: 860px) {
  .moments::before, .moments__progress { left: 14px; }
  .moment { grid-template-columns: 1fr; padding-left: 44px; gap: 28px; }
  .moment::after { left: 14px; top: 64px; }
  .moment--rev .moment__body { order: 0; }
  .moment__art { max-width: 200px; justify-self: start; }
}

/* ---------- Pagina di giornale (Metodo) ---------- */
.newspaper { background: var(--paper); color: var(--paper-ink); }
.np-mast {
  display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  border-top: 3px solid var(--paper-ink); border-bottom: 1px solid var(--paper-ink);
  padding: 10px 0; margin-bottom: 36px;
}
.np-title {
  font-family: var(--f-display); font-weight: 700; text-align: center;
  font-size: clamp(2.2rem, 6vw, 5.2rem); line-height: 1.02; letter-spacing: -0.02em;
  margin: 0 auto 36px; max-width: 18ch;
}
.np-rule { height: 1px; background: var(--paper-ink); opacity: .5; margin-bottom: 40px; }
.np-body { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.np-figure { margin: 0; }
.np-figure img { width: 100%; filter: grayscale(1) contrast(1.05) sepia(.18); border: 1px solid rgba(36,32,26,.35); }
.np-figure figcaption { font-size: .78rem; font-style: italic; margin-top: 10px; opacity: .75; }
.np-text { font-family: var(--f-display); font-size: 1.12rem; line-height: 1.7; column-count: 2; column-gap: 36px; column-rule: 1px solid rgba(36,32,26,.25); }
.np-text p { break-inside: avoid-column; }
.np-drop::first-letter { float: left; font-size: 4.6em; line-height: .78; padding: 6px 10px 0 0; font-weight: 700; color: var(--np-gold); }
.np-quote {
  margin: 56px auto 0; max-width: 820px; text-align: center;
  font-family: var(--f-display); font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.35; font-style: italic;
  border-top: 1px solid rgba(36,32,26,.35); padding-top: 36px;
}
.np-quote strong { font-style: normal; font-weight: 600; }
@media (max-width: 900px) { .np-body { grid-template-columns: 1fr; } .np-text { column-count: 1; } }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--navy-700); color: var(--white);
  padding: clamp(70px, 10vw, 130px) 0;
}
.cta-band__inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { max-width: 18ch; margin: 0; }
.cta-band h2 i { color: var(--gold); }
.cta-band .mark-watermark { left: 38%; top: 50%; width: min(460px, 50vw); transform: translateY(-50%); opacity: .05; }
.cta-band .trail--a { left: 3%; top: 12%; }
.cta-band .trail--b { right: 30%; bottom: -18%; transform: rotate(18deg); opacity: .6; }

/* ---------- Blocco contatti con modulo ---------- */
.contact-head {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--navy-700); color: var(--white); text-align: center;
  padding: clamp(80px, 11vw, 150px) 0 clamp(130px, 15vw, 200px);
}
.contact-head h2 { font-size: clamp(3rem, 8vw, 7rem); font-weight: 300; margin: 0; }
.contact-head h2 em { color: var(--gold); }
.contact-head .trail--a { left: 6%; top: 10%; }
.contact-head .trail--b { right: 7%; top: 18%; }
.contact-body { position: relative; margin-top: clamp(-120px, -10vw, -80px); padding-bottom: clamp(80px, 10vw, 140px); }
.contact-card {
  display: grid; grid-template-columns: .85fr 1.15fr; background: var(--surface);
  border-radius: calc(var(--radius) + 6px); overflow: hidden;
  box-shadow: 0 40px 100px -40px rgba(4,10,34,.45);
}
.contact-card__intro { background: var(--soft); padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.contact-card__intro h3 { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 400; }
.contact-card__intro p { color: var(--mute); }
.contact-direct { border-top: 1px solid var(--line); padding-top: 24px; font-size: .92rem; }
.contact-direct span { display: block; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; font-weight: 700; }
.contact-direct a { font-family: var(--f-display); font-size: 1.35rem; color: var(--navy-700); border-bottom: 1px solid var(--gold); }
.contact-direct a:hover { color: var(--gold-deep); }
.contact-card__form { padding: clamp(32px, 5vw, 64px); }
@media (max-width: 900px) { .contact-card { grid-template-columns: 1fr; } }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; }
.field { position: relative; grid-column: span 2; }
.field--half { grid-column: span 1; }
@media (max-width: 600px) { .field--half { grid-column: span 2; } }
.field label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.field label .req { color: var(--gold-deep); }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: 400 1rem/1.5 var(--f-body); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid #cfcdc6; border-radius: 0;
  padding: 10px 0 12px; transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #a5a4ab; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.field .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--gold); transition: width .5s var(--ease); }
.field input:focus ~ .bar, .field textarea:focus ~ .bar { width: 100%; }
.field.has-error input, .field.has-error textarea { border-bottom-color: #c0392b; }
.field__error { display: none; color: #c0392b; font-size: .8rem; margin-top: 6px; }
.field.has-error .field__error { display: block; }
.field .check, .check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--ink-soft); cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 500; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; border: 1px solid #bdbcb5; border-radius: 5px; display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s; }
.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after { content: ""; width: 10px; height: 5px; border-left: 2px solid var(--navy-950); border-bottom: 2px solid var(--navy-950); transform: rotate(-45deg) translate(1px, -1px); }
.field--check label.check { font-size: .92rem; }

.file-drop {
  position: relative; display: flex; align-items: center; gap: 14px;
  border: 1px dashed rgba(255,255,255,.35); border-radius: 12px; padding: 16px 18px; cursor: pointer;
  transition: border-color .3s, background .3s;
}
.file-drop:hover, .file-drop.is-drag { border-color: var(--gold); background: rgba(201,162,75,.08); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(201,162,75,.15); color: var(--gold); flex: none; }
.file-drop__text { font-size: .92rem; line-height: 1.4; }
.file-drop__text small { display: block; opacity: .6; font-size: .78rem; }
.file-drop__name { color: var(--gold); font-weight: 700; }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 34px; }
.form-status { font-size: .95rem; flex: 1 1 260px; }
.form-status.is-ok { color: #2f7a4a; font-weight: 600; }
.form-status.is-err { color: #c0392b; }
.form-status a { text-decoration: underline; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
button[disabled] { opacity: .6; cursor: progress; }
.form-success {
  display: none; text-align: left; padding: 10px 0;
}
.form-success.is-visible { display: block; animation: rise .8s var(--ease); }
.form-success__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--gold); color: var(--navy-950); display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 22px; }
.form-success p { font-family: var(--f-display); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3; color: var(--ink); }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

/* Variante scura del form (candidatura) */
.form--dark .field label { color: var(--white); }
.form--dark .field input[type="text"], .form--dark .field input[type="email"], .form--dark .field textarea { color: var(--white); border-bottom-color: rgba(255,255,255,.3); }
.form--dark .field input::placeholder, .form--dark .field textarea::placeholder { color: rgba(255,255,255,.4); }
.form--dark .check { color: #c9cad6; }
.form--dark .check input { border-color: rgba(255,255,255,.4); }
.form--dark .form-success p { color: var(--white); }
.form--dark .form-status.is-ok { color: var(--gold); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 56px 1fr 44px; align-items: center; gap: 16px;
  padding: 28px 0; font-family: var(--f-display); font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.3;
  transition: color .3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--gold-deep); }
.faq__idx { font-family: var(--f-body); font-size: .74rem; font-weight: 800; letter-spacing: .16em; color: var(--gold); }
.faq__plus { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); position: relative; transition: background .3s, border-color .3s, transform .5s var(--ease); }
.faq__plus::before, .faq__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); transition: transform .4s var(--ease); }
.faq__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] .faq__plus { background: var(--navy-700); border-color: var(--navy-700); }
.faq details[open] .faq__plus::before, .faq details[open] .faq__plus::after { background: var(--white); }
.faq details[open] .faq__plus::after { transform: translate(-50%, -50%) rotate(0); }
.faq__answer { overflow: hidden; }
.faq__answer-inner { padding: 0 60px 32px 72px; color: var(--ink-soft); max-width: 900px; }
@media (max-width: 600px) {
  .faq summary { grid-template-columns: 1fr 40px; }
  .faq__idx { display: none; }
  .faq__answer-inner { padding: 0 0 28px; }
}

/* ---------- Contatti: info ---------- */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.info-box {
  padding: 40px 32px; border: 1px solid var(--line); border-radius: var(--radius); text-align: center;
  transition: transform .5s var(--ease), border-color .5s, box-shadow .5s;
}
.info-box:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 30px 60px -36px rgba(11,18,48,.4); }
.info-box__icon { width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; background: var(--navy-700); color: var(--gold); font-size: 1.3rem; }
.info-box h3 { font-size: 1.45rem; margin-bottom: .4em; }
.info-box p, .info-box a { color: var(--ink-soft); }
.info-box a { border-bottom: 1px solid var(--gold); font-weight: 600; color: var(--navy-700); }
.info-box a:hover { color: var(--gold-deep); }
@media (max-width: 860px) { .info-grid { grid-template-columns: 1fr; } }
.map-wrap { position: relative; height: 500px; background: var(--soft); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); transition: filter .6s; }
.map-wrap:hover iframe { filter: none; }

/* ---------- Valori (lavora con noi) ---------- */
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.value { background: var(--surface); padding: clamp(28px, 3.4vw, 48px); }
.value__n { font-size: .72rem; font-weight: 800; letter-spacing: .2em; color: var(--gold); margin-bottom: 16px; display: block; }
.value h3 { font-size: 1.7rem; margin-bottom: .45em; }
.value p { color: var(--ink-soft); }
@media (max-width: 700px) { .values { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--navy-950); color: var(--white); padding: clamp(70px, 9vw, 120px) 0 36px; }
.footer-claim {
  font-family: var(--f-display); font-weight: 300; line-height: 1.05;
  font-size: clamp(2.4rem, 6.4vw, 5.6rem); margin: 0 0 clamp(50px, 7vw, 90px); max-width: 16ch;
}
.footer-claim em { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: clamp(32px, 5vw, 80px); padding-bottom: 56px; border-bottom: 1px solid var(--navy-line); }
.footer-grid .brand { width: 170px; margin-bottom: 24px; }
.footer-grid p { color: #b9b9c2; max-width: 40ch; }
.footer-title { font-size: .72rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; display: block; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-nav a { color: #d7d8e0; transition: color .3s, padding .3s; }
.footer-nav a:hover { color: var(--gold); padding-left: 6px; }
.footer-join {
  border: 1px solid var(--navy-line); border-radius: var(--radius); padding: 30px;
  background: linear-gradient(140deg, rgba(27,40,70,.7), rgba(4,10,34,0));
}
.footer-join strong { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.6rem; margin-bottom: 8px; }
.footer-join p { font-style: italic; margin-bottom: 22px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 26px; font-size: .82rem; color: #8e90a3; }
.footer-bottom em { font-style: italic; }
.footer-bottom a:hover { color: var(--gold); }
.site-footer .mark-watermark { right: -6%; bottom: -14%; width: min(560px, 70vw); opacity: .04; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.error-page { min-height: 100svh; display: grid; place-items: center; text-align: center; background: var(--navy-950); color: var(--white); position: relative; overflow: hidden; padding: 120px var(--gutter) 80px; }
.error-page__code { font-family: var(--f-display); font-weight: 300; font-size: clamp(8rem, 28vw, 20rem); line-height: .85; color: transparent; -webkit-text-stroke: 1px var(--gold); margin: 0; }
.error-page h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 18px 0 34px; }

/* ---------- Animazioni di comparsa ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; } .reveal-d2 { transition-delay: .2s; } .reveal-d3 { transition-delay: .3s; } .reveal-d4 { transition-delay: .4s; }

/* Cursore personalizzato (solo dispositivi con puntatore fine) */
.cursor-dot { position: fixed; top: 0; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); pointer-events: none; z-index: 300; transform: translate(-50%, -50%); transition: width .3s var(--ease), height .3s var(--ease), background .3s; mix-blend-mode: difference; display: none; }
.cursor-dot.is-hover { width: 46px; height: 46px; background: rgba(201,162,75,.9); }
@media (hover: hover) and (pointer: fine) { .cursor-dot { display: block; } }

/* Barra di avanzamento lettura */
.progress-bar { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); z-index: 100; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .split-line > span { opacity: 1 !important; transform: none !important; }
  .media-frame::after { transform: scaleY(0) !important; }
  .media-frame img { transform: none !important; }
  .hero__video { display: none; }
  .cursor-dot { display: none !important; }
}

/* Box "in concreto" su fondo blu */
.concrete .text-col p { color: #c9cad6; }
.concrete .text-col p strong { color: var(--white); }

/* l'area di caricamento è una label: annulla lo stile delle etichette */
.field label.file-drop { display: flex; margin: 0; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .92rem; color: var(--white); }
.field label.file-drop small { letter-spacing: .04em; }

/* ---------- Link nelle caselle di consenso ---------- */
.check a { color: inherit; border-bottom: 1px solid var(--gold); font-weight: 700; }
.check a:hover { color: var(--gold-deep); }
.form--dark .check a:hover { color: var(--gold); }

/* ---------- Footer: link legali ---------- */
.footer-legal { display: inline-flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.footer-legal button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.footer-legal button:hover { color: var(--gold); }

/* ---------- Banner consenso ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150;
  max-width: 560px; margin-left: auto;
  background: var(--navy-900); color: #d7d8e0;
  border: 1px solid var(--navy-line); border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
  padding: 26px 28px; font-size: .9rem; line-height: 1.6;
  animation: rise .7s var(--ease);
}
.consent[hidden] { display: none; }
.consent__title { font-family: var(--f-display); font-size: 1.35rem; color: var(--white); margin-bottom: .4em; }
.consent a { color: var(--gold); border-bottom: 1px solid currentColor; }
.consent__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.consent__actions .btn { padding: .9em 1.4em; font-size: .74rem; }
.consent__close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--navy-line); background: transparent; color: #b9b9c2; cursor: pointer; }
.consent__close:hover { color: var(--white); border-color: var(--gold); }

/* ---------- Mappa con consenso ---------- */
.map-consent {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  text-align: center; padding: 24px;
  background: linear-gradient(rgba(245,244,240,.92), rgba(245,244,240,.92)), repeating-linear-gradient(45deg, #e8e5dc 0 2px, transparent 2px 22px);
}
.map-consent > i { font-size: 2rem; color: var(--gold-deep); }
.map-consent p { max-width: 420px; color: var(--ink-soft); margin: 0; }
.map-consent a { font-size: .85rem; color: var(--ink-soft); border-bottom: 1px solid var(--gold); }

/* ---------- Pagina legale ---------- */
.legal-head { background: var(--navy-950); color: var(--white); padding: calc(var(--header-h) + clamp(60px, 8vw, 110px)) 0 clamp(50px, 6vw, 80px); }
.legal-head h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); margin-bottom: .35em; }
.legal-head .lead { color: #c9cad6; max-width: 680px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.legal-toc a { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .7em 1.1em; border: 1px solid var(--navy-line); border-radius: 999px; color: #d7d8e0; transition: border-color .3s, color .3s; }
.legal-toc a:hover { border-color: var(--gold); color: var(--gold); }
.legal { padding-top: clamp(50px, 7vw, 90px); }
.legal h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 2.2em 0 .7em; padding-top: .6em; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; font-weight: 600; }
.legal p { color: var(--ink-soft); }
.legal a { color: var(--navy-700); border-bottom: 1px solid var(--gold); font-weight: 600; }
.legal code { background: var(--soft); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.legal-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.4em 0; font-size: .95rem; }
.legal-table > div { display: grid; grid-template-columns: 1fr 1.3fr; }
.legal-table > div + div { border-top: 1px solid var(--line); }
.legal-table span { padding: 16px 20px; color: var(--ink-soft); }
.legal-table span:first-child { color: var(--ink); font-weight: 600; border-right: 1px solid var(--line); }
.legal-table__head { background: var(--navy-700); }
.legal-table__head span, .legal-table__head span:first-child { color: var(--white) !important; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; border-color: transparent; }
@media (max-width: 640px) { .legal-table > div { grid-template-columns: 1fr; } .legal-table span:first-child { border-right: 0; padding-bottom: 4px; } .legal-table span + span { padding-top: 0; } }
.todo { background: #fff3c4; color: #7a5b00; padding: 0 4px; border-radius: 4px; font-weight: 700; }
.inline-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--navy-700); border-bottom: 1px solid var(--gold); cursor: pointer; }

/* =========================================================
   Movimento: parallasse, inclinazione, pulsanti magnetici
   ========================================================= */
.hero__poster { translate: 0 var(--hy, 0px); }
.media-frame img { translate: 0 var(--py, 0px); }
.media-frame.is-in img { transform: scale(1.1); }
.media-frame:hover img { transform: scale(1.16); }

/* card che si inclinano seguendo il puntatore */
[data-tilt], [data-tilt].reveal.is-in {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: opacity 1s var(--ease), transform .45s var(--ease), background .5s var(--ease), border-color .5s, box-shadow .5s;
  will-change: transform;
}
[data-tilt].reveal:not(.is-in) { transform: translateY(34px); }
[data-tilt]:hover { --lift: -8px; }
[data-tilt] .glare {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(201,162,75,.18), transparent 60%);
}
[data-tilt]:hover .glare { opacity: 1; }
.phase-item, .info-box, .value, .step { position: relative; }

/* pulsanti magnetici */
.btn { translate: var(--mx, 0px) var(--my, 0px); transition: color .4s var(--ease), border-color .4s var(--ease), translate .35s var(--ease); }

/* immagini decorative che fluttuano */
.trail { animation: drift 7s ease-in-out infinite alternate; }
.trail--b { animation-duration: 9s; animation-delay: -3s; }
@keyframes drift { from { translate: 0 0; } to { translate: 10px -16px; } }

/* sopratitoli: la linea si allunga quando entrano */
.eyebrow::before { transition: width 1s var(--ease) .2s; }
.reveal:not(.is-in) .eyebrow::before, .eyebrow.reveal:not(.is-in)::before { width: 0; }

/* righe del menu e link: sottolineatura che scorre */
.footer-nav a, .legal a { background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 100% / 0 1px; transition: background-size .4s var(--ease), color .3s, padding .3s; }
.footer-nav a:hover { background-size: 100% 1px; }

/* immagini dei servizi: l'icona ruota leggermente */
.phase-item__icon, .moment__art img { transition: transform .6s var(--ease); }
.phase-item:hover .phase-item__icon { transform: rotate(-8deg) scale(1.08); }
.moment:hover .moment__art img { transform: scale(1.12) rotate(4deg); }

/* ticker che segue la velocità di scroll */
.ticker__track { transform: skewX(var(--skew, 0deg)); transition: transform .3s ease-out; }

/* numeri dei passaggi che si colorano al passaggio */
.step__num { transition: color .5s var(--ease), -webkit-text-stroke-color .5s; }
.step:hover .step__num { color: var(--gold); }
.value h3, .card h3 { transition: color .4s; }
.value:hover h3 { color: var(--gold-deep); }

/* tablet */
@media (max-width: 1080px) and (min-width: 701px) {
  .hero h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
}
@media (max-width: 480px) {
  .hero__meta { font-size: .64rem; }
  .btn--lg { padding: 1.15em 1.9em; }
  .contact-card__intro, .contact-card__form { padding: 26px 20px; }
  .cta-band__inner .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce), (hover: none) {
  [data-tilt] { --rx: 0deg !important; --ry: 0deg !important; }
  .btn { translate: none; }
}


/* =========================================================
   TEMA BLU NOTTE — correzioni di contrasto
   ========================================================= */
html { background: var(--bg); color-scheme: dark; }
body { background: var(--bg); }
.section--soft { background: var(--surface); }
.section--deep, .site-footer { background: #040a22; }
.newspaper, .newspaper p, .newspaper strong { color: var(--paper-ink); }
.newspaper .np-figure figcaption { color: var(--paper-ink); }
.ticker { background: transparent; border-color: var(--line); }
.phase-item__icon, .moment__art { background: var(--cream); }
.moment__art::before { border-color: rgba(201,162,75,.7); }
.moment::after { background: var(--bg); }
.field input[type="text"], .field input[type="email"], .field textarea { border-bottom-color: #2a3a6e; }
.field input::placeholder, .field textarea::placeholder { color: #6c7697; }
.check input { border-color: #3a4a80; }
.contact-card { border: 1px solid var(--line); box-shadow: 0 40px 100px -30px rgba(0,0,0,.7); }
.contact-card__intro { background: var(--surface-2); }
.contact-card__intro p { color: var(--ink-soft); }
.contact-direct a, .info-box a, .legal a, .inline-btn { color: var(--cream); }
.info-box { background: var(--surface); }
.map-consent { background: linear-gradient(rgba(12,23,57,.94), rgba(12,23,57,.94)), repeating-linear-gradient(45deg, #1a2858 0 2px, transparent 2px 22px); }
.map-wrap { background: var(--surface); }
.form-status.is-ok { color: #7fd1a0; }
.form-status.is-err, .field__error { color: #ff8a7a; }
.field.has-error input, .field.has-error textarea { border-bottom-color: #ff8a7a; }
.legal-table__head { background: var(--surface-2); }
.legal code { background: var(--surface-2); color: var(--cream); }
.todo { background: #5a4300; color: #ffe9a8; }
.card:hover { background: var(--navy-700); }
.media-offset::before { border-color: rgba(201,162,75,.6); }
.statement h2, h1, h2, h3 { text-wrap: balance; }

/* =========================================================
   DINAMISMO MOTORSPORT
   ========================================================= */

/* Semaforo di partenza all'apertura (una volta per sessione) */
.start-lights {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center;
  background: #030817; transition: clip-path .9s cubic-bezier(.7,0,.2,1);
  clip-path: inset(0 0 0 0);
}
.start-lights.is-go { clip-path: inset(0 0 0 100%); }
.start-lights__row { display: flex; gap: clamp(10px, 2.4vw, 22px); padding: 18px 22px; background: #0b1230; border-radius: 16px; border: 1px solid #1f2c5c; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.start-lights__pod { display: grid; gap: 10px; padding: 10px; background: #050a1d; border-radius: 12px; }
.start-lights__pod i { width: clamp(26px, 5vw, 46px); aspect-ratio: 1; border-radius: 50%; background: #1a1f33; display: block; transition: background .08s, box-shadow .08s; }
.start-lights__pod.is-on i { background: #e3262c; box-shadow: 0 0 22px 4px rgba(227,38,44,.75), inset 0 -4px 10px rgba(0,0,0,.35); }
.start-lights__label { position: absolute; bottom: 12vh; left: 0; right: 0; text-align: center; font-size: .72rem; letter-spacing: .4em; text-transform: uppercase; color: #6c7697; }
.start-lights__skip { position: absolute; top: 20px; right: 20px; background: none; border: 1px solid #1f2c5c; color: #8790ab; border-radius: 999px; padding: 8px 16px; font: 700 .7rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.start-lights__skip:hover { color: var(--white); border-color: var(--gold); }

/* Linee di velocità nell'hero */
.speedlines { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.speedlines i {
  position: absolute; right: -40%; height: 1px; width: 38%;
  background: linear-gradient(90deg, transparent, rgba(240,212,172,.55), rgba(201,162,75,0));
  animation: streak linear infinite; opacity: .0;
}
.speedlines i:nth-child(1)  { top: 12%; animation-duration: 1.9s; animation-delay: 0s; }
.speedlines i:nth-child(2)  { top: 21%; animation-duration: 2.6s; animation-delay: .7s; width: 22%; }
.speedlines i:nth-child(3)  { top: 33%; animation-duration: 1.6s; animation-delay: 1.3s; }
.speedlines i:nth-child(4)  { top: 41%; animation-duration: 3.1s; animation-delay: .2s; width: 50%; }
.speedlines i:nth-child(5)  { top: 52%; animation-duration: 2.2s; animation-delay: 1.8s; width: 18%; }
.speedlines i:nth-child(6)  { top: 61%; animation-duration: 1.7s; animation-delay: .9s; }
.speedlines i:nth-child(7)  { top: 70%; animation-duration: 2.8s; animation-delay: 2.2s; width: 30%; }
.speedlines i:nth-child(8)  { top: 79%; animation-duration: 2s;   animation-delay: .4s; }
.speedlines i:nth-child(9)  { top: 86%; animation-duration: 2.4s; animation-delay: 1.5s; width: 44%; }
.speedlines i:nth-child(10) { top: 93%; animation-duration: 1.8s; animation-delay: 2.6s; width: 26%; }
@keyframes streak { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateX(-380%); opacity: 0; } }

/* Cronometro */
.laptimer { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.85); letter-spacing: .12em; }
.laptimer b { font-weight: 700; color: var(--gold); }
.laptimer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e3262c; box-shadow: 0 0 10px #e3262c; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* Cordolo sotto l'hero e sopra il footer */
.kerb { height: 12px; background: repeating-linear-gradient(115deg, var(--gold) 0 34px, #f0d4ac 34px 36px, #0b1230 36px 70px, #f0d4ac 70px 72px); position: relative; z-index: 2; background-size: 158px 100%; animation: kerb 2.4s linear infinite; }
.kerb--thin { height: 6px; opacity: .85; }
@keyframes kerb { to { background-position: -158px 0; } }

/* Ingressi "in scia": scivolano con un leggero motion blur */
.reveal { transform: translateX(-70px) skewX(-6deg); filter: blur(6px); transition: opacity .9s var(--ease), transform 1s var(--ease), filter .9s var(--ease); }
.reveal.is-in { transform: none; filter: none; }
[data-tilt].reveal:not(.is-in) { transform: translateX(-70px) skewX(-6deg); }
.split-line > span { transform: translateY(105%) skewY(6deg); }

/* Titoli enormi in corsivo che scorrono */
.ticker { padding: 34px 0; }
.ticker__track { animation-duration: 20s; }
.ticker__item { font-size: clamp(2.4rem, 6vw, 5.4rem); font-style: italic; font-weight: 600; letter-spacing: -.02em; text-transform: uppercase; }
.ticker__item:nth-child(4n+1) { color: transparent; -webkit-text-stroke: 1px rgba(240,212,172,.6); }
.ticker__item:nth-child(4n+3) { color: var(--gold); }

/* Tagli diagonali tra le sezioni */
.cta-band { clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%); margin: -2px 0; }
.contact-head { clip-path: polygon(0 0, 100% 7%, 100% 100%, 0 100%); }
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 0 58%, rgba(201,162,75,.12) 58% 60%, transparent 60% 63%, rgba(201,162,75,.08) 63% 64%, transparent 64%);
}

/* Pulsanti con spazzata diagonale, come una livrea */
.btn::before { inset: 0 -30%; transform: translateX(-110%) skewX(-24deg); }
.btn:hover::before, .btn:focus-visible::before { transform: translateX(0) skewX(-24deg); }

/* Barra di avanzamento con scia luminosa */
.progress-bar { height: 3px; background: linear-gradient(90deg, transparent, var(--gold) 70%, #fff3d6); box-shadow: 0 0 12px rgba(201,162,75,.8); }

/* Hero più profondo e con griglia di pista */
.hero::after {
  background:
    linear-gradient(180deg, rgba(4,10,34,.6) 0%, rgba(4,10,34,.2) 35%, rgba(7,16,48,.95) 100%),
    linear-gradient(90deg, rgba(4,10,34,.75) 0%, rgba(4,10,34,0) 70%);
}
.hero h1 .gold { text-shadow: 0 0 40px rgba(201,162,75,.35); }

/* Le immagini prendono velocità al passaggio */
.media-frame::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 1s var(--ease);
}
.media-frame:hover::before { transform: translateX(120%); }

/* Numeri di fase e passi con contorno che si riempie */
.phase-num, .step__num { background: linear-gradient(90deg, var(--gold) 50%, transparent 50%) no-repeat; background-size: 200% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; transition: background-position 1.2s var(--ease); }
.is-in .phase-num, .phase-num.is-in, .step.is-in .step__num { background-position: 0 0; }
.step:hover .step__num { color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .speedlines, .start-lights { display: none !important; }
  .reveal { filter: none !important; }
}
.menu-toggle, .socials a { translate: var(--mx, 0px) var(--my, 0px); }

/* =========================================================
   ICONE NIVOLAR
   ========================================================= */
.ico { width: 100%; height: 100%; display: block; fill: none; stroke: var(--cream); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ico .a { stroke: var(--gold); }
.ico .af { fill: var(--gold); stroke: none; }
.ico path:not(.af), .ico circle:not(.af), .ico rect { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); }
.ico .a { transition-delay: .45s; }
.ico .af { opacity: 0; transition: opacity .6s var(--ease) .9s; }
.ico.is-in path:not(.af), .ico.is-in circle:not(.af), .ico.is-in rect { stroke-dashoffset: 0; }
.ico.is-in .af { opacity: 1; }

/* contenitori: medaglioni blu notte con anello oro */
.card__icon, .phase-item__icon, .info-box__icon, .moment__art {
  background: radial-gradient(circle at 30% 25%, #1c2c63, #0a1434 70%);
  border: 1px solid rgba(201,162,75,.45);
  box-shadow: inset 0 0 0 6px rgba(7,16,48,.6), 0 18px 40px -20px rgba(0,0,0,.8);
  color: var(--cream);
}
.card__icon { width: 64px; height: 64px; padding: 14px; border-radius: 50%; }
.phase-item__icon { width: 84px; height: 84px; padding: 18px; }
.info-box__icon { width: 76px; height: 76px; padding: 17px; }
.moment__art { padding: 26%; }
.moment__art img { display: none; }
.card:hover .card__icon { background: radial-gradient(circle at 30% 25%, #2a3d7d, #0e1a42 70%); color: var(--cream); transform: rotate(-8deg) scale(1.08); }

/* al passaggio: gli accenti oro si ridisegnano */
@keyframes redraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.card:hover .ico .a, .phase-item:hover .ico .a, .info-box:hover .ico .a, .moment:hover .ico .a, .btn:hover .ico .a { animation: redraw .9s var(--ease); }
.card:hover .card__icon, .info-box:hover .info-box__icon { box-shadow: inset 0 0 0 6px rgba(7,16,48,.6), 0 0 0 4px rgba(201,162,75,.15), 0 0 30px rgba(201,162,75,.25); }

/* icona nel pulsante */
.ico--btn { width: 22px; height: 22px; flex: none; stroke: currentColor; }
.ico--btn path:not(.af), .ico--btn rect, .ico--btn circle { stroke-dasharray: none; stroke-dashoffset: 0; }
.btn:hover .ico--btn .a { stroke: var(--navy-950); }

/* icona mappa */
.map-consent > .ico { width: 54px; height: 54px; }

/* campi link della candidatura */
.field-note { grid-column: span 2; margin: 0; font-size: .92rem; color: #c9cad6; border-left: 2px solid var(--gold); padding-left: 14px; }
.link-input { position: relative; display: flex; align-items: center; gap: 12px; }
.link-input .ico { width: 22px; height: 22px; flex: none; }
.link-input input { flex: 1; min-width: 0; }
.field input[type="url"] {
  width: 100%; font: 400 1rem/1.5 var(--f-body); color: var(--white);
  background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.3); border-radius: 0; padding: 10px 0 12px;
}
.field input[type="url"]::placeholder { color: rgba(255,255,255,.4); }
.field input[type="url"]:focus { outline: none; border-bottom-color: var(--gold); }
.field.has-error input[type="url"] { border-bottom-color: #ff8a7a; }
.field input[type="url"]:focus ~ .bar { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .ico path, .ico circle, .ico rect { stroke-dashoffset: 0 !important; }
  .ico .af { opacity: 1 !important; }
}
.moment__art { padding: 0; }
.moment__art .ico { width: 44%; height: auto; aspect-ratio: 1; }
.card__icon { width: 72px; height: 72px; padding: 16px; }
.ico { stroke-width: 1.7; }

@media (max-width: 700px) {
  .reveal, [data-tilt].reveal:not(.is-in) { transform: translateX(-28px) skewX(-4deg); }
  .reveal.is-in { transform: none; }
}

/* header con la voce Casi studio: niente compressione, hamburger sotto i 1200px */
.main-nav a, .menu-toggle { flex-shrink: 0; }
.main-nav .header-cta { padding: .7em 1.35em; }
@media (max-width: 1200px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .main-nav--left { display: none; }
  .main-nav--right a:not(.header-cta) { display: none; }
  .brand { order: -1; }
}

/* Dati fiscali nel footer */
.footer-id { display: block; margin-top: 4px; font-size: .7rem; letter-spacing: .02em; color: #6f7287; }
