/* ==========================================================
   Carrozzeria T&T – stili del tema
   Colori presi dal logo: blu notte, arancio fiamma, rosso brace
   ========================================================== */

@font-face {
	font-family: "Barlow Condensed";
	font-style: italic;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/barlow-condensed-latin-700-italic.woff2") format("woff2");
}
@font-face {
	font-family: "Barlow Condensed";
	font-style: italic;
	font-weight: 800;
	font-display: swap;
	src: url("../fonts/barlow-condensed-latin-800-italic.woff2") format("woff2");
}
@font-face {
	font-family: "Barlow";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Barlow";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Barlow";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
}

:root {
	--navy: #051f44;
	--navy-deep: #03142e;
	--navy-lift: #0a2a5a;
	--flame: #ff8a1f;
	--amber: #ffb23d;
	--ember: #e8472a;
	--white: #ffffff;
	--mist: #b9c6dc;
	--line: rgba(255, 255, 255, 0.14);

	--display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
	--body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

body {
	margin: 0;
	background: var(--navy);
	color: var(--white);
	font-family: var(--body);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-style: italic; font-weight: 800; line-height: 1; margin: 0; letter-spacing: 0.005em; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.skip-link {
	position: absolute; left: 16px; top: -80px; z-index: 1000;
	background: var(--amber); color: var(--navy); padding: 10px 16px; font-weight: 600; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }

/* ---------- Bottoni ---------- */
.btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 16px 28px; border-radius: 999px; border: 2px solid transparent;
	font-family: var(--body); font-weight: 600; font-size: 1.0625rem; line-height: 1;
	text-decoration: none; cursor: pointer;
	transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn-flame {
	background: linear-gradient(100deg, var(--amber), var(--flame) 55%, var(--ember));
	background-size: 140% 100%; background-position: 0 0;
	color: var(--navy-deep);
	box-shadow: 0 10px 30px -10px rgba(255, 122, 26, 0.7);
}
.btn-flame:hover { background-position: 100% 0; box-shadow: 0 14px 36px -10px rgba(255, 122, 26, 0.9); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--white); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-small { padding: 12px 20px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
	position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
	display: flex; align-items: center;
	transition: background-color 0.4s, box-shadow 0.4s, height 0.4s var(--ease);
}
.site-header.scrolled {
	background: rgba(5, 31, 68, 0.92);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	box-shadow: 0 1px 0 var(--line);
	height: 70px;
}
body.is-inner .site-header { background: var(--navy); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; line-height: 0; }
.brand-logo { height: 68px; width: auto; transition: height 0.4s var(--ease); }
.site-header.scrolled .brand-logo { height: 52px; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.main-nav ul a {
	position: relative; text-decoration: none; font-weight: 500; padding: 6px 0;
}
.main-nav ul a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
	background: linear-gradient(90deg, var(--amber), var(--ember));
	transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.main-nav ul a:hover::after, .main-nav ul a.active::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--white); border-radius: 2px; margin: 5px 0; transition: transform 0.35s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Preloader ---------- */
.preloader { display: none; }
.js .preloader {
	position: fixed; inset: 0; z-index: 500; background: var(--navy);
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
	transition: opacity 0.6s var(--ease) 0.1s, visibility 0.6s 0.1s;
}
.preloader-logo { width: min(72vw, 380px); height: auto; animation: logoIn 0.9s var(--ease) both; }
.preloader-bar { width: min(52vw, 220px); height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.preloader-bar i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--amber), var(--ember)); animation: load 1.2s var(--ease) 0.2s forwards; }
body.is-loaded .preloader { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes logoIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes load { to { transform: scaleX(1); } }

/* ---------- Hero ---------- */
.hero {
	position: relative; overflow: hidden;
	min-height: 100vh; min-height: 100svh;
	display: flex; align-items: center;
	padding: calc(var(--header-h) + 24px) 0 64px;
	background:
		radial-gradient(900px 500px at 85% 85%, rgba(255, 122, 26, 0.15), transparent 70%),
		radial-gradient(700px 500px at 10% 0%, rgba(26, 82, 170, 0.35), transparent 70%),
		var(--navy);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center; position: relative; z-index: 1; }

.hero-title { font-size: clamp(3.2rem, 6.4vw, 5.9rem); line-height: 0.92; }
.hero-title .line { display: block; white-space: nowrap; overflow: hidden; padding: 0.06em 0.08em 0.1em 0; }
.hero-title .line > span { display: inline-block; }
.hero-title .line:nth-child(2) > span {
	background: linear-gradient(100deg, var(--amber), var(--flame) 50%, var(--ember));
	-webkit-background-clip: text; background-clip: text; color: transparent;
	padding-right: 0.08em;
}
.js .hero-title .line > span { transform: translateY(115%); transition: transform 1s var(--ease); }
.js .hero-title .line:nth-child(2) > span { transition-delay: 0.12s; }
.js body.is-loaded .hero-title .line > span { transform: none; }

.hero-lead { max-width: 30em; margin: 28px 0 34px; color: var(--mist); font-size: 1.2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.js .hero-lead, .js .hero-cta { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease) 0.5s, transform 0.9s var(--ease) 0.5s; }
.js .hero-cta { transition-delay: 0.65s; }
.js body.is-loaded .hero-lead, .js body.is-loaded .hero-cta { opacity: 1; transform: none; }

.hero-stage { position: relative; }
.car { display: block; width: 100%; overflow: visible; }
.js .car { opacity: 0; transform: translateX(-9%); transition: opacity 0.9s var(--ease) 0.2s, transform 1.4s var(--ease) 0.2s; }
.js body.is-loaded .car { opacity: 1; transform: none; }
.flames { transition: opacity 0.5s; }
.flames.off { opacity: 0; }
.wheel .spokes { transform-box: fill-box; transform-origin: center; }
.wheel.spin .spokes { animation: spin 1.3s var(--ease); }
@keyframes spin { from { transform: rotate(-540deg); } to { transform: none; } }

.swatch-panel { margin-top: 10px; }
.swatch-label { margin: 0 0 12px; color: var(--mist); font-size: 1rem; }
.swatch-label strong { color: var(--white); font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch {
	position: relative; width: 40px; height: 40px; border-radius: 50%; padding: 0; cursor: pointer;
	border: 2px solid rgba(255, 255, 255, 0.3);
	background: linear-gradient(160deg, var(--c1), var(--c2));
	transition: transform 0.3s var(--ease), border-color 0.3s;
}
.swatch:hover { transform: scale(1.14) translateY(-2px); }
.swatch[aria-checked="true"] { border-color: var(--white); box-shadow: 0 0 0 4px var(--navy), 0 0 0 6px var(--amber); }
.swatch:active { transform: scale(0.94); }

/* ---------- Sezioni ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt { background: var(--navy-deep); }
.section-head h2 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); }
.section-head p { margin: 18px 0 0; color: var(--mist); max-width: 26em; font-size: 1.15rem; }

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Servizi */
.services-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.services-grid .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
.services { border-bottom: 1px solid var(--line); }
.service { position: relative; padding: 32px 0; border-top: 1px solid var(--line); }
.service::before {
	content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
	background: linear-gradient(90deg, var(--amber), var(--ember));
	transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease);
}
.service:hover::before { transform: scaleX(1); }
.service h3 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); transition: transform 0.45s var(--ease), color 0.3s; }
.service:hover h3 { transform: translateX(10px); color: var(--amber); }
.service p { margin: 12px 0 0; color: var(--mist); max-width: 34em; }

