/* =====================================================================
   IlTuoWeb - foglio di stile unico

   PIANO DI DESIGN
   Idea: il sito come cantiere a vista. La cornice da browser torna in home,
   nel portfolio e nei pacchetti e mostra il prodotto invece di descriverlo.
   Colore (contrasti WCAG calcolati):
     inchiostro  #0E1116  sezioni scure e testo su chiaro    17.03:1
     chiaro      #F2F3F5  sezioni chiare e testo su scuro     17.03:1
     bianco      #FFFFFF  campi, cornici
     secondario  #4B5563  testo di supporto su chiaro          6.81:1
     secondario scuro #A7AFBB testo di supporto su scuro       8.55:1
     filetto     #D5D9E0  separatori su chiaro; #2A2F38 su scuro (non testo)
     bordo campi #7B8390  input                3.44:1 su chiaro, 3.82:1 su bianco
     corallo     #FF5A36  SOLO pulsanti (inchiostro sopra 6.09:1) e filetti;
                          mai testo piccolo (2.79:1 su chiaro)
     corallo hover #FF7A5C inchiostro sopra 7.38:1
     errore      #B3261E su chiaro 5.89:1; #FF8A70 su scuro 8.21:1
     Link: inchiostro (o chiaro su scuro) con sottolineatura corallo.
   Tipografia:
     titoli  Sora 600: geometrico, compatto, sicuro
     testo   Figtree 400 e 600: morbido e leggibile
   Layout: sezioni scure e chiare alternate, una idea per sezione, griglia 12 colonne.
   Movimenti (una curva, 300-700 ms, ingresso home 900 ms):
     1 ingresso home: la cornice si compone a blocchi, il titolo sale di 12px
     2 comparsa allo scroll (IntersectionObserver), 10px, scaglioni da 80 ms
     3 screenshot del portfolio che scorre all'hover, al focus e al tocco
     4 linea del tempo del workflow disegnata una volta (stroke-dashoffset)
     5 cambio schermata del questionario: dissolvenza e 12px, 300 ms
     6 parallasse di 30px sulle immagini principali (animation-timeline)
     7 dissolvenza di 200 ms tra le pagine (View Transitions)
     8 barra fissa su mobile che compare dopo il primo scroll
     9 stati interattivi: hover, focus, FAQ
     Movimento ridotto: solo stato finale e focus.

   RILETTURA CRITICA
   - Il rischio e' l'agenzia web generica: gradiente viola, mockup lucidi, numeri
     ad effetto. Qui niente gradienti, niente ombre pesanti, nessun numero inventato;
     la cornice da browser e' piatta e mostra lavori veri (dimostrativi, dichiarati).
   - Lo scuro puo' sembrare "tech": e' alternato al chiaro e il corallo resta azione.
   - Diverso dai cinque siti dimostrativi: nessun serif, nessun cemento, salvia,
     petrolio o cobalto; inchiostro e corallo sono solo di IlTuoWeb.
   ===================================================================== */

@font-face { font-family: 'Sora'; font-weight: 600; font-display: swap; src: url(../font/sora-600.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url(../font/figtree-400.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url(../font/figtree-600.woff2) format('woff2'); }

:root {
  --ink: #0E1116;
  --light: #F2F3F5;
  --white: #FFFFFF;
  --muted: #4B5563;
  --muted-dark: #A7AFBB;
  --rule: #D5D9E0;
  --rule-dark: #2A2F38;
  --field: #7B8390;
  --coral: #FF5A36;
  --coral-hover: #FF7A5C;
  --error: #B3261E;
  --error-dark: #FF8A70;

  --display: 'Sora', 'Segoe UI', Arial, sans-serif;
  --sans: 'Figtree', 'Segoe UI', Arial, sans-serif;

  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.25rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.875rem, 1.35rem + 1.6vw, 2.75rem);
  --fs-h1: clamp(2.25rem, 1.4rem + 3vw, 4rem);

  --page: min(100% - 40px, 1200px);
  --radius: 12px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --t-fast: 300ms;
  --t-med: 500ms;
  --t-slow: 700ms;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--light); color: var(--ink); font: 400 var(--fs-body)/1.6 var(--sans); touch-action: manipulation; -webkit-tap-highlight-color: color-mix(in srgb, var(--coral) 20%, transparent); }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 0.22em; transition: text-decoration-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--light); }
