/* CodeGambit — landing "Verifica nome".
   I token replicano quelli di src/index.css (tema scuro di default): questa pagina
   è statica e non passa dalla build di Vite, quindi non può ereditarli.
   Se cambiano lì, vanno allineati qui. */
:root {
  --bg: #0b0c0f;
  --surface: #11131a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: rgba(255, 255, 255, 0.92);
  --subtext: rgba(255, 255, 255, 0.62);
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, 0.16);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --shell: min(68rem, 100% - 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Atmosfera: un solo alone d'accento dietro l'apertura, nessuna texture decorativa. */
  background-image: radial-gradient(60rem 36rem at 12% -8%, rgba(124, 58, 237, 0.2), transparent 70%);
  background-repeat: no-repeat;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  z-index: 10;
}
.skip:focus { left: 0; }

:where(a, button, input):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Barra ── */
/* La barra resta appesa in alto: su una pagina lunga, altrimenti, dopo il primo
   schermo l'unico ritorno al sito sarebbe il tasto indietro del browser. */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem max(1.5rem, calc((100% - var(--shell)) / 2));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { border-radius: 0.5rem; display: block; }
.brand-back { color: var(--subtext); font-size: 1.1rem; line-height: 1; transition: color 0.2s, transform 0.2s; }
.brand:hover .brand-back { color: var(--accent); transform: translateX(-2px); }
.wordmark {
  font-family: "Orbitron", "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.bar-cta {
  font-size: 0.875rem;
  white-space: nowrap;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: border-color 0.2s, background-color 0.2s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.bar-cta:hover { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 430px) {
  /* A questa larghezza l'etichetta andava a capo e faceva crescere la barra. */
  .bar { padding-inline: 1rem; gap: 0.5rem; }
  .bar-cta { font-size: 0.8rem; padding: 0.5rem 0.85rem; }
  .wordmark { font-size: 0.9rem; }
}

/* ── Apertura ── */
.hero {
  width: var(--shell);
  margin: 0 auto;
  padding: clamp(3rem, 11vw, 7rem) 0 clamp(3rem, 9vw, 6rem);
}
.kicker {
  margin: 0 0 1.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.3rem, 7.4vw, 4.6rem);
  font-weight: 500;
  line-height: 0.99;
  letter-spacing: -0.035em;
}
h1 em { font-style: normal; color: var(--accent); }
.lede {
  margin: 1.75rem 0 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--subtext);
}
.hero-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn, .btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s, border-color 0.2s;
}
.btn { background: var(--accent); color: #fff; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { opacity: 0.9; }
.btn-ghost { border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-wide { width: 100%; justify-content: center; margin-top: 0.5rem; }

.evidence {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 1.1rem 1.4rem;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  color: var(--subtext);
}
.evidence div {
  display: grid;
  grid-template-columns: 6rem 11rem 1fr;
  gap: 0 1rem;
  padding: 0.4rem 0;
}
.evidence dt { color: rgba(255, 255, 255, 0.4); }
.evidence dd { margin: 0; color: var(--text); }
.evidence dd.meta { color: var(--subtext); }

/* ── Il caso ── */
.case, .checks, .ask {
  width: var(--shell);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  border-top: 1px solid var(--border);
}
h2 {
  margin: 0 0 2.5rem;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0 1.5rem;
  padding: 1.1rem 0 1.1rem 1.25rem;
  border-left: 1px solid var(--border-strong);
  transition: border-color 0.25s;
}
.timeline li:hover { border-left-color: var(--accent); }
.timeline .when { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); padding-top: 0.2rem; }
.timeline .what { color: var(--subtext); }
.pull {
  margin: 2.5rem 0 0;
  max-width: 40ch;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.35;
  color: var(--text);
}

/* ── Controlli ── */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: grid;
  grid-template-columns: 3rem 14rem 1fr;
  gap: 0 1.5rem;
  align-items: baseline;
  padding: 1.35rem 0;
  border-top: 1px solid var(--border);
}
.rows li:last-child { border-bottom: 1px solid var(--border); }
.rows .n { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }
.rows .h { font-weight: 500; }
.rows .d { color: var(--subtext); font-size: 0.95rem; }
.note {
  margin: 2.5rem 0 0;
  max-width: 62ch;
  padding: 1.25rem 1.4rem;
  border-left: 2px solid var(--border-strong);
  color: var(--subtext);
  font-size: 0.95rem;
}
.note strong { color: var(--text); font-weight: 500; }

/* ── Richiesta ── */
.ask-lede { margin: -1.5rem 0 2.5rem; color: var(--subtext); }
.form { max-width: 34rem; }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-size: 0.875rem; margin-bottom: 0.5rem; }
.field label span { color: var(--accent); }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.field input::placeholder { color: rgba(255, 255, 255, 0.3); }
.field input:focus { border-bottom-color: var(--accent); outline: none; }
.field input:focus-visible { outline: none; }
.help { display: block; margin-top: 0.5rem; font-size: 0.8rem; color: var(--subtext); }
.hp { position: absolute; left: -9999px; }
.disclaimer { margin: 1.5rem 0 0; font-size: 0.8rem; line-height: 1.6; color: var(--subtext); }
.disclaimer strong { color: var(--text); font-weight: 500; }

/* ── Chiusura ── */
.foot {
  width: var(--shell);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--subtext);
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* ── Ingresso scaglionato: un solo momento animato, all'apertura ── */
.hero > * { animation: rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero > *:nth-child(1) { animation-delay: 0.05s; }
.hero > *:nth-child(2) { animation-delay: 0.13s; }
.hero > *:nth-child(3) { animation-delay: 0.21s; }
.hero > *:nth-child(4) { animation-delay: 0.29s; }
.hero > *:nth-child(5) { animation-delay: 0.37s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  h1 br { display: none; }
  .kicker { font-size: 0.68rem; letter-spacing: 0.1em; }
  .evidence div { grid-template-columns: 5.5rem 1fr; }
  .evidence dd.meta { grid-column: 2; padding-top: 0.15rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.35rem; }
  .rows li { grid-template-columns: 2.25rem 1fr; }
  .rows .d { grid-column: 2; margin-top: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
