/* 01-tokens.css */
/* ============================================================
   RacingSyn — token

   La direzione visiva segue il riferimento indicato dal cliente
   (porsche.com/motorsport): pagina scura a tutto schermo, niente
   cornice, raggi stretti, tipografia neutra, un solo rosso usato
   come struttura e mai come testo piccolo.

   Le tre linee di attivita' hanno ognuna una temperatura, presa
   dal piano sequenza: il blu freddo della simulazione, il rosso
   dei fari di coda in pit lane, il platino della vettura sotto il
   pannello luce. Si applicano con [data-lane] e cambiano il fondo
   della sezione, non solo un dettaglio.
   ============================================================ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* il mono resta ai numeri: contatore del piano sequenza, tempi, letture
   di telemetria. Mai al testo corrente. */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+2212, U+FEFF, U+FFFD;
}

:root {
  /* --- colore --------------------------------------------------------- */
  --void: #0a0a0b;           /* il fondo della pagina */
  --void-2: #0f0f11;         /* fasce alternate */
  --surface: #141416;        /* le schede */
  --surface-2: #1c1c20;      /* schede al passaggio del mouse, campi */
  --surface-3: #26262b;

  --text: #f2f2f3;
  --text-muted: #9a9aa0;     /* 6,98:1 su --void */
  --text-faint: #85858d;     /* 5,34:1 — il minimo del sito sul testo piccolo */

  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --line-3: rgba(255, 255, 255, 0.32);

  /* Il rosso e' struttura: riempimenti, righe, punti, tab attiva.
     Su fondo scuro sta a 3,96:1, quindi va bene per superfici e testo
     grande ma NON per il corpo: per quello c'e' --accent-text. */
  --red: #e2001a;
  --red-hi: #ff1f38;
  --accent: var(--red);
  --accent-ink: #ffffff;     /* testo sopra il rosso pieno: 4,94:1 */
  --accent-text: #ff6b73;    /* 7,08:1 su --void, per il testo piccolo */

  --focus: #ff6b73;

  /* --- le tre linee di attivita' ---------------------------------------- */
  --lane: var(--red);
  --lane-text: var(--accent-text);
  --lane-ink: #ffffff;
  --lane-wash: 0, 0, 0;      /* rgb del velo di sezione */

  /* --- forma ------------------------------------------------------------ */
  /* raggi stretti: il riferimento non ha nulla di morbido */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -18px rgba(0, 0, 0, 0.9);
  --shadow-float: 0 2px 8px rgba(0, 0, 0, 0.5), 0 28px 64px -24px rgba(0, 0, 0, 1);

  /* --- tipografia -------------------------------------------------------- */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --t-micro: 0.75rem;
  --t-small: 0.9375rem;
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --t-lede: clamp(1.125rem, 1rem + 0.55vw, 1.4375rem);
  --t-h3: clamp(1.1875rem, 1.05rem + 0.65vw, 1.625rem);
  --t-h2: clamp(1.875rem, 1.3rem + 2.5vw, 3.5rem);
  --t-h1: clamp(2.5rem, 1.4rem + 4.6vw, 5.5rem);

  /* --- griglia ------------------------------------------------------------ */
  --gutter: clamp(1.25rem, 3.2vw, 4rem);
  --col-gap: clamp(1rem, 1.4vw, 1.5rem);
  --max: 1560px;

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-section: clamp(4rem, 7vw, 8.5rem);

  /* La pagina e' a tutto schermo: nessuna cornice, a differenza del
     riferimento editoriale usato per Star Group. Il piano sequenza legge
     questo valore per sapere quanto stare distante dai bordi: a zero
     occupa esattamente il viewport. */
  --gap: 0px;
}

/* --- le tre temperature -------------------------------------------------- */
[data-lane='oem'] {
  --lane: #3d8bff;           /* il blu del modello a filo di ferro */
  --lane-text: #7fb2ff;
  --lane-ink: #04122b;
  --lane-wash: 18, 46, 96;
}
[data-lane='racing'] {
  --lane: #e2001a;           /* i fari di coda in pit lane */
  --lane-text: #ff6b73;
  --lane-ink: #ffffff;
  --lane-wash: 84, 8, 16;
}
[data-lane='one-off'] {
  --lane: #d6d9e0;           /* il platino sotto il pannello luce */
  --lane-text: #d6d9e0;
  --lane-ink: #0a0a0b;
  --lane-wash: 62, 64, 72;
}

/* 02-base.css */
/* ============================================================
   Base
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--void); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  font-weight: 400;
  font-feature-settings: 'kern' 1, 'liga' 1, 'cv11' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Niente cornice e niente lastra: la pagina e' a tutto schermo.
   Niente overflow:hidden qui: romperebbe il position:sticky del
   piano sequenza. */
.shell { position: relative; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); font-weight: 500; letter-spacing: -0.04em; line-height: 1.0; }
h2 { font-size: var(--t-h2); font-weight: 500; letter-spacing: -0.035em; }
h3 { font-size: var(--t-h3); line-height: 1.18; letter-spacing: -0.02em; }
h4 { font-size: var(--t-body); font-weight: 600; letter-spacing: -0.015em; }

p { margin: 0 0 var(--space-4); max-width: 64ch; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }
.prose a, a.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--line-3);
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}
.prose a:hover, a.link:hover { color: var(--accent-text); text-decoration-color: currentColor; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

img, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; background: var(--surface); }

button, input, select, textarea { font: inherit; color: inherit; margin: 0; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-xs); }

::selection { background: var(--red); color: #fff; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: 0; left: 0; z-index: 300;
  padding: 0.75rem 1.25rem;
  background: var(--red); color: #fff;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
  transform: translateY(-120%);
  transition: transform 0.15s ease;
}
.skip-link:focus-visible { transform: translateY(0); }

