:root { color-scheme: light dark; --bg: #f5f5f7; --card: #fff; --text: #1d1d1f; --muted: #5c5c61; --accent: #0a6cdc; --line: rgba(128,128,128,.22); --frame: #0b1730; }
@media (prefers-color-scheme: dark) { :root { --bg: #000; --card: #1c1c1e; --text: #f5f5f7; --muted: #a1a1a6; --accent: #4da3ff; --line: rgba(255,255,255,.14); --frame: #2c2c2e; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; }
a { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

header.site { position: absolute; top: 0; left: 0; right: 0; z-index: 10; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: #fff; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
nav a { margin-left: 24px; color: rgba(255,255,255,.85); text-decoration: none; font-size: 15px; font-weight: 500; }
nav a:hover { color: #fff; }
/* pagine interne: header scuro su sfondo chiaro */
body.plain header.site { position: static; border-bottom: 1px solid var(--line); }
body.plain .brand { color: var(--text); }
body.plain nav a { color: var(--muted); }
body.plain nav a:hover { color: var(--text); }

.hero { position: relative; color: #fff; text-align: center; overflow: hidden; border-radius: 0 0 56px 56px;
        background: radial-gradient(120% 90% at 50% 0%, #3a9bff 0%, #0a64d8 48%, #063a8a 100%); padding: 132px 0 0; }
.hero .icon { width: 92px; height: 92px; margin: 0 auto 26px; border-radius: 21px; box-shadow: 0 14px 40px rgba(0,20,70,.45); }
.hero h1 { font-size: clamp(40px, 7.4vw, 80px); line-height: 1.04; letter-spacing: -0.025em; font-weight: 800; margin: 0 auto 18px; max-width: 880px; text-wrap: balance; }
.hero .lead { font-size: clamp(18px, 2.4vw, 23px); color: rgba(255,255,255,.86); margin: 0 auto 32px; max-width: 600px; }
a.button { display: inline-block; padding: 15px 32px; border-radius: 16px; background: #fff; color: #0a56b8; text-decoration: none; font-weight: 700; font-size: 17px; box-shadow: 0 10px 30px rgba(0,20,70,.35); }
a.button.solid { background: var(--accent); color: #fff; box-shadow: none; }
@media (prefers-color-scheme: dark) { a.button.solid { color: #000; } }
.hero small { display: block; margin-top: 16px; color: rgba(255,255,255,.7); font-size: 14px; }
.fan { --cw: clamp(190px, 29vw, 330px); --sw: calc(var(--cw) * .82); position: relative; height: calc(var(--cw) * 1.7); margin-top: 56px; }
.fan .phone { position: absolute; transform-origin: 50% 100%; }
.fan .phone.c { width: var(--cw); left: 50%; margin-left: calc(var(--cw) / -2); bottom: calc(var(--cw) * -.47); z-index: 2; }
.fan .phone.l, .fan .phone.r { width: var(--sw); bottom: calc(var(--cw) * -.62); }
.fan .phone.l { left: 50%; margin-left: calc(var(--cw) / -2 - var(--sw) * .78); transform: rotate(-7deg); }
.fan .phone.r { left: 50%; margin-left: calc(var(--cw) / 2 - var(--sw) * .22); transform: rotate(7deg); }

/* gli screenshot hanno già la cornice dell'iPhone (frames, Silver) */
.phone { filter: drop-shadow(0 28px 36px rgba(0,20,70,.28)); }
.phone img { width: 100%; display: block; }

main.sections { padding: 64px 0 24px; }
.feature { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 24px;
           background: var(--tint, var(--card)); border-radius: 40px; margin: 0 0 24px; padding: 64px 0 0 64px; overflow: hidden; min-height: 520px; }
.feature.flip { padding: 64px 64px 0 0; }
.feature.flip .text { order: 2; }
.feature .text { padding-bottom: 64px; align-self: center; }
.feature .shot { align-self: end; display: flex; justify-content: center; }
.feature .shot .phone { width: min(84%, 320px); margin-bottom: -150px; }
/* Amici: la Live Activity della schermata di blocco sopra il telefono */
.feature .shot.has-live { position: relative; }
.feature .shot .live { position: absolute; left: 50%; bottom: 28px; width: min(96%, 360px); transform: translateX(-50%) rotate(-2deg); border-radius: 7% / 16.5%; box-shadow: 0 24px 60px rgba(20,0,50,.4); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 10px; }
.feature h2 { font-size: clamp(28px, 3.8vw, 42px); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 16px; font-weight: 800; }
.feature p { color: var(--muted); font-size: 18px; margin: 0 0 10px; max-width: 460px; }
.feature ul { padding-left: 20px; margin: 0; color: var(--muted); font-size: 18px; max-width: 460px; }
.feature li { margin: 6px 0; }
.t1 { --tint: #e8f1ff; } .t2 { --tint: #e6f7ec; } .t3 { --tint: #fff1e3; } .t4 { --tint: #f1eaff; } .t5 { --tint: #e3f6f8; } .t6 { --tint: #ffe9ee; }
@media (prefers-color-scheme: dark) { .t1 { --tint: #0e1c33; } .t2 { --tint: #0d2518; } .t3 { --tint: #2b1b0b; } .t4 { --tint: #1f1533; } .t5 { --tint: #0b2328; } .t6 { --tint: #33121b; } }

.band { padding: 40px 0 8px; }
.band h2 { text-align: center; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; margin: 0 0 28px; font-weight: 800; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border-radius: 24px; padding: 26px; }
.card h3 { margin: 0 0 8px; font-size: 20px; }
.card p { color: var(--muted); font-size: 16px; margin: 0; }

/* piani: Gratis e Pro */
.plans .card ul { padding-left: 18px; margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.plans .card li { margin: 5px 0; }
.plans .card h3 { font-size: 26px; }
.plans .card h3 span { display: block; margin-top: 2px; font-size: 15px; color: var(--muted); font-weight: 500; }
.plans .card.pro { box-shadow: inset 0 0 0 2px var(--accent); }
.cta .soon { color: var(--muted); margin: 18px 0 0; font-size: 15px; }
.cta { text-align: center; padding: 72px 0 48px; }
.cta img { width: 80px; height: 80px; border-radius: 19px; margin: 0 auto 18px; box-shadow: 0 10px 30px rgba(10,100,216,.3); }
.cta h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; margin: 0 0 22px; font-weight: 800; }

.prose { background: var(--card); border-radius: 24px; padding: 8px 28px 28px; margin: 32px 0 0; }
.prose h1 { font-size: 34px; letter-spacing: -0.02em; margin: 24px 0 4px; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; }
.prose h3 { font-size: 17px; margin: 18px 0 4px; }
.prose p, .prose li { font-size: 16px; }
.prose .meta { color: var(--muted); font-size: 14px; }

footer.site { padding: 36px 0 52px; color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid var(--line); margin-top: 24px; }
footer.site a { color: inherit; margin: 0 8px; }
footer.site p { margin: 6px 0; }

@media (max-width: 820px) {
  .hero { padding-top: 104px; border-radius: 0 0 36px 36px; }
  .fan { margin-top: 40px; }
  .feature, .feature.flip { grid-template-columns: minmax(0,1fr); padding: 40px 28px 0; gap: 8px; border-radius: 32px; min-height: 0; }
  .feature.flip .text { order: 0; }
  .feature .text { padding-bottom: 28px; }
  .feature .shot .phone { width: min(78%, 300px); margin-bottom: -110px; }
  .feature .shot .live { width: min(92%, 330px); bottom: 20px; }
  nav a { margin-left: 16px; }
}

/* telefoni: la barra in alto non sta tutta, Funzioni e Termini restano nel sito e nel piè di pagina */
@media (max-width: 560px) {
  nav a { margin-left: 14px; font-size: 14px; }
  nav a[href="/#funzioni"], nav a[href="/termini"], nav a[href="/en/terms"] { display: none; }
}

/* beta: modulo in fondo alla home (beta.js) */
.cta .soon { max-width: 520px; margin: 0 auto 24px; }
.beta-form { display: grid; gap: 14px; max-width: 520px; margin: 0 auto; text-align: left; background: var(--card); border-radius: 24px; padding: 26px; }
.beta-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.beta-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.beta-form input:not([type=radio]) { font: inherit; font-size: 17px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; }
.beta-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.beta-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.beta-form fieldset[hidden] { display: none; }
.beta-form legend { font-size: 14px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; }
.beta-form .choice { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 500; color: var(--text); }
.beta-form .choice input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.beta-form .detected { margin: 0; color: var(--muted); }
.beta-form .detected strong { color: var(--text); }
.beta-form button.link { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.beta-form .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.beta-form .error { margin: 0; color: #d70015; font-size: 15px; }
.beta-form .note { margin: 0; color: var(--muted); font-size: 14px; }
.beta-form button.button { font: inherit; font-weight: 700; font-size: 17px; border: 0; cursor: pointer; width: 100%; padding: 15px 32px; border-radius: 16px; background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .beta-form button.button { color: #000; } .beta-form .error { color: #ff6961; } }
.beta-form button.button:disabled { opacity: .6; cursor: default; }
.cta .done { max-width: 520px; margin: 0 auto; font-size: 18px; font-weight: 600; color: var(--accent); }
@media (max-width: 560px) { .beta-form .row { grid-template-columns: 1fr; } .beta-form { padding: 20px; } }
