/* ============================================================
   investireconai.it — sito companion del libro
   "Investire con l'Intelligenza Artificiale for Dummies" (Hoepli)
   Design system ripreso dalla copertina: giallo, nero, blu.
   Nessuna dipendenza esterna: font di sistema, CSS puro.
   ============================================================ */

:root {
  --yellow: #ffe600;
  --yellow-deep: #f2c200;
  --yellow-soft: #fff6b8;
  --blue: #0b8fd6;
  --blue-deep: #056aa3;
  --blue-soft: #e2f1fb;
  --night: #0d0f14;
  --night-2: #151821;
  --night-3: #1d212c;

  --accent: var(--blue);
  --accent-dark: var(--blue-deep);
  --gold: #b88a00;

  --ink: #14161c;
  --ink-soft: #4b5160;
  --ink-faint: #868c9b;
  --bg: #ffffff;
  --bg-alt: #f6f7fa;
  --card: #ffffff;
  --border: #e4e7ee;
  --code-bg: #f8f9fb;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45), 0 8px 20px rgba(0, 0, 0, 0.3);
  --radius: 14px;
  --radius-sm: 9px;

  --font-sans: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --on-dark: #ffffff;
  --on-dark-soft: #b7bccb;
  --on-dark-faint: #7d8395;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #3fb0ee;
    --accent-dark: #7cc9f3;
    --gold: #f0cf3a;
    --ink: #eceef4;
    --ink-soft: #b4bac8;
    --ink-faint: #7e8597;
    --bg: #0d0f14;
    --bg-alt: #13161e;
    --card: #181c26;
    --border: #262b38;
    --code-bg: #12151d;
    --blue-soft: #10283a;
    --yellow-soft: #3a3300;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
p a, li a, dd a, td a { text-decoration: underline; text-underline-offset: 2px; }
.btn, .site-nav a, .footer-nav a, .feature, .feature-link, .brand { text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 800px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 20, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--on-dark);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 1px;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand .brand-ai {
  color: var(--night);
  background: var(--yellow);
  padding: 0 6px;
  margin-left: 2px;
  border-radius: 6px;
  line-height: 1.3;
}
.brand .brand-tld { color: var(--on-dark-faint); font-weight: 500; margin-left: 2px; }

.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  text-decoration: none;
  color: var(--on-dark-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.site-nav a[aria-current="page"] { color: #fff; font-weight: 600; box-shadow: inset 0 -2px 0 var(--yellow); border-radius: 0; }
.site-nav .nav-cta {
  margin-left: 10px;
  background: var(--yellow);
  color: var(--night) !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: none !important;
}
.site-nav .nav-cta:hover { background: var(--yellow-deep); }

/* ---------- Bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--yellow { background: var(--yellow); color: var(--night); box-shadow: 0 6px 18px rgba(255, 230, 0, 0.25); }
.btn--yellow:hover { background: var(--yellow-deep); transform: translateY(-1px); }
.btn--ghost { border-color: var(--border); color: var(--ink); background: var(--card); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.35); color: #fff; background: transparent; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--on-dark);
  padding: 72px 0 0;
}
.hero::before {
  /* bagliore blu + giallo, come la copertina */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 18% 20%, rgba(11, 143, 214, 0.28), transparent 60%),
    radial-gradient(700px 500px at 88% 80%, rgba(255, 230, 0, 0.18), transparent 60%);
  pointer-events: none;
}
.hero::after {
  /* taglio diagonale giallo in basso, motivo della collana */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 110px;
  background: var(--yellow);
  clip-path: polygon(0 62%, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  padding-bottom: 150px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 20px;
}
.kicker::before {
  content: "";
  width: 28px; height: 3px;
  background: var(--yellow);
  border-radius: 2px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  max-width: 14em;
}
.hero h1 .hl {
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  color: #fff;
  padding: 0 0.08em;
}

.hero .lead {
  margin-top: 22px;
  font-size: 1.15rem;
  color: var(--on-dark-soft);
  max-width: 34em;
}
.hero .lead em { color: #fff; font-style: normal; font-weight: 600; }

.pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  line-height: 1.35;
  gap: 8px 10px;
  margin-top: 26px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
  color: #fff;
}
.pill .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 230, 0, 0.18);
}
.pill strong { color: var(--yellow); font-weight: 700; white-space: nowrap; }