[translate="no"] { white-space: nowrap; }

.wrap { width: var(--page); margin: 0 auto; }
.muted { color: var(--muted); }
.dark .muted { color: var(--muted-dark); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--muted); max-width: 48ch; }
.dark .lead { color: var(--muted-dark); }
.measure { max-width: 62ch; }
.small { font-size: var(--fs-small); }
.todo { display: inline; padding: 1px 6px; border: 1px dashed currentColor; border-radius: 4px; font-size: 0.9375em; }
[hidden] { display: none !important; }
.esca { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.invio-stato { margin: 16px 0 0; font-weight: 600; }
.invio-stato:empty { display: none; }
.invio-stato:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 16px; top: -200px; z-index: 50; padding: 12px 16px; background: var(--ink); color: var(--light); }
.skip-link:focus { top: 12px; }

/* ---------- Intestazione ---------- */

.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--light) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.site-header__inner { width: var(--page); margin: 0 auto; min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }

.wordmark { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; color: var(--ink); font: 600 1.375rem/1 var(--display); letter-spacing: -0.03em; text-decoration: none; }
.wordmark::after { content: ""; width: 8px; height: 8px; margin-left: 3px; border-radius: 2px; background: var(--coral); align-self: flex-end; margin-bottom: 14px; }
.dark .wordmark { color: var(--light); }

.site-nav ul { display: flex; gap: 4px 22px; list-style: none; padding: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 0.9688rem; }
.site-nav a[aria-current="page"] { font-weight: 600; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 0.4em; }

.header-actions { display: flex; align-items: center; gap: 4px 16px; }
.shortcut { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9375rem; font-weight: 600; }

.nav-toggle { display: none; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 8px; background: transparent; color: var(--ink); font: 600 0.9375rem/1 var(--sans); cursor: pointer; }

/* ---------- Pulsanti ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 8px; font: 600 1rem/1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--coral); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.dark .btn--ghost { color: var(--light); border-color: var(--light); }
.link-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 30px; }

/* ---------- Sezioni ---------- */

.sec { padding: 104px 0; }
.sec--rule { border-top: 1px solid var(--rule); }
.dark { background: var(--ink); color: var(--light); }
.sec.dark { padding: 104px 20px; }
.sec.dark .wrap { width: min(100%, 1200px); }
.sec__head { max-width: 48ch; margin-bottom: 44px; }
.sec__head h2 { margin-bottom: 14px; }
.sec__head p { color: var(--muted); }
.dark .sec__head p { color: var(--muted-dark); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 72px; align-items: start; }

.page-head { padding: 72px 0 48px; }
.page-head .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px 64px; align-items: end; }
.page-head h1 { max-width: 18ch; }
.page-head .small { margin-top: 14px; color: var(--muted); font-size: var(--fs-small); }

/* ---------- Cornice da browser: l'elemento ricorrente ---------- */

.browser { overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--white); color: var(--ink); }
.dark .browser { border-color: var(--rule-dark); }
.browser__bar { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 7px 14px; border-bottom: 1px solid var(--rule); background: var(--light); }
.browser__dots { display: flex; gap: 6px; }
.browser__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.browser__dots i:first-child { background: var(--coral); }
.browser__url { flex: 1; overflow: hidden; padding: 3px 10px; border-radius: 6px; background: var(--white); color: var(--muted); font-size: 0.8125rem; white-space: nowrap; text-overflow: ellipsis; }
.browser__view { position: relative; overflow: hidden; aspect-ratio: 16 / 10; container-type: size; }
.browser__view img { width: 100%; height: auto; }

/* Mock che si compone in home: soli blocchi decorativi */
.mock { display: grid; gap: 12px; padding: 20px; aspect-ratio: 16 / 11; }
.mock span { display: block; border-radius: 6px; background: var(--light); }
.mock__nav { height: 14px; width: 55%; }
.mock__title { height: 26px; width: 80%; background: var(--ink) !important; }
.mock__line { height: 10px; width: 65%; }
.mock__btn { height: 22px; width: 32%; background: var(--coral) !important; }
.mock__img { height: 100%; min-height: 90px; background: var(--rule) !important; }
.mock__row { display: grid !important; grid-template-columns: 2fr 1fr; gap: 12px; background: none !important; }
.mock__row span { background: var(--light); min-height: 46px; }

