/* EYA Sardinia — sito 2026
   Idea di layout: "livrea". Il numero di pronto intervento è dipinto in grande come
   sulla cisterna dei mezzi; blu cobalto e giallo alta visibilità vengono dai camion.
   Tutto allineato a sinistra, una sola famiglia tipografica (Archivo variabile):
   stretta e pesante per i titoli, normale per il testo. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("archivo-var.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink: #0a1e3f;
  --cobalt: #1552c8;
  --cobalt-deep: #0d3a93;
  --hivis: #e6ef3a;
  --paper: #f3f6fb;
  --white: #ffffff;
  --line: #d3dceb;
  --muted: #47587a;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt); text-underline-offset: 0.18em; }
a:hover { color: var(--cobalt-deep); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .on-dark:focus-visible { outline-color: var(--hivis); }

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.25rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.625rem); }
h3 { font-size: 1.375rem; font-stretch: 80%; font-weight: 700; line-height: 1.2; }
p { margin: 0; max-width: 68ch; }
ul, ol { margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--hivis); color: var(--ink); padding: 10px 16px; z-index: 50; font-weight: 700; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Testata ---------- */
.site-head { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 56px; height: 62px; object-fit: contain; }
.brand-name { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 1.5rem; line-height: 1; }
.brand-sub { display: block; font-family: var(--body); font-stretch: 100%; font-weight: 500; font-size: 0.75rem; color: var(--muted); margin-top: 3px; }
.nav ul { display: flex; gap: 4px 22px; list-style: none; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; padding: 6px 0; display: inline-block; border-bottom: 3px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--cobalt); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-stretch: 78%; font-weight: 800; font-size: 1.125rem; line-height: 1;
  padding: 14px 20px; border-radius: var(--radius); text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-call { background: var(--hivis); color: var(--ink); border-color: var(--ink); }
