/* ==========================================================================
   Meccanica 3.0 — Design System (Brand Book v1.0, agosto 2026)
   Palette ufficiale: Carbon Black #0C0902 · Signal Yellow #FACA0A ·
   Tech White #FEFDFD · Graphite #6F6F70. Tipografia: Inter (self-hosted).
   Vanilla CSS, zero dipendenze. Mobile-first, fluido, accessibile.
   ========================================================================== */

/* ---------- Font (Inter variable 400–700, subset latin + latin-ext) ---------- */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Token (Brand Book pp. 17-19) ---------- */
:root {
  --ink: #0C0902;            /* Carbon Black */
  --paper: #FEFDFD;          /* Tech White — sezioni chiare */
  --card: #FFFFFF;
  --yellow: #FACA0A;         /* Signal Yellow */
  --yellow-hi: #FFD634;      /* hover CTA */
  --yellow-deep: #8A6A00;    /* giallo testuale AA su fondi chiari (5.07:1) */
  --gray: #6F6F70;           /* Graphite — testo secondario su chiaro (4.94:1) */
  --gray-hi: rgba(254, 253, 253, .58);  /* etichette piccole su fondi scuri (AA) */
  --mut-d: rgba(254, 253, 253, .72);    /* testo attenuato su scuro */
  --mut-d2: rgba(254, 253, 253, .66);
  --mut-l: #6F6F70;                     /* testo secondario su chiaro (brand: Graphite) */
  --mut-l2: #6F6F70;
  --line-d: rgba(254, 253, 253, .1);    /* bordi su scuro */
  --line-d2: rgba(254, 253, 253, .16);
  --line-l: #E4E4E5;                    /* bordi su chiaro */
  --line-l2: #ECECED;
  --line-l3: #F1F1F2;

  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1280px;
  --px: clamp(18px, 4vw, 56px);
  --sec-py: clamp(64px, 8vw, 128px);

  --h1: clamp(38px, 6.2vw, 80px);
  --h2: clamp(29px, 4.4vw, 56px);
  --lead: clamp(15.5px, 1.25vw, 18px);

  /* Brand Book p.20: raggio 8px, moderno non giocoso */
  --r-btn: 8px;
  --r-card: 8px;
  --r-tile: 8px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Keyframes (design "Animato") ---------- */
@keyframes mq { to { transform: translateX(-50%); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(46px, -34px); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 28px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } }
@keyframes grad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  background: var(--ink);
  color: #FEFDFD;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
input, select, textarea, button { font: inherit; color: inherit; }
a { color: var(--yellow); text-decoration: none; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
.sec--light :focus-visible, .cta-final :focus-visible { outline-color: var(--ink); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--px); }

.pbar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-hi));
  z-index: 70; pointer-events: none;
}

.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 999;
  background: var(--yellow); color: var(--ink); font-family: var(--display); font-weight: 700;
  padding: 10px 16px; border-radius: var(--r-btn); transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Tipografia di sezione ---------- */
.kicker {
  font-family: var(--display); font-size: 11.5px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--yellow);
}
.sec--light .kicker { color: var(--mut-l2); }
.sec__head { max-width: 760px; }
.sec__head h2 {
  margin-top: clamp(16px, 1.8vw, 22px);
  font-family: var(--display); font-weight: 600; font-size: var(--h2);
  line-height: 1.06; letter-spacing: -.025em; color: #FEFDFD; text-wrap: balance;
}
.sec--light .sec__head h2 { color: var(--ink); }
.sec__lead {
  margin-top: clamp(16px, 1.8vw, 22px); max-width: 58ch;
  font-size: var(--lead); line-height: 1.65; color: var(--mut-d2); text-wrap: pretty;
}
.sec--light .sec__lead { color: var(--mut-l); }