/* --- tipografia di servizio ----------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}
.eyebrow::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--lane);
  flex: none;
}

.lede {
  font-size: var(--t-lede);
  line-height: 1.4;
  letter-spacing: -0.015em;
  max-width: 44ch;
  color: var(--text-muted);
  font-weight: 300;
}
.muted { color: var(--text-muted); }
.small { font-size: var(--t-small); line-height: 1.5; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.prose > * + * { margin-top: var(--space-4); }
.prose p { color: var(--text-muted); }
.prose strong { color: var(--text); font-weight: 600; }

/* --- bottoni --------------------------------------------------------- */
/* Il riferimento non ha pillole morbide: rettangoli a spigolo appena
   smussato, riempimento pieno, nessuna ombra. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  background: var(--text);
  color: var(--void);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { background: #fff; }

.btn--accent { background: var(--lane); color: var(--lane-ink); }
.btn--accent:hover { background: var(--red-hi); color: #fff; }
[data-lane='one-off'] .btn--accent:hover { background: #fff; color: var(--void); }
[data-lane='oem'] .btn--accent:hover { background: #6ba6ff; color: var(--lane-ink); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}
.btn--outline:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line-3); }

.btn--ghost {
  background: transparent;
  color: inherit;
  border: 0;
  padding-inline: 0.25rem;
}
.btn--ghost::after { content: '\2192'; transition: transform 0.2s ease; }
.btn--ghost:hover::after { transform: translateX(3px); }

/* il quadratino con la freccia in alto a destra delle schede immagine */
.arrow-btn {
  width: 34px; height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: rgba(10, 10, 11, 0.72);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}
.arrow-btn::after { content: '\2197'; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.08);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}
.tag--lane { background: var(--lane); color: var(--lane-ink); }

/* riga sottile di separazione, il piu' vicino al riferimento */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* 03-layout.css */
/* ============================================================
   Griglia, header flottante, footer

   Niente backdrop-filter da nessuna parte, e in particolare sopra il
   piano sequenza: sfocare uno sfondo che cambia a ogni fotogramma si
   ricalcola in continuo e non si puo' mettere in cache. Le pillole
   dell'header hanno un fondo pieno e a occhio non si distingue.
   ============================================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--col-gap);
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.cell { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 900px) { .cell { grid-column: var(--from, 1) / var(--to, -1); } }

.section { padding-block: var(--space-section); position: relative; }
.section--tight { padding-block: clamp(3rem, 5vw, 5.5rem); }
.section--alt { background: var(--void-2); }

/* fascia con la temperatura di una linea: il fondo cambia, non solo
   un dettaglio. E' la mossa piu' riconoscibile del riferimento. */
.section--wash {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(var(--lane-wash), 0.5), transparent 62%),
    var(--void);
}

.stack > * + * { margin-top: var(--space-4); }
.stack-6 > * + * { margin-top: var(--space-6); }
.stack-8 > * + * { margin-top: var(--space-8); }

/* ============================================================
   Header: marchio a sinistra, menu al centro, strumenti a destra.
   Tre gruppi che galleggiano, come nel riferimento.
   ============================================================ */

