/* Battery Forecast — website. Same family as mattboxx.github.io/Clipboard-Bridge: system font, floating
   pill navigation, large headings, light/dark from the visitor's system. No external resources. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #17191d;
  --muted: #5f6672;
  --line: #e3e6ec;
  --surface: #f5f6f9;
  --accent: #b45a0a;
  --accent-ink: #ffffff;
  --brand: #3d2f7a;
  --heart: #c2416b;
  --nav: rgba(255, 255, 255, 0.86);
  --shadow: 0 30px 80px -30px rgba(23, 25, 29, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #15162b;
    --ink: #f1f0f7;
    --muted: #aeacc3;
    --line: #2e2f52;
    --surface: #1d1e3a;
    --accent: #ffc35a;
    --accent-ink: #1a1426;
    --brand: #c7a6f2;
    --heart: #f49ab6;
    --nav: rgba(29, 30, 58, 0.88);
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }

/* navigazione */
.nav {
  position: sticky; top: 10px; z-index: 10;
  width: min(1080px, 100% - 32px); margin: 10px auto 0;
  display: flex; align-items: center; gap: 22px;
  padding: 10px 14px 10px 18px;
  background: var(--nav); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 34px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 26px; height: 26px; }
.nav .links { margin-left: auto; display: flex; gap: 20px; align-items: center; font-size: 14px; }
.nav .links a { text-decoration: none; color: var(--muted); }
.nav .links a:hover { color: var(--ink); }
.nav .support { color: var(--heart) !important; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 720px) { .nav .links .hide-s { display: none; } }
@media (max-width: 520px) { .nav { gap: 12px; padding: 8px 12px; } .nav .links { gap: 14px; } .nav .links .hide-xs { display: none; } }
/* intestazione */
.hero { text-align: center; padding: 56px 0 24px; }
.chip {
  display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted);
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: #3fbf7f; display: inline-block; }
h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.04; font-weight: 750; letter-spacing: -0.035em; margin: 18px 0 12px; }
.lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 720px; margin: 0 auto; }
.ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 28px 0 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px;
  font-weight: 650; font-size: 16px; text-decoration: none; border: 1px solid var(--line);
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.secondary { background: var(--surface); }
.small { font-size: 13px; color: var(--muted); }
.shot { margin: 34px auto 0; width: min(400px, 92%); border-radius: 22px; box-shadow: var(--shadow); }
.caption { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* sezioni */
section { padding: 84px 0; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.eyebrow { font-size: 14px; font-weight: 650; color: var(--brand); margin: 0 0 8px; }
h2 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 750; margin: 0; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; }
.split p { color: var(--muted); font-size: 19px; margin: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 16px; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.card h3 { margin: 10px 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); }
.icon svg { width: 20px; height: 20px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 16px; box-shadow: var(--shadow); }
.gallery figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 10px; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.fact { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.fact b { display: block; font-size: 30px; letter-spacing: -0.02em; }
.fact span { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .facts { grid-template-columns: repeat(2, 1fr); } }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 40px; }
.duo img { border-radius: 18px; box-shadow: var(--shadow); max-width: min(440px, 100%); height: auto; }
@media (max-width: 820px) { .duo { grid-template-columns: 1fr; } }
ul.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ul.checks li { padding-left: 30px; position: relative; color: var(--muted); }
ul.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 700; }
ul.checks b { color: var(--ink); font-weight: 650; }

.notice {
  margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--muted); font-size: 15px;
}
.notice b { color: var(--ink); }
code { font: 14px/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--surface); padding: 2px 6px; border-radius: 6px; }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 650; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--muted); font-size: 14px; }
footer .row { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
footer a { color: var(--muted); }
.kofi { display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 12px; text-decoration: none;
  color: var(--heart) !important; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }

/* comparsa discreta durante lo scorrimento; niente animazioni se l'utente le ha ridotte */
/* nascoste solo se lo script è attivo (classe "js"): senza script si vede tutto */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } .btn { transition: none; } }

/* tre previsioni affiancate: a batteria, in carica, carica ferma */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; align-items: start; }
.trio figure { margin: 0; }
.trio img { border-radius: 16px; box-shadow: var(--shadow); width: 100%; height: auto; }
.trio figcaption { font-size: 15px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.trio figcaption b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }

/* A focused feature demo, separate from the static product introduction. */
.glance-feature { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 88px); }
.glance-lead { color: var(--muted); font-size: 19px; margin: 22px 0 0; max-width: 480px; }
.glance-steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 23px; }
.glance-steps li { display: flex; align-items: start; gap: 15px; }
.glance-steps li > span { color: var(--brand); font: 600 12px/1 ui-monospace, monospace; padding-top: 7px; }
.glance-steps b { font-weight: 650; }
.glance-steps p { color: var(--muted); margin: 3px 0 0; font-size: 16px; }
.glance-media { margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 24px;
  background: radial-gradient(ellipse at top, var(--surface), var(--bg)); box-shadow: var(--shadow); }
.glance-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.glance-label > span { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.glance-media picture { display: block; }
.glance-media img { width: 100%; aspect-ratio: 7 / 9; object-fit: contain; border-radius: 13px; }
.glance-media figcaption { color: var(--muted); font-size: 12px; text-align: center; margin-top: 15px; }
@media (max-width: 820px) {
  .glance-feature { grid-template-columns: 1fr; gap: 32px; }
  .glance-media { width: min(100%, 460px); justify-self: center; }
}

/* banner di presentazione: prima immagine della pagina */
.banner { width: min(1120px, 100%); height: auto; margin: 0 auto 36px; border-radius: 22px; box-shadow: var(--shadow); }
/* su telefono la barra non galleggia: coprirebbe il banner e i contenuti mentre si scorre (in fondo, dopo .hero e .banner) */
@media (max-width: 720px) { .nav { position: relative; top: auto; } .hero { padding-top: 28px; } .banner { margin-bottom: 28px; border-radius: 14px; } }

/* dialogo di download (solo PC): scelta x64 / ARM64 */
.dl {
  width: min(640px, calc(100% - 32px)); padding: 36px 36px 30px; border: 1px solid var(--line); border-radius: 26px;
  background: var(--bg); color: var(--ink); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.55); text-align: center;
}
.dl::backdrop { background: rgba(10, 10, 24, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dl[open] { animation: dl-in .42s cubic-bezier(.2, .9, .25, 1.15); }
.dl[open]::backdrop { animation: dl-fade .3s ease-out; }
.dl h2 { font-size: 26px; margin: 12px 0 6px; letter-spacing: -0.02em; }
.dl-icon { margin: 0 auto; width: 56px; height: 56px; }
.dl-sub { color: var(--muted); margin: 0 0 22px; }
.dl-close-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.dl-x { border: 0; background: transparent; color: var(--muted); font-size: 18px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.dl-x:hover { background: var(--surface); color: var(--ink); }
.dl-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dl-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 18px 22px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); font: inherit;
  cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  animation: dl-card .5s cubic-bezier(.2, .9, .25, 1.1) both;
}
.dl-card:nth-child(2) { animation-delay: .08s; }
.dl-card:hover, .dl-card:focus-visible { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45); outline: none; }
.dl-card svg { width: 40px; height: 40px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.dl-card b { font-size: 19px; }
.dl-arch { font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--brand); }
.dl-card small { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.4; }
.dl-card.chosen { animation: dl-pulse .35s ease-out; border-color: var(--accent); }
.dl-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.dl-hint { color: var(--muted); font-size: 13px; margin: 20px 0 0; }
.dl-hint a { color: var(--ink); }
.dl-done { animation: dl-card .45s cubic-bezier(.2, .9, .25, 1.1) both; }
.dl-check svg { width: 64px; height: 64px; margin: 0 auto; display: block; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dl-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: dl-draw .5s ease-out forwards; }
.dl-check path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: dl-draw .35s .4s ease-out forwards; }
.dl-file { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.dl-steps { text-align: left; max-width: 440px; margin: 0 auto; padding-left: 20px; color: var(--muted); font-size: 15px; }
.dl-steps li { margin: 6px 0; }
.dl-steps b { color: var(--ink); }
@keyframes dl-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes dl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dl-card { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes dl-pulse { 50% { transform: scale(.97); } }
@keyframes dl-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .dl[open], .dl[open]::backdrop, .dl-card, .dl-card.chosen, .dl-done { animation: none; }
  .dl-check circle, .dl-check path { animation: none; stroke-dashoffset: 0; }
  .dl-card { transition: none; }
}
@media (max-width: 560px) { .dl { padding: 30px 20px 24px; } .dl-choices { grid-template-columns: 1fr; } }