/* ---------- Home ---------- */

.hero { padding: 72px 20px 96px; }
.hero .wrap { width: min(100%, 1200px); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 48px 64px; align-items: center; }
.hero h1 { margin-bottom: 20px; max-width: 16ch; }
.hero__note { margin-top: 18px; font-size: var(--fs-small); }

.cats + .small { margin-top: 14px; }
.cats { list-style: none; padding: 0; border-top: 2px solid var(--ink); }
.cat { position: relative; display: grid; grid-template-columns: 120px minmax(0, 5fr) minmax(0, 5fr) auto; gap: 14px 36px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.cat .photo__frame { aspect-ratio: 4 / 3; border-radius: 8px; }
.cat h3 a { text-decoration: none; }
.cat h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cat p { color: var(--muted); }
.cat__go { font-weight: 600; white-space: nowrap; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }

.steps { list-style: none; counter-reset: step; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 32px; }
.steps > li { counter-increment: step; padding: 18px 0 0; border-top: 2px solid var(--coral); }
.steps > li::before { content: counter(step); display: block; margin-bottom: 12px; font: 600 1.75rem/1 var(--display); }
.steps h3 { font-size: 1.1875rem; margin-bottom: 6px; }
.steps p { color: var(--muted); }
.dark .steps p { color: var(--muted-dark); }

.pf-preview { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
.pf-preview > :nth-child(1) { grid-column: 1 / span 7; }
.pf-preview > :nth-child(2) { grid-column: 8 / span 5; align-self: end; }
.pf-preview > :nth-child(3) { grid-column: 3 / span 6; }
.pf-mini h3 { margin-top: 14px; font-size: 1.25rem; }
.pf-mini p { color: var(--muted-dark); font-size: var(--fs-small); }

.choice-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.choice-links a { display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 12px 16px; border: 1px solid var(--field); border-radius: 10px; background: var(--white); font-weight: 600; text-align: center; text-decoration: none; transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.choice-links a:active { transform: scale(0.98); }

.doors { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule-dark); }
.doors li { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--rule-dark); }
.doors li + li { padding-left: 28px; border-left: 1px solid var(--rule-dark); }
.doors h3 { margin-bottom: 8px; }
.doors p { color: var(--muted-dark); }
.light-doors .doors, .light-doors .doors li { border-color: var(--rule); }
.light-doors .doors p { color: var(--muted); }

/* ---------- Immagini ---------- */

.photo { margin: 0; }
.photo__frame { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--rule); }
.photo__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.photo--wide .photo__frame { aspect-ratio: 16 / 10; }
.photo figcaption { margin-top: 10px; color: var(--muted); font-size: var(--fs-small); }

/* ---------- Pacchetti ---------- */

.pkg { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px 64px; align-items: center; padding: 64px 0; border-top: 1px solid var(--rule); }
.pkg h2 { margin-bottom: 6px; }
.pkg__size { font: 600 1.125rem/1.3 var(--display); margin-bottom: 18px; }
.pkg dl { margin: 0; display: grid; gap: 16px; }
.pkg dt { font-weight: 600; }
.pkg dd { margin: 4px 0 0; color: var(--muted); }
.pages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 18px; }
.pages span { aspect-ratio: 3 / 4; border-radius: 6px; background: var(--light); border: 1px solid var(--rule); }
.pages span:first-child { background: var(--ink); border-color: var(--ink); }

/* ---------- Portfolio ---------- */

.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; border: 0; min-width: 0; }
.filter legend { width: 100%; margin-bottom: 10px; padding: 0; font-weight: 600; }
.filter label { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--field); border-radius: 999px; background: var(--white); cursor: pointer; transition: border-color var(--t-fast) var(--ease); }
.filter input { position: absolute; opacity: 0; pointer-events: none; }
.filter label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--light); font-weight: 600; }
.filter label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 40px; }
.pf-card:first-child { grid-column: 1 / -1; }
.pf-card .browser__view { aspect-ratio: 16 / 10; }
.pf-card .browser__view img { transition: transform var(--t-slow) var(--ease); }
/* Lo screenshot lungo scorre fino in fondo all'hover, al focus e al tocco */
.pf-card .browser__view:hover img, .pf-card .browser__view:focus-visible img, .pf-card .browser__view:focus img { transform: translateY(calc(-100% + 100cqh)); }
.pf-card__meta { display: grid; gap: 6px; margin-top: 18px; }
.pf-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: var(--fs-small); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); font-size: 0.8125rem; font-weight: 600; }
.dark .badge { border-color: var(--light); color: var(--light); }
.pf-card p { color: var(--muted); max-width: 60ch; }

