/* Design system IAMCAVALLI (2026-11-02). Fonte: la pagina dell'Audit online, sito/landing-audit/astro-v8/src/styles/landing.css.
   Qui ci sono solo i pezzi che valgono per tutto il sito: token, tipografia, struttura, componenti, motion.
   Le sezioni proprie di una pagina restano nel CSS di quella pagina. Guida d'uso: README.md accanto. */

/* ---------- Token ---------- */
:root {
  --verde: #1b463c;
  --verde-medio: #35927c;
  --lime: #def168;
  --crema: #f4f3ef;
  --bianco: #ffffff;
  --nero: #0f1a17;
  --rosso: #d84343;
  --corallo: #ff8a80;
  --grigio: #eeeeee;
  --grigio-2: #b0b0b0;
  --linea: rgba(27, 70, 60, .14);
  --testo-2: #42514d;

  --h1: 36px; --h2: 30px; --h3: 24px;
  --xl: 19px; --l: 17px;
  --raggio: 24px;
  --gutter: 16px;
  --sezione: 72px;

  --facile: cubic-bezier(.22, .8, .24, 1);
}
@media (min-width: 760px)  { :root { --h1: 46px; --h2: 38px; --h3: 30px; --xl: 21px; --l: 18px; --gutter: 32px; --sezione: 96px; } }
@media (min-width: 1240px) { :root { --h1: 60px; --h2: 44px; --h3: 36px; --xl: 22px; --l: 20px; --gutter: 40px; --sezione: 120px; } }

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { font-family: "Satoshi", system-ui, sans-serif; background: var(--crema); color: var(--nero); -webkit-font-smoothing: antialiased; line-height: 1.4; overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
b, strong { font-weight: 700; }
ul, ol { list-style: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

/* ---------- Tipografia ---------- */
.h1 { font-size: var(--h1); line-height: 1.04; font-weight: 500; letter-spacing: -.015em; text-wrap: balance; }
.h2 { font-size: var(--h2); line-height: 1.12; font-weight: 500; color: var(--verde); letter-spacing: -.01em; text-wrap: balance; }
.h2--chiaro { color: var(--bianco); }
.h3 { font-size: var(--h3); line-height: 1.1; font-weight: 500; color: var(--verde); text-wrap: balance; }
.t-xl { font-size: var(--xl); line-height: 1.35; }
.t-l { font-size: var(--l); line-height: 1.45; }
.testo-2 { color: var(--testo-2); }
.occhiello { font-size: 15px; font-weight: 700; color: var(--verde-medio); margin-bottom: 12px; }
.occhiello--chiaro { color: var(--lime); }
.marchio { font-weight: 700; letter-spacing: .08em; font-size: 15px; text-decoration: none; }
.marchio--scuro { color: var(--verde); }

/* Parola evidenziata: il lime passa sotto da sinistra quando arriva. Tenerla a 2-3 parole: va a capo intera */
.evidenzia { position: relative; white-space: nowrap; z-index: 0; }
.evidenzia::before { content: ""; position: absolute; z-index: -1; left: -.12em; right: -.12em; top: .12em; bottom: .02em; background: var(--lime); border-radius: .14em; transform: scaleX(0); transform-origin: left center; transition: transform .9s var(--facile) .25s; }
.carta--verde .evidenzia, .su-verde .evidenzia { color: var(--verde); }
html:not(.js) .evidenzia::before, .visto .evidenzia::before, .visto.evidenzia::before { transform: scaleX(1); }

/* ---------- Struttura ---------- */
.sezione { padding: var(--sezione) 0 0; }
.contenitore { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.contenitore--stretto { max-width: 880px; }
.testa-centro { text-align: center; max-width: 820px; margin: 0 auto 48px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.testa-sx { max-width: 760px; margin-bottom: 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.testa-due { display: grid; gap: 20px; margin-bottom: 48px; }
.testa-due > div { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
@media (min-width: 1100px) { .testa-due { grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; margin-bottom: 64px; } }
.carta { position: relative; overflow: hidden; border-radius: var(--raggio); }
.carta--bianca { background: var(--bianco); }
.carta--verde { background: var(--verde); color: var(--bianco); }
.carta__gradient { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.carta--verde > *:not(.carta__gradient) { position: relative; }

/* ---------- Componenti ---------- */
/* Pillola d'occhiello */
.pillola { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--bianco); border: 1px solid var(--linea); font-size: 14px; font-weight: 500; line-height: 1.1; color: var(--verde); white-space: nowrap; }
.pillola__punto { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(222,241,104,.35); flex-shrink: 0; }
.pillola--chiara { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: var(--bianco); }

/* Badge e etichette */
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--bianco); color: var(--verde); padding: 8px 12px 8px 8px; border-radius: 24px; font-size: 15px; font-weight: 500; line-height: 1.1; white-space: nowrap; }
.badge img { width: 20px; height: 20px; flex-shrink: 0; }
.badge--scuro { background: var(--verde); color: var(--bianco); }
.badge__punto { width: 18px; height: 18px; border-radius: 50%; background: var(--lime); flex-shrink: 0; }
.etichetta { display: inline-block; font-size: 15px; font-weight: 700; padding: 7px 14px; border-radius: 20px; }
.etichetta--prima { background: var(--rosso); color: var(--bianco); }
.etichetta--dopo { background: var(--lime); color: var(--verde); }

/* Bottone a pillola, con la freccia nel cerchio: <a class="btn">Testo<span class="btn__freccia" aria-hidden="true"></span></a> */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; text-align: center; min-height: 58px; background: var(--lime); color: var(--verde); padding: 8px 8px 8px 26px; border-radius: 999px; font: 700 18px/1.15 "Satoshi", sans-serif; text-decoration: none; transition: transform .15s ease, filter .15s ease; }
.btn:not(:has(.btn__freccia)) { padding: 16px 26px; }
.btn:hover { filter: brightness(.96); transform: translateY(-1px); }
.btn__freccia { position: relative; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--verde); overflow: hidden; }
.btn__freccia::before, .btn__freccia::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' stroke='%23def168' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; transition: transform .35s var(--facile); }
.btn__freccia::after { transform: translateX(-100%); }
.btn:hover .btn__freccia::before { transform: translateX(100%); }
.btn:hover .btn__freccia::after { transform: translateX(0); }
.btn--scuro { background: var(--verde); color: var(--bianco); }
.btn--scuro .btn__freccia { background: var(--lime); }
.btn--scuro .btn__freccia::before, .btn--scuro .btn__freccia::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' stroke='%231b463c' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.btn--chiaro { background: transparent; color: var(--bianco); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.btn--chiaro:hover { background: rgba(255,255,255,.08); filter: none; }
.btn--piccolo { min-height: 44px; padding: 10px 18px; font-size: 16px; }
.azioni { display: flex; flex-direction: column; gap: 12px; width: 100%; }
@media (min-width: 560px) { .azioni { flex-direction: row; justify-content: center; width: auto; } }

/* Link di testo con la freccia: le strade secondarie, mai in competizione con il bottone */
.link-freccia { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 17px; font-weight: 700; color: var(--verde); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.link-freccia::after { content: "→"; text-decoration: none; }
.su-verde .link-freccia, .carta--verde .link-freccia { color: var(--bianco); }

/* Tutela: icona nel cerchio lime, poi il testo (Patti chiari della pagina dell'Audit). Niente timbri: sono fuori dal design system */
.tutela { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.45; color: var(--testo-2); text-align: left; }
.tutela__icona { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--lime); color: var(--verde); display: grid; place-items: center; }
.tutela__icona svg { width: 17px; height: 17px; }
.tutela b { color: var(--verde); }
.carta--verde .tutela, .su-verde .tutela { color: rgba(255,255,255,.88); }
.carta--verde .tutela b, .su-verde .tutela b { color: var(--bianco); }

/* Domande: schede bianche che si aprono con un tocco */
.faq__lista { display: flex; flex-direction: column; gap: 10px; }
.faq__voce { background: var(--bianco); border-radius: 16px; }
.faq__voce summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; font-size: 18px; line-height: 1.25; font-weight: 700; color: var(--verde); }
.faq__voce summary::-webkit-details-marker { display: none; }
.faq__voce summary::after { content: "+"; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--crema); display: grid; place-items: center; font-size: 22px; font-weight: 500; transition: transform .2s; }
.faq__voce[open] summary::after { transform: rotate(45deg); }
.faq__voce p { padding: 0 20px 22px; font-size: 16px; line-height: 1.5; color: var(--testo-2); max-width: 680px; }
.faq__voce p + p { padding-top: 0; }
@media (min-width: 760px) { .faq__voce summary { padding: 24px 28px; font-size: 20px; } .faq__voce p { padding: 0 28px 26px; } }