.site-header {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-inline: clamp(0.85rem, 2vw, 1.5rem);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

/* velo in cima: il marchio e' senza pillola, come nel riferimento, e
   sopra un fotogramma chiaro sparirebbe. Alfa 0,62 all'altezza del
   testo tiene il bianco sopra 4,5:1 anche sul frame piu' chiaro. */
.site-header::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -14px;
  height: 150px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(6, 6, 7, 0.72) 0%, rgba(6, 6, 7, 0.34) 46%, rgba(6, 6, 7, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.site-header.is-over-dark::before { opacity: 1; }

.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--text);
  justify-self: start;
  background: rgba(18, 18, 20, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: background 0.3s ease, border-color 0.3s ease;
}
/* Sopra il piano sequenza il marchio sta nudo sul filmato, come nel
   riferimento: li' a tenerlo leggibile e' il velo in cima. Ovunque
   altrove il testo della pagina gli scorre dietro, e senza fondo si
   sovrappone. */
.site-header.is-over-dark .logo { background: transparent; border-color: transparent; }
.logo-mark { width: 26px; height: 26px; flex: none; }
.logo-name { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.logo-name b { font-weight: 700; letter-spacing: -0.035em; }
.logo-name span {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- la pillola centrale --------------------------------------------- */
.nav-primary { justify-self: center; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: rgba(18, 18, 20, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.nav-link, .nav-disclosure {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border: 0;
  border-radius: var(--r-xs);
  background: none;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-link:hover, .nav-disclosure:hover { background: rgba(255, 255, 255, 0.09); }
.nav-link[aria-current='page'] { background: rgba(255, 255, 255, 0.13); }

.nav-has-children { position: relative; }
.nav-disclosure::after {
  content: '';
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.6;
}
.nav-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 25rem;
  padding: 6px;
  background: #121214;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-float);
  display: none;
}
.nav-has-children[data-open='true'] .nav-panel { display: block; }
.nav-panel a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--r-sm);
  transition: background 0.16s ease;
}
.nav-panel a:hover { background: rgba(255, 255, 255, 0.07); }
.nav-panel .nav-dot {
  width: 6px; height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--lane);
}
.nav-panel strong { display: block; font-weight: 600; letter-spacing: -0.015em; }
.nav-panel span.nav-hint { display: block; font-size: var(--t-small); color: var(--text-muted); margin-top: 0.1rem; }

/* --- strumenti a destra ------------------------------------------------ */
.header-tools { justify-self: end; display: flex; align-items: center; gap: 8px; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1rem;
  border-radius: var(--r-sm);
  background: var(--red);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background 0.18s ease;
}
.header-cta:hover { background: var(--red-hi); }
.header-cta .cta-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  flex: none;
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .header-cta .cta-dot { animation: none; } }

.lang { position: relative; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0 0.85rem;
  background: rgba(18, 18, 20, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.lang-toggle svg { width: 15px; height: 15px; flex: none; opacity: 0.75; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 13rem;
  padding: 6px;
  background: #121214;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-float);
  display: none;
}
.lang[data-open='true'] .lang-menu { display: block; }
.lang-menu a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--r-sm);
  font-size: var(--t-small);
  font-weight: 500;
}
.lang-menu a:hover { background: rgba(255, 255, 255, 0.07); }
.lang-menu a[aria-current='true'] { color: var(--accent-text); }
.lang-menu .lang-code { color: var(--text-muted); font-size: var(--t-micro); text-transform: uppercase; }

.nav-burger {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(18, 18, 20, 0.92);
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  content: '';
  position: absolute;
  left: 12px;
  width: 16px; height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}
.nav-burger span { top: 20px; }
.nav-burger span::before { top: -5px; left: 0; }
.nav-burger span::after { top: 5px; left: 0; }

@media (max-width: 1120px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav-burger { display: block; }
  .nav-primary {
    position: fixed;
    top: 66px;
    left: clamp(0.85rem, 2vw, 1.5rem);
    right: clamp(0.85rem, 2vw, 1.5rem);
    max-height: calc(100svh - 84px);
    overflow-y: auto;
    padding: 6px;
    background: #121214;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-float);
    display: none;
  }
  .site-header[data-nav-open='true'] .nav-primary { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; padding: 0; background: none; border: 0; }
  .nav-link, .nav-disclosure {
    width: 100%;
    justify-content: space-between;
    padding: 0.85rem 0.9rem;
    font-size: 1.0625rem;
    border-radius: var(--r-sm);
  }
  .nav-panel { position: static; transform: none; box-shadow: none; padding: 0 0 0.4rem 0.6rem; min-width: 0; background: none; border: 0; }
  /* l'etichetta sparisce alla vista ma non dallo screen reader:
     display:none lascerebbe il link senza nome accessibile */
  .header-cta .cta-label {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .header-cta { padding: 0.72rem; }
  .header-cta .cta-dot { width: 8px; height: 8px; }
}
@media (max-width: 560px) {
  .lang-toggle { min-height: 40px; padding: 0 0.6rem; }
  .lang-toggle .lang-label { display: none; }
  .logo-name b { font-size: 0.9375rem; }
}
.nav-mobile-only { display: none; }
@media (max-width: 1120px) { .nav-mobile-only { display: block; } }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--void-2);
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 6rem) 0 var(--space-8);
}
.footer-grid { row-gap: var(--space-12); }
.footer-brand {
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.footer-brand em { font-style: normal; color: var(--red); }
.footer-col h2 {
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-list li + li { margin-top: 0.6rem; }
.footer-list a { font-size: var(--t-small); color: var(--text-muted); transition: color 0.16s ease; }
.footer-list a:hover { color: var(--text); }
.footer-address { font-size: var(--t-small); line-height: 1.7; color: var(--text-muted); font-style: normal; }
.footer-address a { color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; }
.footer-legal {
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-size: var(--t-micro);
  color: var(--text-muted);
}

/* 04-scrolly.css */
/* ============================================================
   Piano sequenza scrollato — dal modello alla vettura, in 20 secondi

   Lo stato di default e' STATICO: leggibile senza JS e con
   prefers-reduced-motion. Il JS promuove a data-mode="scrub".
   Il JS promuove, non degrada.
   ============================================================ */

.scrolly { position: relative; background: var(--void); color: var(--text); }

.scrolly-canvas { width: 100%; height: 100%; background: #000; display: block; }
.scrolly-poster img { width: 100%; height: 100%; object-fit: cover; }

.scrolly-index {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.scrolly-index::after {
  content: '';
  width: 28px; height: 1px;
  background: var(--red);
}

.scrolly-phase h2 {
  font-size: clamp(1.75rem, 1rem + 2.6vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  font-weight: 400;
  max-width: 18ch;
}
.scrolly-phase p:not(.scrolly-index) {
  margin-top: var(--space-4);
  max-width: 38ch;
  color: rgba(242, 242, 243, 0.8);
  font-size: var(--t-small);
  line-height: 1.5;
  font-weight: 300;
}

.scrolly-counter, .scrolly-progress, .scrolly-veil { display: none; }

/* ------------------------------------------------------------
   Stato statico: otto blocchi verticali, stessi testi, otto
   fermi immagine. E' quello che si vede senza JS.
   ------------------------------------------------------------ */
.scrolly-stage { display: block; }
.scrolly[data-mode='static'] .scrolly-canvas { display: none; }
.scrolly[data-mode='static'] .scrolly-poster img { max-height: 76svh; }

.scrolly-captions {
  display: block;
  max-width: var(--max);
  margin-inline: auto;
  padding: var(--space-16) var(--gutter);
}
.scrolly[data-mode='static'] .scrolly-phase {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--col-gap);
  align-items: start;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.scrolly[data-mode='static'] .scrolly-phase > * { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .scrolly[data-mode='static'] .scrolly-phase > .scrolly-index { grid-column: 1 / 3; margin-bottom: 0; }
  .scrolly[data-mode='static'] .scrolly-phase > h2 { grid-column: 3 / 9; }
  .scrolly[data-mode='static'] .scrolly-phase > p:not(.scrolly-index) { grid-column: 9 / 13; margin-top: 0.4rem; }
  .scrolly[data-mode='static'] .scrolly-phase > .scrolly-still { grid-column: 3 / 13; margin-top: var(--space-8); }
}
.scrolly-still img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-md);
}

/* ------------------------------------------------------------
   Stato scrub: il palco occupa esattamente il viewport
   ------------------------------------------------------------ */
.scrolly[data-mode='scrub'] { height: 900vh; background: transparent; }

.scrolly[data-mode='scrub'] .scrolly-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
.scrolly[data-mode='scrub'] .scrolly-canvas { position: absolute; inset: 0; }
/* il poster regge l'LCP e copre il nero finche' non arriva il primo
   fotogramma disegnato, poi esce di scena */
.scrolly[data-mode='scrub'] .scrolly-poster { position: absolute; inset: 0; overflow: hidden; }
.scrolly[data-painted='true'] .scrolly-poster { display: none; }

.scrolly[data-mode='scrub'] .scrolly-veil {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(4, 4, 5, 0.78) 0%, rgba(4, 4, 5, 0.34) 36%, rgba(4, 4, 5, 0) 62%),
    linear-gradient(to top, rgba(4, 4, 5, 0.8) 0%, rgba(4, 4, 5, 0) 48%),
    linear-gradient(to bottom, rgba(4, 4, 5, 0.55) 0%, rgba(4, 4, 5, 0) 22%);
}

.scrolly[data-mode='scrub'] .scrolly-captions {
  position: absolute;
  inset: 0;
  padding: 0;
  max-width: none;
  pointer-events: none;
}
.scrolly[data-mode='scrub'] .scrolly-phase {
  position: absolute;
  bottom: clamp(6rem, 14vh, 10rem);
  width: min(34rem, 40vw);
  opacity: 0;
  transform: translateY(1.25rem);
  transition: none;
  will-change: opacity, transform;
}
.scrolly[data-mode='scrub'] .scrolly-phase[data-side='left'] { left: clamp(1.5rem, 4vw, 4.5rem); }
.scrolly[data-mode='scrub'] .scrolly-phase[data-side='right'] { right: clamp(1.5rem, 4vw, 4.5rem); text-align: right; }
.scrolly[data-mode='scrub'] .scrolly-phase[data-side='right'] p { margin-left: auto; }
.scrolly[data-mode='scrub'] .scrolly-phase[data-side='right'] h2 { margin-left: auto; }
.scrolly[data-mode='scrub'] .scrolly-still { display: none; }
/* l'indice resta anche in scrub: e' la riga tecnica del riferimento */
.scrolly[data-mode='scrub'] .scrolly-phase[data-side='right'] .scrolly-index { flex-direction: row-reverse; }

.scrolly[data-mode='scrub'] .scrolly-counter,
.scrolly[data-mode='scrub'] .scrolly-progress { opacity: 0; }
.scrolly[data-mode='scrub'] .scrolly-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  position: absolute;
  left: clamp(1.5rem, 4vw, 4.5rem);
  bottom: clamp(2rem, 4.5vh, 3.25rem);
  margin: 0;
  padding: 0.4rem 0.7rem;
  border-radius: var(--r-xs);
  background: rgba(10, 10, 11, 0.72);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.scrolly-counter b { color: var(--text); font-weight: 500; }

.scrolly[data-mode='scrub'] .scrolly-progress {
  display: block;
  position: absolute;
  right: clamp(1.5rem, 4vw, 4.5rem);
  bottom: clamp(2.4rem, 5vh, 3.6rem);
  width: clamp(120px, 18vw, 280px);
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.scrolly-progress i { display: block; height: 100%; width: 0%; background: var(--red); }

/* ------------------------------------------------------------
   Apertura: titolo in basso a sinistra, scheda flottante a destra.
   Tutto si ritira nel primo 4,5% dello scroll.
   ------------------------------------------------------------ */
.scrolly-lead { position: relative; }
.scrolly[data-mode='scrub'] .scrolly-lead { position: absolute; inset: 0; pointer-events: none; }
.scrolly[data-mode='scrub'] .scrolly-lead a,
.scrolly[data-mode='scrub'] .scrolly-lead button { pointer-events: auto; }

.hero-inner {
  position: relative;
  height: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(6rem, 12vh, 9rem) clamp(1.5rem, 4vw, 4.5rem) clamp(2rem, 5vh, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;   /* il titolo sta in basso, come nel riferimento */
}
.scrolly[data-mode='static'] .hero-inner { padding-block: clamp(7rem, 14vh, 11rem) clamp(3rem, 6vh, 5rem); }

.hero-title {
  font-size: clamp(2.25rem, 1rem + 4vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1.0;
  font-weight: 400;
  max-width: 16ch;
  color: #fff;
}
.hero-title b { font-weight: 600; }
.hero-sub {
  margin-top: clamp(1rem, 2.2vh, 1.75rem);
  max-width: 46ch;
  font-size: var(--t-lede);
  line-height: 1.4;
  font-weight: 300;
  color: rgba(242, 242, 243, 0.84);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 3.2vh, 2.25rem);
}

.hero-bottom {
  margin-top: clamp(1.75rem, 4vh, 3rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-8);
}

.hero-proof { display: flex; flex-direction: column; gap: 0.85rem; }
.hero-facts {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--r-xs);
  background: rgba(10, 10, 11, 0.68);
  border: 1px solid var(--line);
  color: rgba(242, 242, 243, 0.92);
  font-size: var(--t-small);
  font-weight: 400;
  width: fit-content;
}
.hero-facts b { font-weight: 700; }
.hero-facts .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--red); flex: none; }

.hero-lanes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.4rem;
  color: rgba(242, 242, 243, 0.62);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.hero-lanes li { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-lanes li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.hero-lanes li:nth-child(1)::before { background: #3d8bff; opacity: 1; }
.hero-lanes li:nth-child(2)::before { background: #e2001a; opacity: 1; }
.hero-lanes li:nth-child(3)::before { background: #d6d9e0; opacity: 1; }

/* scheda flottante in basso a destra: l'equivalente della case study
   card del riferimento */
.hero-card {
  display: flex;
  align-items: stretch;
  gap: 0.85rem;
  width: min(23rem, 34vw);
  padding: 0.7rem;
  border-radius: var(--r-md);
  background: rgba(18, 18, 20, 0.94);
  border: 1px solid var(--line);
  color: var(--text);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.hero-card:hover { transform: translateY(-3px); border-color: var(--line-3); }
/* il figlio flex e' <picture>, non <img>: la misura va data a quello */
.hero-card picture {
  display: block;
  width: 92px;
  flex: none;
  align-self: stretch;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card-body { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.15rem 0.25rem 0.15rem 0; min-width: 0; }
.hero-card .tag { align-self: flex-start; }
.hero-card p { font-size: var(--t-small); line-height: 1.35; margin: 0; color: var(--text-muted); }
.hero-card .hero-card-stat {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.hero-card .hero-card-stat span { font-size: var(--t-micro); font-weight: 600; color: var(--text-muted); letter-spacing: 0; }

@media (max-width: 1180px) { .hero-card { display: none; } }
@media (max-width: 899px) {
  .scrolly[data-mode='scrub'] { height: 760vh; }
  .scrolly[data-mode='scrub'] .scrolly-phase {
    left: clamp(1.25rem, 5vw, 2rem);
    right: clamp(1.25rem, 5vw, 2rem);
    width: auto;
    text-align: left;
    bottom: clamp(5rem, 16vh, 8rem);
  }
  .scrolly[data-mode='scrub'] .scrolly-phase[data-side='right'] { text-align: left; }
  .scrolly[data-mode='scrub'] .scrolly-phase[data-side='right'] p,
  .scrolly[data-mode='scrub'] .scrolly-phase[data-side='right'] h2 { margin-left: 0; }
  .scrolly[data-mode='scrub'] .scrolly-phase[data-side='right'] .scrolly-index { flex-direction: row; }
  .scrolly[data-mode='scrub'] .scrolly-veil {
    background: linear-gradient(to top, rgba(4, 4, 5, 0.88) 0%, rgba(4, 4, 5, 0.3) 54%, rgba(4, 4, 5, 0.45) 100%);
  }
  .hero-lanes { display: none; }
  .scrolly[data-mode='scrub'] .scrolly-progress { width: 84px; }
}
/* Su telefono la riga di prova andava a capo lasciando un separatore
   appeso a fine riga. Restano le prime due voci: i figli sono
   span, punto, span, punto, span, quindi si taglia dal quarto. */
@media (max-width: 560px) {
  .hero-facts > *:nth-child(n+4) { display: none; }
}

/* ------------------------------------------------------------
   Loader
   ------------------------------------------------------------ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  color: var(--text);
  display: grid;
  place-content: center;
  gap: var(--space-6);
  justify-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader[hidden] { display: none; }
body[data-loading='true'] { overflow: hidden; }
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.04em; }
.loader-logo em { font-style: normal; color: var(--red); }
.loader-bar { width: min(220px, 50vw); height: 2px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0%; background: var(--red); transition: width 0.25s ease; }
.loader-note { font-size: var(--t-micro); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }

/* 05-blocks.css */
/* ============================================================
   Blocchi editoriali — superfici scure, bordo di un pixel,
   raggi stretti. Nessuna ombra diffusa: sul nero non si vede,
   e quello che separa una scheda dal fondo e' il bordo.
   ============================================================ */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

/* --- hero di pagina interna ------------------------------------------ */
.page-hero { padding-block: clamp(7.5rem, 15vh, 12rem) clamp(2.5rem, 5vw, 4.5rem); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lede { margin-top: var(--space-6); max-width: 48ch; }
.page-hero-meta { margin-top: var(--space-8); display: flex; flex-wrap: wrap; gap: 0.5rem; }
.page-hero-meta li {
  padding: 0.42rem 0.85rem;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--text-muted);
}
.page-hero-figure { margin-top: var(--space-12); }
.page-hero-figure img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--r-md); }

.breadcrumb {
  display: flex;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.breadcrumb li + li::before { content: '/'; margin-right: 0.5rem; opacity: 0.4; }
.breadcrumb a:hover { color: var(--text); }

/* --- testo ------------------------------------------------------------ */
.block-text .block-title { margin-bottom: var(--space-8); }
.block-text .prose p { max-width: 58ch; }

/* --- numeri ------------------------------------------------------------ */
.stats-panel {
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8) var(--col-gap);
}
@media (min-width: 760px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stat { position: relative; }
@media (min-width: 760px) {
  .stat + .stat { padding-left: var(--col-gap); }
  .stat + .stat::before {
    content: '';
    position: absolute;
    left: 0; top: 0.3rem; bottom: 0.3rem;
    width: 1px;
    background: var(--line);
  }
}
.stat-num {
  display: block;
  font-size: clamp(2.25rem, 0.6rem + 2.6vw, 3.5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-label {
  display: block;
  margin-top: var(--space-4);
  font-size: var(--t-small);
  line-height: 1.35;
  color: var(--text-muted);
  max-width: 22ch;
}
.stat-unit { color: var(--red); }

/* --- fascia media a tutta larghezza ------------------------------------ */
.band { position: relative; }
.band-media {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 54svh;
  overflow: hidden;
  border-radius: var(--r-md);
  background: #000;
  border: 1px solid var(--line);
}
.band-media video, .band-media img { width: 100%; height: 100%; object-fit: cover; }
.band-media::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(4, 4, 5, 0.86) 0%, rgba(4, 4, 5, 0.1) 52%, rgba(4, 4, 5, 0) 100%);
}
.band-placeholder {
  position: absolute; inset: 0;
  display: grid; align-content: start; justify-items: center;
  gap: 0.85rem;
  text-align: center;
  padding: clamp(1.75rem, 6vh, 3.5rem) var(--gutter);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 14px, transparent 14px 28px),
    radial-gradient(120% 100% at 50% 0%, rgba(226, 0, 26, 0.16), transparent 62%);
}
.band-placeholder .lede { color: rgba(242, 242, 243, 0.9); max-width: 26ch; }
.band-placeholder .band-specs { font-size: var(--t-micro); font-weight: 500; letter-spacing: 0.06em; color: var(--text-muted); }
.band-caption { position: absolute; left: clamp(1.25rem, 3vw, 3rem); bottom: clamp(1.25rem, 3vw, 3rem); max-width: 34rem; z-index: 1; }
.band-caption h2 { font-size: clamp(1.75rem, 1rem + 2.2vw, 3rem); color: #fff; }
.band-caption p { margin-top: var(--space-4); color: rgba(242, 242, 243, 0.82); font-size: var(--t-small); }
.band-fs { position: absolute; right: clamp(1.25rem, 3vw, 3rem); bottom: clamp(1.25rem, 3vw, 3rem); z-index: 1; }

/* --- righe (competenze, servizi) ---------------------------------------- */
.rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
.row-item {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-3) var(--col-gap);
  align-items: start;
  padding: clamp(1.5rem, 2.6vw, 2.25rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}
.row-item:hover { background: rgba(255, 255, 255, 0.025); }
.row-item > * { grid-column: 1 / -1; }
.row-index {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.row-title { font-weight: 500; }
.row-body { color: var(--text-muted); max-width: 56ch; font-size: var(--t-small); }
.row-meta { font-size: var(--t-small); color: var(--lane-text); font-weight: 500; }
@media (min-width: 900px) {
  .row-item > .row-index { grid-column: 1 / 2; padding-top: 0.5rem; }
  .row-item > .row-title { grid-column: 2 / 6; }
  .row-item > .row-body { grid-column: 6 / 12; }
  .row-item > .row-meta { grid-column: 12 / 13; text-align: right; padding-top: 0.2rem; }
}

/* --- processo ------------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); }
.step {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 2.2vw, 1.9rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.22s ease, background 0.22s ease;
}
.step:hover { border-color: var(--line-2); background: var(--surface-2); }
@media (min-width: 900px) { .step { grid-column: span 3; } }
.step-num {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--lane-text);
  margin-bottom: var(--space-6);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.step-num::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.step h3 { max-width: 15ch; font-weight: 500; }
.step p { margin-top: var(--space-4); font-size: var(--t-small); color: var(--text-muted); }
.step-time {
  margin-top: auto;
  padding-top: var(--space-6);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- timeline ------------------------------------------------------------- */
.timeline { display: grid; gap: 0; border-top: 1px solid var(--line); }
.tl-item {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-3) var(--col-gap);
  padding: clamp(1.25rem, 2.2vw, 1.75rem) 0;
  border-bottom: 1px solid var(--line);
}
.tl-item > * { grid-column: 1 / -1; }
.tl-year {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.tl-body { color: var(--text-muted); max-width: 58ch; font-size: var(--t-small); }
.tl-body strong { color: var(--text); font-weight: 600; }
@media (min-width: 900px) {
  .tl-item > .tl-year { grid-column: 1 / 3; }
  .tl-item > .tl-body { grid-column: 3 / 11; }
}

/* --- FAQ -------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  align-items: center;
  padding: clamp(1.1rem, 2vw, 1.5rem) 0;
  cursor: pointer;
  font-size: var(--t-h3);
  font-weight: 500;
  letter-spacing: -0.02em;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.05rem;
  font-weight: 400;
}
.faq details[open] summary::after { content: '\2013'; background: var(--red); border-color: var(--red); color: #fff; }
.faq-body { padding-bottom: var(--space-8); max-width: 64ch; color: var(--text-muted); font-size: var(--t-small); }

/* --- tabella ------------------------------------------------------------------ */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(1.25rem, 2.4vw, 2rem);
  background: var(--surface);
}
table.data { width: 100%; border-collapse: collapse; min-width: 42rem; }
table.data caption { text-align: left; font-size: var(--t-small); color: var(--text-muted); padding-bottom: var(--space-6); }
table.data th, table.data td {
  text-align: left;
  padding: 0.85rem 1.25rem 0.85rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: var(--t-small);
  color: var(--text-muted);
}
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }
table.data thead th {
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
table.data tbody th { font-weight: 600; white-space: nowrap; color: var(--text); }

/* --- gallery -------------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); }
.gallery figure { grid-column: 1 / -1; margin: 0; }
.gallery img { width: 100%; object-fit: cover; border-radius: var(--r-md); }
.gallery figcaption { margin-top: 0.7rem; font-size: var(--t-small); color: var(--text-muted); }
@media (min-width: 760px) {
  .gallery figure:nth-child(1) { grid-column: span 7; }
  .gallery figure:nth-child(1) img { aspect-ratio: 4 / 3; }
  .gallery figure:nth-child(2) { grid-column: span 5; margin-top: var(--space-16); }
  .gallery figure:nth-child(2) img { aspect-ratio: 3 / 4; }
  .gallery figure:nth-child(3) { grid-column: span 5; }
  .gallery figure:nth-child(3) img { aspect-ratio: 1 / 1; }
  .gallery figure:nth-child(4) { grid-column: span 7; }
  .gallery figure:nth-child(4) img { aspect-ratio: 16 / 9; }
  .gallery figure:nth-child(5) { grid-column: span 12; }
  .gallery figure:nth-child(5) img { aspect-ratio: 21 / 9; }
}

/* --- affermazione ------------------------------------------------------------------ */
.pull {
  padding: clamp(2rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--surface);
  margin: 0;
}
.pull p {
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  max-width: 26ch;
  font-weight: 300;
}
.pull cite {
  display: block;
  margin-top: var(--space-8);
  font-style: normal;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- link ad altre pagine ---------------------------------------------------------------- */
.pagelinks { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); }
.pagelink {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.22s ease, background 0.22s ease;
}
.pagelink:hover { border-color: var(--line-2); background: var(--surface-2); }
.pagelink:hover .arrow-btn { background: var(--red); border-color: var(--red); color: #fff; }
@media (min-width: 760px) { .pagelink { grid-column: span 4; } }
.pagelink .kicker { font-size: var(--t-micro); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.pagelink h3 { margin-top: var(--space-4); font-weight: 500; }

/* --- CTA ------------------------------------------------------------------------------------ */
.cta-panel {
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(100% 140% at 100% 0%, rgba(226, 0, 26, 0.22), transparent 58%),
    var(--surface);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-8) var(--col-gap);
  align-items: end;
}
.cta-panel > * { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .cta-panel > .cta-head { grid-column: 1 / 8; }
  .cta-panel > .cta-text { grid-column: 8 / 13; }
  .cta-panel > .cta-actions { grid-column: 1 / 13; }
}
.cta-panel h2 { max-width: 18ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* --- entrata in scena ----------------------------------------------------------------------
   Lo stato nascosto e' dietro .js, che un rigo inline in <head> mette
   prima del primo disegno. Senza quella condizione, chi ha il
   JavaScript disattivato non vedrebbe MAI niente sotto il piano
   sequenza: la classe si aggiunge da script, la rimozione no.
   Regola generale del sito: il JS promuove, non e' un prerequisito. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .step:hover, .pagelink:hover, .hero-card:hover, .jcard:hover, .lane-card:hover { transform: none; }
}

/* 06-forms.css */
/* ============================================================
   Form
   ============================================================ */

.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-4) var(--col-gap); }
.field { grid-column: 1 / -1; }
@media (min-width: 760px) { .field--half { grid-column: span 6; } }

.field label,
.fieldset-legend {
  display: block;
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.field .req { color: var(--accent-text); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.field textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
.field select { appearance: none; padding-right: 2.4rem; cursor: pointer; }
.field select option { color: #111; }
.field--select { position: relative; }
.field--select::after {
  content: '';
  position: absolute;
  right: 1.05rem; bottom: 1.15rem;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--line-3);
  outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }

.field-error { display: block; margin-top: 0.4rem; font-size: var(--t-small); color: var(--accent-text); font-weight: 600; }
.field input[aria-invalid='true'], .field select[aria-invalid='true'], .field textarea[aria-invalid='true'] { border-color: var(--accent-text); }

/* scelta della linea di attivita' */
.choice { grid-column: 1 / -1; display: grid; gap: 0.5rem; border: 0; padding: 0; margin: 0; }
.choice-option { position: relative; }
.choice-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-option label {
  display: block;
  margin: 0;
  padding: 0.9rem 3rem 0.9rem 1rem;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.choice-option label span {
  display: block;
  margin-top: 0.2rem;
  font-size: var(--t-small);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
  text-transform: none;
}
.choice-option label::after {
  content: '';
  position: absolute;
  right: 1rem; top: 50%;
  width: 17px; height: 17px;
  margin-top: -8.5px;
  border-radius: 50%;
  border: 1.5px solid var(--line-3);
}
.choice-option input:checked + label { border-color: var(--red); background: rgba(226, 0, 26, 0.12); }
.choice-option input:checked + label::after { background: var(--red); border-color: var(--red); box-shadow: inset 0 0 0 3px var(--surface); }
.choice-option input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 3px; }

/* consensi */
.consents { grid-column: 1 / -1; margin-top: var(--space-2); }
.consent { display: flex; gap: 0.7rem; align-items: flex-start; }
.consent + .consent { margin-top: 0.7rem; }
.consent input[type='checkbox'] {
  appearance: none;
  flex: none;
  width: 19px; height: 19px;
  margin-top: 0.15rem;
  border-radius: var(--r-xs);
  border: 1.5px solid var(--line-3);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.consent input[type='checkbox']:checked { background: var(--red); border-color: var(--red); }
.consent input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  left: 6px; top: 2px;
  width: 4px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent label {
  margin: 0;
  font-size: var(--t-small);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  cursor: pointer;
}
.consent label a { text-decoration: underline; text-underline-offset: 0.18em; }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); margin-top: var(--space-2); }
.form-note { font-size: var(--t-small); color: var(--text-muted); max-width: 34ch; }

.form-done {
  display: none;
  padding: var(--space-8);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  background: rgba(255, 255, 255, 0.04);
}
.form-done h3 { max-width: 20ch; font-weight: 500; }
.form-done p { margin-top: var(--space-4); color: var(--text-muted); max-width: 46ch; font-size: var(--t-small); }
form[data-state='done'] { display: none; }
form[data-state='done'] + .form-done { display: block; }

/* --- blocco contatto -------------------------------------------------- */
.contact-panel {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-12) var(--col-gap);
  padding: clamp(1.75rem, 4vw, 3.5rem);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(226, 0, 26, 0.16), transparent 55%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.contact-side { grid-column: 1 / -1; }
.contact-form { grid-column: 1 / -1; }
@media (min-width: 960px) {
  .contact-side { grid-column: 1 / 6; }
  .contact-form { grid-column: 7 / 13; }
}
.contact-panel .btn { background: var(--red); color: #fff; }
.contact-panel .btn:hover { background: var(--red-hi); }

.contact-aside { margin-top: var(--space-12); display: grid; gap: 0.15rem; }
.contact-aside dt {
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-6);
}
.contact-aside dd { margin: 0.3rem 0 0; font-size: var(--t-small); }
.contact-aside dd a { text-decoration: underline; text-underline-offset: 0.2em; }

/* 07-panels.css */
/* ============================================================
   Pannello contatto B2B
   ============================================================ */

.b2b-panel {
  position: fixed;
  z-index: 120;
  right: clamp(0.85rem, 2vw, 1.5rem);
  bottom: clamp(0.85rem, 2vw, 1.5rem);
  width: min(26rem, calc(100vw - 1.7rem));
  padding: clamp(1.25rem, 2vw, 1.6rem);
  background: #121214;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-float);
  transform: translateY(calc(100% + 2rem));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease, visibility 0.5s;
  max-height: calc(100svh - 1.7rem);
  overflow-y: auto;
}
.b2b-panel.is-open { transform: none; opacity: 1; visibility: visible; }
.b2b-panel h2 { font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem); max-width: 17ch; font-weight: 500; }
.b2b-intro { margin-top: var(--space-3); font-size: var(--t-small); color: var(--text-muted); }
.b2b-close {
  position: absolute;
  top: 0.8rem; right: 0.8rem;
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  transition: background 0.18s ease;
}
.b2b-close:hover { background: rgba(255, 255, 255, 0.14); }
.b2b-step[hidden] { display: none; }
.b2b-panel .form-grid { margin-top: var(--space-6); gap: 0.7rem var(--col-gap); }
.b2b-panel .field--half { grid-column: span 6; }
.b2b-panel .field input, .b2b-panel .field select, .b2b-panel .field textarea { padding: 0.68rem 0.85rem; }
.b2b-panel .field--select::after { bottom: 1rem; }
.b2b-panel .btn { width: 100%; justify-content: center; background: var(--red); color: #fff; }
.b2b-panel .btn:hover { background: var(--red-hi); }
.b2b-panel .form-done { padding: var(--space-6); }
.b2b-more[hidden] { display: none; }
.b2b-toggle-more, .b2b-back {
  grid-column: 1 / -1;
  background: none;
  border: 0;
  padding: 0.4rem 0;
  text-align: left;
  cursor: pointer;
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.b2b-toggle-more:hover, .b2b-back:hover { color: var(--text); }

/* le tre opzioni: le stesse tre linee della home */
.b2b-choices { display: grid; gap: 0.45rem; margin-top: var(--space-6); }
.b2b-option {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 2.6rem 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.b2b-option span {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--t-small);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}
.b2b-option::after {
  content: '\2192';
  position: absolute;
  right: 1rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}
.b2b-option:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-2); }
.b2b-option:hover::after { transform: translateY(-50%) translateX(3px); color: var(--accent-text); }
.b2b-option[data-path='oem']::before,
.b2b-option[data-path='racing']::before,
.b2b-option[data-path='one-off']::before {
  content: '';
  position: absolute;
  left: 0; top: 0.85rem; bottom: 0.85rem;
  width: 2px;
  border-radius: 0 2px 2px 0;
}
.b2b-option[data-path='oem']::before { background: #3d8bff; }
.b2b-option[data-path='racing']::before { background: #e2001a; }
.b2b-option[data-path='one-off']::before { background: #d6d9e0; }

@media (max-width: 760px) {
  .b2b-panel {
    right: 0.75rem; left: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    max-height: 86svh;
  }
}

/* 08-lanes.css */
/* ============================================================
   I blocchi presi dal riferimento (porsche.com/motorsport):

   1. il selettore a segmenti che cambia il colore della sezione
   2. il carosello orizzontale di schede immagine
   3. la griglia del journal, con il quadratino della freccia
   4. i richiami sopra la vettura
   5. la griglia dei marchi

   Tutti degradano: senza JS il selettore mostra i tre pannelli
   uno sotto l'altro, il carosello resta scorrevole a dito, i
   richiami diventano un elenco sotto l'immagine.
   ============================================================ */

/* ============================================================
   1. Le tre linee — selettore a segmenti
   ============================================================ */

.lanes { position: relative; overflow: hidden; }

/* La presa di colore. Tre veli sovrapposti, uno per linea: si
   accende quello giusto. Un solo velo con il gradiente riscritto
   non si puo' animare — i gradienti non si interpolano. */
.lane-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.lane-glow[data-glow='oem'] { background: radial-gradient(90% 70% at 50% 0%, rgba(18, 46, 96, 0.62), transparent 66%); }
.lane-glow[data-glow='racing'] { background: radial-gradient(90% 70% at 50% 0%, rgba(84, 8, 16, 0.68), transparent 66%); }
.lane-glow[data-glow='one-off'] { background: radial-gradient(90% 70% at 50% 0%, rgba(62, 64, 72, 0.6), transparent 66%); }
.lanes[data-lane='oem'] .lane-glow[data-glow='oem'],
.lanes[data-lane='racing'] .lane-glow[data-glow='racing'],
.lanes[data-lane='one-off'] .lane-glow[data-glow='one-off'] { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lane-glow { transition: none; } }

.lanes > .grid { position: relative; z-index: 1; }
.lane-head { margin-bottom: var(--space-8); }

/* la barra a segmenti: fondo pieno, mai backdrop-filter */
.lane-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.lane-tablist {
  display: inline-flex;
  gap: 2px;
  padding: 5px;
  background: rgba(18, 18, 20, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.lane-tablist::-webkit-scrollbar { display: none; }
.lane-tab {
  padding: 0.58rem 1.1rem;
  border: 0;
  border-radius: var(--r-xs);
  background: none;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.lane-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.lane-tab[aria-selected='true'] { color: var(--lane-ink); background: var(--lane); }
.lane-tab[data-lane-tab='oem'][aria-selected='true'] { background: #3d8bff; color: #04122b; }
.lane-tab[data-lane-tab='racing'][aria-selected='true'] { background: #e2001a; color: #fff; }
.lane-tab[data-lane-tab='one-off'][aria-selected='true'] { background: #d6d9e0; color: #0a0a0b; }

/* senza JS i tre pannelli restano uno sotto l'altro e la barra sparisce:
   e' inutile un selettore che non seleziona */
.lanes:not([data-ready]) .lane-tabs { display: none; }
.lane-panel + .lane-panel { margin-top: var(--space-16); }
.lanes[data-ready] .lane-panel { display: none; margin-top: 0; }
.lanes[data-ready] .lane-panel.is-active { display: grid; }

.lane-panel {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-8) var(--col-gap);
  align-items: center;
  position: relative;
  z-index: 1;
}
.lane-panel > * { grid-column: 1 / -1; }
@media (min-width: 960px) {
  .lane-panel > .lane-figure { grid-column: 1 / 8; }
  .lane-panel > .lane-body { grid-column: 8 / 13; }
}
.lanes[data-ready] .lane-panel.is-active { animation: lane-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes lane-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lanes[data-ready] .lane-panel.is-active { animation: none; } }

.lane-figure { position: relative; margin: 0; }
.lane-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
@media (min-width: 960px) { .lane-figure img { aspect-ratio: 16 / 11; } }
.lane-figure .lane-badge {
  position: absolute;
  top: 0.9rem; left: 0.9rem;
  padding: 0.32rem 0.7rem;
  border-radius: var(--r-xs);
  background: var(--lane);
  color: var(--lane-ink);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.lane-body h3 {
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.lane-body > p { margin-top: var(--space-4); color: var(--text-muted); font-size: var(--t-small); max-width: 44ch; }
.lane-points { margin-top: var(--space-8); border-top: 1px solid var(--line); }
.lane-points li {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-small);
}
.lane-points li::before {
  content: '';
  width: 5px; height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--lane);
  transform: translateY(-2px);
}
.lane-cta { margin-top: var(--space-8); display: flex; flex-wrap: wrap; gap: 0.75rem; }
.lane-who {
  margin-top: var(--space-6);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lane-text);
}

/* ============================================================
   2. Carosello orizzontale
   ============================================================ */

.carousel { position: relative; }
.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 21rem);
  gap: var(--col-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.carousel-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .carousel-track { scroll-behavior: auto; } }
@media (min-width: 900px) { .carousel-track { grid-auto-columns: minmax(0, 23rem); } }

.ccard { scroll-snap-align: start; display: flex; flex-direction: column; }
.ccard-figure { position: relative; margin: 0; }
.ccard-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.ccard-body { padding-top: var(--space-4); }
.ccard-kicker {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lane-text);
}
.ccard h3 { margin-top: 0.55rem; font-size: var(--t-h3); font-weight: 500; }
.ccard p { margin-top: 0.5rem; font-size: var(--t-small); color: var(--text-muted); }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: var(--space-8);
}
.carousel-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}
.carousel-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--line-3); }
.carousel-btn[disabled] { opacity: 0.3; cursor: default; }
.carousel-dots { display: flex; align-items: center; gap: 0.4rem; }
.carousel-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-3); transition: width 0.25s ease, background 0.25s ease; }
.carousel-dots i.is-on { width: 20px; border-radius: 3px; background: var(--red); }
/* senza JS i controlli non servono: il carosello si scorre a dito */
.carousel:not([data-ready]) .carousel-controls { display: none; }

/* ============================================================
   3. Journal — griglia di schede immagine
   ============================================================ */

.jgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); }
.jcard {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.jcard:hover { transform: translateY(-3px); border-color: var(--line-2); }
.jcard:hover .arrow-btn { background: var(--red); border-color: var(--red); color: #fff; }
@media (min-width: 760px) {
  .jcard { grid-column: span 4; }
  .jcard--wide { grid-column: span 8; }
}
.jcard-figure { position: relative; margin: 0; }
.jcard-figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.jcard--wide .jcard-figure img { aspect-ratio: 21 / 9; }
.jcard .arrow-btn { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; }
.jcard-body { padding: clamp(1rem, 1.6vw, 1.35rem); display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.jcard-kicker {
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.jcard h3 { font-size: 1.0625rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; }
.jcard p { font-size: var(--t-small); color: var(--text-muted); }
.jcard time { margin-top: auto; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-faint); }

/* ============================================================
   4. Richiami sopra la vettura
   ============================================================ */

.hotspots { position: relative; margin: 0; }
.hotspots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); }
.hotspot-layer { position: absolute; inset: 0; }
.hotspot {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  max-width: min(17rem, 42vw);
  text-align: left;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(14, 14, 16, 0.92);
  color: var(--text);
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease;
}
.hotspot:hover, .hotspot:focus-visible { background: rgba(24, 24, 28, 0.97); border-color: var(--line-3); }
.hotspot-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--lane); }
.hotspot-label { display: block; font-size: var(--t-small); font-weight: 600; letter-spacing: -0.01em; }
.hotspot-text {
  display: block;
  font-size: var(--t-micro);
  color: var(--text-muted);
  font-weight: 400;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease;
}
.hotspot:hover .hotspot-text,
.hotspot:focus-visible .hotspot-text,
.hotspot[aria-expanded='true'] .hotspot-text { max-height: 6rem; opacity: 1; margin-top: 0.25rem; }

/* sotto i 760px i richiami stanno sotto l'immagine, in chiaro */
.hotspot-list { display: grid; gap: 0.5rem; margin-top: var(--space-6); }
.hotspot-list li { display: flex; gap: 0.7rem; align-items: baseline; font-size: var(--t-small); }
.hotspot-list li::before { content: ''; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--lane); transform: translateY(-2px); }
.hotspot-list b { font-weight: 600; }
.hotspot-list span { color: var(--text-muted); }
@media (min-width: 760px) { .hotspot-list { display: none; } }
@media (max-width: 759px) { .hotspot-layer { display: none; } }

/* ============================================================
   5. Marchi / campionati
   ============================================================ */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
@media (min-width: 640px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .logo-grid { grid-template-columns: repeat(6, 1fr); } }
.logo-grid li {
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 2.4vw, 2rem) 0.75rem;
  background: var(--void);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease, background 0.2s ease;
}
.logo-grid li:hover { color: var(--text); background: var(--void-2); }