.pf-section:has(input[value="autofficina"]:checked) .pf-card:not([data-settore="autofficina"]),
.pf-section:has(input[value="ristorazione"]:checked) .pf-card:not([data-settore="ristorazione"]),
.pf-section:has(input[value="parrucchiere"]:checked) .pf-card:not([data-settore="parrucchiere"]),
.pf-section:has(input[value="fiorista"]:checked) .pf-card:not([data-settore="fiorista"]),
.pf-section:has(input[value="consulenza"]:checked) .pf-card:not([data-settore="consulenza"]),
.pf-section:has(input[value="impianti"]:checked) .pf-card:not([data-settore="impianti"]),
.pf-section:has(input[value="architettura"]:checked) .pf-card:not([data-settore="architettura"]),
.pf-section:has(input[value="fisioterapia"]:checked) .pf-card:not([data-settore="fisioterapia"]),
.pf-section:has(input[value="pulizie"]:checked) .pf-card:not([data-settore="pulizie"]) { display: none; }
.pf-section:has(.filter input:not([value="tutti"]):checked) .pf-card { grid-column: 1 / -1; animation: fade-up var(--t-fast) var(--ease); }

/* ---------- Settori ---------- */

.sector { padding: 88px 0; border-top: 1px solid var(--rule); scroll-margin-top: 80px; }
.sector .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px 64px; align-items: center; }
.sector:nth-of-type(even) .photo { order: 2; }
.sector h2 { margin-bottom: 14px; }

.list { list-style: none; padding: 0; }
.list li { position: relative; padding: 10px 0 10px 24px; border-bottom: 1px solid var(--rule); }
.list li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 12px; height: 3px; border-radius: 2px; background: var(--coral); }
.dark .list li { border-color: var(--rule-dark); }

/* ---------- Linea del tempo del workflow ---------- */

.timeline { position: relative; }
.timeline__steps { list-style: none; counter-reset: step; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.timeline__line { position: absolute; left: 22px; top: 22px; width: calc(100% - 22px); height: 2px; color: var(--coral); }
.timeline__line--v { display: none; }
.timeline__line path { stroke: currentColor; stroke-width: 2; fill: none; }
.js .timeline__line path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--t-slow) var(--ease) 150ms; }
.js .timeline.is-drawn .timeline__line path { stroke-dashoffset: 0; }
.timeline__steps > li { position: relative; counter-increment: step; }
.timeline__steps > li:last-child { background: var(--ink); }
.timeline__steps > li::before { content: counter(step); position: relative; display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px; border: 2px solid var(--coral); border-radius: 50%; background: var(--ink); color: var(--light); font: 600 1.125rem/1 var(--display); }
.timeline h3 { font-size: 1.125rem; margin-bottom: 10px; }
.timeline dl { margin: 0; display: grid; gap: 8px; font-size: 0.9375rem; }
.timeline dt { font-weight: 600; }
.timeline dd { margin: 0; color: var(--muted-dark); }
.timeline .why { margin-top: 10px; font-size: 0.9375rem; }

/* ---------- FAQ ---------- */

.faq { max-width: 74ch; padding: 4px 0 0; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { position: relative; display: flex; align-items: center; min-height: 60px; padding: 14px 48px 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 16px; height: 2px; background: currentColor; transition: transform var(--t-fast) var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(90deg) scaleX(0); }
.faq details > div { padding: 0 0 22px; color: var(--muted); }
.faq details[open] > div { animation: fade-up var(--t-fast) var(--ease); }

/* ---------- Chi siamo ---------- */

.partners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.partner { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: start; padding: 28px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--white); }
.monogram { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; background: var(--ink); color: var(--light); font: 600 2.25rem/1 var(--display); letter-spacing: -0.02em; box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 6px var(--coral); }
.partner h2 { font-size: 1.5rem; margin-bottom: 6px; }
.partner p { color: var(--muted); }