/* Foto da inserire: segnaposto con la descrizione di cosa ci va */
.foto { position: relative; background: var(--grigio); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; outline: 1.5px dashed var(--grigio-2); outline-offset: -8px; }
.foto__cornice { position: relative; width: 96px; height: 96px; border: 3px solid var(--grigio-2); border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.foto__sole { position: absolute; width: 30px; left: 8px; top: 7px; }
.foto__monte { position: absolute; width: 96px; left: 0; bottom: 0; }
.foto__testo { max-width: 420px; font-size: 14px; line-height: 1.4; color: var(--testo-2); }
.foto__testo b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--verde); margin-bottom: 4px; }
.foto--4x3 { aspect-ratio: 4 / 3; }

/* Da completare prima di pubblicare: si vede in bozza, si toglie con il dato vero */
.da-verificare, [data-todo] { outline: 1.5px dashed #e08a00; outline-offset: 3px; }
.da-verificare { background: rgba(255, 170, 0, .12); }

/* ---------- Motion ---------- */
/* La grammatica della landing di Caruso: sale di 24 px in 750 ms, a scalare di 90 ms (--i dallo script).
   Solo con JS (lo script mette .js su <html>): senza JS, o con «riduci movimento», tutto è già visibile */
.js [data-rivela] { opacity: 0; transform: translateY(24px); transition: opacity .75s var(--facile), transform .75s var(--facile); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-rivela].visto { opacity: 1; transform: none; }
.js .entra { opacity: 0; transform: translateY(24px); animation: entra .9s var(--facile) forwards; animation-delay: calc(.15s + var(--i, 0) * 110ms); }
@keyframes entra { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rivela], .js .entra { opacity: 1; transform: none; animation: none; }
  * { transition: none !important; }
}
