/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080a0e;
  --bg-2: #0d0f15;
  --surface: #111318;
  --border: #1c1f27;
  --fg: #e8e4de;
  --fg-2: #8a8580;
  --red: #dc2626;
  --red-dim: rgba(220,38,38,0.15);
  --gold: #a8916c;
  --gold-dim: rgba(168,145,108,0.08);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Syne', sans-serif; font-weight: 700; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
input, textarea, button { font-family: inherit; }

/* ===========================
   LAYOUT HELPERS
   =========================== */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 20px;
  line-height: 1.1;
}
.section-desc {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: var(--fg-2);
  max-width: 600px;
  line-height: 1.8;
}
.br-desktop { display: none; }
@media (min-width: 768px) { .br-desktop { display: block; } }

/* ===========================
   MASTHEAD
   =========================== */
.masthead {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 24px 120px;
}
.masthead-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.fog {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.07;
}
.fog-1 {
  width: 600px; height: 400px;
  background: radial-gradient(circle, var(--red) 0%, transparent 70%);
  top: 10%; right: -10%;
  animation: drift1 12s ease-in-out infinite;
}
.fog-2 {
  width: 500px; height: 350px;
  background: radial-gradient(circle, #8888ff 0%, transparent 70%);
  bottom: 15%; left: -5%;
  animation: drift2 18s ease-in-out infinite;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(-30px, 20px); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(20px, -15px); }
}
.moon {
  position: absolute;
  top: 8%; right: 12%;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d4c5a9 0%, #a8916c 50%, transparent 70%);
  box-shadow: 0 0 60px 20px rgba(168,145,108,0.08), 0 0 120px 40px rgba(168,145,108,0.04);
}
.masthead-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  width: 100%;
}
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 36px;
  background: var(--gold-dim);
}
.label-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.masthead-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(48px, 9vw, 112px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.title-line-1 { color: var(--fg-2); }
.title-line-2 { color: var(--fg); }
.title-line-3 {
  background: linear-gradient(90deg, var(--red) 0%, #ff4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.masthead-sub {
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  color: var(--fg-2);
  line-height: 1.8;
  margin-bottom: 48px;
}
.sub-accent { color: var(--fg); }
.masthead-score {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 28px;
  border-radius: 4px;
}
.score-ring {
  position: relative;
  width: 64px; height: 64px;
  flex-shrink: 0;
}
.score-svg { width: 64px; height: 64px; }
.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--red);
}
.score-label { text-align: left; }
.score-label-top {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 2px;
}
.score-label-sub {
  font-size: 10px;
  color: var(--fg-2);
}
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--fg-2);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 3s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ===========================
   ANALISI (FORM)
   =========================== */
.analisi {
  background: var(--bg-2);
  padding: 100px 24px;
}
.analisi-inner {
  max-width: 680px;
  margin: 0 auto;
}
.analisi-form {
  margin-top: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 13px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #444; }
.form-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  padding: 12px 24px;
  border-radius: 2px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: not-allowed;
  opacity: 0.4;
}
.form-note {
  font-size: 11px;
  color: var(--fg-2);
}

/* ===========================
   FUNZIONA (REPORT GRID)
   =========================== */
.funziona {
  padding: 100px 24px;
  background: var(--bg);
}
.funziona-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: 48px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
@media (min-width: 640px) {
  .report-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .report-grid { grid-template-columns: 1fr 1fr 1fr; }
  .card-score { grid-column: span 2; }
}
.report-card {
  background: var(--surface);
  padding: 28px;
}
.card-score { background: var(--bg-2); }
.report-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  margin-bottom: 16px;
  background: var(--red-dim);
}
.report-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
}
.report-card p {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.7;
}
.score-desc { margin-bottom: 16px; }
.score-bar {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 8px;
}
.score-bar-fill {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
}
.score-bar-marker {
  position: absolute;
  top: -22px;
  transform: translateX(-50%);
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
}
.score-risk {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
}

/* ===========================
   RISCHI (GRAVE STATS)
   =========================== */
.rischi {
  padding: 100px 24px;
  background: var(--bg-2);
}
.rischi-inner { max-width: 800px; margin: 0 auto; }
.grave-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  flex-wrap: wrap;
}
.grave-stat {
  flex: 1;
  min-width: 160px;
  padding: 32px 24px;
  text-align: center;
}
.grave-number {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: var(--red);
  margin-bottom: 8px;
}
.grave-text {
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.05em;
}
.grave-divider {
  width: 1px;
  height: 60px;
  background: var(--border);
}
.competitors {
  margin-top: 48px;
  text-align: center;
}
.competitors-label {
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.competitor-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.competitor-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 2px;
  font-size: 11px;
  color: var(--fg-2);
}
.competitors-note {
  font-size: 12px;
  color: var(--gold);
  font-style: italic;
}

/* ===========================
   MANIFESTO
   =========================== */
.manifesto {
  padding: 120px 24px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.manifesto::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.manifesto-inner {
  max-width: 720px;
  margin: 0 auto;
}
blockquote {
  font-family: 'Syne', sans-serif;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 600;
  font-style: italic;
  color: var(--fg);
  margin-bottom: 36px;
  position: relative;
  padding-left: 28px;
  line-height: 1.4;
}
blockquote::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
}
.manifesto-body {
  font-size: 15px;
  color: var(--fg-2);
  line-height: 1.9;
  margin-bottom: 20px;
}
.manifesto-cta {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.cta-text {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 12px;
}
.footer-tagline {
  font-size: 12px;
  color: var(--fg-2);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.footer-meta {
  font-size: 11px;
  color: #444;
}

/* ===========================
   MOBILE TWEAKS
   =========================== */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .masthead { padding-top: 60px; }
  .grave-divider { display: none; }
  .grave-stats { flex-direction: column; }
  .grave-stat { border-bottom: 1px solid var(--border); width: 100%; }
  .grave-stat:last-child { border-bottom: none; }
}