/* ==========================================================================
   Bruumers — app.bruumers.it
   Token presi dall'app: app/lib/core/theme/app_colors.dart (colori),
   app_theme.dart (raggi e ombre), app_text.dart (Figtree, cifre tabulari).
   Il dorato è solo decorativo: per i testi c'è --gold-text.
   ========================================================================== */

:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --surface-alt: #EFEDE6;
  --hairline: #E6E3DA;
  --hairline-strong: #D6D2C6;
  --text: #1C1B18;
  --text-2: #5C584F;
  --text-3: #6F6A5F;
  --primary: #1C1B18;
  --primary-hover: #37352F;
  --on-primary: #FCEAC6;
  --gold: #C9A84C;
  --gold-text: #7A5F1A;
  --gold-soft: #F4ECD8;
  --danger: #C8321F;
  --danger-soft: #FBE5E1;
  --success: #1F7A4D;
  --success-soft: #DFF0E6;
  --info: #1F6FB5;
  --live: #6B3FD4;
  --sand: #F4ECD8;  --sand-ink: #7A5F1A;
  --sage: #E2EEE3;  --sage-ink: #2C6E49;
  --sky: #DFEAF3;   --sky-ink: #2A628F;
  --peach: #F9E6DC; --peach-ink: #A64B23;
  --route: #1E66D0;
  --leader: #D92D20;
  --marker: #FFFFFF;
  --on-marker: #1C1B18;
  --focus: #1F6FB5;
  --bezel: #1C1B18;
  --bezel-edge: rgba(255, 255, 255, 0);

  --shadow-card: 0 1px 3px rgba(0, 0, 0, .04);
  --shadow-fab: 0 2px 8px rgba(0, 0, 0, .18);
  --shadow-phone: 0 2px 6px rgba(28, 27, 24, .10), 0 30px 60px -22px rgba(28, 27, 24, .40);
  --shadow-phone-sm: 0 1px 3px rgba(28, 27, 24, .10), 0 18px 36px -18px rgba(28, 27, 24, .35);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(72px, 9vw, 120px);
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F0D;
    --surface: #191815;
    --surface-alt: #23211C;
    --hairline: #2E2B25;
    --hairline-strong: #3D3A31;
    --text: #F4F2EA;
    --text-2: #B3AFA3;
    --text-3: #8A8578;
    --primary: #C9A84C;
    --primary-hover: #D7B962;
    --on-primary: #141310;
    --gold-text: #E3CC7A;
    --gold-soft: #2A2720;
    --danger: #FF6A5E;
    --danger-soft: #3A1E1A;
    --success: #5BC48B;
    --success-soft: #17301F;
    --info: #6DB0EC;
    --live: #A78BFA;
    --sand: #2A2720;  --sand-ink: #E3CC7A;
    --sage: #1F2A23;  --sage-ink: #8FD0A8;
    --sky: #1E2830;   --sky-ink: #93C5EC;
    --peach: #2E2320; --peach-ink: #F0A98A;
    --marker: #191815;
    --on-marker: #F4F2EA;
    --focus: #6DB0EC;
    --bezel: #23211C;
    --bezel-edge: #3D3A31;
    /* Come nell'app: al buio le superfici si separano col filetto, non con l'ombra. */
    --shadow-card: none;
    --shadow-fab: 0 2px 8px rgba(0, 0, 0, .5);
    --shadow-phone: 0 30px 60px -26px rgba(0, 0, 0, .8);
    --shadow-phone-sm: 0 18px 36px -20px rgba(0, 0, 0, .8);
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
a { color: inherit; }
a:not([class]) {
  color: var(--gold-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:not([class]):hover { text-decoration-thickness: 2px; }
button { font: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--gold-soft); color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; flex: none; width: 24px; height: 24px; fill: currentColor; vertical-align: middle; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.tnum { font-variant-numeric: tabular-nums; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 1100;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Tipografia ---------- */

h1 {
  font-size: clamp(42px, 6.4vw, 80px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h3 { font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }

.lead {
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--gold-text);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--gold-soft);
  color: var(--gold-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .01em;
  vertical-align: 2px;
  white-space: nowrap;
}

/* ---------- Pulsanti ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: 600 16px/1.2 var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--hairline-strong); }
.btn-secondary:hover { background: var(--surface-alt); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }

.text-link {
  color: var(--gold-text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.text-link:hover { text-decoration-thickness: 2px; }
/* inline-block: la sottolineatura del link non passa alla dimensione. */
.text-link span { display: inline-block; margin-left: 8px; color: var(--text-3); font-weight: 500; }

/* ---------- Testata ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--hairline); }

.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  padding: 8px 13px;
  border-radius: var(--r-pill);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { background: var(--surface-alt); color: var(--text); }
.header-cta { margin-left: 8px; }

@media (max-width: 1023px) {
  .nav { display: none; }
  .header-cta { margin-left: auto; }
}

/* ---------- Sezioni ---------- */

.section { padding-block: var(--section-y); }
.section-head { max-width: 760px; }
.section-head h2 { margin-top: 14px; }
.section-head .lead { margin-top: 16px; }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- Apertura ---------- */

.hero {
  padding-block: clamp(32px, 6vw, 80px) clamp(64px, 8vw, 112px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.news-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.news-pill:hover { border-color: var(--hairline-strong); color: var(--text); }
.news-pill .icon { width: 18px; height: 18px; }
.news-tag {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--gold-soft);
  color: var(--gold-text);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 { margin-top: 24px; }
.hero h1 .soft { display: block; color: var(--text-3); }
.hero .lead { margin-top: 22px; max-width: 33em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 24px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}
.hero-notes li { display: inline-flex; align-items: center; gap: 6px; }
.hero-notes .icon { width: 18px; height: 18px; color: var(--success); }

@media (max-width: 899px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 479px) {
  .hero-cta .btn { width: 100%; }
}

/* ---------- Telefoni ---------- */

.phone {
  position: relative;
  padding: var(--bez, 6px);
  border-radius: var(--rad, 36px);
  background: var(--bezel);
  box-shadow: var(--shadow-phone), inset 0 0 0 1px var(--bezel-edge);
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--rad, 36px) - var(--bez, 6px));
  background: #F6F5F1;
}

/* Composizioni a due telefoni: misure in cqw, così scalano col contenitore. */
.phones { position: relative; width: 100%; margin-inline: auto; container-type: inline-size; }
.phones .phone {
  position: absolute;
  width: var(--pw);
  --bez: 1.4cqw;
  --rad: calc(var(--pw) * .16);
}
.phone--front { z-index: 2; }
.phone--back { z-index: 1; }

.phones--hero { max-width: 470px; aspect-ratio: 100 / 124; }
.phones--hero::before {
  content: "";
  position: absolute;
  top: 14%;
  left: 0;
  width: 104%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold-soft);
}
.phones--hero .phone--front { --pw: 52cqw; left: 0; top: 10cqw; }
.phones--hero .phone--back { --pw: 46cqw; right: 2cqw; top: 0; }

.phones--duo { max-width: 450px; aspect-ratio: 100 / 117; }
.phones--duo .phone--front { --pw: 50cqw; left: 5cqw; top: 8cqw; }
.phones--duo .phone--back { --pw: 44cqw; right: 3cqw; top: 0; }

@media (max-width: 559px) {
  .phones--hero { aspect-ratio: 100 / 136; }
  .phones--hero .phone--front { --pw: 58cqw; left: 1cqw; top: 9cqw; }
  .phones--hero .phone--back { --pw: 50cqw; right: 0; }
  .phones--duo { aspect-ratio: 100 / 133; }
  .phones--duo .phone--front { --pw: 57cqw; left: 1cqw; top: 8cqw; }
  .phones--duo .phone--back { --pw: 49cqw; right: 0; }
}

/* ---------- Funzioni ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(32px, 5vw, 56px);
}
.feature {
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.feature h3 { margin-top: 18px; }
.feature p { margin-top: 8px; color: var(--text-2); font-size: 15.5px; line-height: 1.55; }

.tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--tile-bg);
  color: var(--tile-ink);
}
.tile--sand  { --tile-bg: var(--sand);  --tile-ink: var(--sand-ink); }
.tile--sage  { --tile-bg: var(--sage);  --tile-ink: var(--sage-ink); }
.tile--sky   { --tile-bg: var(--sky);   --tile-ink: var(--sky-ink); }
.tile--peach { --tile-bg: var(--peach); --tile-ink: var(--peach-ink); }
.tile--danger { --tile-bg: var(--danger-soft); --tile-ink: var(--danger); }

@media (max-width: 1023px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .features { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .feature {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 16px;
    padding: 20px;
  }
  .feature .tile { grid-row: span 2; }
  .feature h3 { margin-top: 0; align-self: center; }
  .feature p { margin-top: 4px; }
}

/* ---------- Approfondimenti (testo + telefoni) ---------- */

.spot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}
.spot--flip .spot-media { order: -1; }
.spot-text h2 { margin-top: 14px; }
.spot-text .lead { margin-top: 18px; }

.spot-media {
  padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: 32px;
  background: var(--panel, var(--surface-alt));
}
.panel--sage  { --panel: var(--sage); }
.panel--sky   { --panel: var(--sky); }
.panel--sand  { --panel: var(--sand); }
.panel--peach { --panel: var(--peach); }

.checks { display: grid; gap: 14px; margin-top: 28px; }
.checks li { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; line-height: 1.45; }
.tick {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: -1px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--sage-ink);
}
.tick .icon { width: 18px; height: 18px; }
.fine-print { margin-top: 20px; color: var(--text-3); font-size: 14.5px; }

@media (max-width: 899px) {
  .spot-grid { grid-template-columns: minmax(0, 1fr); }
  .spot--flip .spot-media { order: 0; }
}

/* ---------- Mappa ---------- */

.map-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  margin-top: clamp(32px, 5vw, 48px);
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.map-frame { position: relative; min-width: 0; }
/* isolation: gli z-index di Leaflet (400-1000) restano dentro la mappa e non passano sopra la testata. */
.map-canvas {
  height: 440px;
  isolation: isolate;
  background: var(--surface-alt);
}
.map-canvas:focus-visible { outline-offset: -3px; }

.map-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 90px);
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-fab);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}
.map-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.map-chip strong { color: var(--text); font-weight: 700; }
.live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