/* Come lavoriamo */
.steps { position: relative; list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps::before, .steps::after {
	content: ""; position: absolute; left: 28px; right: 28px; top: 28px; height: 3px; border-radius: 3px;
}
.steps::before { background: var(--line); }
.steps::after {
	background: linear-gradient(90deg, var(--amber), var(--flame), var(--ember));
	transform: scaleX(0); transform-origin: left; transition: transform 1.8s var(--ease) 0.2s;
}
.steps.drawn::after { transform: scaleX(1); }
.step { position: relative; z-index: 1; }
.step-n {
	display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
	background: var(--navy-deep); border: 3px solid var(--line);
	font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.8rem; line-height: 1;
	transition: background 0.5s, border-color 0.5s, color 0.5s;
}
.step.is-in .step-n { background: linear-gradient(135deg, var(--amber), var(--ember)); border-color: transparent; color: var(--navy-deep); }
.step h3 { font-size: 1.9rem; margin: 22px 0 10px; }
.step p { margin: 0; color: var(--mist); }

/* Banda telefono */
.callband { background: linear-gradient(100deg, var(--amber), var(--flame) 55%, #f06a22); color: var(--navy-deep); padding: clamp(48px, 7vw, 84px) 0; }
.callband-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 40px; }
.callband-text { margin: 0; font-family: var(--display); font-style: italic; font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.05; }
.callband-number {
	font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(2.8rem, 8vw, 6.4rem); line-height: 1; text-decoration: none;
	background: linear-gradient(var(--navy-deep), var(--navy-deep)) 0 100% / 0 4px no-repeat;
	transition: background-size 0.5s var(--ease);
	padding-bottom: 6px;
}
.callband-number:hover { background-size: 100% 4px; }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.contact-info h2, .form h2 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); margin-bottom: 28px; }
.info-list { margin: 0 0 32px; display: grid; gap: 22px; }
.info-list dt { color: var(--mist); font-size: 0.95rem; margin-bottom: 2px; }
.info-list dd { margin: 0; font-size: 1.35rem; font-weight: 500; line-height: 1.35; }
.info-list a { text-decoration: none; background: linear-gradient(var(--amber), var(--amber)) 0 100% / 0 2px no-repeat; transition: background-size 0.4s var(--ease), color 0.3s; }
.info-list a:hover { background-size: 100% 2px; color: var(--amber); }

