/* La presentazione (landing.html): pubblica, scura come la notte in auto.
   Pensata prima per lo schermo della Tesla (773×601 col riquadro diviso,
   1254×784 a tutto schermo: sopra la piega il titolo, i pulsanti e la
   Plancia), poi per telefono e computer. Tutto si tocca con il dito: i
   pulsanti sono alti almeno 48 px. */

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope-latin.woff2?v=1") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #07090d;
  --bg-2: #0d1118;
  --card: rgb(255 255 255 / .045);
  --card-hi: rgb(255 255 255 / .075);
  --line: rgb(255 255 255 / .1);
  --text: #f2f4f7;
  --muted: #a9b1bd;
  --accent: #1f6feb;
  --accent-hi: #3b82f6;
  --accent-text: #79adff;
  --radius: 22px;
  --wrap: min(1180px, calc(100% - 32px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background:
    radial-gradient(70rem 40rem at 85% -10%, rgb(31 111 235 / .32), transparent 60%),
    radial-gradient(50rem 32rem at -10% 10%, rgb(20 160 150 / .16), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40rem);
  background-color: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); }
h1, h2, h3 { margin: 0; letter-spacing: -.022em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent-hi); outline-offset: 3px; border-radius: 8px; }

.lp-skip {
  position: absolute; left: 16px; top: -60px; z-index: 30; padding: 12px 16px; border-radius: 12px;
  background: var(--text); color: var(--bg); font-weight: 700; text-decoration: none;
}
.lp-skip:focus { top: 12px; }

/* --- barra in alto ---------------------------------------------------------- */

.lp-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px max(16px, calc((100% - 1180px) / 2));
  background: rgb(7 9 13 / .72);
  backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
.lp-brand { display: inline-flex; align-items: center; min-height: 48px; }
.lp-nav { display: flex; gap: 4px; }
.lp-nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px;
  color: var(--muted); text-decoration: none; font-weight: 500; border-radius: 12px;
}
.lp-nav a:hover { color: var(--text); }
.lp-top-cta { margin-left: auto; display: flex; gap: 8px; }

/* --- pulsanti ---------------------------------------------------------------- */

.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card-hi); color: var(--text);
  font: 600 16px/1.2 inherit; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
}
.lp-btn:hover { background: rgb(255 255 255 / .12); }
.lp-btn:active { transform: scale(.98); }
.lp-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 24px -8px rgb(31 111 235 / .7); }
.lp-btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.lp-btn-ghost { background: transparent; }
.lp-btn-big { min-height: 56px; padding: 0 24px; font-size: 17px; border-radius: 16px; }
@media (prefers-reduced-motion: reduce) { .lp-btn { transition: none; } .lp-btn:active { transform: none; } }

/* --- apertura ------------------------------------------------------------------ */

