/* ═══════════════════════════════════════════════════════════
   H³Élite — Shared Stylesheet
   Giugno 2026 · Da validare prima della pubblicazione
═══════════════════════════════════════════════════════════ */

:root {
  --blue: #164F8A;
  --blue-dark: #0F3869;
  --blue-mid: #1E6FBB;
  --blue-pale: #EBF4FC;
  --blue-faint: #F4F9FD;
  --ink: #1C1C1C;
  --ink-2: #3A3A3A;
  --ink-3: #525252;
  --ink-4: #747474;
  --bg: #FAFAF8;
  --bg-warm: #F5F3EF;
  --white: #FFFFFF;
  --border: rgba(28,28,28,0.08);
  --border-md: rgba(28,28,28,0.12);
  --max: 1200px;
  --px: clamp(24px, 5vw, 80px);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── CONTAINER ── */
.inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* ── NAV ── */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-cta {
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 7px;
  text-decoration: none;
  transition: background .2s;
}
.nav-cta:hover { background: var(--blue-dark); }

/* ── SEZIONI ── */
section { padding: 88px 0; border-bottom: 1px solid var(--border); }
section.tight { padding: 64px 0; }
section.loose { padding: 112px 0; }

.sec-ey {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}

h2.sec-title {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 20px;
}
h2.sec-title .it {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}
h3.sub-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 10px;
}
.sec-body {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 640px;
}
.sec-body + .sec-body { margin-top: 18px; }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--white);
  padding: 80px 0 72px;
  border-bottom: 1px solid var(--border);
}
.page-hero-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-hero-meta::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--blue);
}
h1.page-title {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--ink);
  margin-bottom: 10px;
}
h1.page-title .it {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}
.page-lead {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 620px;
  margin-top: 22px;
}

/* ── MANIFESTO BLU ── */
.manifesto {
  background: var(--blue);
  padding: 72px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.manifesto-quote {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--white);
  max-width: 760px;
  margin-bottom: 24px;
}
.manifesto-sub {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.04em;
}

/* ── PULSANTI ── */
.btn-p {
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-block;
  transition: background .2s, transform .15s;
}
.btn-p:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-s {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}
.btn-s:hover { color: var(--blue); }
.btn-s-arrow { color: var(--blue); font-size: 18px; }
.btn-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 40px; }

/* ── CTA SECTION ── */
.cta-section { background: var(--white); }
.cta-inner { text-align: center; max-width: 520px; margin: 0 auto; }
h2.cta-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 14px;
}
h2.cta-title .it {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}
.cta-sub {
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-3);
  margin-bottom: 40px;
  line-height: 1.7;
}
.cta-form { display: flex; gap: 8px; margin: 0 auto 16px; }
.cta-input {
  flex: 1;
  border: 1px solid var(--border-md);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color .2s;
}
.cta-input:focus { border-color: var(--blue-mid); }
.cta-input::placeholder { color: var(--ink-4); }
.cta-btn {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background .2s;
  white-space: nowrap;
}
.cta-btn:hover { background: var(--blue-dark); }
.cta-note { font-size: 13px; color: var(--ink-3); }
.cta-note strong { color: var(--ink-2); font-weight: 500; }

/* ── FOOTER ── */
footer { background: var(--ink); padding: 64px 0 36px; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--px); }
.footer-brand { margin-bottom: 48px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.footer-tagline {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  margin-top: 10px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.fcl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 16px;
}
.fclinks a {
  display: block;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.70);
  text-decoration: none;
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color .2s;
}
.fclinks a:hover { color: rgba(255,255,255,0.95); }
.footer-legal {
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.52);
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════
   SCROLL ANIMATIONS
   .js-anim aggiunto a <html> da h3-animations.js
   Graceful: senza JS tutto rimane visibile