.map { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(circle at 30% 30%, var(--navy-lift), var(--navy-deep)); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-load { position: absolute; inset: 0; width: 100%; background: none; border: 0; color: var(--white); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; font-family: var(--body); }
.map-load span { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.9rem; }
.map-load small { color: var(--mist); max-width: 24em; font-size: 0.875rem; line-height: 1.4; }
.map-load:hover span { color: var(--amber); }
.map-link { display: inline-block; margin-top: 14px; color: var(--amber); font-weight: 500; }

/* Modulo */
.form { background: var(--navy-lift); border: 1px solid var(--line); border-radius: 18px; padding: clamp(24px, 4vw, 44px); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.98rem; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"], .form textarea {
	width: 100%; padding: 14px 16px; font: inherit; color: var(--white);
	background: rgba(3, 20, 46, 0.7); border: 1px solid var(--line); border-radius: 10px;
	transition: border-color 0.25s, box-shadow 0.25s;
}
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 178, 61, 0.28); }
.check { display: flex !important; gap: 12px; align-items: flex-start; font-weight: 400 !important; color: var(--mist); font-size: 0.95rem !important; margin: 6px 0 24px !important; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--flame); flex: none; }
.form-note { margin: 14px 0 0; color: var(--mist); font-size: 0.92rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 16px; border-radius: 10px; margin: 0 0 22px; font-weight: 500; }
.notice-ok { background: rgba(34, 181, 124, 0.18); border: 1px solid #22b57c; }
.notice-err { background: rgba(232, 71, 42, 0.18); border: 1px solid var(--ember); }

/* Footer */
.site-footer { background: var(--navy-deep); border-top: 1px solid var(--line); padding: 56px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr; gap: 40px; align-items: start; }
.footer-logo { width: 200px; height: auto; }
.footer-col { display: flex; flex-direction: column; gap: 4px; font-style: normal; color: var(--mist); }
.footer-col strong { color: var(--white); font-weight: 600; margin-bottom: 6px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--mist); font-size: 0.92rem; }
.footer-bottom a { text-decoration: none; }

