/* CALIBRO SISTEMI
   I colori si cambiano solo qui sotto. Le regole partono dal telefono;
   quelle per schermi grandi sono in fondo, dentro @media. */

:root {
  --grafite: #1F2326;
  --acciaio: #6B7278;
  --pietra: #E6E3DD;
  --arancio: #FF6A00;
  --avorio: #F7F6F2;

  --grafite-2: #2A2F33;
  --testo-scuro: #C3C6C5;   /* testo secondario su grafite */
  --testo-chiaro: #4B5156;  /* testo secondario su avorio e pietra */
  --r: 14px;
}

@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* carattere di riserva con le stesse misure: la pagina non salta mentre carica */
@font-face {
  font-family: "Inter riserva";
  src: local("Arial");
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

/* BASE */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 68px; scroll-padding-bottom: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grafite); color: var(--grafite); font: 400 17px/1.55 Inter, "Inter riserva", sans-serif; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(38px, 11.2vw, 46px); font-weight: 850; letter-spacing: -.025em; }
h2 { font-size: 32px; font-weight: 820; letter-spacing: -.02em; }
h3 { font-size: 21px; font-weight: 750; letter-spacing: -.01em; }
p { text-wrap: pretty; }
a { color: inherit; }
em { font-style: normal; color: var(--arancio); }
:focus-visible { outline: 3px solid var(--arancio); outline-offset: 3px; }
.light :focus-visible, .stone :focus-visible, .form-card :focus-visible { outline-color: var(--grafite); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--arancio); padding: 12px; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-short { padding: 46px 0; }
.dark { background: var(--grafite); color: var(--avorio); }
.light { background: var(--avorio); }
.stone { background: var(--pietra); }
.lead { margin-top: 18px; font-size: 18px; color: var(--testo-scuro); }
.lead strong { color: var(--avorio); }
.mark { background: linear-gradient(transparent 64%, var(--arancio) 64% 94%, transparent 94%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* PULSANTI */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 12px 22px; border: 2px solid var(--arancio); border-radius: 10px; background: var(--arancio); color: var(--grafite); font: inherit; font-weight: 750; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.btn:hover { background: #FF842E; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-line { background: transparent; border-color: var(--acciaio); color: var(--avorio); }
.btn-line:hover { background: var(--grafite-2); }
.btn-small { min-height: 44px; padding: 8px 16px; }
.btn-full { width: 100%; }

/* TESTATA */
.top { position: sticky; top: 0; z-index: 20; background: var(--grafite); color: var(--avorio); border-bottom: 1px solid #30363A; }
.top-in { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { width: 160px; }
.nav { display: none; }
.menu summary { width: 48px; height: 48px; margin-right: -10px; display: grid; place-items: center; list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 24px; height: 3px; border-radius: 2px; background: currentColor; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -8px; }
.burger::after { top: 8px; }
.menu[open] .burger { background: transparent; }
.menu[open] .burger::before { top: 0; transform: rotate(45deg); }
.menu[open] .burger::after { top: 0; transform: rotate(-45deg); }
.menu nav { position: absolute; left: 0; right: 0; top: 64px; display: grid; padding: 4px 20px 22px; background: var(--grafite); border-bottom: 3px solid var(--arancio); }
.menu nav a:not(.btn) { padding: 14px 0; font-weight: 600; text-decoration: none; border-bottom: 1px solid #30363A; }
.menu nav .btn { margin-top: 16px; }

/* 1. APERTURA */
.hero { padding-top: 22px; overflow: hidden; }
/* sul telefono i dispositivi stanno tra testo e pulsanti, cosi' si vedono subito */
.hero-grid { display: flex; flex-direction: column; }
.hero-text { display: contents; }
.hero h1 { font-size: clamp(27px, 9vw, 46px); }
.hero h1 em { display: block; }
.hero .stage { margin-top: 18px; }
.hero .actions, .hero .assure { order: 1; }
.hero .assure { margin-bottom: 30px; }
.eyebrow { margin-bottom: 14px; font-size: 14px; font-weight: 650; line-height: 1.4; color: var(--testo-scuro); padding-left: 12px; border-left: 3px solid var(--arancio); }
.hero .lead { margin-top: 16px; }
.hero .lead strong { white-space: nowrap; }
.actions { display: grid; gap: 10px; margin-top: 22px; }
.assure { display: grid; gap: 4px; margin-top: 16px; font-size: 15px; color: var(--testo-scuro); }
.assure li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--arancio); border-radius: 2px; }

/* la scena: portatile e telefono. Le misure sono percentuali della scena. */
.scene { position: relative; width: calc(100% + 24px); max-width: 600px; margin: 24px -12px 4px; aspect-ratio: 100 / 61; flex: none; }
.scene img { position: absolute; height: auto; max-width: none; }
.scene-laptop { left: 0; top: 0; width: 93%; }
.scene-phone { right: 0; bottom: 0; width: 22.5%; }

/* 2. PROBLEMA */
.pains { display: grid; margin-top: 22px; }
.pains > div { padding: 14px 0 14px 16px; border-left: 3px solid var(--arancio); }
.pains > div + div { margin-top: 10px; }
.pains h3 { font-size: 19px; }
.pains p { margin-top: 4px; color: var(--testo-chiaro); }

/* 3. COSA INCLUDE: sul telefono si scorre con il dito, su computer griglia 2x2 */
.wide { max-width: 900px; }
.cards { position: relative; display: flex; gap: 12px; margin: 28px -20px 0; padding: 4px 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.card { flex: none; width: 84%; display: flex; flex-direction: column; justify-content: space-between; border-radius: 22px; overflow: hidden; background: var(--grafite-2); scroll-snap-align: start; }
.card-text { padding: 22px 20px 18px; }
.card-text h3 { font-size: 22px; }
.card-text p { margin-top: 8px; color: var(--testo-scuro); font-size: 16px; line-height: 1.45; }
.card-phone { flex: none; height: 390px; overflow: hidden; }
.card-phone img { width: 250px; margin: 0 auto; }
.dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--acciaio); }
.dots i.on { width: 24px; background: var(--arancio); }

/* 4. CHIAMATE PERSE */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.duo { position: relative; width: 100%; max-width: 500px; margin: 0 auto; aspect-ratio: 100 / 133; }
.duo img { position: absolute; height: auto; }
.duo-back { left: 0; top: 0; width: 49%; }
.duo-front { right: 0; bottom: 0; width: 61%; }

/* i numeri sono veri passaggi in ordine */
.steps { display: grid; gap: 18px; margin-top: 26px; counter-reset: passo; }
.steps li { position: relative; padding-left: 56px; counter-increment: passo; }
.steps li::before { content: counter(passo); position: absolute; left: 0; top: -1px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: var(--arancio); color: var(--grafite); font-size: 19px; font-weight: 850; }
.steps h3 { font-size: 19px; }
.steps p { margin-top: 4px; color: var(--testo-chiaro); line-height: 1.45; }
.dark .steps p { color: var(--testo-scuro); }

/* 5. ANTEPRIMA E PREZZO */
.offer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; align-items: center; }
.ticket { position: relative; padding: 24px 22px; border-radius: 20px; background: var(--avorio); color: var(--grafite); border-top: 8px solid var(--arancio); }
.price { font-size: 19px; font-weight: 650; }
.price strong { font-size: 64px; font-weight: 880; letter-spacing: -.03em; line-height: 1; }
.final { margin-top: 4px; color: var(--testo-chiaro); }
.ticks { display: grid; gap: 8px; margin: 18px 0; font-size: 16px; }
.ticks li { position: relative; padding-left: 28px; line-height: 1.4; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0; width: 9px; height: 16px; border: solid var(--arancio); border-width: 0 4px 4px 0; transform: rotate(45deg); }
.terms { display: flex; flex-wrap: wrap; gap: 8px; }
.terms span { padding: 5px 11px; border-radius: 7px; background: var(--pietra); font-size: 14px; font-weight: 700; }
.guarantee { margin: 16px 0; padding: 14px; border: 2px solid var(--grafite); border-radius: 12px; }
.guarantee h3 { font-size: 18px; }
.guarantee p { margin-top: 4px; font-size: 15px; line-height: 1.45; }

/* 6. CHI SIAMO E ZONE */
.about { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 18px; align-items: center; }
.about-logo { width: 92px; height: 92px; border-radius: 50%; }
.about h2 { font-size: 28px; }
.about-text { grid-column: 1 / -1; }
.about-text p + p { margin-top: 12px; }
.areas { display: grid; gap: 8px; margin-top: 18px; }
.areas li { padding-left: 12px; border-left: 3px solid var(--arancio); color: var(--testo-chiaro); font-size: 15px; line-height: 1.4; }
.areas strong { display: block; color: var(--grafite); }

/* 7. DOMANDE */
.faq { margin-top: 24px; }
.faq details { border-bottom: 1px solid #D5D1C9; }
.faq summary { position: relative; display: block; padding: 18px 40px 18px 0; font-weight: 700; line-height: 1.35; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: var(--arancio); font-size: 21px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; color: var(--testo-chiaro); }

/* 8. CONTATTO */
.contact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.contact .btn-line { margin-top: 20px; }
.form-card { padding: 22px 18px; border-radius: 20px; background: var(--avorio); color: var(--grafite); }
.form-card iframe { width: 100%; border: 0; }
.field { margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 700; }
.field input:not([type=checkbox]), .field select { width: 100%; min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--acciaio); border-radius: 9px; background: #fff; color: var(--grafite); font: inherit; font-size: 17px; }
.field [aria-invalid=true] { border-color: #A32B00 !important; box-shadow: inset 0 0 0 1px #A32B00; }
.consent { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 0 10px; }
.consent input { width: 24px; height: 24px; margin: 0; accent-color: var(--arancio); }
.consent > label { margin: 0; font-size: 14px; font-weight: 450; line-height: 1.45; }
.consent .error { grid-column: 2; }
.error { margin-top: 5px; color: #A32B00; font-size: 14px; font-weight: 650; }
.form-note { margin-top: 10px; color: var(--testo-chiaro); font-size: 13px; text-align: center; }
.form-status { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--pietra); font-weight: 650; }

/* PIEDE */
.footer { padding: 40px 0 110px; background: var(--grafite); color: var(--testo-scuro); border-top: 1px solid #30363A; font-size: 15px; }
.footer-grid { display: grid; gap: 22px; }
.footer address { font-style: normal; line-height: 1.8; }
.legal { display: grid; }
.legal a { padding: 10px 0; text-underline-offset: 4px; }
.todo { color: #FFB27A; }

/* BARRA IN BASSO, solo telefono */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: 1.45fr 1fr; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--grafite); border-top: 1px solid #30363A; }
.sticky .btn { min-height: 48px; padding: 8px; font-size: 15px; }
.sticky.away { display: none; }

/* PAGINE SEMPLICI: privacy, cookie, grazie, 404 */
.simple { min-height: 62svh; padding: 64px 0; }
.simple h1 { font-size: 36px; }
.simple .wrap { max-width: 760px; }
.simple p { margin-top: 18px; }
.simple .btn { margin-top: 28px; }
.notice-draft { padding: 16px; border: 2px dashed var(--arancio); border-radius: 12px; }

/* TABLET */
@media (min-width: 640px) {
  .wrap { padding: 0 28px; }
  h1, .hero h1 { font-size: 56px; }
  h2 { font-size: 40px; }
  .actions { display: flex; flex-wrap: wrap; }
  .scene { width: 100%; max-width: 560px; margin: 28px auto 8px; }
  .pains { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .pains > div + div { margin: 0; }
  .cards { margin: 32px -28px 0; padding: 4px 28px; scroll-padding: 0 28px; }
  .card { width: 46%; }
  .about { grid-template-columns: 180px minmax(0, 1fr); column-gap: 36px; }
  .about-logo { grid-row: 1 / span 2; width: 180px; height: 180px; }
  .about h2 { font-size: 36px; align-self: end; }
  .about-text { grid-column: 2; }
  .areas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .form-card { padding: 30px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* COMPUTER */
@media (min-width: 960px) {
  html { scroll-padding-top: 84px; scroll-padding-bottom: 0; }
  .top-in { height: 78px; }
  .brand img { width: 184px; }
  .menu, .sticky, .dots { display: none; }
  .nav { display: flex; align-items: center; gap: 28px; }
  .nav a:not(.btn) { padding: 10px 0; font-size: 16px; font-weight: 550; text-decoration: none; }
  .nav a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--arancio); text-decoration-thickness: 3px; text-underline-offset: 7px; }
  h1, .hero h1 { font-size: clamp(43px, 4.4vw, 55px); }
  h2 { font-size: 42px; }
  .section { padding: 84px 0; }
  .section-short { padding: 64px 0; }
  .hero { padding: 56px 0 72px; }
  .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
  .hero-text { display: block; }
  .hero .actions .btn { padding: 12px 16px; font-size: 16px; }
  .hero .lead { font-size: 20px; }
  .hero .assure { margin-bottom: 0; }
  .assure { font-size: 14px; }
  .scene { max-width: 640px; margin: 0; }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 38px 0 0; padding: 0; overflow: visible; }
  .card { width: auto; height: 390px; flex-direction: row; align-items: flex-end; }
  .card-text { align-self: center; padding: 28px 8px 28px 32px; }
  .card-text h3 { font-size: 25px; }
  .card-phone { width: 47%; height: 354px; }
  .card-phone img { width: 210px; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
  .steps h3 { font-size: 21px; }
  .duo { max-width: 460px; }
  .offer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
  .ticket { padding: 34px; }
  .faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 64px; }
  .faq { margin: 0; }
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
  .footer { padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