═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: no-preference) {

  /* ── Keyframes ── */
  @keyframes h3FadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── Page hero — auto on load, nessun JS richiesto ── */
  .page-hero .page-hero-meta {
    animation: h3FadeUp 0.65s cubic-bezier(0.16,1,0.3,1) both;
  }
  .page-hero h1.page-title {
    animation: h3FadeUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.09s both;
  }
  .page-hero .page-lead {
    animation: h3FadeUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.20s both;
  }

  /* ── Elementi di testo — nascosti finché la section non ha .in-view ── */
  .js-anim section .sec-ey,
  .js-anim .manifesto .manifesto-quote,
  .js-anim .inf-section .inf-inner {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
                transform 0.7s cubic-bezier(0.16,1,0.3,1);
  }
  .js-anim section h2.sec-title {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
                transform 0.7s cubic-bezier(0.16,1,0.3,1);
    transition-delay: 0.09s;
  }
  .js-anim section .sec-body {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
                transform 0.7s cubic-bezier(0.16,1,0.3,1);
    transition-delay: 0.17s;
  }
  .js-anim section .btn-actions {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
                transform 0.7s cubic-bezier(0.16,1,0.3,1);
    transition-delay: 0.26s;
  }
  .js-anim .manifesto .manifesto-sub {
    opacity: 0;
    transition: opacity 0.7s ease;
    transition-delay: 0.22s;
  }

  /* ── Card e list items — opacity + translate ── */
  .js-anim section .pillar-card,
  .js-anim section .diff-card,
  .js-anim section .vm-card,
  .js-anim section .bio-item,
  .js-anim section .cf-card,
  .js-anim section .percorso-card,
  .js-anim section .faq-item,
  .js-anim section .milestone,
  .js-anim section .sel-item,
  .js-anim section .network-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1),
                transform 0.65s cubic-bezier(0.16,1,0.3,1);
  }
  /* Board card — solo opacity (ha già hover transform) */
  .js-anim section .board-card {
    opacity: 0;
    transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1),
                box-shadow .2s, transform .2s;
  }

  /* Colonne foto / sticky */
  .js-anim section .founder-photo,
  .js-anim section .direttore-layout > :first-child {
    opacity: 0;
    transition: opacity 0.9s ease;
  }

  /* ── Stato visibile ── */
  .js-anim section.in-view .sec-ey,
  .js-anim section.in-view h2.sec-title,
  .js-anim section.in-view .sec-body,
  .js-anim section.in-view .btn-actions,
  .js-anim section.in-view .founder-photo,
  .js-anim section.in-view .direttore-layout > :first-child {
    opacity: 1;
    transform: translateY(0);
  }
  .js-anim .manifesto.in-view .manifesto-quote,
  .js-anim .manifesto.in-view .manifesto-sub,
  .js-anim .inf-section.in-view .inf-inner {
    opacity: 1;
    transform: translateY(0);
  }
  .js-anim section.in-view .pillar-card,
  .js-anim section.in-view .diff-card,
  .js-anim section.in-view .vm-card,
  .js-anim section.in-view .bio-item,
  .js-anim section.in-view .cf-card,
  .js-anim section.in-view .percorso-card,
  .js-anim section.in-view .faq-item,
  .js-anim section.in-view .milestone,
  .js-anim section.in-view .sel-item,
  .js-anim section.in-view .network-card,
  .js-anim section.in-view .board-card {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── Stagger — transition-delay per nth-child ── */

  /* 3 colonne */
  .js-anim section .pillar-card:nth-child(2),
  .js-anim section .cf-card:nth-child(2)       { transition-delay: 0.12s; }
  .js-anim section .pillar-card:nth-child(3),
  .js-anim section .cf-card:nth-child(3)       { transition-delay: 0.22s; }

  /* 2 colonne diff-grid */
  .js-anim section .diff-card:nth-child(2)     { transition-delay: 0.10s; }
  .js-anim section .diff-card:nth-child(3)     { transition-delay: 0.20s; }
  .js-anim section .diff-card:nth-child(4)     { transition-delay: 0.30s; }

  /* vm-grid */
  .js-anim section .vm-card:nth-child(2)       { transition-delay: 0.14s; }

  /* bio-items */
  .js-anim section .bio-item:nth-child(2)      { transition-delay: 0.08s; }
  .js-anim section .bio-item:nth-child(3)      { transition-delay: 0.16s; }
  .js-anim section .bio-item:nth-child(4)      { transition-delay: 0.24s; }
  .js-anim section .bio-item:nth-child(5)      { transition-delay: 0.32s; }
  .js-anim section .bio-item:nth-child(6)      { transition-delay: 0.40s; }

  /* faq-items */
  .js-anim section .faq-item:nth-child(2)      { transition-delay: 0.08s; }
  .js-anim section .faq-item:nth-child(3)      { transition-delay: 0.16s; }
  .js-anim section .faq-item:nth-child(4)      { transition-delay: 0.24s; }
  .js-anim section .faq-item:nth-child(5)      { transition-delay: 0.32s; }
  .js-anim section .faq-item:nth-child(6)      { transition-delay: 0.40s; }

  /* milestones */
  .js-anim section .milestone:nth-child(2)     { transition-delay: 0.12s; }
  .js-anim section .milestone:nth-child(3)     { transition-delay: 0.22s; }
  .js-anim section .milestone:nth-child(4)     { transition-delay: 0.32s; }

  /* percorso-cards */
  .js-anim section .percorso-card:nth-child(2) { transition-delay: 0.10s; }
  .js-anim section .percorso-card:nth-child(3) { transition-delay: 0.20s; }
  .js-anim section .percorso-card:nth-child(4) { transition-delay: 0.30s; }

  /* board-cards (max 5) */
  .js-anim section .board-card:nth-child(2)    { transition-delay: 0.07s; }
  .js-anim section .board-card:nth-child(3)    { transition-delay: 0.14s; }
  .js-anim section .board-card:nth-child(4)    { transition-delay: 0.21s; }
  .js-anim section .board-card:nth-child(5)    { transition-delay: 0.28s; }

  /* network-cards (5 in 5 col) */
  .js-anim section .network-card:nth-child(2)  { transition-delay: 0.07s; }
  .js-anim section .network-card:nth-child(3)  { transition-delay: 0.14s; }
  .js-anim section .network-card:nth-child(4)  { transition-delay: 0.21s; }
  .js-anim section .network-card:nth-child(5)  { transition-delay: 0.28s; }

  /* sel-items */
  .js-anim section .sel-item:nth-child(2)      { transition-delay: 0.08s; }
  .js-anim section .sel-item:nth-child(3)      { transition-delay: 0.16s; }
  .js-anim section .sel-item:nth-child(4)      { transition-delay: 0.24s; }
  .js-anim section .sel-item:nth-child(5)      { transition-delay: 0.32s; }
}

