/* ============================================================
   site.css — stili della landing page.
   Caricato DOPO style.css, che resta invariato per le pagine
   legali (privacy.html, terms.html): qui si sovrascrive solo
   ciò che serve alla landing, senza toccare quei documenti.
   ============================================================ */

:root {
  /* Gradiente del marchio, campionato dall'icona dell'app:
     ciano → blu → viola. */
  --brand-1: #3fc1ef;
  --brand-2: #5ba8f1;
  --brand-3: #9868f5;
  --brand: linear-gradient(135deg, var(--brand-1), var(--brand-2) 45%, var(--brand-3));
  --brand-tint: rgba(91, 168, 241, 0.10);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.06), 0 24px 60px rgba(0,0,0,.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-tint: rgba(91, 168, 241, 0.16);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.5);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 24px 60px rgba(0,0,0,.6);
  }
}

body.landing { padding: 0; }

.landing .container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 22px;
}

.landing h2 {
  border-top: none;
  padding-top: 0;
  font-size: clamp(26px, 4.4vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.landing .section { padding: 76px 0; }
.landing .section-alt { background: var(--bg-soft); }
.landing .section-head { max-width: 620px; margin-bottom: 36px; }
.landing .section-head p { color: var(--text-dim); font-size: 18px; margin: 0; }

/* ---------- Barra di navigazione ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav .brand { font-size: 17px; margin-right: auto; }

/* Niente background qui: il segnaposto gradiente vincerebbe per specificità
   sull'icona vera impostata in style.css. */
.nav .brand .dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-links { display: flex; gap: 20px; }

.nav-links a {
  font-size: 15px;
  color: var(--text-dim);
  text-decoration: none;
}

.nav-links a:hover { color: var(--text); }

.langs a {
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  line-height: 1.4;
}

.langs a[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */

.hero { padding: 64px 0 40px; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 380px);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 6.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 18px 0 18px;
}

.hero h1 .grad {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0 0 28px;
  max-width: 34em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--accent);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Badge "Presto su App Store": informativo, non è un link —
   l'app non è ancora pubblicata. */
.store-badge {
  /* E' un link alla scheda su App Store: senza queste due righe erediterebbe
     sottolineatura e colore dei link del testo. */
  text-decoration: none;
  transition: transform .12s ease, opacity .12s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px 11px 18px;
  border-radius: 13px;
  background: var(--text);
  color: var(--bg);
  line-height: 1.15;
}

.store-badge svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store-badge .small { display: block; font-size: 11px; opacity: .8; }
.store-badge .big { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.store-badge:hover { transform: translateY(-1px); opacity: .9; }
.store-badge:focus-visible { outline: 3px solid var(--accent, #0071e3); outline-offset: 3px; }

.hero-note { font-size: 14px; color: var(--text-dim); margin: 18px 0 0; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-phone { justify-self: center; }
}

/* ---------- Screenshot della Home (ritagliato dagli screenshot dello Store) ----------
   Il PNG ha già angoli arrotondati trasparenti e la dissolvenza in basso:
   qui solo dimensione e ombra. Sorgenti in assets/home/, una per lingua. */

.phone-shot {
  display: block;
  width: 300px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(20, 30, 60, .18));
}

/* ---------- Mockup iPhone (ricostruito in HTML/CSS) ---------- */

.hero-phone { display: flex; justify-content: center; }

.phone {
  width: 300px;
  border-radius: 46px;
  padding: 11px;
  background: linear-gradient(160deg, #2a2a2e, #0f0f11);
  box-shadow: var(--shadow-lg);
  flex: none;
}

.phone-screen {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  background: #f1f2f6;
  color: #1d1d1f;
  padding: 0 13px 8px;
  font-size: 12px;
}

.ph-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 12px 6px 8px;
}

.ph-signal { display: flex; gap: 3px; align-items: flex-end; }
.ph-signal i { width: 3px; background: #1d1d1f; border-radius: 1px; display: block; }
.ph-signal i:nth-child(1) { height: 4px; }
.ph-signal i:nth-child(2) { height: 6px; }
.ph-signal i:nth-child(3) { height: 8px; }
.ph-battery {
  width: 20px; height: 10px;
  border: 1px solid #1d1d1f;
  border-radius: 3px;
  position: relative;
}
.ph-battery::before {
  content: ""; position: absolute; inset: 1.5px; right: 5px;
  background: #1d1d1f; border-radius: 1px;
}

.ph-greet { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 6px 4px 12px; }

.ph-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.ph-card {
  border-radius: 12px;
  padding: 10px;
  background: #e3effc;
  border: 1px solid rgba(0,0,0,.04);
}
.ph-card.next { background: #e4f6ea; }
.ph-card span { display: block; font-size: 10px; color: #6e6e73; font-weight: 600; }
.ph-card strong { display: block; font-size: 17px; letter-spacing: -.02em; margin: 3px 0 2px; color: #0071e3; }
.ph-card.next strong { color: #2ba14f; }
.ph-card small { font-size: 10px; color: #8a8a8e; }

.ph-list-title { font-weight: 700; margin: 14px 4px 8px; font-size: 13px; }

.ph-list { list-style: none; margin: 0; padding: 8px 10px; background: #fff; border-radius: 14px; }

.ph-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; }
.ph-row + .ph-row { border-top: 1px solid #ececf0; }

.ph-ico {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
}
.ph-ico svg { width: 15px; height: 15px; }

.ph-name { flex: 1; min-width: 0; }
.ph-name b { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; }
.ph-name span { display: block; font-size: 10.5px; color: #8a8a8e; margin-top: 1px; }
.ph-amt { text-align: right; flex: none; }
.ph-amt b { display: block; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ph-amt span { display: block; font-size: 10px; color: #8a8a8e; }
.ph-amt b.est { color: #e08a1e; }

.ph-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-top: 3px;
}
.ph-tag.due { background: #fff0d9; color: #c47710; }

.ph-tabs {
  display: flex;
  justify-content: space-around;
  margin: 10px -13px 0;
  padding: 9px 0 14px;
  background: #fff;
  border-top: 1px solid #ececf0;
  font-size: 9.5px;
  color: #8a8a8e;
}
.ph-tab { display: grid; justify-items: center; gap: 3px; }
.ph-tab svg { width: 17px; height: 17px; }
.ph-tab.on { color: #0071e3; }

/* ---------- Striscia dati chiave ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin: 8px 0 0;
}

.fact { background: var(--bg); padding: 22px 20px; }
.fact b { display: block; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.fact span { display: block; font-size: 14px; color: var(--text-dim); margin-top: 5px; }

/* ---------- Griglia funzioni ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.feature .ficon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--brand-tint);
  margin-bottom: 14px;
}
.feature .ficon svg { width: 21px; height: 21px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.feature h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--text-dim); font-size: 15.5px; }

/* Etichetta per una funzione non ancora rilasciata a tutti (in test /
   in arrivo): stesso linguaggio a pillola dei badge del report di
   risparmio, colore viola per distinguerla da uno stato "attivo". */
.beta-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f2ecfd;
  color: #7c4fe0;
}

/* ---------- Sezione report di risparmio ---------- */

.insights { display: grid; gap: 12px; }

.insight {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}

.insight .badge {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 2px;
}

.insight div { min-width: 0; }
.insight b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.insight p { margin: 2px 0 0; color: var(--text-dim); font-size: 14.5px; }

/* Su schermi stretti il badge accanto al testo lo comprimerebbe in una
   colonna di poche parole: meglio impilarlo sopra. */
@media (max-width: 560px) {
  .insight { flex-direction: column; gap: 10px; }
  .insight .badge { align-self: flex-start; margin-top: 0; }
}

/* ---------- Prezzi ---------- */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

.plan {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  background: var(--bg-card);
}

.plan.pro { border-color: transparent; box-shadow: 0 0 0 2px var(--accent); }

.plan h3 { margin: 0; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); }
.plan .price { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin: 8px 0 2px; }
.plan .price small { font-size: 15px; font-weight: 400; color: var(--text-dim); letter-spacing: 0; }
.plan .price-note { color: var(--text-dim); font-size: 14px; margin: 0 0 18px; }

.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 15.5px; }
.plan li svg { width: 17px; height: 17px; flex: none; margin-top: 3px; stroke: #2ba14f; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; }

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}

.faq summary {
  cursor: pointer;
  padding: 18px 34px 18px 0;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s ease;
}

.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

.faq details p { margin: 0 0 20px; color: var(--text-dim); font-size: 16px; max-width: 68ch; }

@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* ---------- Chiusura + footer ---------- */

.closing {
  text-align: center;
  border-radius: 22px;
  padding: 62px 28px;
  background: var(--brand);
  color: #fff;
}

.closing h2 { color: #fff; margin-bottom: 10px; }
.closing p { color: rgba(255,255,255,.92); font-size: 18px; max-width: 44ch; margin: 0 auto 26px; }
.closing .store-badge { background: #fff; color: #1d1d1f; }

.landing footer { margin-top: 0; padding: 40px 0; }
.landing footer .container { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.landing footer .spacer { margin-left: auto; }
.landing footer a { margin: 0; }