.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 14px; font-size: 0.85rem; color: var(--on-dark-faint); }

.hero-visual { position: relative; }
.hero-visual img {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: rotate(-1.5deg) translateY(0); }
  50% { transform: rotate(-1.5deg) translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) { .hero-visual img { animation: none; } }

/* ---------- Striscia numeri ---------- */

.stats {
  background: var(--yellow);
  color: var(--night);
  padding: 6px 0 34px;
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}
.stat { text-align: left; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat span { font-size: 0.9rem; font-weight: 600; opacity: 0.8; }

/* ---------- Sezioni ---------- */

.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section--dark { background: var(--night); color: var(--on-dark); }
.section--dark .section h2, .section--dark h2 { color: #fff; }
.section--dark .section-sub { color: var(--on-dark-soft); }

.section h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.section .section-sub { color: var(--ink-soft); margin-bottom: 32px; max-width: 46em; font-size: 1.05rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 8px; }
.section-head .kicker { margin-bottom: 10px; color: var(--accent); }
.section-head .kicker::before { background: var(--accent); }
.section--dark .section-head .kicker { color: var(--yellow); }
.section--dark .section-head .kicker::before { background: var(--yellow); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.feature {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(16, 24, 40, 0.12); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.feature h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 0.97rem; color: var(--ink-soft); }
.feature .feature-icon {
  display: inline-flex;
  width: 46px; height: 46px;
  align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--night);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 18px;
}
.feature .feature-link { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--accent); font-size: 0.95rem; }

/* ---------- Cosa impari (tre promesse di copertina) ---------- */

.promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.promise {
  padding: 26px 24px;
  border-radius: var(--radius);
  background: var(--night-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.promise .num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--yellow);
}
.promise h3 { color: #fff; font-size: 1.15rem; margin: 10px 0 8px; }
.promise p { color: var(--on-dark-soft); font-size: 0.97rem; }

/* ---------- Metodo in una riga ---------- */

.method {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.method blockquote {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  border-left: 6px solid var(--yellow);
  padding-left: 22px;
}
.method blockquote span { color: var(--accent); }
.method p { color: var(--ink-soft); }

/* ---------- Raccolta prompt ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.toolbar input[type="search"] {
  flex: 1 1 280px;
  padding: 13px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.toolbar input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.toolbar select {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.result-count { font-size: 0.9rem; color: var(--ink-faint); margin-bottom: 22px; }

.prompt-list { display: grid; gap: 20px; }

.prompt-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.prompt-card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }

.prompt-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 22px 0;
}

.tag {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
}
.tag--parte { background: var(--blue-soft); color: var(--accent); }
.tag--cap { background: var(--bg-alt); color: var(--ink-soft); border: 1px solid var(--border); }
.tag--nuovo { background: var(--yellow); color: var(--night); }

.prompt-card__title { padding: 12px 22px 0; font-size: 1.08rem; font-weight: 700; }

.prompt-card__text {
  margin: 14px 22px 16px;
  padding: 18px 20px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}

.prompt-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 22px 18px;
}
.prompt-card__ref { font-size: 0.85rem; color: var(--ink-faint); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--night);
  background: var(--yellow);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.copy-btn:hover { background: var(--yellow-deep); transform: translateY(-1px); }
.copy-btn.copied { background: var(--accent); color: #fff; }

.empty-state { text-align: center; color: var(--ink-faint); padding: 56px 0; }

/* ---------- Glossario ---------- */

.letter-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.letter-nav a {
  display: inline-flex;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.letter-nav a:hover { color: var(--night); border-color: var(--yellow); background: var(--yellow); }

.glossary-letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--accent);
  border-bottom: 2px solid var(--border);
  padding-bottom: 6px;
  margin: 36px 0 14px;
  scroll-margin-top: 90px;
}
.glossary-letter:first-child { margin-top: 0; }

.voce { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.voce dt { font-weight: 700; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 1.03rem; }
.voce dd { margin-top: 4px; color: var(--ink-soft); font-size: 0.97rem; max-width: 56em; }

/* ---------- Timeline aggiornamenti ---------- */

.timeline { list-style: none; position: relative; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--border);
}
.timeline li { position: relative; padding-bottom: 34px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--yellow);
}
.timeline li.is-future::before { background: var(--bg); box-shadow: 0 0 0 2px var(--border); }
.timeline time {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.timeline h3 { font-size: 1.15rem; margin: 4px 0 6px; font-weight: 700; }
.timeline p { color: var(--ink-soft); font-size: 0.97rem; max-width: 46em; }

/* ---------- Pagina libro ---------- */

.book-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
}
.book-side { position: sticky; top: 90px; }

.book-cover-img {
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: rotate(-1deg);
}

.book-facts {
  margin-top: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.book-facts dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 0.93rem; }
.book-facts dt { color: var(--ink-faint); font-weight: 600; }
.book-facts dd { color: var(--ink); font-weight: 600; }
.book-facts .facts-date {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: var(--night);
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
}
.book-facts .btn { width: 100%; justify-content: center; margin-top: 16px; }

.toc { list-style: none; }
.toc-parte {
  margin-top: 28px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.toc-parte:first-child { margin-top: 0; }
.toc-cap {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  align-items: start;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.98rem;
}
.toc-cap .n {
  height: 1.7em;
  margin-top: 0.1em;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--night);
  background: var(--yellow);
  border-radius: 7px;
  font-variant-numeric: tabular-nums;
}

.icone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.icona-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--card);
}
.icona-card strong { color: var(--accent); font-size: 0.82rem; letter-spacing: 0.1em; }
.icona-card.firma { border-color: var(--yellow); background: var(--yellow-soft); }
.icona-card.firma strong { color: var(--night); }
@media (prefers-color-scheme: dark) { .icona-card.firma strong { color: var(--yellow); } }
.icona-card p { font-size: 0.92rem; color: var(--ink-soft); margin-top: 6px; }