.btn-call:hover { background: var(--ink); color: var(--hivis); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.on-dark .btn-line { color: var(--white); border-color: var(--white); }
.on-dark .btn-line:hover { background: var(--white); color: var(--cobalt-deep); }
.on-dark .btn-call { border-color: var(--hivis); }
.on-dark .btn-call:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.site-head .btn { padding: 11px 16px; font-size: 1.0625rem; }

/* ---------- Hero ---------- */
.hero { background: var(--cobalt); color: var(--white); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding-block: clamp(36px, 7vw, 80px); }
.hero h1 { color: var(--white); }
.hero p { color: #dfe8fb; font-size: 1.1875rem; margin-top: 18px; max-width: 54ch; }
.plate { display: block; margin-top: 28px; text-decoration: none; color: var(--hivis); }
.plate-label { display: block; font-family: var(--display); font-stretch: 80%; font-weight: 700; font-size: 1.0625rem; color: var(--white); }
.plate-number {
  display: block; font-family: var(--display); font-stretch: 62%; font-weight: 900;
  font-size: clamp(3.5rem, 15.5vw, 7.5rem); line-height: 0.92; letter-spacing: 0.005em; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.plate:hover .plate-number { color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-photo { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--cobalt-deep); aspect-ratio: 16 / 11; border: 3px solid var(--white); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo:not(:has(img)) { display: grid; place-items: center; border-style: dashed; border-color: #6f97e6; }
.hero-photo:not(:has(img))::after { content: "24h"; font-family: var(--display); font-stretch: 62%; font-weight: 900; font-size: clamp(5rem, 14vw, 9rem); line-height: 1; color: #2d68da; }

/* banda a strisce: richiama i pannelli retroriflettenti dei mezzi */
.stripes { height: 14px; background: repeating-linear-gradient(-45deg, var(--hivis) 0 18px, var(--ink) 18px 36px); }

.facts { background: var(--ink); color: var(--white); }
.facts ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.facts li { padding: 20px 20px 20px 0; }
.facts li + li { padding-left: 20px; border-left: 1px solid #2a4170; }
.facts strong { display: block; font-family: var(--display); font-stretch: 76%; font-weight: 800; font-size: 1.375rem; line-height: 1.15; color: var(--hivis); }
.facts span { font-size: 0.9375rem; color: #c9d5ec; }

/* ---------- Sezioni ---------- */
.band { padding-block: clamp(44px, 7vw, 84px); }
.band-paper { background: var(--paper); }
.band-ink { background: var(--ink); color: var(--white); }
.band-ink h2 { color: var(--white); }
.band-ink p { color: #c9d5ec; }
.band-head { display: grid; gap: 14px; margin-bottom: clamp(24px, 4vw, 40px); }
.lead { font-size: 1.1875rem; color: var(--muted); }
.band-ink .lead { color: #c9d5ec; }
.stack > * + * { margin-top: 1em; }
.stack > h2 { margin-top: 1.6em; }
.stack > h2:first-child, .stack > h3:first-child { margin-top: 0; }
.stack > h3 { margin-top: 1.5em; }
.stack ul, .stack ol { padding-left: 1.2em; max-width: 66ch; }
.stack li + li { margin-top: 0.4em; }

/* "Che problema hai?" */
.problems { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.problems a { display: block; height: 100%; padding: 18px 18px 20px; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.problems a:hover { background: var(--hivis); }
.problems strong { display: block; font-family: var(--display); font-stretch: 78%; font-weight: 800; font-size: 1.3125rem; line-height: 1.15; }
.problems span { display: block; margin-top: 6px; font-size: 0.9688rem; color: var(--muted); }
.problems a:hover span { color: var(--ink); }

/* Elenco servizi: una tabella-indice, non una griglia di card */
.index { list-style: none; border-top: 2px solid var(--ink); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 5vw, 56px); }
.index li { border-bottom: 1px solid var(--line); }
.index a { display: grid; gap: 4px; padding: 18px 0; text-decoration: none; color: var(--ink); }
.index a strong { font-family: var(--display); font-stretch: 78%; font-weight: 800; font-size: 1.4375rem; line-height: 1.15; }
.index a span { color: var(--muted); font-size: 0.9688rem; }
.index a:hover strong { color: var(--cobalt); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.16em; }

/* Passi di un intervento (sequenza reale) */
.steps { list-style: none; counter-reset: passo; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.steps li { counter-increment: passo; border-top: 4px solid var(--hivis); padding-top: 14px; }
.steps li::before { content: counter(passo); display: block; font-family: var(--display); font-stretch: 62%; font-weight: 900; font-size: 3rem; line-height: 1; color: var(--hivis); }
.steps h3 { margin-top: 8px; color: var(--white); }
.steps p { margin-top: 6px; font-size: 0.9688rem; }
.steps-light li { border-top-color: var(--cobalt); }
.steps-light li::before { color: var(--cobalt); }
.steps-light h3 { color: var(--ink); }
.steps-light p { color: var(--muted); }

/* Foto dei mezzi */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--paper); }
.gallery figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 6px; }
.band-gallery:not(:has(img)) { display: none; }

/* Zone */
.zones { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 56px); border-top: 2px solid var(--ink); }
.zones li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.zones h3 a { color: var(--ink); text-decoration: none; }
.zones h3 a:hover { color: var(--cobalt); text-decoration: underline; }
.zones p { color: var(--muted); font-size: 0.9688rem; margin-top: 4px; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 56px); }
.split > div { border-left: 4px solid var(--cobalt); padding-left: 20px; }
.split p { margin-top: 10px; color: var(--muted); }
.split a.more { display: inline-block; margin-top: 12px; font-weight: 700; }

/* FAQ */
.faq { border-top: 2px solid var(--ink); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 700; font-size: 1.125rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-family: var(--display); font-weight: 800; font-size: 1.75rem; color: var(--cobalt); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 18px; color: var(--muted); }

/* Chiusura con chiamata */
.callout { background: var(--cobalt); color: var(--white); }
.callout .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding-block: clamp(32px, 5vw, 56px); }
.callout h2 { color: var(--white); }
.callout p { color: #dfe8fb; margin-top: 8px; }
.callout .actions { margin-top: 0; }

/* ---------- Pagine interne ---------- */
.page-head { background: var(--cobalt); color: var(--white); }
.page-head .wrap { padding-block: clamp(28px, 5vw, 56px); }
.page-head h1 { color: var(--white); font-size: clamp(2rem, 5.2vw, 3.375rem); max-width: 22ch; }
.page-head .lead { color: #dfe8fb; margin-top: 16px; max-width: 62ch; }
.crumbs { font-size: 0.875rem; margin-bottom: 16px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #9db8ee; }
.crumbs a { color: #dfe8fb; }
.crumbs [aria-current] { color: var(--white); font-weight: 600; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.aside { position: sticky; top: 96px; border: 2px solid var(--ink); border-radius: var(--radius); padding: 20px; background: var(--white); }
.aside h2 { font-size: 1.5rem; }
.aside p { margin-top: 8px; font-size: 0.9688rem; color: var(--muted); }
.aside .tel { display: block; margin-top: 12px; font-family: var(--display); font-stretch: 64%; font-weight: 900; font-size: 2.625rem; line-height: 1; color: var(--cobalt); text-decoration: none; white-space: nowrap; }
.aside .btn { width: 100%; margin-top: 12px; }
.aside ul { list-style: none; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.aside li + li { margin-top: 6px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 !important; max-width: none !important; }
.chips li { margin: 0 !important; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.9375rem; }
.linklist { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; max-width: none !important; }
.linklist li { margin: 0 !important; }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); align-items: start; }
.dl { display: grid; gap: 14px; margin: 0; }
.dl div { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.dl dt { font-size: 0.875rem; color: var(--muted); font-weight: 600; }
.dl dd { margin: 2px 0 0; font-size: 1.125rem; font-weight: 600; }
.form { display: grid; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.9688rem; }
.form input, .form select, .form textarea { font: inherit; padding: 11px 12px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--white); color: var(--ink); width: 100%; }
.form textarea { min-height: 110px; resize: vertical; }
.form .note { font-size: 0.875rem; color: var(--muted); }
.form-out { font-size: 0.9375rem; font-weight: 600; }

/* ---------- Piede ---------- */
.site-foot { background: var(--ink); color: #c9d5ec; font-size: 0.9375rem; padding-bottom: 84px; }
.site-foot .wrap { padding-block: 44px 28px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
.site-foot h2 { font-size: 1.125rem; font-stretch: 82%; color: var(--white); margin-bottom: 10px; }
.site-foot ul { list-style: none; display: grid; gap: 6px; }
.site-foot a { color: #c9d5ec; }
.site-foot a:hover { color: var(--hivis); }
.site-foot address { font-style: normal; display: grid; gap: 4px; }
.foot-name { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 1.5rem; color: var(--white); }
.legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid #2a4170; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.8438rem; color: #9fb0d0; }
.legal button { background: none; border: 0; padding: 0; font: inherit; color: #c9d5ec; text-decoration: underline; cursor: pointer; }

/* Barra chiamata fissa su telefono */
.callbar { display: none; }

/* Consenso cookie */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 560px; margin-inline: auto; background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px; box-shadow: 0 10px 30px rgba(10, 30, 63, 0.25); font-size: 0.9375rem; }
.consent p { max-width: none; }
.consent .actions { margin-top: 12px; }
.consent .btn { font-size: 1rem; padding: 10px 16px; }

@media (max-width: 900px) {
  .hero .wrap, .cols, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .problems, .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-head .btn { display: none; }
  .site-head { position: static; }
  .callbar { display: grid; grid-template-columns: 1fr auto; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--ink); }
  .callbar .btn { padding: 13px 14px; font-size: 1.125rem; }
  .callbar .btn-line { color: var(--white); border-color: var(--white); }
  .consent { bottom: 72px; left: 8px; right: 8px; padding: 10px 12px; font-size: 0.8438rem; line-height: 1.4; }
  .consent .actions { margin-top: 8px; gap: 8px; }
  .consent .btn { padding: 8px 14px; font-size: 0.9375rem; }
  .hero .actions { display: none; } /* su telefono gli stessi pulsanti sono nella barra fissa */
}
@media (max-width: 600px) {
  .index, .zones, .split, .linklist, .facts ul { grid-template-columns: minmax(0, 1fr); }
  .facts li, .facts li + li { padding: 14px 0; border-left: 0; }
  .facts li + li { border-top: 1px solid #2a4170; }
  .problems, .steps, .gallery, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .nav ul { gap: 2px 18px; }
  .brand-sub { display: none; }
  .crumbs li[aria-current] { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-head, .callbar, .consent, .callout { display: none; } }