.lp-hero {
  width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(20px, 3.5vw, 56px);
  align-items: center;
  /* Sullo schermo dell'auto tutta l'apertura sta sopra la piega. */
  min-height: min(calc(100svh - 69px), 760px);
  padding: clamp(16px, 3vh, 48px) 0 clamp(24px, 5vh, 64px);
}
.lp-eyebrow { color: var(--accent-text); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.lp-hero h1 { margin: 10px 0 14px; font-size: clamp(30px, 3.3vw + 9px, 58px); font-weight: 800; }
.lp-lead { color: var(--muted); font-size: clamp(16px, .55vw + 12px, 20px); max-width: 34em; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.lp-facts { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.lp-facts li { display: inline-flex; align-items: center; gap: 8px; }
.lp-facts li::before { content: ""; width: 16px; height: 16px; flex: none; background: url("/static/landing/check.svg?v=1") center / 16px no-repeat; }

.lp-hero-shot { margin: 0; display: grid; gap: 12px; }
/* Lo schermo: la cornice nera e il riflesso della luce, come quello dell'auto. */
.lp-bezel {
  position: relative; padding: clamp(6px, .8vw, 10px); border-radius: clamp(16px, 2vw, 26px);
  background: linear-gradient(160deg, #20242c, #050608 55%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 40px 80px -30px rgb(0 0 0 / .9), 0 0 120px -30px rgb(31 111 235 / .55);
}
.lp-bezel img { border-radius: clamp(10px, 1.3vw, 18px); width: 100%; }
.lp-bezel::after {
  content: ""; position: absolute; inset: clamp(6px, .8vw, 10px); border-radius: clamp(10px, 1.3vw, 18px); pointer-events: none;
  background: linear-gradient(115deg, rgb(255 255 255 / .09), transparent 35%);
}
.lp-hero-shot figcaption { color: var(--muted); font-size: 13px; text-align: center; }

/* --- sezioni ---------------------------------------------------------------------- */

.lp-section { width: var(--wrap); margin: 0 auto; padding: clamp(40px, 8vh, 96px) 0 0; }
.lp-section-head { display: grid; gap: 10px; margin-bottom: clamp(20px, 3.5vh, 40px); max-width: 40em; }
.lp-section-head h2 { font-size: clamp(26px, 2.2vw + 10px, 44px); font-weight: 800; }

.lp-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.lp-feature {
  display: grid; align-content: start; gap: 18px; padding: clamp(10px, 1.2vw, 14px) clamp(10px, 1.2vw, 14px) 22px;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
}
.lp-shot { border-radius: calc(var(--radius) - 8px); overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgb(255 255 255 / .06); }
.lp-shot img { width: 100%; }
.lp-feature-copy { display: grid; gap: 8px; padding: 0 8px; }
.lp-feature h3 { font-size: clamp(20px, .8vw + 13px, 24px); font-weight: 700; }
.lp-feature p { color: var(--muted); }

.lp-tiles {
  list-style: none; margin: clamp(14px, 2vw, 24px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px);
}
.lp-tile { padding: 20px 20px 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.lp-tile svg {
  width: 44px; height: 44px; padding: 10px; border-radius: 12px; margin-bottom: 4px;
  background: linear-gradient(160deg, var(--accent-hi), var(--accent)); box-shadow: 0 6px 18px -6px rgb(31 111 235 / .8);
  fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.lp-tile h3 { font-size: 18px; font-weight: 700; }
.lp-tile p { color: var(--muted); font-size: 15px; }

.lp-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
/* Tre punti in fila: una riga sottile sopra, col primo tratto nel blu dell'app. */
.lp-points li { position: relative; display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.lp-points li::before { content: ""; position: absolute; top: -1px; left: 0; width: 32px; height: 1px; background: var(--accent-hi); }
.lp-points strong { font-size: 18px; }
.lp-points span { color: var(--muted); font-size: 15px; }

.lp-join { padding-bottom: clamp(40px, 8vh, 96px); }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); counter-reset: step; }
.lp-steps li { position: relative; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.lp-step-n {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px;
  background: rgb(31 111 235 / .18); color: var(--accent-text); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums;
}
.lp-steps h3 { font-size: 19px; font-weight: 700; }
.lp-steps p { color: var(--muted); font-size: 15px; }
.lp-cta-center { justify-content: center; margin-top: clamp(22px, 4vh, 40px); }

.lp-foot {
  width: var(--wrap); margin: 0 auto; padding: 28px 0 40px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: 14px 24px; align-items: center;
  color: var(--muted); font-size: 13px;
}
.lp-foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; justify-content: flex-end; }
.lp-foot nav a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.lp-foot nav a:hover { color: var(--text); }
.lp-foot p { grid-column: 1 / -1; }

/* --- schermi più stretti ------------------------------------------------------- */

/* La Tesla col riquadro diviso (773 px) e i tablet: l'apertura resta a due
   colonne, più compatta; sotto le tiles a due. */
@media (max-width: 1000px) {
  .lp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-nav { display: none; }
}
@media (max-width: 900px) and (min-width: 760px) {
  .lp-hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .lp-hero h1 { font-size: clamp(28px, 2.6vw + 12px, 40px); }
  .lp-lead { font-size: 16px; }
  .lp-btn-big { min-height: 52px; padding: 0 18px; font-size: 16px; }
  .lp-facts { display: none; }
}
/* Telefono: una colonna. */
@media (max-width: 759px) {
  .lp-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 28px; }
  .lp-features, .lp-points, .lp-steps { grid-template-columns: minmax(0, 1fr); }
  .lp-top-cta .lp-btn-ghost { display: none; }
  .lp-foot { grid-template-columns: minmax(0, 1fr); }
  .lp-foot nav { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .lp-tiles { grid-template-columns: minmax(0, 1fr); }
  .lp-cta .lp-btn-big { flex: 1 1 100%; }
}