.sec--dark { background: var(--ink); }
.sec--light { background: var(--paper); color: var(--ink); }
.section { padding-block: var(--sec-py); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: clamp(15px, 1.2vw, 16.5px);
  letter-spacing: .005em; padding: 17px 26px; border-radius: var(--r-btn);
  border: 0; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.btn--yellow { background: var(--yellow); color: var(--ink); } /* CTA: giallo con testo nero (p.20) */
.btn--yellow:hover { background: var(--yellow-hi); color: var(--ink); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--paper); font-weight: 600; border: 1px solid rgba(254,253,253,.26); }
.btn--outline:hover { border-color: #FEFDFD; background: rgba(254,253,253,.05); color: #FEFDFD; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(12, 9, 2, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(254, 253, 253, .08);
  transition: transform .45s var(--ease), background .3s, border-color .3s;
}
html.js-anim .header--top { background: rgba(12, 9, 2, 0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); border-bottom-color: transparent; }
.header--hidden { transform: translateY(-100%); }
.header--hidden:focus-within { transform: none; } /* il focus tastiera riporta l'header in vista */
.header__inner {
  height: clamp(64px, 7vw, 82px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: inline-flex; align-items: center; }
.logo img { height: clamp(18px, 1.6vw, 22px); width: auto; display: block; }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); }
.nav a { font-size: 14px; font-weight: 500; color: rgba(254,253,253,.72); transition: color .2s; }
.nav a:hover { color: #FEFDFD; }
.nav__cta {
  font-family: var(--display); font-weight: 700; color: #FEFDFD !important;
  border: 1px solid rgba(254,253,253,.28); padding: 11px 20px; border-radius: var(--r-btn);
  transition: border-color .2s, background .2s;
}
.nav__cta:hover { border-color: #FEFDFD; background: rgba(254,253,253,.06); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 0 12px;
  background: transparent; border: 1px solid rgba(254,253,253,.24);
  border-radius: var(--r-btn); cursor: pointer;
}
.nav-toggle span { display: block; height: 1.5px; width: 100%; background: #FEFDFD; transition: transform .3s, opacity .3s, background .3s; }
.nav-toggle span:last-child { width: 70%; background: var(--yellow); }

.mobile-menu {
  display: none; flex-direction: column; gap: 2px;
  padding: 8px var(--px) 22px; border-top: 1px solid rgba(254,253,253,.08);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  font-family: var(--display); font-size: 19px; font-weight: 500; color: #FEFDFD;
  padding: 14px 0; border-bottom: 1px solid rgba(254,253,253,.07);
}
.mobile-menu .mobile-menu__cta {
  margin-top: 14px; font-size: 16px; font-weight: 700; color: var(--ink);
  background: var(--yellow); padding: 16px 20px; border-radius: var(--r-btn);
  text-align: center; border-bottom: 0;
}

@media (max-width: 899px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { width: 100%; background: #FEFDFD; transform: translateY(-6.5px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); overflow: hidden; }
.hero__grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(254,253,253,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(254,253,253,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 45% 35%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 75% at 45% 35%, #000 25%, transparent 78%);
}
.hero__orb { position: absolute; pointer-events: none; }
.hero__orb--1 {
  width: 560px; height: 560px; left: -160px; top: -140px;
  background: radial-gradient(circle, rgba(250, 202, 10, .13), transparent 65%);
  animation: drift 15s ease-in-out infinite;
}
.hero__orb--2 {
  width: 480px; height: 480px; right: -120px; bottom: -160px;
  background: radial-gradient(circle, rgba(250, 202, 10, .08), transparent 65%);
  animation: drift2 18s ease-in-out infinite;
}
.hero__wm {
  position: absolute; right: -30px; top: 6%; z-index: 0;
  font-family: var(--display); font-weight: 800; font-style: italic;
  font-size: clamp(160px, 32vh, 330px); line-height: 1; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(250, 202, 10, .14);
  user-select: none; pointer-events: none; will-change: transform;
}
.hero__scroll {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-family: var(--display); font-size: 10px; font-weight: 600;
  letter-spacing: .3em; color: var(--gray-hi);
  animation: bob 2.4s ease-in-out infinite;
}
.hero h1 .wm-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.hero h1 .w { display: inline-block; }
html.js-anim .hero h1 .w { transform: translateY(118%); transition: transform .9s var(--ease); }
html.js-anim .hero h1.is-in .w { transform: translateY(0); }
.hero__badge .pin { animation: pulse 2.2s ease-in-out infinite; }
.hero__stats strong { font-variant-numeric: tabular-nums; }
.hero__glow {
  position: absolute; top: -20%; right: -10%; width: 60%; height: 80%;
  background: radial-gradient(circle at 60% 40%, rgba(253, 200, 22, .09), transparent 62%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  padding-block: clamp(46px, 7vw, 96px) clamp(56px, 7vw, 104px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: clamp(34px, 5vw, 72px); align-items: center;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  border: 1px solid var(--line-d2); border-radius: 999px;
  padding: 8px 16px 8px 12px; margin-bottom: clamp(22px, 2.6vw, 32px);
}
.hero__badge span:last-child { min-width: 0; }
.hero__badge .pin { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); flex: none; }
.hero__badge span:last-child {
  font-family: var(--display); font-size: 11.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: rgba(254,253,253,.78);
}
.hero h1 {
  font-family: var(--display); font-weight: 700; font-size: var(--h1);
  line-height: 1.02; letter-spacing: -.03em; color: #FEFDFD; text-wrap: balance;
}
.hero__sub {
  margin-top: clamp(20px, 2.4vw, 30px); max-width: 37ch;
  font-size: clamp(16px, 1.35vw, 19.5px); line-height: 1.62; color: var(--mut-d); text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 3.4vw, 42px); }
.hero__stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: clamp(16px, 2vw, 28px); margin-top: clamp(38px, 4.6vw, 60px);
  padding-top: clamp(26px, 3vw, 34px); border-top: 1px solid var(--line-d);
}
.hero__stats strong {
  display: block; font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700; letter-spacing: -.02em; color: #FEFDFD;
}
.hero__stats span { display: block; margin-top: 5px; font-size: 13px; line-height: 1.45; color: var(--gray-hi); }

.hero__media { position: relative; }
.hero__frame {
  position: relative; width: 100%; aspect-ratio: 4 / 5; min-height: 320px;
  border-radius: var(--r-card); overflow: hidden; border: 1px solid rgba(254,253,253,.12);
  background:
    radial-gradient(60% 45% at 50% 42%, rgba(253, 200, 22, .08), transparent 70%),
    linear-gradient(160deg, #16110a 0%, var(--ink) 60%);
  display: grid; place-items: center;
}
.hero__frame img { width: min(72%, 380px); height: auto; }
.hero__card {
  position: absolute; left: clamp(-10px, -1vw, 0px); bottom: clamp(18px, 2.4vw, 32px);
  max-width: min(300px, 86%); background: var(--paper); border-radius: var(--r-tile);
  padding: 18px 20px; border: 1px solid var(--line-l); color: var(--ink);
}
.hero__card .tag { font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mut-l2); }
.hero__card .title { margin-top: 8px; font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--ink); }
.hero__card .text { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: #5A5A5E; }

/* ---------- Marquee servizi ---------- */
.marquee {
  border-top: 1px solid var(--line-d); border-bottom: 1px solid var(--line-d);
  overflow: hidden; padding: 16px 0; background: #120E07;
}
.marquee__track { display: flex; width: max-content; animation: mq 34s linear infinite; will-change: transform; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; }
.marquee__group span {
  font-family: var(--display); font-size: 12.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gray-hi);
  padding: 0 22px; white-space: nowrap;
}
.marquee__group i { color: var(--yellow); font-style: normal; }

/* ---------- Valori ---------- */
#valori { border-top: 1px solid rgba(254,253,253,.08); }
.values {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(272px, 100%), 1fr));
  gap: clamp(14px, 1.6vw, 22px); margin-top: clamp(38px, 4.6vw, 64px);
}
.value {
  background: rgba(254,253,253,.035); border: 1px solid var(--line-d);
  border-radius: var(--r-card); padding: clamp(24px, 2.6vw, 34px);
  display: flex; flex-direction: column; gap: 14px;
  transition: background .3s, border-color .3s;
}
.value { transition: background .3s, border-color .35s, translate .5s var(--ease); }
.value:hover { background: rgba(254,253,253,.06); border-color: rgba(250, 202, 10, .45); translate: 0 -8px; }
.value__label { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gray-hi); }
.value h3 { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 1.9vw, 25px); line-height: 1.18; letter-spacing: -.015em; color: #FEFDFD; }
.value > p { font-size: 15px; line-height: 1.62; color: var(--mut-d2); }
.value ul {
  margin-top: 6px; padding: 16px 0 0; list-style: none;
  display: flex; flex-direction: column; gap: 9px; border-top: 1px solid rgba(254,253,253,.09);
}
.value li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: rgba(254,253,253,.8); }
.value li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--gray); margin-top: 7px; }

