*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { text-underline-offset: 0.2em; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 9;
  padding: .6rem 1rem;
}
.skip:focus { left: 1rem; }






.site-header { position: sticky; top: 0; z-index: 5; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 52px; height: 52px; }
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.brand-name em { display: block; font-size: .68rem; font-style: normal; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.nav { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .93rem; }

.hero { position: relative; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-copy { position: relative; }
.eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.06; letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 3.2vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }
.lede { max-width: 60ch; }
.cta-row { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; margin-top: 1.4rem; }
.cta { display: inline-block; text-decoration: none; font-weight: 700; padding: .85rem 1.3rem; border-radius: 3px; }
.ghost { text-decoration: none; font-weight: 600; }

.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section h2 { max-width: 24ch; }
.two-col { display: grid; gap: 1.25rem 3rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.mt { margin-top: 2.5rem; }
.note { font-size: .85rem; max-width: 70ch; }

.sede img { aspect-ratio: 3 / 2; object-fit: cover; }
.sede h3 span { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; opacity: .75; }
.sede p, .sede a { display: block; }
.sede a { font-size: .9rem; font-weight: 600; margin-top: .5rem; }

.logos-band { overflow: hidden; }
.logos { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.logos li { display: flex; align-items: center; justify-content: center; flex: 0 1 auto; }
/* Altezza fissa (non max-height) uguale per tutti i loghi, quadrati o
   rettangolari che siano: nessun override per singolo logo da mantenere
   quando se ne aggiungono di nuovi. */
.logos img { height: 72px; width: auto; max-width: 100%; }

.ldv { display: grid; gap: .55rem; max-width: 420px; }
.ldv input { padding: .8rem .9rem; border-radius: 3px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; }
.ldv button { padding: .8rem 1.2rem; border: 0; border-radius: 3px; font: inherit; font-weight: 700; cursor: pointer; }
.form-error { font-size: .88rem; min-height: 1.2em; }
.contatti-list { display: grid; gap: .5rem; }
.k { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.legal { padding-block: 2rem; font-size: .85rem; }
.legal-row { display: flex; gap: 1.5rem; justify-content: space-between; flex-wrap: wrap; }


:focus-visible { outline: 3px solid #e01122; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.table-scroll { overflow-x: auto; }
table.fuel { border-collapse: collapse; width: 100%; max-width: 640px; font-variant-numeric: tabular-nums; }
table.fuel th, table.fuel td { padding: .55rem .8rem; text-align: left; }
table.fuel th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
table.fuel td:last-child, table.fuel th:last-child { text-align: right; }

.section h2.one-line { max-width: none; white-space: nowrap; }
@media (max-width: 46rem) { .section h2.one-line { white-space: normal; } }

body {
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  color: #e9e9f2; background: #0b0b22; line-height: 1.6;
}
h1, h2, h3 { color: #fff; }
a { color: #ffd7dd; }
a:hover { color: #fff; }
.eyebrow { color: #ff5566; margin-bottom: .6rem; }
h2 { margin-bottom: 1.2rem; }
section p + p { margin-top: 1rem; }
.note { color: #9b9ab5; margin-top: 1.25rem; }

.site-header { background: rgba(11,11,34,.82); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,.09); }
.head-row { padding-block: .7rem; }
.brand img { background: #fff; border-radius: 8px; padding: 2px; }
.nav a { text-decoration: none; opacity: .85; }
.nav a:hover { opacity: 1; }

.hero { padding-block: clamp(5rem, 13vw, 10rem); min-height: 72vh; display: grid; align-items: end; }
.hero-media {
  background:
    linear-gradient(180deg, rgba(11,11,34,.55) 0%, rgba(11,11,34,.85) 60%, #0b0b22 100%),
    url(img/sede-olevano-hero.webp) center 45%/cover no-repeat;
}
.hero-copy > * + * { margin-top: 1.2rem; }
.lede { font-size: 1.15rem; color: #c8c8dc; }

.cta { background: #e01122; color: #fff; }
.cta:hover { background: #fff; color: #11104d; }
.ghost { color: #fff; border-bottom: 2px solid #ff5566; }

.section.alt { background: #101029; }
.grid article { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); padding: 1.6rem; }
.grid h3 { margin-bottom: .55rem; }
.grid h3::before { content: ""; display: block; width: 30px; height: 4px; background: #e01122; margin-bottom: .9rem; }

.sede { background: #12122c; border: 1px solid rgba(255,255,255,.1); overflow: hidden; padding-bottom: 1.3rem; }
.sede img { filter: saturate(.95); }
.sede h3 { padding: 1.15rem 1.25rem .4rem; }
.sede p, .sede a { padding-inline: 1.25rem; }

/* Bianco solo nei due rettangoli dei loghi: la sezione resta al buio come il
   resto della pagina, il nastro è un pannello bianco unico, con i filetti di C
   fra le celle e nessun riquadro aggiuntivo. I tre loghi che arrivavano su
   bianco sono scavati a trasparenza, altrimenti non avrebbero bordo né cucitura. */
.logos-band { background: #fff; border: 1px solid #e2e2ea; }
.logos { background: #fff; gap: 0; }
.logos li { flex: 0 0 auto; padding: 1.4rem; border-right: 1px solid #ececf1; }
.logos li:last-child { border-right: 0; }
.logos img { opacity: 1; }
.logos a { display: flex; text-decoration: none; color: inherit; }
.logos a img { transition: opacity .18s ease; }
.logos a:hover img, .logos a:focus-visible img { opacity: .68; }
/* Nastro animato: il JS clona la sequenza e imposta --marquee-shift/-duration,
   poi passa da .prep (misurazione, nascosto) a .run (animato). Senza JS, o con
   prefers-reduced-motion, si resta sulla griglia con wrap qui sotto. */
.logos.prep, .logos.run { flex-wrap: nowrap; width: max-content; }
.logos.prep { visibility: hidden; }
.logos.prep li, .logos.run li { flex: 0 0 auto; min-width: clamp(193px, 24vw, 257px); }
.logos.run { animation: logos-scroll var(--marquee-duration, 40s) linear infinite; }
.logos.run[data-marquee-reverse] { animation-direction: reverse; }
/* In pausa al passaggio del mouse o con focus dentro: i loghi sono link. */
.logos.is-paused,
.logos-band:hover .logos.run,
.logos-band:focus-within .logos.run { animation-play-state: paused; }
@keyframes logos-scroll { to { transform: translateX(var(--marquee-shift, 0px)); } }
@media (max-width: 46rem) {
  .logos { flex-wrap: wrap; }
  .logos li { flex: 1 1 45%; border-bottom: 1px solid #ececf1; }
  .logos.prep li, .logos.run li { min-width: 177px; padding: 1.15rem; }
}
@media (max-width: 22rem) {
  .logos img { height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .logos, .logos.run { animation: none; flex-wrap: wrap; width: auto; visibility: visible; }
  .logos li, .logos.run li { flex: 0 0 auto; min-width: 0; }
}
/* Fallback CSS-only: se il JS non gira, un leggero scorrimento laterale
   segnala comunque che la fila non è statica. */
@media (prefers-reduced-motion: no-preference) {
  .logos[data-marquee]:not(.run) {
    flex-wrap: nowrap;
    width: max-content;
    animation: logos-fallback 14s ease-in-out infinite;
  }
  @keyframes logos-fallback {
    0% { transform: translateX(0); }
    50% { transform: translateX(-20px); }
    100% { transform: translateX(0); }
  }
}

.ldv label { font-size: .85rem; color: #b8b8cc; }
.ldv input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); color: #fff; }
.ldv button { background: #e01122; color: #fff; }
.form-error { color: #ff7788; }

.contatti { border-top: 1px solid rgba(255,255,255,.1); }
.contatti-list li { display: flex; gap: .75rem; align-items: baseline; }
.k { color: #8f8fab; min-width: 5.5rem; }

.legal { background: #07071a; color: #8f8fab; border-top: 1px solid rgba(255,255,255,.08); }
.legal a { color: #e9e9f2; }

/* Fuel table */
table.fuel th, table.fuel td { border-bottom: 1px solid rgba(127,127,150,.25); }
table.fuel tbody tr:last-child td { border-bottom: 0; }
table.fuel td:last-child { font-weight: 700; }
table.fuel tr.beyond td { color: #c8c8dc; font-style: italic; }
table.fuel tr.is-current td { background: rgba(224,17,34,.18); color: #fff; font-style: normal; }
table.fuel tr.is-current td:first-child { box-shadow: inset 4px 0 0 #e01122; }
.fuel-now {
  margin-top: .6rem; max-width: 26rem; padding: 1.6rem 1.75rem 1.5rem;
  background: linear-gradient(140deg, rgba(224,17,34,.22), rgba(224,17,34,.04) 70%);
  border: 1px solid rgba(255,85,102,.35); border-left: 6px solid #e01122; border-radius: 6px;
}
.fuel-now-label { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #ffb3bd; }
.fuel-now-pct {
  margin-top: .35rem; font-size: clamp(3.8rem, 13vw, 5.8rem); font-weight: 800; line-height: 1;
  letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums;
}
.fuel-now-pct span { font-size: .5em; font-weight: 700; color: #ff5566; margin-left: .08em; }
.fuel-now-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .9rem 1.5rem;
  margin: 1.3rem 0 0; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.14); }
.fuel-now-meta dt { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #9b9ab5; }
.fuel-now-meta dd { margin: .15rem 0 0; font-size: 1.05rem; font-weight: 600; color: #fff; }
.fuel-error { color: #ff7788; }
.fuel-formula { font: .95rem ui-monospace, "Segoe UI", monospace; color: #fff; padding: .7rem .9rem;
  background: rgba(255,255,255,.05); border-left: 3px solid #e01122; overflow-x: auto; }
.fuel-diag { font: .88rem ui-monospace, "Segoe UI", monospace; display: grid; gap: .3rem; }


.prose h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; }
.prose h2 { max-width: none; margin-top: 2.4rem; }
.prose h1 + .note { margin-top: 0; }
.prose table { border-collapse: collapse; width: 100%; max-width: 76ch; margin-top: 1.2rem; }
.prose th, .prose td { padding: .6rem .75rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid rgba(255,255,255,.14); }
.prose th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.prose code { font: .88rem ui-monospace, "Segoe UI", monospace; }
.prose li { margin-top: .5rem; }