/* Pulsante chiama (mobile) */
.call-fab {
	display: none; position: fixed; right: 16px; bottom: 16px; z-index: 90;
	align-items: center; gap: 8px; padding: 14px 20px; border-radius: 999px; text-decoration: none;
	font-weight: 600; color: var(--navy-deep);
	background: linear-gradient(100deg, var(--amber), var(--flame) 55%, var(--ember));
	box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6);
}

/* Pagine interne */
.inner { padding-top: calc(var(--header-h) + 64px); min-height: 70vh; }
.entry-title { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 24px; }
.entry-title a { text-decoration: none; }
.entry-title a:hover { color: var(--amber); }
.entry-meta { color: var(--mist); margin-top: -12px; }
.entry { margin-bottom: 56px; }
.entry-content { color: #dbe4f3; }
.entry-content a { color: var(--amber); }
.entry-content h2, .entry-content h3 { margin: 40px 0 14px; }
.entry-content h2 { font-size: 2.2rem; }
.entry-content h3 { font-size: 1.7rem; }
.entry-content img { border-radius: 10px; }
.pagination { display: flex; gap: 12px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ---------- Gioco ---------- */
.game-wrap { max-width: 980px; }
.game { margin-top: 36px; }
.game-hud { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.hud-item { display: flex; flex-direction: column; gap: 2px; min-width: 96px; }
.hud-label { color: var(--mist); font-size: 0.9rem; }
.hud-item strong { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.lives { display: flex; gap: 8px; height: 2.4rem; align-items: center; }
.lives i { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--amber), var(--ember)); transition: transform 0.35s var(--ease), opacity 0.35s, filter 0.35s; }
.lives i.lost { transform: scale(0.55); opacity: 0.25; filter: grayscale(1); }

.game-board {
	position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line);
	background: radial-gradient(700px 260px at 50% 100%, rgba(255, 122, 26, 0.14), transparent 70%), var(--navy-deep);
	touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.game-board svg { display: block; width: 100%; height: auto; }
#gameCar.shake { animation: carShake 0.32s linear; }
@keyframes carShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

.dent { cursor: pointer; outline: none; }
.dent .inner { transform-box: fill-box; transform-origin: center; animation: dentIn 0.28s var(--ease); }
@keyframes dentIn { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dent .ring { fill: none; stroke: var(--amber); stroke-width: 3.5; stroke-linecap: round; transform: rotate(-90deg); transform-box: fill-box; transform-origin: center; }
.dent .ring.urgent { stroke: var(--ember); }
.dent:focus-visible .hit { stroke: var(--amber); stroke-width: 3; }
.dent.fixed { pointer-events: none; }
.dent.fixed .inner { animation: dentFix 0.45s var(--ease) forwards; }
.dent.fixed .core { fill: #ffffff; fill-opacity: 0.9; }
.dent.fixed .ring { stroke: #3ddc97; }
@keyframes dentFix { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.dent.missed { pointer-events: none; }
.dent.missed .inner { animation: dentMiss 0.35s ease-out forwards; }
@keyframes dentMiss { to { transform: scale(0.4); opacity: 0; } }

.pop { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 26px; pointer-events: none; paint-order: stroke; stroke: rgba(3, 20, 46, 0.8); stroke-width: 4px; animation: popUp 0.75s var(--ease) forwards; }
.pop.good { fill: #3ddc97; }
.pop.bad { fill: var(--ember); }
@keyframes popUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-30px); } }

.game-overlay {
	overflow: auto;
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
	gap: 10px; padding: 24px; background: rgba(3, 20, 46, 0.86);
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
	transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.game-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.game-ov-title { margin: 0; font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; }
.game-ov-text { margin: 0 0 12px; max-width: 30em; color: var(--mist); }
.game-ov-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.game-ov-actions [hidden] { display: none; }

@media (max-width: 560px) {
	.game { margin-left: -12px; margin-right: -12px; }
	.game-hud { padding: 0 12px; }
	.game-board { border-radius: 12px; }
	.game-board svg { height: 150px; }
	.game-ov-actions .btn { padding: 12px 18px; font-size: 0.98rem; }
	.game-ov-title { font-size: 1.7rem; }
	.game-hud { gap: 12px 20px; }
	.hud-item { min-width: 0; }
	.hud-item strong { font-size: 2rem; }
	.game-overlay { padding: 14px; gap: 6px; }
	.game-ov-text { font-size: 0.95rem; margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
	#gameCar.shake, .dent .inner, .pop { animation: none !important; }
	.game-overlay { transition: none; }
}

/* ---------- Auto cartoon (parti comuni) ---------- */
.car-wrap { transform-box: fill-box; transform-origin: 50% 100%; }
.tw-spin, .tw-sync, .tw-truck { transform-box: fill-box; transform-origin: center; }
.tw-spin { animation: wheelSpin 0.5s linear infinite; }
@keyframes wheelSpin { to { transform: rotate(360deg); } }
.bob { animation: bob 0.42s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-1.4px); } }


/* Clic sull'auto: clacson */
.car { cursor: pointer; }
.honk-bubble {
	position: absolute; top: -2%; right: 6%; z-index: 2; padding: 8px 16px; border-radius: 18px;
	background: #fff; color: var(--navy-deep); font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.5rem; line-height: 1;
	opacity: 0; transform: scale(0.4) rotate(-6deg); transform-origin: 20% 100%; pointer-events: none;
}
.honk-bubble::after { content: ""; position: absolute; left: 22px; bottom: -9px; border: 9px solid transparent; border-top-color: #fff; border-bottom: 0; }
.honking .honk-bubble { animation: bubble 1.1s var(--ease) forwards; }
.honking .car { animation: carHop 0.55s var(--ease); }
@keyframes bubble { 0% { opacity: 0; transform: scale(0.4) rotate(-6deg); } 18% { opacity: 1; transform: scale(1.08) rotate(-4deg); } 30% { transform: scale(1) rotate(-4deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1) rotate(-4deg) translateY(-8px); } }
@keyframes carHop { 0% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-16px) scale(0.97, 1.05); } 55% { transform: translateY(0) scale(1.04, 0.95); } 100% { transform: translateY(0) scale(1, 1); } }

/* ---------- Scena cartoon: incidente e carro attrezzi ---------- */
.toon-section { padding: clamp(40px, 6vw, 72px) 0 0; background: var(--navy); }
.toon-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.toon-head h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.toon { position: relative; width: 100%; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; background: #051f44; cursor: pointer; }
.toon svg { display: block; width: 100%; height: auto; }

.toon .toonA { transform: translateX(-300px); }
.toon .toonB { transform: translateX(1250px); }
.toon .toonT { transform: translateX(-340px); }
.toon .burst, .toon .part, .toon .dizzy, .toon .smoke, .toon .spark, .toon .fatto, .toon .dmg, .toon .flash { opacity: 0; }
.toon .burst-in, .toon .fatto-in { transform-box: fill-box; transform-origin: center; }
.toon .burst-text { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 46px; fill: #051f44; }
.toon .fatto-text { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 58px; fill: #ffb23d; paint-order: stroke; stroke: #051f44; stroke-width: 7px; stroke-linejoin: round; }
.toon .truck-text { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 17px; fill: #051f44; }
.toon .siren { fill: #ff3b3b; }
.toon .spark, .toon .part, .toon .puff { transform-box: fill-box; transform-origin: center; }
.toon .hook { transform-origin: 108px 168px; }
.toon .orbit { transform-origin: 0 0; }

.toon .cloud.c1 { animation: drift 70s linear infinite; }
.toon .cloud.c2 { animation: drift 95s linear infinite; animation-delay: -40s; }
.toon .cloud.c3 { animation: drift 60s linear infinite; animation-delay: -20s; }
@keyframes drift { from { transform: translateX(-320px); } to { transform: translateX(1400px); } }

.toon.play .toonA { animation: toonA 14s linear infinite; }
.toon.play .toonB { animation: toonB 14s linear infinite; }
.toon.play .toonT { animation: toonT 14s linear infinite; }
.toon.play .tw-sync { animation: toonWheel 14s linear infinite; }
.toon.play .tw-truck { animation: toonTWheel 14s linear infinite; }
.toon.play .dmg { animation: toonDmg 14s linear infinite; }
.toon.play .flash { animation: toonFlash 14s linear infinite; }
.toon.play .burst { animation: toonShow 14s linear infinite; }
.toon.play .burst-in { animation: toonBurst 14s linear infinite; }
.toon.play .bumper { animation: toonBumper 14s linear infinite; }
.toon.play .hubcap { animation: toonHubcap 14s linear infinite; }
.toon.play .dizzy { animation: toonDizzy 14s linear infinite; }
.toon.play .orbit { animation: orbit 1.1s linear infinite; }
.toon.play .smoke { animation: toonSmoke 14s linear infinite; }
.toon.play .puff { animation: puff 1.5s ease-out infinite; }
.toon.play .puff.p2 { animation-delay: -0.5s; }
.toon.play .puff.p3 { animation-delay: -1s; }
.toon.play .spark { animation: toonSpark 14s linear infinite; }
.toon.play .spark.s2 { animation-delay: 0.08s; }
.toon.play .spark.s3 { animation-delay: 0.16s; }
.toon.play .spark.s4 { animation-delay: 0.24s; }
.toon.play .spark.s5 { animation-delay: 0.32s; }
.toon.play .fatto { animation: toonShowFatto 14s linear infinite; }
.toon.play .fatto-in { animation: toonFatto 14s linear infinite; }
.toon.play .siren { animation: siren 0.5s steps(1) infinite; }
.toon.play .hook { animation: hook 1.2s ease-in-out infinite alternate; }

@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes puff { 0% { transform: translateY(0) scale(0.6); opacity: 0.9; } 100% { transform: translateY(-62px) scale(1.7); opacity: 0; } }
@keyframes siren { 0% { fill: #ff3b3b; } 50% { fill: #3b8bff; } }
@keyframes hook { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }

@keyframes toonA {
	0% { transform: translateX(-300px) rotate(0deg) scale(1, 1); animation-timing-function: cubic-bezier(.4, 0, .9, .5); }
	29% { transform: translateX(332px) rotate(0deg) scale(1, 1); animation-timing-function: linear; }
	30% { transform: translateX(332px) rotate(-2deg) scale(.9, 1.06); }
	32% { transform: translateX(316px) rotate(-4deg) scale(1, 1); }
	35% { transform: translateX(326px) rotate(-3deg) scale(1, 1); }
	64% { transform: translateX(326px) rotate(-3deg) scale(1, 1); }
	66% { transform: translateX(326px) rotate(0deg) scale(1.06, .94); }
	68% { transform: translateX(326px) rotate(0deg) scale(1, 1); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
	92%, 100% { transform: translateX(1300px) rotate(0deg) scale(1, 1); }
}
@keyframes toonB {
	0% { transform: translateX(1250px) rotate(0deg) scale(1, 1); animation-timing-function: cubic-bezier(.4, 0, .9, .5); }
	29% { transform: translateX(602px) rotate(0deg) scale(1, 1); animation-timing-function: linear; }
	30% { transform: translateX(602px) rotate(+2deg) scale(.9, 1.06); }
	32% { transform: translateX(618px) rotate(+4deg) scale(1, 1); }
	35% { transform: translateX(610px) rotate(+3deg) scale(1, 1); }
	64% { transform: translateX(610px) rotate(+3deg) scale(1, 1); }
	66% { transform: translateX(610px) rotate(0deg) scale(1.06, .94); }
	68% { transform: translateX(610px) rotate(0deg) scale(1, 1); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
	92%, 100% { transform: translateX(-320px) rotate(0deg) scale(1, 1); }
}
@keyframes toonT {
	0%, 38% { transform: translateX(-340px); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
	48%, 76% { transform: translateX(30px); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
	96%, 100% { transform: translateX(1300px); }
}
@keyframes toonWheel {
	0% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.4, 0, .9, .5); }
	29%, 68% { transform: rotate(2100deg); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
	92%, 100% { transform: rotate(5300deg); }
}
@keyframes toonTWheel {
	0%, 38% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
	48%, 76% { transform: rotate(1180deg); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
	96%, 100% { transform: rotate(5400deg); }
}
@keyframes toonDmg { 0%, 29.9% { opacity: 0; } 30%, 65% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes toonFlash { 0%, 65.5% { opacity: 0; } 66.5% { opacity: 0.95; } 70%, 100% { opacity: 0; } }
@keyframes toonShow { 0%, 29.9% { opacity: 0; } 30%, 41% { opacity: 1; } 43%, 100% { opacity: 0; } }
@keyframes toonBurst {
	0%, 29.9% { transform: scale(0.2) rotate(-20deg); }
	31% { transform: scale(1.3) rotate(4deg); }
	33%, 41% { transform: scale(1) rotate(0deg); }
	43%, 100% { transform: scale(1.12) rotate(2deg); }
}
@keyframes toonBumper {
	0%, 29.9% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
	30% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
	34% { transform: translate(120px, -140px) rotate(280deg); }
	38% { transform: translate(210px, -50px) rotate(540deg); }
	40% { transform: translate(250px, 52px) rotate(700deg); }
	41%, 62% { opacity: 1; transform: translate(262px, 50px) rotate(720deg); }
	65%, 100% { opacity: 0; transform: translate(262px, 50px) rotate(720deg); }
}
@keyframes toonHubcap {
	0%, 29.9% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
	30% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
	34% { transform: translate(150px, -90px) rotate(300deg); }
	38% { transform: translate(250px, 36px) rotate(620deg); }
	46%, 62% { opacity: 1; transform: translate(440px, 40px) rotate(1500deg); }
	65%, 100% { opacity: 0; transform: translate(440px, 40px) rotate(1500deg); }
}
@keyframes toonDizzy { 0%, 31.9% { opacity: 0; } 33%, 60% { opacity: 1; } 64%, 100% { opacity: 0; } }
@keyframes toonSmoke { 0%, 31.9% { opacity: 0; } 33%, 56% { opacity: 1; } 62%, 100% { opacity: 0; } }
@keyframes toonSpark {
	0%, 65.5% { opacity: 0; transform: scale(0) rotate(0deg); }
	67% { opacity: 1; transform: scale(1.4) rotate(45deg); }
	70%, 100% { opacity: 0; transform: scale(0) rotate(90deg); }
}
@keyframes toonShowFatto { 0%, 66% { opacity: 0; } 67%, 80% { opacity: 1; } 84%, 100% { opacity: 0; } }
@keyframes toonFatto {
	0%, 66% { transform: scale(0.4) rotate(-6deg); }
	68% { transform: scale(1.2) rotate(-4deg); }
	70%, 80% { transform: scale(1) rotate(-4deg); }
	84%, 100% { transform: scale(1) rotate(-4deg) translateY(-10px); }
}

@media (max-width: 860px) {
	.toon svg { height: 200px; }
	.honk-bubble { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
	.toon .toonA { transform: translateX(240px) !important; }
	.toon .toonB { transform: translateX(740px) !important; }
	.toon .toonT { display: none; }
	.tw-spin, .bob, .cloud { animation: none !important; }
}

/* ---------- Assicurazioni convenzionate ---------- */
.ins { margin-top: 44px; }
.ins-road { height: 70px; margin-bottom: 6px; overflow: hidden; }
.ins-road svg { display: block; width: 100%; height: 100%; }
.ins-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ins-card {
	display: flex; flex-direction: column; gap: 16px;
	padding: 18px; border-radius: 16px; background: var(--navy-lift);
	border: 1px solid var(--line); color: var(--mist);
}
.ins-plate { display: flex; align-items: center; justify-content: center; height: 92px; padding: 12px 18px; border-radius: 12px; background: #fff; }
.ins-logo { display: block; max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.ins-name { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--navy-deep); }
.ins-meta { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.shield { flex: none; width: 30px; height: 34px; color: var(--mist); overflow: visible; }
.shield-fill { opacity: 0; }
.tick { stroke-dasharray: 50; stroke-dashoffset: 0; }
.ins-card .shield-fill { opacity: 1; }          /* senza animazione: scudi pieni e spunta visibile */
.ins-car { animation: none; }

.ins.play .ins-car { animation: insCar 10s linear infinite; }
.ins.play .ins-card { animation: insLit 10s linear infinite backwards; animation-delay: calc(1.5s + var(--i) * 2s); }
.ins.play .shield-fill { animation: insFill 10s linear infinite backwards; animation-delay: calc(1.5s + var(--i) * 2s); }
.ins.play .shield { animation: insPop 10s linear infinite backwards; animation-delay: calc(1.5s + var(--i) * 2s); transform-box: fill-box; transform-origin: center; }
.ins.play .tick { animation: insTick 10s linear infinite backwards; animation-delay: calc(1.5s + var(--i) * 2s); }
.ins.play .ins-card .shield-fill, .ins.play .ins-card .tick, .ins.play .ins-card .shield { animation-delay: inherit; }

@keyframes insCar { from { transform: translateX(-198px); } to { transform: translateX(1302px); } }
@keyframes insLit {
	0% { transform: translateY(0); border-color: var(--line); box-shadow: none; }
	3%, 17% { transform: translateY(-8px); border-color: var(--amber); box-shadow: 0 18px 40px -16px rgba(255, 122, 26, 0.55); }
	24%, 100% { transform: translateY(0); border-color: var(--line); box-shadow: none; }
}
@keyframes insFill { 0% { opacity: 0; } 3%, 17% { opacity: 1; } 24%, 100% { opacity: 0; } }
@keyframes insPop { 0% { transform: scale(1); } 3% { transform: scale(1.3) rotate(-6deg); } 6%, 100% { transform: scale(1) rotate(0deg); } }
@keyframes insTick { 0% { stroke-dashoffset: 50; } 6%, 17% { stroke-dashoffset: 0; } 24%, 100% { stroke-dashoffset: 50; } }

@media (max-width: 860px) {
	.ins-list { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.ins-plate { height: 78px; padding: 10px 12px; }
	.ins-logo { max-height: 52px; }
	.ins-name { font-size: 1.8rem; }
	.ins-card { padding: 12px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
	.hero-grid { grid-template-columns: 1fr; gap: 20px; }
	.hero { align-items: flex-start; }
	.services-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
	.services-grid .section-head { position: static; }
	.steps { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
	.steps::before, .steps::after { display: none; }
	.footer-inner { grid-template-columns: 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
	:root { --header-h: 72px; }
	.brand-logo { height: 54px; }
	.nav-toggle { display: block; }
	.main-nav {
		position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: flex-start; gap: 24px;
		padding: 28px 24px 36px; background: var(--navy-deep); border-bottom: 1px solid var(--line);
		transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0.3s;
	}
	.main-nav.open { opacity: 1; visibility: visible; transform: none; }
	.main-nav ul { flex-direction: column; gap: 14px; }
	.main-nav ul a { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2rem; }
	body.nav-open .site-header { background: var(--navy-deep); }
	.call-fab { display: inline-flex; }
}

@media (max-width: 560px) {
	.swatches { gap: 10px; }
	.swatch { width: 36px; height: 36px; }
	.hero-title .line { white-space: normal; }
	.field-row { grid-template-columns: 1fr; gap: 0; }
	.steps { grid-template-columns: 1fr; }
	.footer-inner { grid-template-columns: 1fr; }
	.hero-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js .reveal, .js .hero-lead, .js .hero-cta, .js .car { opacity: 1 !important; transform: none !important; }
	.js .hero-title .line > span { transform: none !important; }
	.js .preloader { display: none; }
	.steps::after { transform: scaleX(1); }
}