/* ---------- Trasparenza ---------- */
.transparency {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(18px, 2.4vw, 34px); margin-top: clamp(38px, 4.6vw, 64px); align-items: start;
}
.transparency__col { display: flex; flex-direction: column; gap: 16px; }
.transparency__media {
  position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 14px;
  overflow: hidden; background: var(--ink); border: 1px solid var(--line-l);
  display: grid; place-items: center;
}
.transparency__media .play {
  width: 62px; height: 62px; border-radius: 50%;
  border: 1.5px solid rgba(254,253,253,.5); display: grid; place-items: center;
}
.transparency__media .play::after {
  content: ""; width: 0; height: 0; margin-left: 4px;
  border-block: 9px solid transparent; border-left: 14px solid var(--yellow);
}
.transparency__media figcaption {
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--display); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(254,253,253,.65);
}
.transparency__col h3 { font-family: var(--display); font-weight: 700; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink); letter-spacing: -.01em; }
.transparency__col h3 + p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--mut-l); }

.quote-card {
  background: var(--card); border: 1px solid var(--line-l); border-radius: var(--r-card);
  padding: clamp(20px, 2.2vw, 30px); color: var(--ink);
}
.quote-card__head {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--line-l2);
}
.quote-card__label { font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mut-l2); }
.quote-card__ref { margin-top: 7px; font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--ink); }
.quote-card__brand img { height: 14px; width: auto; display: block; }
.quote-card__groups { display: flex; flex-direction: column; gap: 22px; padding-top: 20px; }
.quote-group__meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.chip {
  font-family: var(--display); font-size: 10.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; padding: 5px 10px; border-radius: 5px;
}
.chip--now { background: var(--yellow); color: var(--ink); border: 1px solid var(--yellow); }
.chip--soon { background: #fff; color: var(--ink); border: 1px solid #CFCFCB; }
.chip--watch { background: #fff; color: var(--mut-l); border: 1px solid var(--line-l); }
.quote-group__note { font-size: 12.5px; color: var(--mut-l2); }
.quote-row {
  display: flex; gap: 14px; justify-content: space-between; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--line-l3);
}
.quote-row__item { font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.quote-row__code { margin-top: 3px; font-family: var(--display); font-size: 11.5px; color: var(--mut-l2); letter-spacing: .02em; }
.quote-row__amount { flex: none; font-family: var(--display); font-size: 12px; font-weight: 500; color: var(--mut-l2); letter-spacing: .03em; text-align: right; }
.quote-card__foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-l2); display: flex; flex-direction: column; gap: 10px; }
.quote-card__foot p { font-size: 13.5px; line-height: 1.55; color: var(--mut-l); }
.quote-card__foot strong { font-family: var(--display); font-size: 14px; font-weight: 700; color: var(--ink); }