.author {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 8px;
}
.author .avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--night);
  color: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
}

/* ---------- Newsletter ---------- */

.newsletter {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--on-dark);
  border-radius: var(--radius);
  padding: 36px 34px;
  box-shadow: var(--shadow);
}
.newsletter::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 0, 0.35), transparent 70%);
  pointer-events: none;
}
.newsletter h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; margin-bottom: 8px; color: #fff; }
.newsletter p { color: var(--on-dark-soft); max-width: 46em; }

.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.newsletter-form input[type="email"] {
  flex: 1 1 260px;
  padding: 13px 16px;
  font-size: 1rem;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.15s;
}
.newsletter-form input[type="email"]::placeholder { color: var(--on-dark-faint); }
.newsletter-form input[type="email"]:focus { border-color: var(--yellow); }
.newsletter-form .btn--primary { background: var(--yellow); color: var(--night); }
.newsletter-form .btn--primary:hover { background: var(--yellow-deep); }

.newsletter-note { margin-top: 12px; font-size: 0.85rem; color: var(--on-dark-faint); }
.newsletter-msg { margin-top: 12px; font-size: 0.95rem; font-weight: 700; color: var(--yellow); }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--on-dark-soft);
}
.consent input { margin-top: 4px; accent-color: var(--yellow); width: 16px; height: 16px; flex: none; }
.consent a { color: #fff; }
.newsletter-msg.is-error { color: #ff8a8a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.status-page { text-align: center; padding: 72px 0 40px; }
.status-page .badge {
  display: inline-flex; width: 72px; height: 72px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--yellow); color: var(--night); font-size: 2rem; font-weight: 800; margin-bottom: 20px;
}
.status-page h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -0.02em; }
.status-page p { color: var(--ink-soft); max-width: 36em; margin: 14px auto 0; font-size: 1.05rem; }

