/* ============ HeleoX — sito di presentazione ============ */
/* Palette derivata dal logo: notte violacea, viola gradiente, ciano acceso.
   Severità coerenti con la dashboard: emerald / amber / red, primario indigo/viola. */

:root {
  --bg: #120b24;
  --bg-2: #180f30;
  --bg-3: #1f1440;
  --surface: #1c1238;
  --surface-2: #251a4a;
  --border: #35276266;
  --text: #ece7fb;
  --text-dim: #a99cd4;
  --primary: #8b5cf6;
  --primary-2: #a78bfa;
  --cyan: #38d5f5;
  --emerald: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --grad: linear-gradient(100deg, #a78bfa, #38d5f5);
  --radius: 16px;
  --shadow: 0 20px 60px -20px rgba(10, 4, 30, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  /* trasparente: sotto c'è .video-bg (html tiene il colore di base come fallback) */
  background: transparent;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- sfondo video scroll-driven (homepage) ---------- */
.video-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
@supports (height: 100lvh) {
  /* su mobile la barra degli indirizzi si ritrae durante lo scroll: 100lvh
     copre il viewport "grande", così il video non lascia mai una striscia
     scoperta in basso mentre la barra si anima */
  .video-bg { height: 100lvh; }
}
.video-bg video {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.5; /* il video resta un'atmosfera, mai il protagonista */
}
.video-bg::after {
  /* velo scuro: tiene il contrasto del testo ovunque, un po' più fitto in
     alto dove vivono titolo e CTA dell'hero */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #120b24d9 0%, #120b24b3 45%, #120b24cc 100%);
}
@media (prefers-reduced-motion: reduce) {
  .video-bg { display: none; }
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.accent { color: var(--cyan); }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
code {
  background: #ffffff14; padding: 0.1em 0.4em; border-radius: 6px;
  font-size: 0.9em; color: var(--amber);
}

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: #120b24d9; backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ---------- dropdown "Moduli" (solo CSS: hover + focus-within, niente JS) ---------- */
.nav-drop { position: relative; }
.nav-drop::after { content: ""; position: absolute; top: 100%; left: -20px; right: -20px; height: 14px; } /* ponte invisibile: il menu non si chiude attraversando lo spazio vuoto */
.nav-drop-toggle {
  background: none; border: none; cursor: pointer; padding: 0;
  font: inherit; font-size: 0.92rem; font-weight: 500; color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 0.3rem; transition: color 0.2s;
}
.nav-drop:hover .nav-drop-toggle, .nav-drop:focus-within .nav-drop-toggle, .nav-drop.open .nav-drop-toggle { color: var(--text); }
.nav-drop-toggle .caret { font-size: 0.7em; transition: transform 0.2s; }
.nav-drop:hover .caret, .nav-drop:focus-within .caret, .nav-drop.open .caret { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; z-index: 60;
  min-width: 265px; padding: 0.5rem;
  background: var(--surface-2); border: 1px solid #3a2a6e; border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu, .nav-drop.open .nav-drop-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-drop-menu a {
  padding: 0.55rem 0.8rem; border-radius: 10px; text-decoration: none;
  color: var(--text-dim); font-size: 0.9rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.55rem; transition: background 0.15s, color 0.15s;
}
.nav-drop-menu a:hover { background: #ffffff0d; color: var(--text); }

/* ---------- card della homepage cliccabili (link alle pagine modulo) ---------- */
a.card { text-decoration: none; color: inherit; display: block; }
a.card .card-more { margin-top: 0.8rem; font-size: 0.85rem; font-weight: 700; color: var(--primary-2); }
a.card:hover .card-more { color: var(--cyan); }

/* ---------- pagine modulo ---------- */
.module-hero { position: relative; padding: 4.5rem 0 3rem; overflow: hidden; }
.module-hero .card-icon { font-size: 2.4rem; }
.module-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.18; font-weight: 800; letter-spacing: -0.02em; max-width: 40rem; }
.module-hero .lead { max-width: 40rem; }
.module-block { margin-bottom: 2.8rem; }
.module-block h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.8rem; }
.module-block p { color: var(--text-dim); max-width: 46rem; }
.module-block p strong { color: var(--text); }
.module-block ul { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.6rem; max-width: 46rem; }
.module-block ul li { color: var(--text-dim); padding-left: 1.5rem; position: relative; }
.module-block ul li::before { content: "✓"; position: absolute; left: 0; color: var(--emerald); font-weight: 800; }
.module-block ul li strong { color: var(--text); }
.module-callout {
  margin-top: 1.2rem; max-width: 46rem; padding: 1.2rem 1.4rem;
  background: var(--surface); border-left: 3px solid var(--primary); border-radius: 0 12px 12px 0;
  color: var(--text-dim); font-size: 0.95rem;
}
.module-callout strong { color: var(--text); }
.module-cta { margin-top: 1rem; display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; }
.module-source { font-size: 0.78rem; color: var(--text-dim); opacity: 0.75; }
.module-source a { color: inherit; }
.nav-cta { display: flex; gap: 0.6rem; align-items: center; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .nav-cta .btn-ghost { display: none; } /* su mobile resta solo "Prova ora" */
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 0.85rem 1.7rem; border-radius: 12px;
  font-weight: 700; font-size: 0.98rem; text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary {
  background: linear-gradient(100deg, #7c3aed, #8b5cf6 55%, #38d5f5 140%);
  color: #fff; box-shadow: 0 8px 30px -8px #8b5cf6aa;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px -8px #8b5cf6cc; }
.btn-ghost { border: 1px solid #4b3a86; color: var(--text); background: #ffffff08; }
.btn-ghost:hover { background: #ffffff12; transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.btn-lg { padding: 1.05rem 2.4rem; font-size: 1.1rem; }
.btn-block { display: block; text-align: center; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 6.5rem 0 5.5rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(#a78bfa0d 1px, transparent 1px),
    linear-gradient(90deg, #a78bfa0d 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 30%, transparent 75%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; animation: drift 14s ease-in-out infinite alternate; }
.glow-1 { width: 480px; height: 480px; background: #7c3aed55; top: -140px; left: -100px; }
.glow-2 { width: 380px; height: 380px; background: #38d5f533; bottom: -120px; right: -60px; animation-delay: -7s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(50px, 30px) scale(1.15); } }

.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3.5rem; align-items: center; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }

.pill {
  display: inline-block; padding: 0.35rem 0.9rem; border-radius: 999px;
  border: 1px solid #4b3a86; background: #ffffff0a; color: var(--primary-2);
  font-size: 0.82rem; font-weight: 600; margin-bottom: 1.4rem;
}
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.lead { margin: 1.4rem 0 2rem; font-size: 1.13rem; color: var(--text-dim); max-width: 34rem; }
.lead strong { color: var(--text); }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-cta.center { justify-content: center; }
.hero-note { margin-top: 1.1rem; font-size: 0.86rem; color: var(--text-dim); }

/* ---------- dashboard mockup ---------- */
.dash-card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid #3a2a6e; border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.dash-head {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: var(--red); } .dot.amber { background: var(--amber); } .dot.green { background: var(--emerald); }
.dash-title { margin-left: 0.6rem; font-size: 0.78rem; color: var(--text-dim); font-family: ui-monospace, monospace; }
.dash-body { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; padding: 1.5rem; align-items: center; }
@media (max-width: 520px) { .dash-body { grid-template-columns: 1fr; justify-items: center; } }

.gauge-wrap { position: relative; width: 150px; height: 150px; }
.gauge { width: 150px; height: 150px; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: #ffffff14; stroke-width: 10; }
.gauge-fill {
  fill: none; stroke: url(#g) var(--emerald); stroke: var(--emerald);
  stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.25, 1, 0.4, 1);
}
.gauge-label {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.gauge-score { font-size: 2.1rem; font-weight: 800; line-height: 1; }
.gauge-grade { font-size: 0.76rem; color: var(--emerald); font-weight: 700; margin-top: 0.2rem; }
.radar-sweep {
  position: absolute; inset: 10px; border-radius: 50%;
  background: conic-gradient(from 0deg, #38d5f52e 0deg, transparent 70deg);
  animation: sweep 3.2s linear infinite; pointer-events: none;
}
@keyframes sweep { to { transform: rotate(360deg); } }

.findings { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; }
.finding {
  font-size: 0.82rem; padding: 0.55rem 0.8rem; border-radius: 10px;
  background: #ffffff08; border: 1px solid transparent;
  opacity: 0; transform: translateX(16px);
  animation: slide-in 0.5s ease forwards;
}
.finding.f-ok { color: var(--emerald); animation-delay: 0.7s; }
.finding.f-med { color: var(--text); border-color: #fbbf2433; animation-delay: 1.1s; }
.finding.f-hi { color: var(--text); border-color: #f8717133; animation-delay: 1.5s; }
.finding.f-fix { color: var(--cyan); animation-delay: 1.9s; }
@keyframes slide-in { to { opacity: 1; transform: none; } }
.sev { font-size: 0.68rem; font-weight: 800; padding: 0.1rem 0.5rem; border-radius: 999px; margin-left: 0.3rem; text-transform: uppercase; }
.sev-med { background: #fbbf2426; color: var(--amber); }
.sev-hi { background: #f8717126; color: var(--red); }

/* ---------- sections ---------- */
.section { padding: 5.5rem 0; position: relative; }
.section-alt { background: linear-gradient(180deg, #180f30d9, #120b24cc); } /* traslucido: lascia trasparire lo sfondo video */
.section-head { max-width: 46rem; margin-bottom: 3rem; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 0.8rem;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.section-head p { margin-top: 1rem; color: var(--text-dim); font-size: 1.04rem; }
.section-head p strong { color: var(--text); }

/* ---------- module cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-5px); border-color: #6d4fd1; box-shadow: 0 16px 40px -18px #7c3aed88; }
.card-icon { font-size: 1.7rem; margin-bottom: 0.7rem; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.9rem; color: var(--text-dim); }
.card p strong { color: var(--text); }
.card-featured {
  background: linear-gradient(150deg, #2b1a5e, #1c1238);
  border-color: #7c5df0;
}

/* ---------- score strip ---------- */
.score-strip {
  margin-top: 2.6rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem 2rem; flex-wrap: wrap;
}
.score-strip h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.score-strip p { color: var(--text-dim); font-size: 0.92rem; max-width: 34rem; }
.grade-scale { display: flex; gap: 0.5rem; }
.grade {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.15rem; transition: transform 0.2s;
}
.grade:hover { transform: scale(1.15); }
.g-a { background: #34d39926; color: var(--emerald); }
.g-b { background: #a3e63526; color: #a3e635; }
.g-c { background: #fbbf2426; color: var(--amber); }
.g-d { background: #fb923c26; color: #fb923c; }
.g-f { background: #f8717126; color: var(--red); }

/* ---------- personas ---------- */
.personas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 1000px) { .personas { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .personas { grid-template-columns: 1fr; } }
.persona {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; display: flex; flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.persona:hover { transform: translateY(-5px); border-color: #38d5f580; }
.persona-emoji { font-size: 2rem; margin-bottom: 0.8rem; }
.persona h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.persona p { font-size: 0.88rem; color: var(--text-dim); flex: 1; }
.persona-plan {
  margin-top: 1rem; font-size: 0.78rem; font-weight: 700; color: var(--cyan);
  border-top: 1px dashed var(--border); padding-top: 0.8rem;
}

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 3rem;
}
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: linear-gradient(160deg, #241650, var(--surface));
  border: 1px solid #3a2a6e; border-radius: var(--radius);
  padding: 1.8rem; text-align: center;
}
.stat-num { display: block; font-size: 2.5rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 0.88rem; color: var(--text-dim); }

/* ---------- panels ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.panel { border-radius: var(--radius); padding: 1.8rem; border: 1px solid var(--border); background: var(--surface); }
.panel h3 { margin-bottom: 1rem; font-size: 1.08rem; }
.panel-danger { border-color: #f8717140; }
.panel-good { border-color: #34d39940; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.checklist li { padding-left: 1.5rem; position: relative; font-size: 0.92rem; color: var(--text-dim); }
.checklist li strong { color: var(--text); }
.checklist.bad li::before { content: "✖"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.panel p { font-size: 0.94rem; color: var(--text-dim); }
.panel p strong, .panel p em { color: var(--text); }
.highlight-box {
  margin-top: 1rem; padding: 1rem 1.2rem; border-radius: 12px;
  background: #34d39914; border: 1px solid #34d39940; color: var(--text) !important;
}

/* ---------- cases ---------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .cases { grid-template-columns: 1fr; } }
.case {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; transition: transform 0.25s ease, border-color 0.25s ease;
}
.case:hover { transform: translateY(-5px); border-color: #6d4fd1; }
.case-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--red); background: #f8717118;
  padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.9rem;
}
.case p { font-size: 0.9rem; color: var(--text-dim); }
.case p em { color: var(--text); }
.case-fix { margin-top: 0.9rem; color: var(--cyan) !important; font-weight: 500; }
.case-fix strong { color: var(--text); }

/* ---------- compare table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 2.4rem; }
.compare { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 780px; background: var(--surface); }
.compare th, .compare td { padding: 0.85rem 1rem; text-align: center; border-bottom: 1px solid var(--border); }
.compare td:first-child, .compare th:first-child { text-align: left; color: var(--text); font-weight: 600; }
.compare thead th { background: var(--bg-3); font-size: 0.8rem; letter-spacing: 0.02em; }
.compare tbody td { color: var(--text-dim); }
.col-hx {
  background: #7c3aed1f !important; color: var(--text) !important; font-weight: 700;
  border-left: 1px solid #7c5df055; border-right: 1px solid #7c5df055;
}
.row-price td { font-size: 0.82rem; }

/* ---------- math box ---------- */
.math-box {
  background: linear-gradient(150deg, #241650, var(--surface));
  border: 1px solid #3a2a6e; border-radius: var(--radius); padding: 2rem;
}
.math-box h3 { margin-bottom: 1.4rem; text-align: center; font-size: 1.15rem; }
.math-row { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.math-item { text-align: center; }
.math-label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.math-value { font-size: 2.3rem; font-weight: 800; }
.math-value span { font-size: 1rem; color: var(--text-dim); font-weight: 600; }
.math-value.strike { text-decoration: line-through; text-decoration-color: var(--red); color: var(--text-dim); }
.math-win .math-value { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.math-vs { font-weight: 800; color: var(--cyan); font-size: 1.2rem; }
.math-note { margin-top: 1.6rem; font-size: 0.85rem; color: var(--text-dim); text-align: center; max-width: 44rem; margin-inline: auto; }
.math-note strong { color: var(--text); }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; align-items: stretch; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.8rem 1.5rem; display: flex; flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.plan:hover { transform: translateY(-5px); }
.plan-featured { border-color: #7c5df0; background: linear-gradient(160deg, #2b1a5e, var(--surface)); box-shadow: 0 18px 50px -20px #7c3aedaa; }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #10082a; font-size: 0.72rem; font-weight: 800;
  padding: 0.25rem 0.9rem; border-radius: 999px; white-space: nowrap;
}
.plan h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.plan-price { font-size: 2.3rem; font-weight: 800; margin: 0.5rem 0 0.1rem; }
.plan-price span { font-size: 0.95rem; font-weight: 600; color: var(--text-dim); }
.plan-per { font-size: 0.78rem; color: var(--cyan); font-weight: 700; margin-bottom: 0.8rem; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin: 0.8rem 0 1.4rem; flex: 1; }
.plan ul li { font-size: 0.88rem; color: var(--text-dim); padding-left: 1.4rem; position: relative; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--emerald); font-weight: 800; }
.plan ul li strong { color: var(--text); }
.plan-custom {
  margin-top: 1.2rem; background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
}
.plan-custom-text h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }
.plan-custom-text p { margin-top: 0.3rem; font-size: 0.9rem; color: var(--text-dim); }
.plan-custom-text p strong { color: var(--text); }
.plan-custom .btn { flex-shrink: 0; }
.plans-note { margin-top: 1.6rem; text-align: center; font-size: 0.85rem; color: var(--text-dim); }

/* ---------- beta ---------- */
.beta { background: radial-gradient(ellipse 70% 90% at 50% 110%, #3b1d8a55, transparent), #180f30d9; } /* traslucido come .section-alt */
.beta-inner { text-align: center; max-width: 44rem; }
.beta-logo { width: 76px; height: 76px; border-radius: 20px; margin-bottom: 1.4rem; box-shadow: 0 0 60px #8b5cf680; animation: pulse-glow 3.5s ease-in-out infinite; }
@keyframes pulse-glow { 0%,100% { box-shadow: 0 0 40px #8b5cf660; } 50% { box-shadow: 0 0 80px #38d5f580; } }
.beta h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
.beta p { margin: 1.2rem 0 2rem; color: var(--text-dim); font-size: 1.05rem; }
.beta p strong { color: var(--text); }

/* ---------- osservatorio ---------- */
.obs-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 1.2rem; }
@media (max-width: 1000px) { .obs-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .obs-tiles { grid-template-columns: 1fr; } }
.obs-tile {
  background: linear-gradient(160deg, #241650, var(--surface));
  border: 1px solid #3a2a6e; border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.obs-num {
  font-size: 2rem; font-weight: 800; line-height: 1.1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.obs-label { font-size: 0.85rem; color: var(--text-dim); flex: 1; }
.obs-src { font-size: 0.72rem; color: var(--text-dim); opacity: 0.75; border-top: 1px dashed var(--border); padding-top: 0.6rem; }

.obs-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1.2rem; align-items: stretch; }
@media (max-width: 900px) { .obs-grid { grid-template-columns: 1fr; } }
.obs-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; display: flex; flex-direction: column;
}
.obs-panel-head h3 { font-size: 1.05rem; }
.obs-panel-sub { font-size: 0.82rem; color: var(--text-dim); margin: 0.3rem 0 1.2rem; }
.obs-source { font-size: 0.75rem; color: var(--text-dim); opacity: 0.75; margin-top: 1rem; }

/* grafico a barre — una sola serie, un solo colore (l'identità la danno
   le etichette anno/valore, non il colore); barre sottili, estremità
   arrotondate solo in alto, base ancorata. */
.bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 1.2rem; flex: 1; min-height: 220px; padding-top: 1.6rem; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.45rem; height: 100%; flex: 1; max-width: 84px; }
.bar-fill {
  width: 100%; height: 0; border-radius: 4px 4px 0 0;
  background: var(--primary-2);
  transition: height 1.1s cubic-bezier(0.25, 1, 0.4, 1), filter 0.2s ease;
}
.bars.grown .bar-fill { height: var(--h); }
.bar:nth-child(2) .bar-fill { transition-delay: 0.1s; }
.bar:nth-child(3) .bar-fill { transition-delay: 0.2s; }
.bar:nth-child(4) .bar-fill { transition-delay: 0.3s; }
.bar:hover .bar-fill { filter: brightness(1.2); }
.bar-val { font-size: 0.92rem; font-weight: 800; color: var(--text); }
.bar-year { font-size: 0.78rem; color: var(--text-dim); }

/* feed news */
.obs-feed-head h3 { display: flex; align-items: center; gap: 0.55rem; }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 0 0 #34d39966; animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 #34d39966; } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.news-feed {
  list-style: none; display: flex; flex-direction: column; gap: 0.8rem;
  max-height: 430px; overflow-y: auto; padding-right: 0.4rem;
  scrollbar-width: thin; scrollbar-color: #4b3a86 transparent;
}
.news-item {
  background: #ffffff06; border: 1px solid var(--border); border-radius: 12px;
  padding: 0.9rem 1.1rem; transition: border-color 0.2s ease, background 0.2s ease;
}
.news-item:hover { border-color: #6d4fd1; background: #ffffff0a; }
.news-meta { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.35rem; }
.news-date { font-size: 0.72rem; color: var(--text-dim); font-family: ui-monospace, monospace; }
.news-tag {
  font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--cyan); background: #38d5f518; padding: 0.14rem 0.55rem; border-radius: 999px;
}
.news-title { font-size: 0.94rem; margin-bottom: 0.25rem; }
.news-text { font-size: 0.83rem; color: var(--text-dim); }
.news-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; margin-top: 0.55rem; flex-wrap: wrap; }
.news-impact { font-size: 0.78rem; font-weight: 700; color: var(--amber); }
.news-source { font-size: 0.75rem; color: var(--text-dim); text-decoration: none; }
.news-source:hover { color: var(--cyan); }

.obs-cta { margin-top: 2.2rem; text-align: center; color: var(--text-dim); font-size: 1rem; }
.obs-cta a { color: var(--cyan); text-decoration: none; }
.obs-cta a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 3rem 0; }
.footer-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.footer p { color: var(--text-dim); font-size: 0.88rem; max-width: 38rem; }
.footer-fine { font-size: 0.75rem !important; opacity: 0.7; }
.footer-links { display: flex; gap: 0.7rem; align-items: center; font-size: 0.88rem; }
.footer-links a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--cyan); }
.footer-links span { color: var(--text-dim); }
.footer-legal { font-size: 0.82rem !important; }
.footer-legal a, .footer-fine a { color: var(--text-dim); }
.footer-legal a:hover, .footer-fine a:hover { color: var(--cyan); }

/* ---------- blog (blog.html) ---------- */
.nav-links .nav-active { color: var(--text); }
.blog-hero { position: relative; overflow: hidden; min-height: calc(100vh - 64px - 260px); }
.blog-hero .hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blog-hero .container { position: relative; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; max-width: 56rem; }
@media (max-width: 760px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover { transform: translateY(-5px); border-color: #6d4fd1; box-shadow: 0 16px 40px -18px #7c3aed88; }
.blog-title { font-size: 1.08rem; margin: 0.5rem 0 0.55rem; line-height: 1.35; }
.blog-text { font-size: 0.9rem; color: var(--text-dim); }
.blog-text strong { color: var(--text); }
.blog-text a { color: var(--cyan); }
.blog-empty { color: var(--text-dim); font-size: 0.95rem; }
.blog-card { cursor: pointer; }
.blog-more {
  display: inline-block; margin-top: 0.9rem; font-size: 0.8rem; font-weight: 700;
  color: var(--cyan); border-top: 1px dashed var(--border); padding-top: 0.8rem; width: 100%;
}

/* pop-up dettaglio notizia */
.blog-modal {
  border: none; padding: 0; background: transparent; max-width: none; max-height: none;
  width: 100%; height: 100%; display: none; align-items: center; justify-content: center;
}
.blog-modal[open] { display: flex; }
.blog-modal::backdrop { background: #0a0518cc; backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: min(40rem, calc(100vw - 2.4rem));
  max-height: min(80vh, 40rem); overflow-y: auto;
  background: linear-gradient(160deg, var(--surface-2), var(--bg-2));
  border: 1px solid #4b3a86; border-radius: var(--radius);
  padding: 2rem 2.2rem; box-shadow: var(--shadow);
  scrollbar-width: thin; scrollbar-color: #4b3a86 transparent;
  animation: modal-in 0.25s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border);
  background: #ffffff0a; color: var(--text-dim); font-size: 0.95rem; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: #ffffff14; color: var(--text); }
.modal-title { font-size: 1.35rem; line-height: 1.3; margin: 0.7rem 0 1rem; padding-right: 2.2rem; }
.modal-body p { font-size: 0.95rem; color: var(--text-dim); margin-bottom: 0.9rem; }
.modal-body p strong, .modal-body p em { color: var(--text); }
.modal-body a { color: var(--cyan); }

/* ---------- pagine legali (privacy.html / cookie.html) ---------- */
.legal-page { max-width: 46rem; margin: 0 auto; padding: 4rem 1.5rem 5rem; }
.legal-page h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; margin-bottom: 0.4rem; }
.legal-updated { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 2.4rem; }
.legal-page h2 { font-size: 1.15rem; font-weight: 800; margin: 2.2rem 0 0.7rem; }
.legal-page p, .legal-page li { font-size: 0.95rem; color: var(--text-dim); }
.legal-page p strong, .legal-page li strong { color: var(--text); }
.legal-page ul { padding-left: 1.3rem; margin: 0.6rem 0; display: flex; flex-direction: column; gap: 0.45rem; }
.legal-page a { color: var(--cyan); }
.legal-box {
  margin: 1.2rem 0; padding: 1rem 1.2rem; border-radius: 12px;
  background: #34d39914; border: 1px solid #34d39940;
}
.legal-box p { color: var(--text); }
.legal-back { display: inline-block; margin-bottom: 2rem; color: var(--text-dim); text-decoration: none; font-size: 0.9rem; }
.legal-back:hover { color: var(--text); }