/* ---------- Servizi ---------- */
.services {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(268px, 100%), 1fr));
  gap: clamp(12px, 1.4vw, 18px); margin-top: clamp(38px, 4.6vw, 64px);
}
.service {
  background: rgba(254,253,253,.035); border: 1px solid var(--line-d);
  border-radius: 14px; padding: clamp(22px, 2.2vw, 28px);
  display: flex; flex-direction: column; gap: 12px;
  transition: background .3s, border-color .3s;
}
.service { transition: background .3s, border-color .35s, translate .5s var(--ease); }
.service:hover { background: rgba(254,253,253,.06); border-color: rgba(250, 202, 10, .45); translate: 0 -7px; }
.service__num { font-family: var(--display); font-size: 11.5px; font-weight: 700; color: var(--gray-hi); letter-spacing: .06em; }
.service h3 { font-family: var(--display); font-weight: 600; font-size: clamp(18.5px, 1.7vw, 22px); line-height: 1.2; letter-spacing: -.015em; color: #FEFDFD; }
.service p { font-size: 14.5px; line-height: 1.6; color: rgba(254,253,253,.64); }
.service ul { margin-top: 4px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.service li {
  font-family: var(--display); font-size: 11.5px; font-weight: 500; letter-spacing: .02em;
  color: rgba(254,253,253,.82); border: 1px solid var(--line-d2); border-radius: 5px; padding: 5px 9px;
}

.cert-banner {
  margin-top: clamp(28px, 3vw, 40px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between;
  background: rgba(253, 200, 22, .07); border: 1px solid rgba(253, 200, 22, .28);
  border-radius: 14px; padding: clamp(20px, 2.2vw, 28px);
}
.cert-banner strong { display: block; font-family: var(--display); font-size: clamp(17px, 1.6vw, 21px); font-weight: 700; color: #FEFDFD; letter-spacing: -.01em; }
.cert-banner p { margin-top: 7px; font-size: 14.5px; line-height: 1.55; color: rgba(254,253,253,.72); }
.cert-banner .btn { flex: none; padding: 15px 22px; font-size: 15px; }

/* ---------- Processo ---------- */
.steps { position: relative; max-width: 720px; margin: clamp(40px, 5vw, 64px) auto 0; }
.steps__track { position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: rgba(12, 9, 2, .12); }
.steps__fill { position: absolute; left: 7px; top: 8px; width: 2px; height: 0%; background: linear-gradient(180deg, var(--yellow), var(--yellow-hi)); }
.step { position: relative; padding: 0 0 clamp(40px, 5vw, 56px) 48px; }
.step:last-child { padding-bottom: 8px; }
.step__dot {
  position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(12, 9, 2, .25); background: var(--paper); box-sizing: border-box;
  transition: border-color .4s, background .4s, box-shadow .4s;
}
.step.is-on .step__dot { border-color: var(--yellow-deep); background: var(--yellow); box-shadow: 0 0 0 6px rgba(250, 202, 10, .18); }
.step__num {
  font-family: var(--display); font-size: 12px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--yellow-deep);
}
.step h3 { font-family: var(--display); font-weight: 700; font-size: clamp(19px, 1.9vw, 23px); line-height: 1.2; letter-spacing: -.015em; color: var(--ink); margin: 8px 0; }
.step p { max-width: 54ch; font-size: clamp(15px, 1.2vw, 16.5px); line-height: 1.65; color: var(--mut-l); text-wrap: pretty; }

/* ---------- Gallery officina ---------- */
#officina { border-top: 1px solid var(--line-d); }
.gallery {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(10px, 1.2vw, 16px); margin-top: clamp(38px, 4.6vw, 64px);
}
.gallery figure {
  position: relative; overflow: hidden; border-radius: var(--r-card);
  border: 1px solid var(--line-d); background: rgba(254,253,253,.03);
}
.gallery img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s var(--ease);
}
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 16px 12px;
  background: linear-gradient(180deg, transparent, rgba(12, 9, 2, .82));
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: rgba(254,253,253,.92);
}
.gallery .g-7 { grid-column: span 7; aspect-ratio: 4 / 3; }
.gallery .g-5 { grid-column: span 5; aspect-ratio: 4 / 4.3; }
.gallery .g-4 { grid-column: span 4; aspect-ratio: 3 / 3.4; }
@media (max-width: 720px) {
  .gallery .g-7, .gallery .g-5 { grid-column: span 12; aspect-ratio: 4 / 3; }
  .gallery .g-4 { grid-column: span 6; }
  .gallery .g-4:last-child { grid-column: span 12; aspect-ratio: 16 / 9; }
}

/* ---------- Auto di cortesia ---------- */
.courtesy {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 0; margin-top: clamp(28px, 3vw, 40px);
  background: rgba(253, 202, 10, .07); border: 1px solid rgba(253, 202, 10, .28);
  border-radius: var(--r-card); overflow: hidden;
}
.courtesy__media { min-height: 260px; }
.courtesy__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.courtesy__body { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.courtesy__body .kicker { color: var(--yellow); }
.courtesy__body h3 {
  font-family: var(--display); font-weight: 600; font-size: clamp(21px, 2.2vw, 28px);
  line-height: 1.15; letter-spacing: -.02em; color: #FEFDFD;
}
.courtesy__body p { font-size: 15px; line-height: 1.62; color: var(--mut-d); }
.courtesy__body .btn { margin-top: 8px; }

/* ---------- Recensioni ---------- */
.reviews {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(288px, 100%), 1fr));
  gap: clamp(14px, 1.6vw, 22px); margin-top: clamp(34px, 4vw, 56px);
}
.review {
  background: rgba(254,253,253,.035); border: 1px solid var(--line-d);
  border-radius: var(--r-card); padding: clamp(24px, 2.6vw, 32px);
  display: flex; flex-direction: column; gap: 16px;
  transition: rotate .5s var(--ease), translate .5s var(--ease), border-color .35s;
}
.reviews > .review:nth-child(3n+1) { rotate: -1.2deg; }
.reviews > .review:nth-child(3n+2) { rotate: .9deg; }
.reviews > .review:nth-child(3n) { rotate: -.6deg; }
.review:hover { rotate: 0deg; translate: 0 -6px; border-color: rgba(250, 202, 10, .4); }
.review__stars { font-family: var(--display); font-size: 14px; letter-spacing: .24em; color: rgba(254,253,253,.88); }
.review blockquote { font-size: clamp(15.5px, 1.3vw, 17.5px); line-height: 1.6; color: #FEFDFD; text-wrap: pretty; }
.review figcaption {
  margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(254,253,253,.09);
  font-family: var(--display); font-size: 13px; font-weight: 500; color: var(--gray-hi);
}
.reviews-note { margin-top: clamp(24px, 2.6vw, 34px); font-size: 14px; color: var(--gray-hi); }
.reviews-note em { font-style: normal; color: var(--yellow); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 1080px; margin-inline: auto; padding-inline: var(--px); }
.faq { margin-top: clamp(30px, 3.4vw, 48px); border-top: 1px solid var(--line-l); }
.faq__item { border-bottom: 1px solid var(--line-l); }
.faq__q {
  width: 100%; display: flex; gap: 18px; align-items: center; justify-content: space-between;
  background: transparent; border: 0; padding: clamp(20px, 2.2vw, 26px) 0;
  cursor: pointer; text-align: left; transition: opacity .2s;
}
.faq__q:hover { opacity: .7; }
.faq__q span:first-child {
  font-family: var(--display); font-weight: 600; font-size: clamp(16.5px, 1.5vw, 20px);
  line-height: 1.3; letter-spacing: -.012em; color: var(--ink);
}
.faq__mark {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #CFCFCB;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 17px; font-weight: 500; color: var(--ink);
  transition: transform .45s var(--ease), background .3s, border-color .3s;
}
.faq__item.is-open .faq__mark { transform: rotate(45deg); background: var(--yellow); border-color: var(--yellow); }
.faq__a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease);
}
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
/* visibility: hidden toglie le risposte chiuse dall'albero di accessibilità
   (coerente con aria-expanded) senza rompere l'animazione della griglia */