/* ---------- Recensioni: componente pronto, non usato finché non ci sono recensioni vere ---------- */

.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.review { margin: 0; padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--white); }
.review blockquote { margin: 0 0 16px; }
.review figcaption { color: var(--muted); font-size: var(--fs-small); }
.review figcaption strong { color: var(--ink); }
.stars { display: inline-block; margin-bottom: 10px; color: var(--ink); letter-spacing: 2px; }

/* ---------- Questionario ---------- */

.quiz { max-width: 46rem; }
.quiz__progress { display: grid; gap: 8px; margin-bottom: 28px; }
.quiz__progress progress { width: 100%; height: 8px; appearance: none; border: 0; border-radius: 999px; background: var(--rule); overflow: hidden; }
.quiz__progress progress::-webkit-progress-bar { background: var(--rule); border-radius: 999px; }
.quiz__progress progress::-webkit-progress-value { background: var(--coral); border-radius: 999px; }
.quiz__progress progress::-moz-progress-bar { background: var(--coral); border-radius: 999px; }
.q-step { margin: 0 0 40px; padding: 0; border: 0; min-width: 0; }
.q-step legend { padding: 0; margin-bottom: 18px; font: 600 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.2 var(--display); letter-spacing: -0.02em; }
.q-step legend:focus { outline: none; }
.q-step legend:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.q-hint { margin: -8px 0 16px; color: var(--muted); }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--field); border-radius: 10px; background: var(--white); font-weight: 600; cursor: pointer; transition: border-color var(--t-fast) var(--ease); }
.option input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ink); }
.option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), inset 4px 0 0 var(--coral); }
.field { display: grid; gap: 8px; margin-top: 20px; }
.field label { font-weight: 600; }
.field input[type="text"], .field input[type="email"], .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--field); border-radius: 8px; background: var(--white); color: var(--ink); font: inherit; }
.field textarea { min-height: 110px; resize: vertical; }
.options--extra { margin-top: 10px; }
button.link-more { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.q-error { margin: 14px 0 0; color: var(--error); font-weight: 600; }
.q-error:empty { display: none; }
.q-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.no-js-only { margin-top: 12px; }
.js .no-js-only { display: none; }
html:not(.js) .js-only { display: none; }

.js .q-step:not(.is-current) { display: none; }
.js .q-step.is-current { animation: step-in var(--t-fast) var(--ease); }
.summary { max-width: 46rem; }
.summary[hidden] { display: none; }
.summary:not([hidden]) { animation: step-in var(--t-fast) var(--ease); }
.summary h2:focus { outline: none; }
.summary dl { margin: 24px 0; display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); border-top: 1px solid var(--rule); }
.summary dt, .summary dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.summary dt { color: var(--muted); }
.suggest { padding: 22px 24px; border-radius: var(--radius); background: var(--ink); color: var(--light); }
.suggest p { color: var(--muted-dark); }
.suggest strong { display: block; font: 600 1.75rem/1.2 var(--display); color: var(--light); margin: 4px 0 8px; }
.copy-fallback { width: 100%; min-height: 220px; margin-top: 12px; padding: 12px; border: 1px solid var(--field); border-radius: 8px; font: inherit; }

/* ---------- Testi legali ---------- */

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.5rem; margin: 40px 0 10px; }

/* ---------- Piè di pagina e barra mobile ---------- */

.site-footer { padding: 64px 20px 32px; font-size: var(--fs-small); }
.site-footer__inner { width: min(100%, 1200px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 28px 40px; }
.site-footer p { color: var(--muted-dark); }
.footer-title { margin: 0 0 6px; color: var(--light) !important; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.footer-note { grid-column: 1 / -1; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--rule-dark); }

.mobile-bar { display: none; }

/* ---------- Hover solo con puntatore fine ---------- */

@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-color: currentColor; }
  .btn--primary:hover { background: var(--coral-hover); color: var(--ink); }
  .btn--ghost:hover { background: var(--ink); color: var(--light); }
  .dark .btn--ghost:hover { background: var(--light); color: var(--ink); }
  .skip-link:hover { color: var(--light); }
  .photo__frame:hover img, .cat:hover .photo__frame img { transform: scale(1.03); }
  .choice-links a:hover, .option:hover, .filter label:hover { border-color: var(--ink); }
  .faq summary:hover { text-decoration: underline; text-decoration-color: var(--coral); text-underline-offset: 0.22em; }
}

