:root {
  --yellow: #F5C842;
  --yellow-dark: #C9A000;
  --yellow-pale: #FDF6DC;
  --black: #111111;
  --near-black: #222222;
  --gray-900: #1a1a1a;
  --gray-700: #3d3d3a;
  --gray-500: #6b6860;
  --gray-300: #B4B2A9;
  --gray-100: #E8E6DF;
  --gray-50: #F9F7F2;
  --white: #ffffff;
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-w: 780px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── NAV ── */
nav {
  border-bottom: 0.5px solid var(--gray-100);
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500;
  color: var(--gray-900); text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-sub {
  font-size: 11px; color: var(--gray-500);
  margin-top: 2px; font-weight: 300;
}
.nav-cta {
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  padding: 9px 18px; border: none;
  border-radius: var(--radius-md);
  background: var(--yellow); color: var(--gray-900);
  cursor: pointer; text-decoration: none;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.85; }

/* ── HERO ── */
.hero {
  padding: 72px 0 64px;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-300); margin-bottom: 18px; font-weight: 400;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 42px; font-weight: 500; line-height: 1.12;
  letter-spacing: -0.02em; margin-bottom: 22px;
}
.hero-title em {
  font-style: italic; font-weight: 400;
  color: var(--yellow-dark);
}
.hero-body {
  font-size: 16px; line-height: 1.8; color: var(--gray-500);
  margin-bottom: 36px; font-weight: 300; max-width: 420px;
}
.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn-yellow {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500; padding: 12px 24px;
  background: var(--yellow); color: var(--gray-900);
  border: none; border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: opacity 0.15s;
}
.btn-yellow:hover { opacity: 0.85; }
.btn-ghost {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 400; padding: 12px 24px;
  border: 0.5px solid var(--gray-100);
  border-radius: var(--radius-md); cursor: pointer;
  background: none; color: var(--gray-700); text-decoration: none;
  display: inline-block; transition: border-color 0.15s;
}
.btn-ghost:hover { border-color: var(--gray-300); }

/* ── BOOK COVER ── */
.book-wrap {
  display: flex; align-items: stretch; width: 186px; height: 240px;
  text-decoration: none; transition: transform 0.25s ease;
}
a.book-wrap:hover { transform: translateY(-4px); }
.book-spine {
  width: 16px; background: #2a2a2a;
  border-radius: 3px 0 0 3px; flex-shrink: 0;
}
.book-front {
  flex: 1; background: var(--black);
  border-radius: 0 5px 5px 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 18px 14px 0;
  overflow: hidden; position: relative;
}
.book-front-top { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.book-front-mid { text-align: center; }
.book-moon-wrap { position: relative; width: 52px; height: 44px; }
.book-moon-bg {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  position: absolute; right: 0; top: 0;
}
.book-moon-fg {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--black);
  border: 2px solid white;
  position: absolute; left: 0; top: 0;
}
.book-moon-eye {
  width: 5px; height: 5px; border-radius: 50%;
  background: white; position: absolute; top: 13px; left: 14px;
}
.book-stars-row {
  display: flex; gap: 6px; align-items: center; margin-top: 8px;
}
.bstar {
  background: var(--yellow);
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}
.bstar-sm { width: 9px; height: 9px; }
.bstar-lg { width: 13px; height: 13px; }
.book-title-text {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700; color: white;
  text-align: center; line-height: 1.35;
}
.book-sub-text {
  font-size: 9px; color: rgba(255,255,255,0.35);
  text-align: center; margin-top: 4px;
}
.book-strip {
  width: 100%; background: var(--yellow);
  padding: 7px 0; display: flex;
  justify-content: center; gap: 6px; align-items: center;
}
.strip-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gray-900); opacity: 0.35;
}

/* ── BOOK COVER IMAGE (immagine reale) ── */
.book-cover-link { display: inline-block; transition: transform 0.25s ease; }
a.book-cover-link:hover { transform: translateY(-4px); }
.book-cover {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 18px 40px -14px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.08);
}
.book-card-cover--img { padding: 0; background: var(--white); overflow: hidden; }
.book-card-cover--img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