.faq__a > div { overflow: hidden; visibility: hidden; transition: visibility .35s; }
.faq__item.is-open .faq__a > div { visibility: visible; }
.no-js .faq__a { grid-template-rows: 1fr; }
.no-js .faq__a > div { visibility: visible; }
.faq__a p {
  padding-bottom: clamp(22px, 2.4vw, 28px); max-width: 68ch;
  font-size: clamp(15px, 1.2vw, 16.5px); line-height: 1.68; color: var(--mut-l); text-wrap: pretty;
}

/* ---------- CTA finale: banda gialla a gradiente animato ---------- */
.cta-final {
  position: relative; overflow: hidden;
  background: linear-gradient(115deg, var(--yellow), var(--yellow-hi), var(--yellow));
  background-size: 220% 220%; animation: grad 9s ease infinite;
  color: var(--ink);
}
.cta-final__glow { display: none; }
.cta-final__inner { position: relative; max-width: 960px; margin-inline: auto; padding: clamp(64px, 8vw, 110px) var(--px); text-align: center; }
.cta-final h1, .cta-final h2 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4.4vw, 54px); line-height: 1.07; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.cta-final p { margin: clamp(16px, 2vw, 26px) auto 0; max-width: 60ch; font-family: var(--display); font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; line-height: 1.7; color: rgba(12, 9, 2, .75); }
.cta-final__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: clamp(26px, 3vw, 38px); }
.cta-final .btn--yellow { background: var(--ink); color: #FEFDFD; }
.cta-final .btn--yellow:hover { background: #241C10; color: #FEFDFD; }
.cta-final .btn--outline { border-color: rgba(12, 9, 2, .35); color: var(--ink); }
.cta-final .btn--outline:hover { border-color: var(--ink); background: rgba(12, 9, 2, .06); color: var(--ink); }
/* badge riusato su fondo giallo (grazie.html) */
.cta-final .hero__badge { border-color: rgba(12, 9, 2, .35); }
.cta-final .hero__badge .pin { background: var(--ink); }
.cta-final .hero__badge span:last-child { color: rgba(12, 9, 2, .8); }

/* ---------- Contatti ---------- */
.contact {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr));
  gap: clamp(18px, 2.4vw, 34px); margin-top: clamp(34px, 4vw, 56px); align-items: start;
}
.contact__col { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 20px); }
.contact__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--card); border: 1px solid var(--line-l); border-radius: var(--r-tile);
  padding: 18px 20px; transition: border-color .2s;
}
.tile:hover { border-color: var(--ink); }
.tile__tag { font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mut-l2); }
.tile__main { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--ink); }
.tile__main--sm { font-size: 16px; }
.tile__sub { font-size: 13px; color: var(--mut-l2); }

