:root {
  --bg: #ffffff;
  --surface: #f3f7fd;
  --surface-2: #e8f0fc;
  --text: #0f1b2d;
  --body: #3a4556;
  --muted: #5d6878;
  --accent: #015fdd;
  --accent-dark: #0049ab;
  --accent-light: #3d86ea;
  --accent-grad: linear-gradient(135deg, #2f7ff0 0%, #015fdd 55%, #0049ab 100%);
  --line: rgba(1, 95, 221, 0.16);
  --shadow: 0 18px 50px rgba(15, 27, 45, 0.08);
  --radius: 2px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.05;
}

.accent-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.logo img {
  display: block;
  height: 56px;
  width: auto;
}

.logo {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1;
}

.logo .sub {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
}

.nav-links {
  display: flex;
  gap: 40px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--accent-dark); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 10px 30px rgba(1, 95, 221, 0.25);
}

.btn-primary:hover { box-shadow: 0 14px 40px rgba(1, 95, 221, 0.38); }

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent-dark);
}

.btn-outline:hover { background: rgba(1, 95, 221, 0.07); }

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 100px 0 90px;
  background:
    radial-gradient(ellipse at 85% 25%, rgba(1, 95, 221, 0.10), transparent 55%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 6px;
  font-size: 0.75rem;
  margin-bottom: 26px;
}

.eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(3.2rem, 7vw, 6rem);
  font-weight: 400;
  margin-bottom: 28px;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
}

.hero p.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 500px;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Immagine auto (mostra la sagoma placeholder finché non c'è l'<img>) */
.car-frame {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
}

.car-frame::before,
.car-frame::after {
  content: "";
  position: absolute;
  width: 46px;
  height: 46px;
  border-color: var(--accent);
  border-style: solid;
}

.car-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.car-frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.car-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(160deg, var(--surface-2), var(--surface));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
}

.car-placeholder svg {
  width: 60%;
  max-width: 340px;
  color: rgba(1, 95, 221, 0.3);
}

.car-placeholder small {
  font-size: 0.7rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
}

.car-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Sezioni ---------- */
section { padding: 110px 0; }

.section-title {
  text-align: center;
  margin-bottom: 70px;
}

.section-title .eyebrow { justify-content: center; margin-bottom: 18px; }
.section-title .eyebrow::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.section-title h2 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
}

.section-title p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 16px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}

.feature {
  padding: 50px 40px;
  text-align: center;
  transition: background 0.3s ease;
}

.feature + .feature { border-left: 1px solid var(--line); }
.feature:hover { background: var(--surface); }

.feature .num {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 22px;
}

.feature .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 26px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  display: grid;
  place-items: center;
}

.feature .icon svg { width: 26px; height: 26px; }

.feature h3 {
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Contatti ---------- */
.contact {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.contact-card {
  background: var(--bg);
  padding: 48px 28px;
  text-align: center;
  border: 1px solid var(--line);
  transition: border-color 0.3s ease, transform 0.3s ease;
  display: block;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.contact-card .icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.contact-card .icon svg { width: 28px; height: 28px; }

.contact-card .label {
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
}

.contact-card .value {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  font-weight: 500;
  word-break: break-word;
}

.contact-card .value.small { font-size: 1.45rem; }

/* ---------- CTA finale ---------- */
.cta {
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(1, 95, 221, 0.09), transparent 65%),
    var(--bg);
}

.cta h2 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  margin-bottom: 18px;
}

.cta h2 em { font-style: italic; }

.cta p {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 44px;
}

.cta .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

footer strong { color: var(--accent); font-weight: 500; }

/* ---------- Pulsante WhatsApp flottante ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366; /* verde ufficiale WhatsApp */
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  z-index: 60;
  transition: transform 0.2s ease;
}

.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .features, .contact-grid { grid-template-columns: 1fr; }
  .feature + .feature { border-left: 0; border-top: 1px solid var(--line); }
  .nav-links { display: none; }
  .hero { padding-top: 56px; }
  section { padding: 76px 0; }
}

