/* ═══════════════════════════════════════════════
   ORIVEI — landing page
   Fondo chiaro · accenti blu chiaro · testo grigio scuro
   ═══════════════════════════════════════════════ */

:root {
  --bg: #f7fafd;
  --bg-alt: #edf4fb;
  --bg-deep: #e2eef9;
  --ink: #2b3138;
  --ink-soft: #5a646f;
  --blue: #6fabde;
  --blue-strong: #4a90d9;
  --blue-tint: #d8e9f8;
  --blue-ghost: rgba(111, 171, 222, 0.16);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --header-h: 72px;
  /* Ritmo verticale e orizzontale unico per tutte le sezioni */
  --section-pad: clamp(100px, 14vh, 160px);
  --section-pad-x: clamp(24px, 6vw, 72px);
  --chapter-gap: clamp(56px, 9vh, 96px);
  --content-w: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

em {
	font-style: normal;
  color: var(--blue-strong);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
}

/* ── Header ─────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 56px);
  background: rgba(247, 250, 253, 0.82);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.wordmark {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark.small { font-size: 18px; }

.chapter-nav {
  display: flex;
  gap: clamp(14px, 3vw, 36px);
}

.chapter-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.25s;
}

.chapter-nav a span {
  color: var(--blue-strong);
  font-weight: 600;
  margin-right: 4px;
}

.chapter-nav a:hover { color: var(--ink); }

.progress-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--blue-ghost);
}

.progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-strong));
  transform-origin: left;
  transform: scaleX(0);
}

/* ── Hero ───────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 40px) 24px 120px;
  overflow: hidden;
}

.hero-halo {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 90vmin;
  height: 90vmin;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blue-tint) 0%, transparent 65%);
  pointer-events: none;
}

.particles { position: absolute; inset: 0; pointer-events: none; }

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50% 50% 50% 0;
  background: var(--blue);
  opacity: 0.35;
}

.hero-content { position: relative; max-width: 860px; }

.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-strong);
}

.hero-eyebrow { margin-bottom: 28px; }

.hero-title {
  font-size: clamp(2.6rem, 7.5vw, 5.4rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line > span {
  display: block;
  transform: translateY(110%);
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto;
  opacity: 0;
}

.sprout {
  position: relative;
  width: clamp(80px, 12vw, 120px);
  margin-top: 48px;
}

.sprout .draw { stroke: var(--blue-strong); }
.sprout .seed { fill: var(--blue-strong); opacity: 0; }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
}

.scroll-line {
  width: 1.5px;
  height: 44px;
  background: linear-gradient(var(--blue-strong), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollPulse {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(18px); opacity: 0; }
}

/* ── Capitoli (layout comune) ───────────────── */

.chapter {
  position: relative;
  padding: var(--section-pad) var(--section-pad-x);
}

.chapter-inner {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(28px, 5vw, 72px);
  max-width: var(--content-w);
  margin: 0 auto;
}

.chapter-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.chapter-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 300;
  color: var(--blue);
  line-height: 1;
}

.chapter-name {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.chapter-body h2 {
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  margin-bottom: 30px;
}

.chapter-body p {
  font-size: 1.06rem;
  color: var(--ink-soft);
  max-width: 620px;
  margin-bottom: 20px;
}

.chapter-body strong { color: var(--ink); font-weight: 600; }

.chapter-lead { font-size: 1.15rem; }

/* ── 01 Radici ──────────────────────────────── */

.chapter-radici { background: var(--bg); }

.growth-path {
  position: absolute;
  right: clamp(-40px, 2vw, 60px);
  top: 50%;
  transform: translateY(-50%);
  height: 78%;
  max-height: 560px;
  opacity: 0.9;
  pointer-events: none;
}

.growth-path .draw-scrub { stroke: var(--blue); }
.growth-path .node { fill: var(--blue-strong); opacity: 0; }

/* ── 02 Orizzonti ───────────────────────────── */

.chapter-orizzonti {
  background: linear-gradient(var(--bg), var(--bg-alt));
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 36px);
  max-width: var(--content-w);
  margin: var(--chapter-gap) auto 0;
}

.pillar {
  background: #fff;
  border: 1px solid var(--blue-tint);
  border-radius: 18px;
  padding: clamp(28px, 3.5vw, 44px) clamp(22px, 3vw, 36px);
  box-shadow: 0 14px 40px -22px rgba(74, 144, 217, 0.35);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.pillar:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 54px -22px rgba(74, 144, 217, 0.45);
}

.pillar svg {
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
}

.pillar .draw { stroke: var(--blue-strong); }