.map-card { background: var(--card); border: 1px solid var(--line-l); border-radius: var(--r-tile); overflow: hidden; }
.map-card__canvas {
  position: relative; display: block; width: 100%; height: clamp(180px, 22vw, 240px);
  overflow: hidden;
}
.map-card__canvas img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; transition: transform .6s var(--ease); }
.map-card__canvas:hover img { transform: scale(1.04); }
.map-card__canvas small {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(12, 9, 2, .85); color: #FEFDFD;
  font-family: var(--display); font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 5px;
}
.map-card__foot { padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.map-card__addr { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink); font-weight: 500; }
.map-card__link {
  font-family: var(--display); font-size: 13.5px; font-weight: 700; color: var(--ink);
  border-bottom: 2px solid var(--yellow); padding-bottom: 2px;
}
.map-card__link:hover { color: var(--ink); opacity: .75; }

.hours-card { background: var(--card); border: 1px solid var(--line-l); border-radius: var(--r-tile); padding: 20px; }
.hours-card table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.hours-card td { padding: 9px 0; border-bottom: 1px solid var(--line-l3); font-size: 14.5px; color: var(--ink); }
.hours-card tr:last-child td { border-bottom: 0; }
.hours-card td:first-child { font-weight: 500; }
.hours-card td:last-child { text-align: right; font-family: var(--display); color: var(--mut-l); }
.hours-card tr.today td { font-weight: 700; color: var(--ink); }
.hours-card tr.today td:last-child { color: var(--yellow-deep); }