.map-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-fab);
  cursor: pointer;
}
.map-toggle:hover { background: var(--surface-alt); }
.map-toggle .icon-play,
.map-toggle.is-paused .icon-pause { display: none; }
.map-toggle.is-paused .icon-play { display: inline-block; }

.map-frame.is-fallback .map-chip { display: none; }
.map-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  color: var(--text-2);
  font-size: 16px;
  text-align: center;
}

.map-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-left: 1px solid var(--hairline);
}
.map-panel-title { display: flex; align-items: center; justify-content: space-between; font-size: 17px; }
.map-panel-title .count {
  min-width: 30px;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.riders { display: grid; gap: 12px; }
.riders li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who { display: grid; min-width: 0; line-height: 1.3; }
.who strong { font-size: 15.5px; font-weight: 700; }
.who small { color: var(--text-3); font-size: 13.5px; }
.map-note { margin-top: auto; color: var(--text-3); font-size: 13px; line-height: 1.5; }

/* Bolle dei motociclisti: stesse proporzioni di disegnaBolla() nell'app. */
.rider {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 3.5px solid var(--ring, var(--route));
  border-radius: 50%;
  background: var(--marker);
  color: var(--on-marker);
  font: 800 14px/1 var(--font);
  letter-spacing: -0.01em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
}
.rider--staff { border: 2.5px solid #FFFFFF; background: var(--leader); color: #FFFFFF; }

.rider-icon { background: none; border: 0; }
.rider-icon .rider { transition: transform .2s ease; }
.map-canvas.is-far .rider-icon .rider { transform: scale(.86); }

/* Leaflet con i token del sito. */
.map-canvas.leaflet-container { background: var(--surface-alt); font-family: var(--font); }
.map-canvas .leaflet-tile-pane { filter: saturate(.75) contrast(.97); }
.map-canvas .leaflet-bar {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-fab);
}
.map-canvas .leaflet-bar a {
  width: 40px;
  height: 40px;
  border-bottom-color: var(--hairline);
  background: var(--surface);
  color: var(--text);
  font: 600 22px/40px var(--font);
}
.map-canvas .leaflet-bar a:hover { background: var(--surface-alt); }
.map-canvas .leaflet-bar a.leaflet-disabled { background: var(--surface); color: var(--text-3); opacity: .55; }
.map-canvas .leaflet-control-attribution {
  padding: 2px 8px;
  border-top-left-radius: 8px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text-2);
  font-size: 11px;
}
.map-canvas .leaflet-control-attribution a { color: var(--gold-text); }