.pillar h3 {
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.pillar p {
  font-size: 0.96rem;
  color: var(--ink-soft);
}

/* ── 03 Libri ───────────────────────────────── */

.chapter-libri {
  background: linear-gradient(var(--bg-alt), #fff);
}

/* Dalle linee prende forma un libro */
.book-sketch {
  display: block;
  width: clamp(220px, 30vw, 380px);
  margin: var(--chapter-gap) auto 0;
}

.book-sketch .draw-scrub { stroke: var(--blue-strong); }
.book-sketch .thin { stroke: var(--blue); }
.book-sketch .node { fill: var(--blue-strong); opacity: 0; }

body.reduced-motion .book-sketch .node { opacity: 1; }

/* ── 04 Missione ────────────────────────────── */

.chapter-missione {
  background: #fff;
}

/* ── Chiusura ───────────────────────────────── */

.closing {
  background: linear-gradient(#fff, var(--bg));
  padding: var(--section-pad) var(--section-pad-x);
  text-align: center;
}

.closing-inner { max-width: 680px; margin: 0 auto; }

.closing .eyebrow { margin-bottom: 22px; }

.closing h2 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  margin-bottom: 26px;
}

.closing p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  margin-bottom: 40px;
}

.cta-button {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--blue-strong);
  padding: 16px 42px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 16px 34px -14px rgba(74, 144, 217, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-3px);
  background: #3f81c4;
  box-shadow: 0 22px 42px -14px rgba(74, 144, 217, 0.8);
}

/* ── CTA · Prossime uscite (fascione full width) ── */

.cta-banner {
  background: var(--blue-strong);
  padding: var(--chapter-gap) var(--section-pad-x);
  text-align: center;
}

.cta-banner-btn {
  background: #fff;
  color: var(--blue-strong);
  box-shadow: 0 16px 34px -14px rgba(20, 35, 52, 0.4);
}

.cta-banner-btn:hover {
  background: var(--bg);
  color: #3f81c4;
  box-shadow: 0 22px 42px -14px rgba(20, 35, 52, 0.45);
}

/* ── Footer ─────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--blue-tint);
  padding: 44px 24px 52px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.site-footer .wordmark { display: block; margin-bottom: 8px; }

.footer-links { margin-top: 10px; font-size: 0.82rem; }

.footer-links a {
  color: var(--blue-strong);
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

.copyright { margin-top: 6px; font-size: 0.78rem; opacity: 0.75; }

/* ── Avviso privacy (naming neutro anti ad-block) ── */

.site-notice {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  width: min(880px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--blue-tint);
  border-radius: 18px;
  padding: 20px clamp(20px, 3vw, 32px);
  box-shadow: 0 24px 60px -20px rgba(20, 35, 52, 0.35);
}

.site-notice[hidden] { display: none; }

.site-notice-text strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.site-notice-text p {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.site-notice-text a {
  color: var(--blue-strong);
  text-decoration: underline;
}

.site-notice-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.site-notice-btn {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--blue-strong);
  border: 1.5px solid var(--blue-strong);
  border-radius: 999px;
  padding: 10px 26px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.site-notice-btn:hover { background: #3f81c4; transform: translateY(-2px); }

.site-notice-btn.ghost {
  background: transparent;
  color: var(--blue-strong);
}

.site-notice-btn.ghost:hover { background: var(--blue-ghost); }

@media (max-width: 640px) {
  .site-notice { flex-direction: column; align-items: stretch; text-align: left; }
  .site-notice-actions { flex-direction: row; }
  .site-notice-actions .site-notice-btn { flex: 1; }
}

/* ── Pagina legale (privacy) ────────────────── */

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 60px) var(--section-pad-x) 90px;
}

.legal-page h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 44px;
}

.legal-page h2 {
  font-size: 1.35rem;
  font-weight: 500;
  margin: 38px 0 12px;
}

.legal-page p,
.legal-page li {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.legal-page ul { padding-left: 22px; }

.legal-page a { color: var(--blue-strong); }

.legal-page code {
  background: var(--blue-tint);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.85em;
}

/* ── Animazioni: stati iniziali ─────────────── */

.reveal { opacity: 0; transform: translateY(36px); }

.pillar { opacity: 0; transform: translateY(48px); }

body.reduced-motion .reveal,
body.reduced-motion .pillar,
body.reduced-motion .hero-sub,
body.reduced-motion .scroll-hint,
body.reduced-motion .hero-title .line > span {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 820px) {
  .chapter-nav { display: none; }

  .chapter-inner { grid-template-columns: 1fr; }

  .chapter-label {
    position: static;
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
  }

  .pillars { grid-template-columns: 1fr; }

  .growth-path { display: none; }
}