/* ---------- Movimento ---------- */

@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
@keyframes step-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes drift { from { transform: translateY(-15px) scale(1.06); } to { transform: translateY(15px) scale(1.06); } }

/* 1. Ingresso della home: la cornice si compone, una volta per sessione */
.js:not(.intro-done) .mock > * { animation: rise var(--t-med) var(--ease) both; }
.js:not(.intro-done) .mock > :nth-child(2) { animation-delay: 80ms; }
.js:not(.intro-done) .mock > :nth-child(3) { animation-delay: 160ms; }
.js:not(.intro-done) .mock > :nth-child(4) { animation-delay: 240ms; }
.js:not(.intro-done) .mock > :nth-child(5) { animation-delay: 320ms; }
.js:not(.intro-done) .mock > :nth-child(6) { animation-delay: 400ms; }
.js:not(.intro-done) .hero h1 { animation: rise var(--t-slow) var(--ease) 100ms both; }

/* 2. Comparsa allo scroll */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* 6. Parallasse leggero */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .parallax img { animation: drift linear both; animation-timeline: view(); }
  }
}

/* 7. Passaggio tra le pagine */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: var(--ease); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-header__inner { padding: 0 0 4px; }
  .header-actions { display: none; }
  .site-nav { flex-basis: 100%; order: 3; }
  .js .site-nav:not(.is-open) { display: none; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0 0 12px; }
  .site-nav a { width: 100%; min-height: 48px; }
  .timeline__steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .timeline__steps > li { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 20px; }
  .timeline__steps > li::before { margin: 0; grid-row: span 4; }
  .timeline__line--h { display: none; }
  .timeline__line--v { display: block; width: 2px; height: calc(100% - 22px); }
}

@media (max-width: 900px) {
  .hero .wrap, .page-head .wrap, .split, .pkg, .sector .wrap { grid-template-columns: minmax(0, 1fr); }
  .sector:nth-of-type(even) .photo { order: 0; }
  .cat { grid-template-columns: 96px minmax(0, 1fr); }
  .cat .photo { grid-row: 1 / span 3; align-self: start; margin-top: 4px; }
  .cat p, .cat__go { grid-column: 2; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-preview { grid-template-columns: minmax(0, 1fr); }
  .pf-preview > :nth-child(n) { grid-column: auto; }
  .pf-grid, .partners { grid-template-columns: minmax(0, 1fr); }
  .choice-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doors { grid-template-columns: minmax(0, 1fr); }
  .doors li, .doors li + li { padding: 24px 0; border-left: 0; }
  .site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__inner > :first-child { grid-column: 1 / -1; }

  /* 8. Barra fissa su mobile, compare dopo il primo scroll */
  body { padding-bottom: 76px; }
  .site-header { position: relative; }
  .mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--ink); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility 0s linear var(--t-fast); }
  .mobile-bar.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .mobile-bar .btn { min-height: 48px; padding: 0 12px; }
  .mobile-bar .btn--ghost { color: var(--light); border-color: var(--light); }
}

@media (max-width: 600px) {
  .sec { padding: 72px 0; }
  .sec.dark { padding: 72px 20px; }
  .hero { padding: 40px 20px 72px; }
  .page-head { padding: 48px 0 32px; }
  .sector { padding: 64px 0; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .partner { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .monogram { width: 88px; height: 88px; font-size: 1.75rem; }
  .summary dl { grid-template-columns: minmax(0, 1fr); }
  .summary dt { padding-bottom: 0; border-bottom: 0; }
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
}

/* Movimento ridotto: solo lo stato finale e i focus */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-property: color, background-color, border-color, outline-color, text-decoration-color !important; }
  .reveal { opacity: 1; transform: none; }
  .js .timeline__line path { stroke-dashoffset: 0; }
  .photo__frame img { transform: none !important; }
  .mobile-bar { transform: none; }
  @view-transition { navigation: none; }
}