/* ── INSIGHT BAR ── */
.insight-bar {
  display: flex; gap: 0;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  margin: 32px 0;
  overflow: hidden;
}
.insight {
  flex: 1; padding: 20px 22px;
  border-right: 0.5px solid var(--gray-100);
}
.insight:last-child { border-right: none; }
.insight-num {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 500;
  color: var(--gray-900); margin-bottom: 5px;
}
.insight-text { font-size: 12px; line-height: 1.5; color: var(--gray-500); font-weight: 300; }

/* ── DIVIDER ── */
.divider { height: 0.5px; background: var(--gray-100); }

/* ── STORY ── */
.story {
  padding: 60px 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 52px;
}
.section-label {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-300); margin-bottom: 16px; font-weight: 400;
}
.story-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; line-height: 1.35;
  margin-bottom: 18px; letter-spacing: -0.01em;
}
.story-body {
  font-size: 14px; line-height: 1.9; color: var(--gray-500); font-weight: 300;
}
.story-body p + p { margin-top: 14px; }

.story-quote {
  font-family: var(--font-display);
  font-size: 15px; line-height: 1.75; font-style: italic;
  color: var(--gray-700);
  border-left: 3px solid var(--yellow);
  padding: 4px 0 4px 20px; margin-bottom: 28px;
}

.author-card {
  background: var(--gray-50); border-radius: var(--radius-lg);
  padding: 16px 18px; margin-bottom: 12px;
}
.author-card:last-child { margin-bottom: 0; }
.author-name {
  font-size: 14px; font-weight: 500;
  color: var(--gray-900); margin-bottom: 4px;
}
.author-role {
  font-size: 12px; color: var(--gray-500);
  line-height: 1.6; font-weight: 300;
}
.author-tag {
  display: inline-block; margin-top: 10px;
  font-size: 11px; font-weight: 500;
  padding: 4px 10px; background: var(--yellow);
  color: #5a3d00; border-radius: 999px;
}

/* ── BOOKS GRID ── */
.books-section { padding: 0 0 60px; }
.books-section--top { padding-top: 48px; }
.section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 20px;
}
.section-count { font-size: 12px; color: var(--gray-300); }
.books-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.book-card {
  border: 0.5px solid var(--gray-100);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none; color: inherit; display: block;
}
a.book-card:hover { border-color: var(--gray-300); transform: translateY(-3px); }
.book-card--disabled { opacity: 0.85; }
.book-card-cover {
  height: 120px; background: var(--black);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.book-card-cover.coming { background: var(--gray-50); }
.mini-star {
  width: 14px; height: 14px; background: var(--yellow);
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}
.mini-circle {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55);
}
.mini-circle--yellow { border-color: var(--yellow); width: 18px; height: 18px; }
.book-card-body { padding: 14px; }
.book-card-age { font-size: 11px; color: var(--gray-300); margin-bottom: 4px; }
.book-card-title { font-size: 13px; font-weight: 500; line-height: 1.3; margin-bottom: 5px; }
.book-card-desc { font-size: 12px; color: var(--gray-500); line-height: 1.55; font-weight: 300; }
.badge {
  display: inline-block; font-size: 11px; padding: 4px 10px;
  border-radius: var(--radius-sm); margin-top: 10px;
  background: var(--gray-50); color: var(--gray-300);
}
.badge.new {
  background: var(--yellow); color: #5a3d00; font-weight: 500;
}

