/* Landing di Rewace: stesso stile dell'app (bianco e nero, blocchi grigio chiaro senza
   ombre, card in evidenza nere). Il colore solo per i dati: verde = risparmio. */
:root {
  --bg: #ffffff;
  --surface: #f4f4f5;
  --text: #0a0a0a;
  --text-2: #3f3f46;
  --muted: #8a8a93;
  --line: #e8e8eb;
  --black: #0a0a0a;
  --green: #11994a;
  --radius: 24px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv05', 'cv08'; overflow-x: hidden; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--black); color: #fff; font-size: 17px; font-weight: 600; text-decoration: none;
  transition: transform 0.12s, background 0.15s;
}
.btn:hover { background: #26262a; }
.btn:active { transform: scale(0.97); }
.btn-small { height: 42px; padding: 0 18px; font-size: 15px; }
.btn-light { background: #fff; color: var(--black); }
.btn-light:hover { background: #ececee; }
.btn-block { width: 100%; }

/* ---------- barra in alto ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 14px 20px; padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.logo img { height: 25px; width: auto; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 48px; padding-bottom: 72px; }
.badge { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text-2); }
.hero h1 { margin-top: 22px; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; font-weight: 800; }
.grey { color: var(--muted); }
.lead { margin-top: 22px; max-width: 520px; font-size: 19px; line-height: 1.5; color: var(--text-2); }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.hint { font-size: 15px; color: var(--muted); }

.qr-inline { margin-top: 36px; display: flex; align-items: center; gap: 18px; padding: 16px; padding-right: 24px; border-radius: var(--radius); background: var(--surface); width: fit-content; }
.qr-inline p { font-size: 15px; line-height: 1.45; color: var(--text-2); }
.qr-inline strong { color: var(--text); }
.qr { width: 96px; height: 96px; padding: 8px; border-radius: 14px; background: #fff; flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-big { width: 220px; height: 220px; padding: 14px; border-radius: 20px; margin: 22px auto 0; border: 1px solid var(--line); }

.hero-phone { display: flex; justify-content: center; }
.hero-phone .phone { width: min(340px, 100%); }

/* ---------- telefono: lo screenshot vero dell'app con una cornice sottile ---------- */
.phone {
  margin: 0; aspect-ratio: 390 / 844; border-radius: 46px; padding: 9px;
  background: var(--black);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 38px; background: #f2f2f3; }

/* ---------- funzioni ---------- */
.features { display: flex; flex-direction: column; gap: 20px; padding-bottom: 20px; }
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: 56px 64px 0; border-radius: 32px; background: var(--surface); overflow: hidden;
}
.feature .phone { width: min(300px, 100%); justify-self: center; margin-bottom: -150px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.feature { padding-bottom: 0; min-height: 520px; }
.feature.reverse .feature-text { order: 2; }
.feature-text { padding-bottom: 56px; }
.feature h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; font-weight: 800; }
.feature p { margin-top: 16px; font-size: 17px; line-height: 1.55; color: var(--text-2); max-width: 440px; }

.stat { margin-top: 28px; display: flex; flex-direction: column; gap: 4px; padding-top: 20px; border-top: 1px solid #dcdce0; max-width: 440px; }
.stat-value { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 15px; color: var(--muted); }
.green { color: var(--green); }

/* ---------- come provarla: card nera ---------- */
.steps-card { margin: 20px 0 72px; padding: 56px 64px; border-radius: 32px; background: var(--black); color: #fff; }
.steps-card h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; }
.steps { list-style: none; counter-reset: s; margin: 32px 0 36px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.5; }
.steps li::before {
  content: counter(s); width: 36px; height: 36px; border-radius: 50%; margin-bottom: 8px;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: #fff; color: var(--black);
}
.steps strong { font-size: 18px; }
.steps span { color: #a1a1aa; }

/* ---------- footer ---------- */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 40px;
  /* linea solo sotto il contenuto, non sotto il margine laterale */
  background: linear-gradient(var(--line), var(--line)) top center / calc(100% - 40px) 1px no-repeat; }
.foot img { height: 19px; width: auto; }
.foot p { font-size: 13px; color: var(--muted); text-align: right; }

/* ---------- pannello "Prova l'app" ---------- */
.sheet {
  width: min(440px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 0; border-radius: 28px;
  background: #fff; color: var(--text);
}
.sheet::backdrop { background: rgba(17, 17, 20, 0.45); }
.sheet[open] { animation: sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.sheet-close-row { display: flex; justify-content: flex-end; padding: 14px 14px 0; margin: 0; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); font-size: 24px; line-height: 1; }
.sheet-body { padding: 0 28px 28px; text-align: center; }
.sheet-body h2 { font-size: 26px; font-weight: 800; }
.app-icon { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px; }
.muted { color: var(--muted); font-size: 16px; line-height: 1.5; margin-top: 8px; }
.small { font-size: 14px; margin-top: 18px; }
.link { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.steps.compact { grid-template-columns: 1fr; gap: 0; margin: 22px 0 24px; text-align: left; }
.steps.compact li { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; row-gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.steps.compact li::before { grid-row: span 2; margin: 0; background: var(--black); color: #fff; }
.steps.compact strong { font-size: 16px; }
.steps.compact span { color: var(--muted); font-size: 15px; }

/* il pannello mostra il QR al computer e le istruzioni sul telefono (classi messe da main.js) */
.is-mobile .desktop-only, .is-desktop .mobile-only { display: none !important; }
.is-ios .android-only, .is-android .ios-only { display: none !important; }
.is-mobile.is-other .steps.compact { display: none !important; }

/* ---------- telefono e tablet ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 28px; padding-bottom: 48px; }
  .hero-phone .phone { width: min(300px, 82%); }
  .qr-inline { display: none; }
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 32px; padding: 36px 24px 0; min-height: 0; border-radius: 28px; }
  .feature.reverse .feature-text { order: 0; }
  .feature-text { padding-bottom: 0; }
  .feature .phone { width: min(280px, 80%); margin-bottom: -120px; }
  .steps-card { padding: 36px 24px; border-radius: 28px; margin-bottom: 48px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps-card .btn { width: 100%; }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot p { text-align: left; }
}
@media (max-width: 480px) {
  .hero-cta .btn { width: 100%; }
  .lead { font-size: 17px; }
  .sheet { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet[open] { animation: none; }
}