@media (max-width: 480px) {
  .nav .btn { padding: 12px 16px; letter-spacing: 2px; }
  .logo { font-size: 1.6rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- Link footer ---------- */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a,
.footer-links button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links button:hover { color: var(--accent-dark); }

.footer-bottom {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  width: 100%;
}

/* ---------- Pagine legali ---------- */
.legal-hero {
  padding: 90px 0 50px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(1, 95, 221, 0.09), transparent 65%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.legal-hero .eyebrow { justify-content: center; }
.legal-hero .eyebrow::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.legal-hero h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); }

.legal-hero p {
  color: var(--muted);
  margin-top: 14px;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.legal {
  padding: 70px 0 110px;
}

.legal .container { max-width: 820px; }

.legal h2 {
  font-size: 2.1rem;
  margin: 56px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.legal h2:first-child { margin-top: 0; }

.legal h3 {
  font-size: 1.5rem;
  margin: 30px 0 10px;
  color: var(--accent-dark);
}

.legal p,
.legal li {
  color: var(--body);
  margin-bottom: 14px;
}

.legal ul { padding-left: 22px; margin-bottom: 14px; }
.legal li::marker { color: var(--accent); }

.legal a {
  color: var(--accent-dark);
  border-bottom: 1px solid var(--line);
}

.legal a:hover { border-color: var(--accent); }

.legal strong { font-weight: 500; color: var(--text); }

.legal-box {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 28px;
  margin: 20px 0;
}

.legal-box p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 20px 0; }

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 560px;
}

.legal th,
.legal td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--body);
}

.legal th {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.legal .btn { border-bottom: 1px solid var(--accent); margin-top: 6px; cursor: pointer; background: none; font-family: inherit; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 30px);
  width: calc(100% - 32px);
  max-width: 1000px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(15, 27, 45, 0.18);
  padding: 30px 34px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

.cookie-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.cookie-banner::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 46px;
  height: 46px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.cookie-inner {
  display: flex;
  align-items: center;
  gap: 34px;
}

.cookie-text { flex: 1; padding-right: 20px; }

.cookie-text h2 {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.cookie-text p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cookie-text a {
  color: var(--accent-dark);
  border-bottom: 1px solid var(--line);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-actions .btn,
.cookie-modal-actions .btn {
  padding: 13px 22px;
  font-size: 0.7rem;
  cursor: pointer;
  font-family: inherit;
  background-color: transparent;
}

.cookie-actions .btn-primary,
.cookie-modal-actions .btn-primary { background: var(--accent-grad); border: 0; }

.btn-link {
  color: var(--muted);
  border: 1px solid rgba(15, 27, 45, 0.14);
}

.btn-link:hover { color: var(--accent-dark); border-color: var(--line); }

.cookie-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.cookie-close:hover { color: var(--accent-dark); border-color: var(--line); }
.cookie-close svg { width: 18px; height: 18px; }

/* ---------- Modale preferenze ---------- */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 27, 45, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.cookie-modal.is-visible { opacity: 1; visibility: visible; }

.cookie-dialog {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 40px 36px 32px;
}

.cookie-dialog h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.cookie-dialog > p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 26px;
}

.cookie-dialog > p a { color: var(--accent-dark); border-bottom: 1px solid var(--line); }

.cookie-cat {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.cookie-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cookie-cat h3 {
  font-size: 1.45rem;
}

.cookie-cat p {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 6px;
}

.cookie-always {
  font-size: 0.66rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.switch {
  position: relative;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.25s ease, background 0.25s ease;
}

.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(24px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

@media (max-width: 900px) {
  .cookie-inner { flex-direction: column; align-items: stretch; gap: 22px; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

@media (max-width: 480px) {
  .cookie-banner { padding: 26px 20px 20px; bottom: 12px; }
  .cookie-actions { flex-direction: column; }
  .cookie-dialog { padding: 36px 22px 24px; }
  .cookie-modal-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- Tema bianco e blu: rifiniture ---------- */
.contact-card,
.cookie-dialog { box-shadow: var(--shadow); }

.contact-card { background: #fff; }

.contact-card:hover { box-shadow: 0 22px 60px rgba(1, 95, 221, 0.14); }

.feature .icon,
.contact-card .icon { background: rgba(1, 95, 221, 0.06); }

.legal-box { background: var(--surface); }

.hero p.lead,
.section-title p,
.feature p { color: var(--body); }

/* CTA finale su fondo blu */
.cta {
  background: var(--accent-grad);
  color: #fff;
}

.cta .eyebrow,
.cta h2 em.accent-text {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: none;
}

.cta p { color: rgba(255, 255, 255, 0.85); }

.cta .btn-primary {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.cta .btn-outline {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.cta .btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

footer { background: var(--surface); }

@media (max-width: 480px) {
  .logo img { height: 42px; }
}
