/* Metronium — sito di lancio. Stessa palette dell'app (Theme.swift, varianti scure). */
:root {
  --bg: #0d0f14;
  --surface: #171a21;
  --surface-raised: #20242d;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f5fb;
  --text-2: #a9adc1;
  --text-3: #6f7488;
  --brand: #8b83ff;
  --brand-strong: #6d63ff;
  --brand-deep: #4f46e5;
  --brand-soft: #262451;
  --protein: #2dd4bf;
  --carbs: #f2b533;
  --fat: #db8fbb;
  --success: #4ade80;
  --danger: #f87171;
  --radius-card: 20px;
  --radius-control: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Bagliore di sfondo nei colori del marchio */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -20vw auto;
  height: 90vh;
  background:
    radial-gradient(40% 50% at 30% 30%, rgba(109, 99, 255, 0.28), transparent 70%),
    radial-gradient(30% 40% at 75% 20%, rgba(45, 212, 191, 0.10), transparent 70%),
    radial-gradient(30% 40% at 60% 55%, rgba(219, 143, 187, 0.10), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }

/* ---------- Barra in alto ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgba(13, 15, 20, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-control);
  font: 600 16px/1 var(--font);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.3,.7,.4,1.4), background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid rgba(139, 131, 255, 0.55); outline-offset: 2px; }
.btn-primary { background: linear-gradient(180deg, var(--brand-strong), var(--brand-deep)); color: #fff; box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45); }
.btn-primary:hover { text-decoration: none; box-shadow: 0 10px 30px rgba(79, 70, 229, 0.6); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font: 600 14px/1.2 var(--font);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(139,131,255,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(139,131,255,0); } 100% { box-shadow: 0 0 0 0 rgba(139,131,255,0); } }

h1, h2, h3 { font-family: var(--font); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.04; font-weight: 800; margin: 18px 0 18px; }
h1 .accent { background: linear-gradient(90deg, var(--protein), var(--carbs) 50%, var(--fat)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 .accent-brand { background: linear-gradient(180deg, #b3adff, var(--brand) 45%, var(--brand-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--text-2); max-width: 34em; margin: 0 0 28px; }

/* Conto alla rovescia */
.countdown { display: flex; gap: 10px; margin: 0 0 26px; }
.countdown .unit {
  min-width: 76px;
  padding: 12px 8px 10px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.countdown .num { display: block; font: 700 32px/1 var(--font); font-variant-numeric: tabular-nums; }
.countdown .lbl { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.countdown-caption { margin: -14px 0 24px; color: var(--text-3); font-size: 14px; }

/* Modulo della lista d'attesa */
.waitlist { display: flex; gap: 10px; max-width: 480px; }
.field {
  flex: 1;
  min-height: 50px;
  padding: 0 16px;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: 16px var(--font-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field::placeholder { color: var(--text-3); }
.field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(139, 131, 255, 0.2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { margin: 12px 0 0; font-size: 14px; color: var(--text-3); }
.form-note a { color: var(--text-2); text-decoration: underline; }
.form-status { margin: 12px 0 0; font-weight: 600; font-family: var(--font); }
.form-status:empty { display: none; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--danger); }
.waitlist.done { display: none; }
.thanks {
  display: none;
  align-items: center; gap: 14px;
  max-width: 480px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  animation: pop 0.45s cubic-bezier(.3,.7,.4,1.3);
}
.thanks.show { display: flex; }
.thanks .check { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--success); color: #062b14; display: grid; place-items: center; font-weight: 800; }
.thanks strong { font-family: var(--font); display: block; }
.thanks span { color: var(--text-2); font-size: 15px; }
@keyframes pop { from { transform: scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Telefono con la schermata Oggi (copia fedele dell'app, tema scuro) ---------- */
.phone {
  position: relative;
  width: min(320px, 100%);
  margin: 0 auto;
  padding: 10px;
  border-radius: 60px;
  background: linear-gradient(145deg, #4a4d58, #16171c 35%, #0b0c0f 65%, #33363f);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255,255,255,0.10), inset 0 0 0 4px #050506;
  transform: rotate(-2deg);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #2c2e36; }
.phone::before { left: -3px; top: 150px; height: 64px; box-shadow: 0 -86px 0 0 #2c2e36; }
.phone::after { right: -3px; top: 190px; height: 96px; }
.screen { position: relative; width: 100%; aspect-ratio: 402 / 874; border-radius: 50px; overflow: hidden; background: #0d0f14; }

.app {
  --label-2: rgba(235, 235, 245, 0.6);
  --label-3: rgba(235, 235, 245, 0.3);
  position: absolute;
  top: 0; left: 0;
  width: 402px; height: 874px;
  transform-origin: top left;
  transform: scale(var(--s, 0.746));
  background: #0d0f14;
  color: #fff;
  font-family: var(--font-text);
  letter-spacing: -0.01em;
}
.status { position: relative; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 52px; }
.status .time { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.status .island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 126px; height: 37px; border-radius: 20px; background: #000; }
.status-icons { display: flex; gap: 6px; align-items: center; color: #fff; }
.status-icons svg { fill: currentColor; }

.app-content { padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.app-title { font-size: 34px; font-weight: 700; line-height: 41px; padding-top: 8px; letter-spacing: 0.01em; }

.week { display: flex; }
.week .day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.week .day span { font-size: 11px; color: var(--label-2); }
.week .day b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 400; }
.week .day.sel b { background: var(--brand); color: #fff; font-weight: 700; }
.week .day.fut b { color: var(--label-2); }
.week .day i { width: 5px; height: 5px; border-radius: 50%; }
.week .day i.ok { background: var(--success); }

.app-card { background: var(--surface); border-radius: 20px; }
.summary-card { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.summary-top { display: flex; align-items: center; gap: 28px; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-raised); }
.ring .value { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.8,.2,1); }
.ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .center b { font: 700 22px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.ring .center small { font-size: 11px; color: var(--label-2); }
.metrics { display: flex; flex-direction: column; gap: 16px; }
.metrics .pair { display: flex; gap: 28px; }
.metrics small { display: block; font-size: 12px; color: var(--label-2); }
.metrics b { display: block; font: 700 20px/1.2 var(--font); font-variant-numeric: tabular-nums; }
.metrics .link { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; color: var(--brand); }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.macro small { display: block; font-size: 12px; color: var(--label-2); margin-bottom: 4px; }
.bar { height: 6px; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.macro b { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.macro.p .bar { background: rgba(45,212,191,.18); } .macro.p i { background: var(--protein); }
.macro.c .bar { background: rgba(242,181,51,.18); } .macro.c i { background: var(--carbs); }
.macro.f .bar { background: rgba(219,143,187,.18); } .macro.f i { background: var(--fat); }

.meals-head { display: flex; justify-content: space-between; align-items: baseline; }
.meals-head span { font-size: 20px; font-weight: 700; }
.meals-head a { font-size: 15px; color: var(--brand); }
.meal { display: flex; align-items: center; gap: 12px; padding: 12px; margin-top: -4px; }
.meal-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.meal-icon svg { width: 21px; height: 21px; fill: currentColor; }
.meal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.meal-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.meal-row b { font-size: 17px; font-weight: 600; }
.meal-row span { font-size: 15px; color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.meal-foods { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meal-macros { font-size: 12px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.meal-detail { font-size: 11px; color: var(--label-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meal-empty { font-size: 15px; color: var(--label-3); }
.meal-plus { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(139,131,255,.3); }
.meal-plus svg { width: 16px; height: 16px; fill: none; stroke: var(--brand); stroke-width: 3.2; stroke-linecap: round; }

.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 90px;
  display: flex; align-items: center;
  padding: 8px 24px 24px;
  box-sizing: border-box;
  background: rgba(23, 26, 33, 0.82);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--label-2); }
.tab svg { width: 24px; height: 24px; fill: currentColor; }
.tab span { font-size: 10px; font-weight: 500; }
.tab.on { color: var(--brand); }
.tab-add { flex: none; width: 58px; height: 58px; transform: translateY(-10px); border-radius: 50%; background: var(--brand); display: grid; place-items: center; box-shadow: 0 4px 16px rgba(139,131,255,0.35); }
.tab-add svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; }
.home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: #fff; }

/* ---------- Sezioni ---------- */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin: 0 0 36px; }
.eyebrow { font: 700 13px var(--font); text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand); }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; font-weight: 800; margin: 10px 0 12px; }
.section-head p { color: var(--text-2); margin: 0; font-size: 18px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), border-color 0.3s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(139,131,255,.35); }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; background: var(--brand-soft); color: var(--brand); }
.icon svg { width: 22px; height: 22px; }
.icon.teal { background: rgba(45,212,191,.12); color: var(--protein); }
.icon.amber { background: rgba(242,181,51,.12); color: var(--carbs); }
.icon.rose { background: rgba(219,143,187,.12); color: var(--fat); }
.feature h3 { font-size: 20px; margin: 0 0 8px; }
.feature p { margin: 0; color: var(--text-2); font-size: 16px; }

/* Etichetta nutrizionale (ordine europeo) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.label-card { max-width: 420px; margin-left: auto; }
.label-card .head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.label-card .head span { font: 700 17px var(--font); }
.label-card .head b { font: 700 30px var(--font); font-variant-numeric: tabular-nums; }
.label-card .head b small { font-size: 13px; color: var(--text-2); margin-left: 3px; }
.energy { display: flex; gap: 3px; height: 8px; margin: 4px 0 6px; }
.energy i { border-radius: 6px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.legend span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--c); }
.row { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.row b { font: 600 16px var(--font); display: flex; align-items: center; gap: 8px; }
.row b::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, rgba(255,255,255,.3)); }
.row.sub { border-top: 0; padding: 3px 0 7px 18px; color: var(--text-2); font-size: 14px; }
.row.sub span:first-child { display: flex; align-items: center; gap: 8px; }
.row.sub span:first-child::before { content: ""; width: 3px; height: 15px; border-radius: 3px; background: var(--c); opacity: .55; }
.verified { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(74,222,128,.1); color: var(--success); font: 600 13px var(--font); }

.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; color: var(--text-2); }
.checks li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 13px; margin-top: 1px; }
.checks strong { color: var(--text); }

/* Privacy */
.privacy-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.privacy-band .feature { background: linear-gradient(180deg, var(--surface), rgba(23,26,33,.6)); }

/* Invito finale */
.cta {
  text-align: center;
  padding: 56px 28px;
  border-radius: 32px;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(109,99,255,.35), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
}
.cta img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 12px 30px rgba(79,70,229,.45); }
.cta h2 { margin-top: 18px; }
.cta p { color: var(--text-2); max-width: 32em; margin: 0 auto 26px; }
.cta .waitlist, .cta .thanks { margin: 0 auto; text-align: left; }
.cta .form-note, .cta .form-status { text-align: center; }

footer { padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 22px; }
footer a { color: var(--text-2); }

/* Comparsa allo scorrimento */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 44px; }
  .grid, .privacy-band { grid-template-columns: 1fr 1fr; }
  .label-card { margin: 0 auto; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .grid, .privacy-band { grid-template-columns: 1fr; }
  .waitlist { flex-direction: column; }
  .countdown .unit { min-width: 0; flex: 1; }
  .countdown .num { font-size: 26px; }
  .phone { transform: none; }
  section { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Pagine di testo (privacy) ---------- */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 5vw, 48px); margin: 12px 0 8px; }
.doc .updated { color: var(--text-3); margin: 0 0 28px; }
.doc .summary-box { padding: 22px 24px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); margin-bottom: 36px; }
.doc .summary-box h2 { font-size: 20px; margin: 0 0 10px; }
.doc .summary-box ul { margin: 0; padding-left: 20px; color: var(--text-2); }
.doc .summary-box li { margin: 6px 0; }
.doc h2 { font-size: 26px; margin: 44px 0 12px; scroll-margin-top: 84px; }
.doc h3 { font-size: 19px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc strong { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .toc { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(6, auto); grid-auto-flow: column; gap: 6px 28px; padding: 0; list-style: none; margin: 0 0 8px; }
.doc .toc li { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-family: var(--font); color: var(--text); font-size: 14px; background: var(--surface); }
.doc td { color: var(--text-2); }
.doc .table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
.doc .table-wrap table { margin: 0; }
.doc .todo { background: rgba(242,181,51,.14); color: var(--carbs); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
@media (max-width: 600px) { .doc .toc { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; } }