/* ═══════════════════════════════════════════════════════════
   MEDIA PLACEHOLDERS
   Segnaposto per foto/video — sostituire con materiale reale
   prima del lancio. Visibili solo in bozza.
═══════════════════════════════════════════════════════════ */

/* Badge ID visibile nel placeholder */
.mp-id {
  position: absolute;
  top: 10px; left: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 8px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: rgba(22,79,138,0.10);
  color: var(--blue-mid);
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid rgba(22,79,138,0.18);
  z-index: 1;
}
.mp-on-dark .mp-id {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.45);
  border-color: rgba(255,255,255,0.15);
}

/* Base */
.mp {
  position: relative;
  background: var(--blue-faint);
  border: 1.5px dashed rgba(30,111,187,0.28);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  min-height: 120px;
}
/* Griglia punteggiata di sfondo */
.mp::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,111,187,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,111,187,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.mp-icon { position: relative; color: var(--blue-mid); opacity: 0.4; flex-shrink: 0; }
.mp-type {
  position: relative;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--blue-mid); opacity: 0.65;
}
.mp-desc {
  position: relative;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px; font-weight: 300;
  color: var(--ink-4);
  text-align: center; max-width: 240px;
  line-height: 1.55;
}

/* Aspect ratio */
.mp-hero     { aspect-ratio: 16 / 6; }   /* full-width editorial */
.mp-wide     { aspect-ratio: 3 / 1; }    /* banda orizzontale */
.mp-video    { aspect-ratio: 16 / 9; }   /* video embed */
.mp-portrait { aspect-ratio: 3 / 4; }    /* ritratto verticale */
.mp-square   { aspect-ratio: 1; }

/* Variante video: bordo più marcato, sfondo gradiente */
.mp-video-type {
  border-color: rgba(22, 79, 138, 0.35);
  background: linear-gradient(135deg, var(--blue-faint) 0%, var(--white) 100%);
}
.mp-video-type .mp-icon { opacity: 0.5; }

/* ── PAGE HERO — SPLIT CON IMMAGINE ── */
.page-hero.with-img {
  position: relative;
  overflow: hidden;
}
/* Wrapper immagine — posizionato in assoluto a destra */
.page-hero-img {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 42%;
  overflow: hidden;
}
.page-hero-img img,
.page-hero-img .mp {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
}
/* Sfumatura che fonde l'immagine nel bianco verso sinistra */
.page-hero.with-img::after {
  content: '';
  position: absolute;
  right: 36%;
  top: 0; bottom: 0;
  width: 18%;
  background: linear-gradient(to right, var(--white) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}
.page-hero.with-img .inner {
  position: relative;
  z-index: 3;
  max-width: 60%;
}

/* ── DESIGN NOTE ── */
.design-note {
  background: #fffbeb;
  border-top: 3px solid #f59e0b;
  padding: 16px 0;
  font-size: 12px;
  color: #78350f;
  line-height: 1.6;
}
.design-note strong { font-weight: 600; }