@media (prefers-color-scheme: dark) {
  .map-canvas .leaflet-tile-pane { filter: brightness(.8) saturate(.6) contrast(1.06); }
}

@media (max-width: 899px) {
  .map-card { grid-template-columns: minmax(0, 1fr); }
  .map-canvas { height: 360px; }
  .map-panel { border-left: 0; border-top: 1px solid var(--hairline); }
  .riders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 399px) {
  .riders { gap: 12px 8px; }
  .riders li { gap: 8px; }
  .who strong { font-size: 14.5px; }
  .who small { font-size: 12.5px; }
}

/* ---------- Anteprima ---------- */

.section--preview {
  border-block: 1px solid var(--hairline);
  background: var(--surface);
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.preview-scroller { margin-top: clamp(32px, 5vw, 56px); }
.preview-scroller:focus-visible { outline-offset: 6px; border-radius: var(--r-md); }
.preview { container-type: inline-size; }
.preview .phone { --bez: 2.6cqw; --rad: 15cqw; box-shadow: var(--shadow-phone-sm), inset 0 0 0 1px var(--bezel-edge); }
.preview figcaption { display: grid; gap: 4px; margin-top: 18px; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.preview figcaption strong { color: var(--text); font-size: 16px; font-weight: 700; }

@media (max-width: 899px) {
  .preview-scroller {
    margin-inline: calc(-1 * var(--gutter));
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
  }
  .preview-list {
    display: flex;
    gap: 16px;
    width: max-content;
    padding: 4px var(--gutter) 20px;
  }
  .preview { flex: 0 0 auto; width: min(62vw, 240px); scroll-snap-align: start; }
}

.auto-block { margin-top: clamp(64px, 8vw, 104px); }
.auto-head { max-width: 760px; }
.auto-head h3 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; }
.auto-head .lead { margin-top: 14px; }

.car-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(28px, 4vw, 40px);
}