/* ---------- Form ---------- */
.form-card {
  background: var(--card); border: 1px solid var(--line-l); border-radius: var(--r-card);
  padding: clamp(22px, 2.4vw, 34px); color: var(--ink);
}
.form-card h3 { font-family: var(--display); font-weight: 600; font-size: clamp(21px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
.form-card__note { margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--mut-l2); }
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span {
  font-family: var(--display); font-size: 11.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--mut-l);
}
.field input, .field select, .field textarea {
  width: 100%; background: #FBFBF9; border: 1px solid #D9D9D4; border-radius: var(--r-btn);
  padding: 14px 15px; font-size: 16px; color: var(--ink); outline: none;
  transition: border-color .2s, background .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gray) 50%), linear-gradient(135deg, var(--gray) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); background: #FFFFFF; }
.field input::placeholder, .field textarea::placeholder { color: #767679; }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.consent input { flex: none; width: 19px; height: 19px; margin-top: 2px; accent-color: var(--ink); }
.consent span { font-size: 13px; line-height: 1.55; color: var(--mut-l); }
.consent a { color: var(--ink); text-decoration: underline; }

.form__alert {
  display: none; background: #FFF6DC; border: 1px solid #F0D68A; border-radius: var(--r-btn);
  padding: 12px 14px; font-size: 13.5px; line-height: 1.5; color: #5A4600;
}
.form__alert.is-visible { display: block; }
.form__submit { margin-top: 4px; width: 100%; padding: 18px 22px; font-size: 16.5px; }
/* Senza JavaScript il form non può inviare in sicurezza (finirebbe in GET con
   i dati in URL): si nasconde il submit e si mostrano i canali alternativi */
.form__nojs { display: none; background: #FFF6DC; border: 1px solid #F0D68A; border-radius: var(--r-btn); padding: 12px 14px; font-size: 13.5px; line-height: 1.55; color: #5A4600; }
.no-js .form__submit { display: none; }
.no-js .form__nojs { display: block; }
.form__fineprint { font-size: 12.5px; line-height: 1.55; color: var(--mut-l2); }

.form-success { display: none; flex-direction: column; gap: 14px; padding: clamp(20px, 3vw, 44px) 0; text-align: center; align-items: center; }
.form-success.is-visible { display: flex; }
.form-card.is-sent .form-body { display: none; }
.form-success__check {
  width: 52px; height: 52px; border-radius: 50%; background: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--ink);
}
.form-success h3 { font-size: clamp(21px, 2.2vw, 28px); letter-spacing: -.02em; }
.form-success p { max-width: 38ch; font-size: 15.5px; line-height: 1.6; color: var(--mut-l); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); border-top: 1px solid var(--line-d); }
.footer__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(28px, 3.4vw, 48px);
  padding-block: clamp(48px, 6vw, 80px) clamp(24px, 3vw, 36px);
}
.footer__about { max-width: 34ch; margin-top: 16px; font-size: 14px; line-height: 1.6; color: rgba(254,253,253,.6); }
.footer h4 { font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gray-hi); }
.footer__links { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.footer__links a, .footer__links span { font-size: 14px; line-height: 1.5; color: rgba(254,253,253,.72); }
.footer__links a:hover { color: #FEFDFD; }
.footer__links .dim { color: var(--gray-hi); }
.footer__legal {
  padding-block: clamp(20px, 2.4vw, 28px) clamp(44px, 6vw, 74px);
  border-top: 1px solid rgba(254,253,253,.08);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
}
.footer__legal, .footer__legal a { font-size: 12.5px; line-height: 1.6; color: var(--gray-hi); }
.footer__legal a { color: rgba(254,253,253,.72); }
.footer__legal a:hover { color: #FEFDFD; }
.footer__legal-links { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- Barra sticky mobile ---------- */
.sticky-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 70;
  display: none; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(254,253,253,.12); border-top: 1px solid rgba(254,253,253,.12);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  /* visibility esclude i link dal tab order quando la barra è fuori schermo */
  transform: translateY(110%); visibility: hidden;
  transition: transform .4s var(--ease), visibility .4s;
}
.sticky-cta.is-visible { transform: translateY(0); visibility: visible; }
.no-js .sticky-cta { transform: none; visibility: visible; }
.sticky-cta a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-size: 15px; font-weight: 700;
  padding: 17px 12px; min-height: 56px;
}
.sticky-cta .call { background: rgba(12, 9, 2, .94); color: #FEFDFD; }
.sticky-cta .book { background: var(--yellow); color: var(--ink); }
@media (max-width: 899px) {
  .sticky-cta { display: grid; }
  body { padding-bottom: 64px; } /* la barra sticky non copre l'ultima riga del footer */
}

/* ---------- Pagine legali ---------- */
.backlink { font-size: 14px; font-weight: 500; color: rgba(254,253,253,.72); }
.backlink:hover { color: #FEFDFD; }
.legal { max-width: 46rem; margin-inline: auto; padding: clamp(48px, 7vw, 96px) var(--px) var(--sec-py); }
.legal h1 { font-family: var(--display); font-weight: 700; font-size: var(--h2); letter-spacing: -.02em; color: #FEFDFD; margin-bottom: clamp(24px, 3vw, 40px); }
.legal h2 { font-family: var(--display); font-weight: 700; font-size: clamp(18px, 1.7vw, 22px); color: #FEFDFD; margin: clamp(32px, 4vw, 48px) 0 12px; }
.legal p, .legal li { font-size: 15px; line-height: 1.7; color: var(--mut-d); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; margin-block: 10px; }
.legal a { color: var(--yellow); }
.legal a:hover { color: #FFE07A; }
.legal em { color: var(--gray-hi); }

/* ---------- Reveal on scroll ----------
   Il nascondimento si attiva solo con html.js-anim, aggiunta da main.js quando
   IntersectionObserver è disponibile: se lo script non carica, tutto resta visibile. */
html.js-anim .reveal { opacity: 0; transform: translateY(20px); }
html.js-anim .reveal.is-in { opacity: 1; transform: none; }
html.js-anim .reveal.is-in:not(.reveal--done) {
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}

/* ---------- Riduzione movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important; /* congela le animazioni infinite (niente strobo) */
    transition-duration: .01ms !important;
  }
  html.js-anim .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Stampa ---------- */
@media print {
  .header, .sticky-cta, .pbar, main .cta-final { display: none; }
  body { background: #fff; color: #000; }
}