/* ── WAITLIST ── */
.waitlist {
  background: var(--near-black);
  border-radius: var(--radius-lg);
  padding: 48px 40px; margin-bottom: 48px;
  text-align: center;
}
.waitlist-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 500;
  color: white; margin-bottom: 10px;
}
.waitlist-sub {
  font-size: 14px; color: rgba(255,255,255,0.4);
  margin-bottom: 30px; font-weight: 300;
}
.waitlist-form {
  display: flex; gap: 8px;
  max-width: 380px; margin: 0 auto;
}
/* Honeypot: nascosto a utenti reali ma presente nel DOM per i bot */
.hp-field {
  position: absolute !important;
  left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.waitlist-form input[type="email"] {
  flex: 1; font-family: var(--font-body);
  font-size: 14px; padding: 11px 16px;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.07); color: white;
  outline: none; transition: border-color 0.2s;
}
.waitlist-form input::placeholder { color: rgba(255,255,255,0.25); }
.waitlist-form input:focus { border-color: rgba(255,255,255,0.3); }
.waitlist-form input.invalid { border-color: #e06b6b; }
.waitlist-form button {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500; padding: 11px 20px;
  background: var(--yellow); color: var(--gray-900);
  border: none; border-radius: var(--radius-md); cursor: pointer;
  white-space: nowrap; transition: opacity 0.15s;
}
.waitlist-form button:hover { opacity: 0.85; }
.waitlist-form button:disabled { opacity: 0.5; cursor: progress; }
.waitlist-note { font-size: 12px; color: rgba(255,255,255,0.18); margin-top: 14px; }
.waitlist-note.success { color: var(--yellow); }
.waitlist-note.error { color: #f0a3a3; }

/* ── FOOTER ── */
footer {
  border-top: 0.5px solid var(--gray-100);
  padding: 22px 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 500; color: var(--gray-900);
}
.footer-note { font-size: 12px; color: var(--gray-300); }

/* ── BOOK PAGE (libro.html) ── */
.back-link {
  display: inline-block; font-size: 13px; color: var(--gray-500);
  text-decoration: none; margin: 28px 0 0; transition: color 0.15s;
}
.back-link:hover { color: var(--gray-900); }

.product {
  padding: 40px 0 56px;
  display: grid; grid-template-columns: 220px 1fr; gap: 52px;
  align-items: start;
}
.product-media { display: flex; justify-content: center; }
.product-cover { max-width: 260px; }
.product-info .hero-eyebrow { margin-bottom: 14px; }
.product-title {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 500; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.product-lead {
  font-size: 15px; line-height: 1.8; color: var(--gray-500);
  font-weight: 300; margin-bottom: 24px;
}
.product-meta { display: flex; gap: 22px; margin-bottom: 26px; flex-wrap: wrap; }
.product-meta-item { }
.product-meta-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-300); margin-bottom: 3px; }
.product-meta-value { font-size: 14px; font-weight: 500; color: var(--gray-900); }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.feature-list {
  padding: 0 0 56px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.feature {
  border: 0.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
}
.feature-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--yellow-pale);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.feature-title { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.feature-text { font-size: 13px; line-height: 1.6; color: var(--gray-500); font-weight: 300; }

.faq { padding: 8px 0 56px; }
.faq-item {
  border-bottom: 0.5px solid var(--gray-100);
  padding: 18px 0;
}
.faq-q {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 500; color: var(--gray-900);
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: "+"; color: var(--gray-300); font-size: 20px; font-family: var(--font-body); }
details[open] .faq-q::after { content: "–"; }
.faq-a {
  font-size: 14px; line-height: 1.8; color: var(--gray-500);
  font-weight: 300; margin-top: 12px;
}

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-visible { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease; }

/* ── HERO ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-text > * {
  opacity: 0; animation: fadeUp 0.6s ease forwards;
}
.hero-eyebrow { animation-delay: 0.05s; }
.hero-title   { animation-delay: 0.15s; }
.hero-body    { animation-delay: 0.25s; }
.hero-actions { animation-delay: 0.35s; }
.hero .book-cover-link { opacity: 0; animation: fadeUp 0.7s ease 0.2s forwards; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text > *, .hero .book-cover-link { animation: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 0 40px;
    gap: 40px;
  }
  .hero .book-cover-link { margin: 0 auto; }
  .hero .book-cover { max-width: 240px; }
  .hero-title { font-size: 32px; }
  .story { grid-template-columns: 1fr; gap: 36px; padding: 44px 0; }
  .books-grid { grid-template-columns: 1fr; }
  .insight-bar { flex-direction: column; }
  .insight { border-right: none; border-bottom: 0.5px solid var(--gray-100); }
  .insight:last-child { border-bottom: none; }
  .waitlist { padding: 36px 24px; }
  .waitlist-form { flex-direction: column; }
  .product { grid-template-columns: 1fr; gap: 32px; }
  .product-media { justify-content: flex-start; }
  .feature-list { grid-template-columns: 1fr; }
}