.legal { max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin-top: 40px; }
.legal h3 { font-size: 1.05rem; margin-top: 24px; margin-bottom: 6px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 0.98rem; }
.legal ul { padding-left: 1.2em; margin: 8px 0; }
.legal li { margin: 4px 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin: 12px 0; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal th { color: var(--ink); font-weight: 700; }
.legal .updated { font-size: 0.85rem; color: var(--ink-faint); }

/* ---------- Cookie banner ---------- */

#cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 100;
  display: flex;
  justify-content: center;
}
.cookie-banner__inner {
  width: 100%;
  max-width: 760px;
  background: var(--night);
  color: var(--on-dark);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  padding: 18px 20px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.cookie-banner__inner p { flex: 1 1 360px; margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--on-dark-soft); }
.cookie-banner__inner p strong { color: #fff; }
.cookie-banner__inner a { color: var(--yellow); }
.cookie-banner__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-banner__actions .btn { padding: 10px 18px; font-size: 0.92rem; }
.cookie-banner__actions .btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
@media (max-width: 640px) { #cookie-banner { left: 10px; right: 10px; bottom: 10px; } .cookie-banner__actions { width: 100%; } .cookie-banner__actions .btn { flex: 1; justify-content: center; } }

.faq details { border-top: 1px solid var(--border); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-soft); max-width: 60em; }

/* ---------- Avvertenza ---------- */

.disclaimer {
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.disclaimer strong { color: var(--ink); }

/* ---------- CTA finale ---------- */

.cta-band {
  background: var(--yellow);
  color: var(--night);
  padding: 56px 0;
}
.cta-band .container {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 28px;
  align-items: center;
}
.cta-band img { width: 110px; border-radius: 6px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); transform: rotate(-3deg); }
.cta-band h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.15; }
.cta-band p { margin-top: 6px; font-weight: 500; opacity: 0.85; }
.cta-band .btn { background: var(--night); color: #fff; }
.cta-band .btn:hover { background: #000; transform: translateY(-1px); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--night);
  color: var(--on-dark-faint);
  padding: 44px 0 52px;
  font-size: 0.9rem;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.site-footer a { color: var(--on-dark-soft); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .footer-brand { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.site-footer .footer-legal { margin-top: 14px; max-width: 54em; font-size: 0.82rem; line-height: 1.55; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; align-content: start; }

/* ---------- Titoli pagine interne ---------- */

.page-title {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--on-dark);
  padding: 56px 0 48px;
}
.page-title::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(700px 320px at 85% 0%, rgba(11, 143, 214, 0.3), transparent 60%);
  pointer-events: none;
}
.page-title .container { position: relative; }
.page-title h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.page-title p { color: var(--on-dark-soft); margin-top: 14px; max-width: 46em; font-size: 1.05rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .container { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-bottom: 130px; }
  .hero h1 { max-width: none; }
  .hero-visual { max-width: 520px; margin: 0 auto; }
  .method { grid-template-columns: 1fr; }
  .book-layout { grid-template-columns: 1fr; gap: 36px; }
  .book-side { position: static; max-width: 340px; }
  .cta-band .container { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 640px) {
  body { font-size: 16px; overflow-x: hidden; }
  .icone-grid { grid-template-columns: 1fr; }
  .site-header .container { height: auto; flex-direction: column; padding-block: 10px; gap: 8px; }
  .site-nav { flex-wrap: wrap; justify-content: center; }
  .site-nav .nav-cta { margin-left: 0; }
  .hero { padding-top: 48px; }
  .section { padding: 56px 0; }
  .newsletter { padding: 28px 22px; }
  .stat b { font-size: 1.8rem; }
}