/* Cornice da cruscotto: schermo incassato e una fila di comandi sotto. */
.dash-frame {
  padding: 12px 12px 0;
  border-radius: 26px;
  background: linear-gradient(180deg, #2A2823 0%, #1A1916 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, var(--shadow-phone-sm), 0 0 0 1px var(--bezel-edge);
}
.dash-screen {
  overflow: hidden;
  border-radius: 14px;
  background: #0F0F0D;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6);
}
.dash-screen img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.dash-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
}
.dash-controls span { width: 28px; height: 6px; border-radius: 3px; background: #3D3A31; }
.dash-controls i {
  width: 22px;
  height: 22px;
  margin-inline: 8px;
  border: 2px solid #3D3A31;
  border-radius: 50%;
  background: #23211C;
}

.dash figcaption { display: grid; gap: 6px; margin-top: 16px; color: var(--text-2); font-size: 15px; }
.dash-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dash-title strong { color: var(--text); font-size: 18px; font-weight: 700; }
.auto-note { margin-top: clamp(20px, 3vw, 28px); color: var(--text-3); font-size: 14px; max-width: 760px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.status--ok { --dot: var(--success); }
.status--soon { --dot: var(--gold); }

@media (max-width: 767px) {
  .car-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Download ---------- */

.dl-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "android steps" "android ios";
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 16px;
  margin-top: clamp(32px, 5vw, 56px);
}
.dl-android { grid-area: android; }
.dl-steps { grid-area: steps; }
.dl-ios { grid-area: ios; }

.dl-android, .dl-steps, .dl-ios {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.dl-android { padding: clamp(24px, 4vw, 40px); }
.dl-head { display: flex; align-items: center; gap: 18px; }
.dl-logo { width: 72px; height: 72px; }
.dl-head h3 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.dl-meta { margin-top: 6px; color: var(--text-2); font-size: 15.5px; }
.dl-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 28px; }
.dl-hint { color: var(--text-3); font-size: 14.5px; }

.dl-notes { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.dl-notes h4 { font-size: 15px; font-weight: 700; }
.dl-notes ul { display: grid; gap: 6px; margin-top: 10px; padding-left: 20px; color: var(--text-2); font-size: 15px; }

.dl-sha { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; color: var(--text-3); font-size: 12.5px; }
.dl-sha .icon { width: 18px; height: 18px; color: var(--success); }
.dl-sha code { color: var(--text-2); font: 12px/1.5 var(--mono); word-break: break-all; }

.dl-qr { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .dl-qr {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
  }
  .dl-qr img {
    flex: none;
    width: 104px;
    height: 104px;
    padding: 6px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: #FFFFFF;
  }
  .dl-qr p { max-width: 30em; color: var(--text-2); font-size: 15px; }
  .dl-qr strong { color: var(--text); }
}

.dl-steps { padding: clamp(24px, 3.5vw, 36px); }
.dl-steps h3 { font-size: 20px; }
.steps { display: grid; gap: 18px; margin-top: 20px; counter-reset: step; }
.steps li { position: relative; padding-left: 46px; color: var(--text-2); counter-increment: step; }
.steps .text-link { font-size: inherit; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.steps strong { color: var(--text); }

@media (max-width: 479px) {
  .dl-head { gap: 14px; }
  .dl-logo { width: 56px; height: 56px; }
}

.dl-ios { display: flex; align-items: center; gap: 16px; padding: 22px 24px; }
.dl-ios p { color: var(--text-2); font-size: 15px; }

/* Il blocco del telefono di chi visita (solo evidenza, nessun redirect). */
.for-you {
  position: absolute;
  top: -13px;
  left: 22px;
  display: none;
  padding: 3px 11px;
  border: 1px solid var(--gold);
  border-radius: var(--r-pill);
  background: var(--gold-soft);
  color: var(--gold-text);
  font-size: 12.5px;
  font-weight: 700;
}
html[data-platform="android"] .dl-android,
html[data-platform="ios"] .dl-ios {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow-card);
}
html[data-platform="android"] .dl-android .for-you,
html[data-platform="ios"] .dl-ios .for-you { display: inline-block; }

@media (max-width: 899px) {
  .dl-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "android" "steps" "ios";
    grid-template-rows: none;
  }
  html[data-platform="ios"] .dl-grid { grid-template-areas: "ios" "android" "steps"; }
}

/* ---------- Domande ---------- */

.faq {
  max-width: 820px;
  margin: clamp(32px, 5vw, 48px) auto 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.faq details + details { border-top: 1px solid var(--hairline); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--r-xl);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline-offset: -3px; }
.faq summary .icon { color: var(--text-3); transition: transform .2s ease; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq .answer { padding: 0 24px 22px; color: var(--text-2); }

/* ---------- Piede ---------- */

.site-footer {
  padding-block: 32px 40px;
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
  font-size: 15px;
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; }
.footer-brand img { width: 32px; height: 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-links .icon { width: 16px; height: 16px; color: var(--text-3); }

/* ---------- Movimento ridotto ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
