/* home.bundle.css — generato da scripts/build-home-css.js */

/* === home-hero.css === */
/* ═══ Hero editorial v2 — split magazine, raffinato ═══ */

.home-hero-mesh,
.home-hero-stage,
.home-hero-ring,
.home-hero-beams,
.home-hero-shine,
.home-hero-scanlines,
.home-hero-spot,
.home-hero-aurora,
.home-hero-divider:not(.home-hero-divide),
.home-hero-canvas,
.home-hero-grid,
.home-hero-vignette,
.home-hero-inner,
.home-hero::before {
  display: none !important;
}

.home-page .home-hero.home-hero--editorial {
  position: relative;
  min-height: min(88vh, 820px);
  margin: 0 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.home-hero--editorial .home-hero-fade {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: 100vw;
  height: min(38vh, 280px);
  margin-left: -50vw;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(6, 8, 14, 0.12) 50%,
    rgba(6, 8, 14, 0.38) 100%
  );
}

.home-hero--editorial .home-hero-stripe {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  z-index: 2;
  background: linear-gradient(
    180deg,
    var(--home-amber) 0%,
    var(--home-accent2) 45%,
    var(--home-accent) 100%
  );
}

.home-hero--editorial .home-hero-issue {
  position: absolute;
  top: clamp(1rem, 3vw, 1.75rem);
  right: clamp(1rem, 4vw, 2.5rem);
  z-index: 3;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.55);
  opacity: 0;
}

.home-hero--editorial.hero-ready .home-hero-issue {
  animation: edFade 0.8s ease 0.5s forwards;
}

.home-hero--editorial .home-hero-shell {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) 1px minmax(0, 1.35fr);
  gap: 0 clamp(1.75rem, 4vw, 3.25rem);
  align-items: stretch;
  min-height: inherit;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem) clamp(4rem, 10vw, 6rem);
  max-width: 1120px;
  margin: 0 auto;
}

.home-hero--editorial .home-hero-brand-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1rem, 2vw, 1.75rem) 0;
  min-width: 0;
  container-type: inline-size;
  container-name: hero-brand;
}

.home-hero--editorial .home-hero-divide {
  display: block;
  width: 1px;
  align-self: stretch;
  margin: 0.5rem 0;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.14) 20%,
    rgba(245, 158, 11, 0.35) 50%,
    rgba(255, 255, 255, 0.14) 80%,
    transparent
  );
  opacity: 0;
}

.home-hero--editorial.hero-ready .home-hero-divide {
  animation: edDivide 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

@keyframes edDivide {
  from {
    opacity: 0;
    transform: scaleY(0.3);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.home-hero--editorial .home-hero-main-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(0.5rem, 2vw, 1.25rem) 0;
  min-width: 0;
}

.home-hero--editorial .home-hero-brand-col > *,
.home-hero--editorial .home-hero-main-col > * {
  opacity: 0;
}

.home-hero--editorial.hero-ready .home-hero-brand-col > * {
  animation: edSlideLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-hero--editorial.hero-ready .home-hero-main-col > * {
  animation: edSlideRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-hero--editorial.hero-ready .home-title-stack { animation-delay: 0.06s; }
.home-hero--editorial.hero-ready .home-brand-line { animation-delay: 0.14s; }
.home-hero--editorial.hero-ready .home-hero-meta { animation-delay: 0.22s; }
.home-hero--editorial.hero-ready .home-hero-punch { animation-delay: 0.2s; }
.home-hero--editorial.hero-ready .home-tagline { animation-delay: 0.34s; }
.home-hero--editorial.hero-ready .home-cta-row { animation-delay: 0.44s; }

@keyframes edSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes edSlideRight {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes edFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.home-hero--editorial .home-title-stack {
  position: relative;
  width: 100%;
  max-width: 100%;
  /* Spazio del logo rimosso — mantiene EVIL nella stessa posizione */
  padding-top: calc(68px + 1.1rem);
}

.home-hero--editorial .home-title {
  margin: 0;
  /* Scala con la colonna; ~8× la tagline sotto */
  font-size: clamp(4rem, 21cqi, 8.25rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-hero--editorial .home-brand-line {
  display: block;
  margin-top: 1.9rem;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: clamp(0.75rem, 4.15cqi, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--home-amber);
  white-space: nowrap;
  max-width: 100%;
}

.home-hero--editorial .home-hero-meta {
  display: block;
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #475569;
}

/* Citazione — due livelli tipografici */
.home-hero--editorial .home-hero-punch {
  margin: 0;
  padding: 0;
  border: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.25rem 0.5rem;
  align-items: start;
  text-align: left;
}

.home-hero--editorial .home-punch-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 7vw, 3.5rem);
  line-height: 0.8;
  color: var(--home-amber);
  opacity: 0.85;
}

.home-hero--editorial .home-punch-mark--end {
  align-self: end;
  margin-bottom: 0.15em;
  color: rgba(0, 255, 156, 0.55);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.home-hero--editorial .home-punch-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.15rem 0 0.25rem;
}

.home-hero--editorial .home-punch-lead {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.4;
  color: #94a3b8;
}

.home-hero--editorial .home-punch-accent {
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.5rem, 3.8vw, 2.35rem);
  font-weight: 400;
  line-height: 1.2;
  color: #f8fafc;
}

.home-hero--editorial .home-punch-accent em {
  font-style: italic;
  color: var(--home-accent);
  font-weight: 600;
}

.home-hero--editorial .home-tagline {
  margin: 1.65rem 0 1.85rem;
  padding-top: 1.35rem;
  max-width: 36em;
  font-size: 0.96rem;
  line-height: 1.75;
  color: #94a3b8;
  text-align: left;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.home-hero--editorial .home-tagline strong {
  color: #e2e8f0;
  font-weight: 600;
}

.home-hero--editorial .home-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.home-hero--editorial .home-cta {
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.home-hero--editorial .home-cta--primary {
  background: var(--home-amber);
  color: #1a1208;
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.3);
}

.home-hero--editorial .home-cta--primary:hover {
  background: #fbbf24;
  box-shadow: 0 10px 32px rgba(245, 158, 11, 0.4);
}

.home-hero--editorial .home-cta--secondary {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.home-hero--editorial .home-cta--secondary:hover {
  border-color: rgba(0, 255, 156, 0.45);
  color: #fff;
}

.home-hero--editorial .home-cta:hover {
  transform: translateY(-2px);
}

.home-hero--editorial .home-scroll-hint {
  position: absolute;
  bottom: 1.15rem;
  right: clamp(1rem, 4vw, 2.5rem);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #64748b;
  opacity: 0;
}

.home-hero--editorial .home-scroll-hint::before {
  content: '';
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--home-amber), transparent);
}

.home-hero--editorial.hero-ready .home-scroll-hint {
  animation: edFade 0.7s ease 0.6s forwards;
}

/* Desktop — titolo verticale */
@media (min-width: 900px) {
  .home-hero--editorial .home-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    max-height: min(48vh, 380px);
    margin-top: 0.25rem;
  }

  .home-hero--editorial.hero-ready .home-title-stack {
    animation-name: edSlideLeftTitle;
  }

  @keyframes edSlideLeftTitle {
    from {
      opacity: 0;
      transform: translateX(-22px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .home-hero--editorial .home-hero-brand-col {
    min-height: 320px;
  }
}

@media (max-width: 899px) {
  .home-hero--editorial .home-hero-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .home-hero--editorial .home-hero-divide {
    display: none;
  }

  .home-hero--editorial .home-hero-brand-col,
  .home-hero--editorial .home-hero-main-col {
    align-items: center;
    text-align: center;
  }

  .home-hero--editorial .home-title-stack {
    width: auto;
    max-width: min(100%, 100vw - 2.5rem);
  }

  .home-hero--editorial .home-title {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: clamp(3.6rem, 16vw, 6.5rem);
  }

  .home-hero--editorial .home-brand-line {
    font-size: clamp(0.72rem, 3.4vw, 0.98rem);
    letter-spacing: 0.14em;
  }

  .home-hero--editorial .home-hero-punch {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .home-hero--editorial .home-punch-mark--end {
    display: none;
  }

  .home-hero--editorial .home-punch-body {
    align-items: center;
  }

  .home-hero--editorial .home-tagline,
  .home-hero--editorial .home-cta-row {
    text-align: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero--editorial .home-hero-meta {
    display: none;
  }

  .home-hero--editorial .home-hero-issue {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero--editorial .home-hero-brand-col > *,
  .home-hero--editorial .home-hero-main-col > *,
  .home-hero--editorial .home-scroll-hint,
  .home-hero--editorial .home-hero-issue,
  .home-hero--editorial .home-hero-divide {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

@media (max-width: 576px) {
  .home-page .home-hero.home-hero--editorial {
    min-height: auto;
  }
}

/* === home-unified.css === */
/* ═══ Home — sistema visivo unificato (editorial + card coerenti) ═══ */

.home-page {
  --home-serif: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  --home-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --home-card-bg: rgba(9, 14, 24, 0.9);
  --home-card-border: rgba(255, 255, 255, 0.1);
  --home-learn: #7dd3fc;
  --home-sim: var(--home-amber);
  --home-def: var(--home-accent);
  --home-section-gap: clamp(2.75rem, 6vw, 3.75rem);
}

/* ─── Intestazioni sezione (tutte uguali) ─── */
.home-section-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.home-section-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--home-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--home-amber);
}

.home-page .home-section-title {
  margin: 0 0 0.45rem;
  font-family: var(--home-serif);
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  font-weight: 400;
  color: #f8fafc;
  text-shadow: none;
  letter-spacing: -0.01em;
}

.home-page .home-section-sub {
  margin: 0;
  max-width: 32em;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #94a3b8;
}

/* ─── Ritmo verticale sezioni ─── */
.home-showcase,
.home-portals,
.home-starters {
  padding-top: var(--home-section-gap);
  padding-left: 0.75rem;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.home-showcase {
  margin-top: 0;
  padding-bottom: var(--home-section-gap);
}

.home-portals {
  padding-bottom: var(--home-section-gap);
}

.home-starters {
  padding-bottom: var(--home-section-gap);
  border: none;
  border-radius: 0;
}

/* ─── Percorsi consigliati ─── */
.home-starter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 0.25rem;
}

.home-starter-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
  padding: 1.15rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 22, 0.55);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.home-starter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.home-starter-card--learn {
  border-left: 3px solid var(--home-learn);
}
.home-starter-card--learn:hover { border-color: rgba(167, 139, 250, 0.35); }

.home-starter-card--sim {
  border-left: 3px solid var(--home-sim);
}
.home-starter-card--sim:hover { border-color: rgba(245, 158, 11, 0.35); }

.home-starter-card--def {
  border-left: 3px solid var(--home-def);
}
.home-starter-card--def:hover { border-color: rgba(0, 255, 156, 0.3); }

.home-starter-card--intel {
  border-left: 3px solid #38bdf8;
}
.home-starter-card--intel:hover { border-color: rgba(56, 189, 248, 0.35); }

.home-starter-num {
  font-family: var(--home-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.45);
  padding-top: 0.15rem;
}

.home-starter-pillar {
  margin: 0 0 0.25rem;
  font-family: var(--home-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-starter-card--learn .home-starter-pillar { color: var(--home-learn); }
.home-starter-card--sim .home-starter-pillar { color: var(--home-sim); }
.home-starter-card--def .home-starter-pillar { color: var(--home-def); }
.home-starter-card--intel .home-starter-pillar { color: #38bdf8; }

.home-starter-title {
  margin: 0 0 0.35rem;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: #f8fafc;
  line-height: 1.25;
}

.home-starter-desc {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #94a3b8;
}

.home-starter-cta {
  font-family: var(--home-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.home-starter-card--learn:hover .home-starter-cta { color: var(--home-learn); }
.home-starter-card--sim:hover .home-starter-cta { color: var(--home-sim); }
.home-starter-card--def:hover .home-starter-cta { color: var(--home-def); }
.home-starter-card--intel:hover .home-starter-cta { color: #7dd3fc; }

@media (max-width: 768px) {
  .home-starter-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Spotlight = stesso linguaggio delle portal card ─── */
.spotlight-ring {
  display: none !important;
}

.spotlight-card {
  --card-accent: var(--home-learn);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 220px;
  padding: 1px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(155deg, rgba(167, 139, 250, 0.35), rgba(255, 255, 255, 0.05));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.spotlight-card--map {
  --card-accent: var(--home-sim);
  background: linear-gradient(155deg, rgba(245, 158, 11, 0.32), rgba(255, 255, 255, 0.05));
}

.spotlight-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.spotlight-shine::after {
  content: '';
  position: absolute;
  top: -20%;
  left: -60%;
  width: 45%;
  height: 140%;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: skewX(-18deg);
  animation: portalShineSweep 6s ease-in-out infinite;
}

.spotlight-card--map .spotlight-shine::after {
  animation-delay: -3s;
}

.spotlight-card::after {
  display: none;
}

.spotlight-card--lab {
  border-color: transparent;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.spotlight-card--map {
  border-color: transparent;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.spotlight-deco {
  border-right: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.spotlight-deco--code {
  position: relative;
  min-height: 100%;
  padding: 0;
  font-family: var(--home-mono);
  font-size: 0.68rem;
}

.spotlight-deco--code .dim {
  color: #f87171;
}

.spotlight-deco--code .ok {
  color: var(--home-learn);
}

.spotlight-deco--map {
  position: relative;
  min-height: 100%;
  padding: 0;
  background: rgba(0, 0, 0, 0.32);
}

.spotlight-deco--map .map-lines line {
  stroke: rgba(245, 158, 11, 0.45);
}

.spotlight-deco--map .map-dot {
  background: var(--home-sim);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

.spotlight-body {
  background: var(--home-card-bg);
  border-left: 3px solid var(--card-accent);
}

.spotlight-tag {
  font-family: var(--home-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  color: var(--card-accent);
}

.spotlight-card--lab .spotlight-tag,
.spotlight-card--map .spotlight-tag {
  color: var(--card-accent);
}

.spotlight-body h3 {
  font-family: var(--home-serif);
  font-size: 1.3rem;
  font-weight: 400;
}

.spotlight-points li::before {
  color: var(--card-accent);
}

.spotlight-btn {
  border-radius: 999px;
  background: var(--home-amber);
  color: #1a1208;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.28);
}

.spotlight-btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.spotlight-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.spotlight-card--lab:hover,
.spotlight-card--map:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

/* ─── Trust + etica ─── */
.home-trust-strip,
.home-ethics {
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(9, 14, 24, 0.55);
  backdrop-filter: blur(8px);
}

.home-trust-strip {
  margin-top: 0.25rem;
  background: linear-gradient(90deg, rgba(9, 14, 24, 0.65), rgba(9, 14, 24, 0.45));
  border-color: rgba(245, 158, 11, 0.2);
  font-family: var(--home-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.trust-icon {
  color: var(--home-amber);
}

.home-ethics {
  margin-top: 0;
  margin-bottom: 0;
  padding: 1.15rem 1.25rem;
  box-shadow: none;
}

.home-ethics p {
  font-size: 0.9rem;
  color: #94a3b8;
}

.home-ethics a {
  color: var(--home-amber);
}

/* ─── Portali — allineati a spotlight ─── */
.home-portals-head {
  margin-bottom: 1.75rem;
}

.path-node--learn { color: var(--home-learn); border-color: rgba(167, 139, 250, 0.35); }
.path-node--sim { color: var(--home-sim); border-color: rgba(245, 158, 11, 0.35); }
.path-node--def { color: var(--home-def); border-color: rgba(0, 255, 156, 0.35); }

.path-connector {
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.45), rgba(245, 158, 11, 0.45), rgba(0, 255, 156, 0.45));
}

.portal-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.portal-card--didattica {
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.28), rgba(255, 255, 255, 0.03));
}

.portal-card--intel {
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.26), rgba(255, 255, 255, 0.03));
}

.portal-card--tools {
  background: linear-gradient(160deg, rgba(0, 255, 156, 0.22), rgba(255, 255, 255, 0.03));
}

.portal-card-inner {
  background: var(--home-card-bg);
  border-radius: 15px;
}

.portal-card--didattica .portal-card-inner { border-left-color: var(--home-learn); }
.portal-card--intel .portal-card-inner { border-left-color: var(--home-sim); }
.portal-card--tools .portal-card-inner { border-left-color: var(--home-def); }

.portal-head h3 {
  font-family: var(--home-serif);
  font-weight: 400;
  font-size: 1.15rem;
}

.portal-tagline {
  font-family: var(--home-mono);
  color: var(--home-amber);
}

.portal-card--didattica .portal-tagline { color: var(--home-learn); }
.portal-card--intel .portal-tagline { color: var(--home-sim); }
.portal-card--tools .portal-tagline { color: var(--home-def); }

.portal-card--didattica .portal-chips li { color: var(--home-learn); }
.portal-card--intel .portal-chips li { color: #fcd34d; }
.portal-card--tools .portal-chips li { color: #6ee7b7; }

.portal-card--didattica .portal-enter,
.portal-card--didattica .portal-links a:hover { color: var(--home-learn); }

.portal-card--intel .portal-enter,
.portal-card--intel .portal-links a:hover { color: var(--home-sim); }

.portal-card--tools .portal-enter,
.portal-card--tools .portal-links a:hover { color: var(--home-def); }

.pv-prompt {
  color: var(--home-learn);
}

.portal-card--intel .pv-map-dot {
  fill: var(--home-sim);
}

.portal-card--intel .pv-map-line {
  stroke: rgba(245, 158, 11, 0.45);
}

/* Anteprima intelligence — elenco moduli, niente fake “live” */
.portal-preview--cases {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
}

.pv-case {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pv-case:last-child {
  border-bottom: none;
}

.pv-case-label {
  font-family: var(--home-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.pv-case-detail {
  font-size: 0.62rem;
  color: #64748b;
  line-height: 1.45;
}

.portal-card--intel .pv-case--focus .pv-case-label {
  color: var(--home-sim);
}

.portal-card--intel .pv-case--focus .pv-case-detail {
  color: #cbd5e1;
}

.portal-card--intel .portal-tagline,
.portal-card--intel.is-active .portal-tagline {
  animation: none;
}

/* ─── Argomenti = chip come portali ─── */
.home-topics {
  gap: 8px;
  margin-top: 0.5rem;
}

.home-topic {
  font-family: var(--home-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 14, 24, 0.65);
  color: #94a3b8;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.home-topic:hover {
  border-color: rgba(245, 158, 11, 0.35);
  color: #e2e8f0;
  transform: translateY(-1px);
}

.home-discover-note {
  font-family: var(--home-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #64748b;
}

.spotlight-grid,
.home-portal-grid {
  gap: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .spotlight-shine::after {
    animation: none !important;
  }
}

.home-hero--editorial .home-cta--secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.home-hero--editorial .home-cta--secondary:hover {
  border-color: rgba(0, 255, 156, 0.4);
}

@media (max-width: 992px) {
  .spotlight-card {
    grid-template-columns: 1fr;
  }

  .spotlight-body {
    border-left: none;
    border-top: 3px solid var(--card-accent);
  }

  .spotlight-deco--map {
    min-height: clamp(148px, 36vw, 200px);
    aspect-ratio: 16 / 9;
    max-height: 220px;
  }
}

/* === home-motion.css === */
/* ═══ Home — motion & chiarezza (scroll, stagger, hover) ═══ */

/* Nav rapida — orientamento */
.home-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.home-jump-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: var(--home-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 14, 24, 0.7);
  backdrop-filter: blur(8px);
  transition: color 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.home-jump-link:hover,
.home-jump-link.is-current {
  color: #f8fafc;
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.home-jump-link.is-current .home-jump-num {
  background: var(--home-amber);
  color: #1a1208;
}

.home-jump-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  font-size: 0.62rem;
  background: rgba(245, 158, 11, 0.2);
  color: var(--home-amber);
}

/* Disabilita entrance duplicata da home.css */
.home-portals.is-visible .portal-card,
.home-portals.portals-live .portal-card {
  animation: none !important;
}

.home-page.motion-on .home-portals.portals-live .portal-card-inner {
  animation: portalCardFloat 7s ease-in-out infinite;
}

/* Scroll reveal — base */
.home-reveal {
  opacity: 1;
  transform: none;
}

.home-reveal .home-section-head > *,
.home-reveal .home-trust-strip,
.home-reveal .home-discover-note,
.home-reveal .home-jump-link {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-reveal .spotlight-card,
.home-reveal .portal-card,
.home-reveal .home-starter-card {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-reveal .home-starter-card:nth-child(odd) {
  transform: translateX(-40px) translateY(32px) scale(0.94) rotate(-1.5deg);
}

.home-reveal .home-starter-card:nth-child(even) {
  transform: translateX(40px) translateY(32px) scale(0.94) rotate(1.5deg);
}

.home-reveal.is-visible .home-section-kicker { transition-delay: 0.05s; opacity: 1; transform: none; }
.home-reveal.is-visible .home-section-title { transition-delay: 0.12s; opacity: 1; transform: none; }
.home-reveal.is-visible .home-section-sub { transition-delay: 0.2s; opacity: 1; transform: none; }

.home-reveal .spotlight-card:nth-child(odd),
.home-reveal .spotlight-grid .spotlight-card:nth-child(1) {
  transform: translateX(-44px) translateY(36px) scale(0.91) rotate(-2deg);
}

.home-reveal .spotlight-card:nth-child(even),
.home-reveal .spotlight-grid .spotlight-card:nth-child(2) {
  transform: translateX(44px) translateY(36px) scale(0.91) rotate(2deg);
}

.home-reveal.is-visible .spotlight-card:nth-child(1),
.home-reveal.is-visible .spotlight-grid .spotlight-card:nth-child(1) { transition-delay: 0.16s; opacity: 1; transform: none; }
.home-reveal.is-visible .spotlight-card:nth-child(2),
.home-reveal.is-visible .spotlight-grid .spotlight-card:nth-child(2) { transition-delay: 0.3s; opacity: 1; transform: none; }

.home-reveal.is-visible .portal-card:nth-child(1) { transition-delay: 0.18s; opacity: 1; transform: none; }
.home-reveal.is-visible .portal-card:nth-child(2) { transition-delay: 0.3s; opacity: 1; transform: none; }
.home-reveal.is-visible .portal-card:nth-child(3) { transition-delay: 0.42s; opacity: 1; transform: none; }

.home-reveal.is-visible .home-trust-strip {
  transition-delay: 0.48s;
  opacity: 1;
  transform: none;
}

.home-jump.is-visible .home-jump-link:nth-child(1) { transition-delay: 0.06s; opacity: 1; transform: none; }
.home-jump.is-visible .home-jump-link:nth-child(2) { transition-delay: 0.14s; opacity: 1; transform: none; }
.home-jump.is-visible .home-jump-link:nth-child(3) { transition-delay: 0.22s; opacity: 1; transform: none; }

.home-starters.is-visible .home-starter-card {
  opacity: 1;
  transform: none;
}

.home-starters.is-visible .home-starter-card:nth-child(1) { transition-delay: 0.12s; }
.home-starters.is-visible .home-starter-card:nth-child(2) { transition-delay: 0.22s; }
.home-starters.is-visible .home-starter-card:nth-child(3) { transition-delay: 0.32s; }
.home-starters.is-visible .home-starter-card:nth-child(4) { transition-delay: 0.42s; }

/* ═══ Percorsi — animazioni ricche (Da dove iniziare) ═══ */
.home-starter-card {
  --starter-x: 50%;
  --starter-y: 50%;
  --starter-tilt-x: 0deg;
  --starter-tilt-y: 0deg;
  position: relative;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--starter-tilt-x)) rotateY(var(--starter-tilt-y));
}

.home-starter-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(
    200px circle at var(--starter-x) var(--starter-y),
    rgba(255, 255, 255, 0.1),
    transparent 58%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.home-starter-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 65%
  );
  transform: translateX(-130%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.home-starter-card:hover::before {
  opacity: 1;
}

.home-starter-card:hover::after {
  transform: translateX(130%);
}

.home-starter-card > * {
  position: relative;
  z-index: 1;
}

.home-starter-card:hover {
  transform: perspective(900px) rotateX(var(--starter-tilt-x)) rotateY(var(--starter-tilt-y)) translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.42),
    0 0 32px rgba(245, 158, 11, 0.08);
}

.home-starter-card--learn:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42), 0 0 36px rgba(167, 139, 250, 0.14);
}

.home-starter-card--sim:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42), 0 0 36px rgba(245, 158, 11, 0.16);
}

.home-starter-card--def:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42), 0 0 36px rgba(0, 255, 156, 0.12);
}

.home-starter-card--intel:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42), 0 0 36px rgba(56, 189, 248, 0.14);
}

.home-starters.is-visible .home-starter-num {
  animation: starterNumPop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.home-starters.is-visible .home-starter-card:nth-child(1) .home-starter-num { animation-delay: 0.18s; }
.home-starters.is-visible .home-starter-card:nth-child(2) .home-starter-num { animation-delay: 0.28s; }
.home-starters.is-visible .home-starter-card:nth-child(3) .home-starter-num { animation-delay: 0.38s; }
.home-starters.is-visible .home-starter-card:nth-child(4) .home-starter-num { animation-delay: 0.48s; }

@keyframes starterNumPop {
  from {
    opacity: 0;
    transform: scale(0.4) translateY(8px);
    color: var(--home-amber);
  }
  to {
    opacity: 1;
    transform: none;
    color: rgba(148, 163, 184, 0.45);
  }
}

.home-starters.is-visible .home-starter-pillar {
  animation: starterPillarIn 0.5s ease both;
}

.home-starters.is-visible .home-starter-card:nth-child(1) .home-starter-pillar { animation-delay: 0.24s; }
.home-starters.is-visible .home-starter-card:nth-child(2) .home-starter-pillar { animation-delay: 0.34s; }
.home-starters.is-visible .home-starter-card:nth-child(3) .home-starter-pillar { animation-delay: 0.44s; }
.home-starters.is-visible .home-starter-card:nth-child(4) .home-starter-pillar { animation-delay: 0.54s; }

@keyframes starterPillarIn {
  from { opacity: 0; letter-spacing: 0.32em; transform: translateX(-8px); }
  to { opacity: 1; letter-spacing: 0.18em; transform: none; }
}

.home-starter-cta {
  display: inline-block;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), letter-spacing 0.28s ease, color 0.2s ease;
}

.home-starter-card:hover .home-starter-cta {
  transform: translateX(8px);
  letter-spacing: 0.05em;
}

.home-starters.starters-live .home-starter-card:not(:hover) {
  border-color: rgba(255, 255, 255, 0.08);
  animation: starterIdle 6.5s ease-in-out infinite, starterBorderPulse 4s ease-in-out infinite;
}

.home-page.motion-on .home-starters.starters-live .home-starter-card:nth-child(1):not(:hover) { animation-delay: 0s, 0s; }
.home-page.motion-on .home-starters.starters-live .home-starter-card:nth-child(2):not(:hover) { animation-delay: -1.6s, -1s; }
.home-page.motion-on .home-starters.starters-live .home-starter-card:nth-child(3):not(:hover) { animation-delay: -3.2s, -2s; }
.home-page.motion-on .home-starters.starters-live .home-starter-card:nth-child(4):not(:hover) { animation-delay: -4.8s, -3s; }

@keyframes starterIdle {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

.home-starters::after {
  content: '';
  position: absolute;
  inset: -8% 5%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 20% 40%, rgba(167, 139, 250, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(0, 255, 156, 0.06), transparent 55%),
    radial-gradient(ellipse 40% 35% at 50% 50%, rgba(245, 158, 11, 0.05), transparent 50%);
  opacity: 0;
  transition: opacity 1s ease;
}

.home-starters.is-visible::after {
  opacity: 1;
  animation: starterAmbient 10s ease-in-out infinite alternate;
}

@keyframes starterAmbient {
  0% { transform: scale(1) translate(0, 0); filter: blur(0); }
  100% { transform: scale(1.04) translate(1%, -1%); filter: blur(1px); }
}

.home-starter-grid {
  position: relative;
}

.home-starters.starters-live .home-starter-card:nth-child(1) { --starter-accent: var(--home-learn); }
.home-starters.starters-live .home-starter-card:nth-child(2) { --starter-accent: var(--home-sim); }
.home-starters.starters-live .home-starter-card:nth-child(3) { --starter-accent: var(--home-def); }
.home-starters.starters-live .home-starter-card:nth-child(4) { --starter-accent: #38bdf8; }

@keyframes starterBorderPulse {
  0%, 100% { border-left-color: color-mix(in srgb, var(--starter-accent, #f59e0b) 55%, transparent); }
  50% { border-left-color: var(--starter-accent, #f59e0b); box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.02); }
}

/* ═══ In evidenza — spotlight (Laboratorio + Mappa) ═══ */
.home-showcase::after {
  content: '';
  position: absolute;
  inset: 5% 0 -5%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 18% 35%, rgba(167, 139, 250, 0.09), transparent 58%),
    radial-gradient(ellipse 45% 38% at 82% 55%, rgba(245, 158, 11, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity 1s ease;
}

.home-showcase.is-visible::after {
  opacity: 1;
  animation: showcaseAmbient 11s ease-in-out infinite alternate;
}

@keyframes showcaseAmbient {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(1.5%, -1%) scale(1.03); }
}

.home-showcase.is-visible .home-section-title {
  animation: showcaseTitleIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both 0.06s;
}

@keyframes showcaseTitleIn {
  from { opacity: 0.6; filter: blur(4px); transform: translateY(8px); }
  to { opacity: 1; filter: none; transform: none; }
}

.spotlight-card {
  --spot-x: 50%;
  --spot-y: 50%;
  --spot-tilt-x: 0deg;
  --spot-tilt-y: 0deg;
  transform: perspective(1000px) rotateX(var(--spot-tilt-x)) rotateY(var(--spot-tilt-y));
}

/* Card in vista — fallback se showcase non ancora live */
.home-page.motion-on .home-showcase:not(.showcase-live) .spotlight-card {
  animation: cardIdle 8s ease-in-out infinite;
}

.home-page.motion-on .home-showcase:not(.showcase-live) .spotlight-card:nth-child(2) {
  animation-delay: -2.6s;
}

.home-showcase.showcase-live .spotlight-card:not(:hover) {
  animation: spotlightIdle 7s ease-in-out infinite, spotlightGlowPulse 5.5s ease-in-out infinite;
}

.home-showcase.showcase-live .spotlight-card--lab:not(:hover) { animation-delay: 0s, 0s; }
.home-showcase.showcase-live .spotlight-card--map:not(:hover) { animation-delay: -3.5s, -2.5s; }

@keyframes spotlightIdle {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

@keyframes spotlightGlowPulse {
  0%, 100% { filter: brightness(1) saturate(1); }
  50% { filter: brightness(1.08) saturate(1.12); }
}

.home-showcase.showcase-live .spotlight-shine::after {
  animation: portalShineSweep 4.5s ease-in-out infinite;
}

.home-showcase.showcase-live .spotlight-card--map .spotlight-shine::after {
  animation-delay: -2.25s;
}

/* ═══ Pannello sinistro — Laboratorio (terminale SQL) ═══ */
.spotlight-deco--code {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.code-deco__grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.07) 1px, transparent 1px);
  background-size: 14px 14px;
  animation: codeGridDrift 12s linear infinite;
  pointer-events: none;
}

@keyframes codeGridDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 28px, 28px 0; }
}

.code-deco__scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 156, 0.55), transparent);
  box-shadow: 0 0 12px rgba(0, 255, 156, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.code-deco__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(167, 139, 250, 0.15), transparent 65%);
  animation: codeGlowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes codeGlowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.code-deco__terminal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(4, 6, 12, 0.88);
  box-shadow: inset 0 0 24px rgba(167, 139, 250, 0.06);
  overflow: hidden;
}

.code-deco__bar {
  display: flex;
  gap: 5px;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.code-deco__bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
}

.code-deco__bar span:nth-child(1) { background: rgba(248, 113, 113, 0.7); }
.code-deco__bar span:nth-child(2) { background: rgba(245, 158, 11, 0.7); }
.code-deco__bar span:nth-child(3) { background: rgba(0, 255, 156, 0.55); }

.code-deco__body {
  padding: 0.75rem 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.code-deco__line {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.45;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-10px);
  clip-path: inset(0 100% 0 0);
}

.code-deco__prompt {
  color: rgba(167, 139, 250, 0.85);
  margin-right: 0.25rem;
}

.code-deco__tick {
  display: inline-block;
  margin-right: 0.2rem;
  color: var(--home-accent);
}

.code-deco__cursor {
  position: absolute;
  bottom: 1.1rem;
  left: 1.15rem;
  width: 2px;
  height: 0.75rem;
  background: var(--home-accent);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

.home-showcase.showcase-live .code-deco__scan {
  animation: codeScanSweep 3.2s ease-in-out infinite;
}

@keyframes codeScanSweep {
  0% { top: 18%; opacity: 0; }
  8% { opacity: 0.85; }
  45% { top: 78%; opacity: 0.85; }
  55% { opacity: 0; }
  100% { top: 78%; opacity: 0; }
}

.home-showcase.showcase-live .code-deco__line--1 {
  animation: codeLineReveal 7s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.home-showcase.showcase-live .code-deco__line--2 {
  animation: codeLineReveal 7s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.home-showcase.showcase-live .code-deco__line--2 .dim {
  animation: codeInjectGlitch 7s steps(1) infinite;
  animation-delay: 0.55s;
}

.home-showcase.showcase-live .code-deco__line--3 {
  animation: codeLineReveal 7s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.home-showcase.showcase-live .code-deco__line--1 { animation-delay: 0s, 0s; }
.home-showcase.showcase-live .code-deco__line--2 { animation-delay: 0.55s, 0.55s; }
.home-showcase.showcase-live .code-deco__line--3 { animation-delay: 1.1s, 1.1s; }

.home-showcase.showcase-live .code-deco__cursor {
  animation: codeCursorLoop 7s step-end infinite;
}

@keyframes codeLineReveal {
  0%, 6% {
    opacity: 0;
    transform: translateX(-10px);
    clip-path: inset(0 100% 0 0);
  }
  14%, 72% {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
  80%, 100% {
    opacity: 0;
    transform: translateX(6px);
    clip-path: inset(0 0 0 100%);
  }
}

@keyframes codeInjectGlitch {
  0%, 18%, 100% { filter: none; transform: none; }
  19% { filter: hue-rotate(20deg); transform: translateX(-2px); color: #f87171; }
  20% { transform: translateX(2px); }
  21% { transform: none; }
  40%, 42% { text-shadow: 2px 0 rgba(248, 113, 113, 0.8), -2px 0 rgba(167, 139, 250, 0.6); }
}

@keyframes codeCursorLoop {
  0%, 12% { opacity: 0; left: 1.15rem; }
  13%, 22% { opacity: 1; left: 1.15rem; }
  23%, 32% { opacity: 1; left: 1.15rem; }
  33%, 52% { opacity: 1; left: 1.15rem; }
  53%, 62% { opacity: 1; left: 1.15rem; }
  63%, 72% { opacity: 1; left: 2.2rem; }
  73%, 78% { opacity: 0; }
  100% { opacity: 0; }
}

.spotlight-card--lab:hover .code-deco__scan {
  animation-duration: 2s;
}

.spotlight-card--lab:hover .code-deco__line--2 .dim {
  animation: codeInjectGlitch 0.4s steps(2) 3;
}

/* ═══ Pannello sinistro — Mappa incidenti ═══ */
.spotlight-deco--map {
  display: block;
}

.map-deco__grid {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  animation: mapGridPan 16s linear infinite;
  pointer-events: none;
}

@keyframes mapGridPan {
  0% { transform: translate(0, 0); }
  100% { transform: translate(18px, 12px); }
}

.map-deco__radar {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(245, 158, 11, 0.12) 40deg, transparent 80deg);
  opacity: 0.55;
  animation: mapRadarSpin 5s linear infinite;
  pointer-events: none;
}

@keyframes mapRadarSpin {
  to { transform: rotate(360deg); }
}

.spotlight-deco--map .map-lines {
  position: absolute;
  inset: 14% 10%;
  width: 80%;
  height: 72%;
  opacity: 0.5;
  z-index: 1;
}

.spotlight-deco--map .map-lines line {
  stroke: rgba(245, 158, 11, 0.5);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.spotlight-deco--map .map-dot {
  position: absolute;
  top: var(--my, 50%);
  left: var(--mx, 50%);
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--home-sim);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.55);
  z-index: 2;
}

.spotlight-deco--map .map-dot::before,
.spotlight-deco--map .map-dot::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  border: 1px solid rgba(245, 158, 11, 0.55);
  opacity: 0;
  pointer-events: none;
}

.map-deco__blip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.9);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

.map-deco__blip--1 {
  top: 28%;
  left: 22%;
  animation: mapBlipTravel 4s ease-in-out infinite;
}

.map-deco__blip--2 {
  top: 45%;
  left: 55%;
  animation: mapBlipTravel 4s ease-in-out infinite 2s;
}

@keyframes mapBlipTravel {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  15% { opacity: 1; transform: translate(18px, 8px) scale(1); }
  35% { opacity: 0.8; transform: translate(38px, 4px) scale(0.8); }
  50% { opacity: 0; transform: translate(52px, -2px) scale(0.4); }
}

.home-showcase.showcase-live .spotlight-deco--map .map-lines line {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: showcaseLineDraw 1.6s ease forwards, mapLineFlow 2.8s linear 1.8s infinite;
}

.home-showcase.showcase-live .spotlight-deco--map .map-lines line:nth-child(1) { animation-delay: 0.2s, 2s; }
.home-showcase.showcase-live .spotlight-deco--map .map-lines line:nth-child(2) { animation-delay: 0.45s, 2.2s; }
.home-showcase.showcase-live .spotlight-deco--map .map-lines line:nth-child(3) { animation-delay: 0.7s, 2.4s; }
.home-showcase.showcase-live .spotlight-deco--map .map-lines line:nth-child(4) { animation-delay: 0.95s, 2.6s; }

@keyframes mapLineFlow {
  0% { stroke-dashoffset: 0; opacity: 0.45; }
  50% { stroke-dashoffset: -24; opacity: 0.85; }
  100% { stroke-dashoffset: -48; opacity: 0.45; }
}

.home-showcase.showcase-live .spotlight-deco--map .map-dot {
  animation: showcaseMapDot 2.4s ease-in-out infinite;
}

.home-showcase.showcase-live .spotlight-deco--map .map-dot::before {
  animation: mapDotRing 2.4s ease-out infinite;
}

.home-showcase.showcase-live .spotlight-deco--map .map-dot::after {
  animation: mapDotRing 2.4s ease-out infinite 0.6s;
}

.home-showcase.showcase-live .spotlight-deco--map .map-dot--1 { animation-delay: 0s; }
.home-showcase.showcase-live .spotlight-deco--map .map-dot--2 { animation-delay: 0.4s; }
.home-showcase.showcase-live .spotlight-deco--map .map-dot--3 { animation-delay: 0.8s; }
.home-showcase.showcase-live .spotlight-deco--map .map-dot--4 { animation-delay: 1.2s; }

.home-showcase.showcase-live .spotlight-deco--map .map-dot--1::before { animation-delay: 0s; }
.home-showcase.showcase-live .spotlight-deco--map .map-dot--2::before { animation-delay: 0.4s; }
.home-showcase.showcase-live .spotlight-deco--map .map-dot--3::before { animation-delay: 0.8s; }
.home-showcase.showcase-live .spotlight-deco--map .map-dot--4::before { animation-delay: 1.2s; }

@keyframes mapDotRing {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3.2); opacity: 0; }
}

@keyframes showcaseLineDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes showcaseMapDot {
  0%, 100% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
  50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 20px rgba(245, 158, 11, 0.85); }
}

.spotlight-card--map:hover .map-deco__radar {
  animation-duration: 3s;
  opacity: 0.75;
}

.spotlight-card--map:hover .map-dot {
  transform: scale(1.2);
}

.spotlight-card:hover {
  transform: perspective(1000px) rotateX(var(--spot-tilt-x)) rotateY(var(--spot-tilt-y)) translateY(-10px) scale(1.02);
}

.spotlight-card--lab:hover {
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.48), 0 0 40px rgba(167, 139, 250, 0.18);
}

.spotlight-card--map:hover {
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.48), 0 0 40px rgba(245, 158, 11, 0.16);
}

/* Mobile: pannello mappa alto abbastanza per radar/griglia amber */
@media (max-width: 992px) {
  .spotlight-deco--map {
    min-height: clamp(148px, 36vw, 200px);
    aspect-ratio: 16 / 9;
    max-height: 220px;
  }

  .spotlight-deco--map .map-deco__grid {
    opacity: 0.5;
  }

  .spotlight-deco--map .map-deco__radar {
    opacity: 0.65;
  }

  .home-showcase.showcase-live .spotlight-deco--map .map-dot::before,
  .home-showcase.showcase-live .spotlight-deco--map .map-dot::after {
    animation-name: mapDotRingMobile;
  }

  @keyframes mapDotRingMobile {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(2.4); opacity: 0; }
  }

  .map-deco__blip--1,
  .map-deco__blip--2 {
    animation-name: mapBlipTravelMobile;
  }

  @keyframes mapBlipTravelMobile {
    0%, 100% { opacity: 0; transform: translate(0, 0) scale(0.5); }
    15% { opacity: 1; transform: translate(12px, 6px) scale(1); }
    35% { opacity: 0.8; transform: translate(24px, 3px) scale(0.8); }
    50% { opacity: 0; transform: translate(32px, -1px) scale(0.4); }
  }
}

.spotlight-body h3 {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.spotlight-card:hover .spotlight-body h3 {
  transform: translateX(4px);
}

.spotlight-points li {
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.spotlight-card:hover .spotlight-points li:nth-child(1) {
  transform: translateX(6px);
  transition-delay: 0.04s;
}

.spotlight-card:hover .spotlight-points li:nth-child(2) {
  transform: translateX(10px);
  transition-delay: 0.1s;
}

.spotlight-btn {
  display: inline-block;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, letter-spacing 0.28s ease;
}

.spotlight-card:hover .spotlight-btn {
  transform: translateX(8px) translateY(-2px) scale(1.04);
  letter-spacing: 0.05em;
}

.home-showcase.is-visible .home-trust-strip {
  animation: trustStripIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both 0.45s, trustGlow 6s ease-in-out infinite 1.1s;
}

@keyframes trustStripIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.home-showcase.showcase-live .trust-icon {
  display: inline-block;
  animation: trustIconPulse 3s ease-in-out infinite;
}

@keyframes trustIconPulse {
  0%, 100% { transform: scale(1) rotate(0deg); color: var(--home-amber); }
  50% { transform: scale(1.15) rotate(90deg); color: var(--home-accent); }
}

/* Card in vista — portals */
.home-page.motion-on .portal-card:not(:hover) {
  animation: cardIdle 8s ease-in-out infinite;
}

.home-page.motion-on .portal-card:nth-child(2) {
  animation-delay: -2.6s;
}

.home-page.motion-on .portal-card:nth-child(3) {
  animation-delay: -5.2s;
}

@keyframes cardIdle {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

/* Spotlight — glow al mouse */
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(
    220px circle at var(--spot-x) var(--spot-y),
    rgba(255, 255, 255, 0.09),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.home-showcase:not(.showcase-live) .code-deco__line {
  opacity: 1;
  transform: none;
  clip-path: none;
  animation: codeLineIn 0.5s ease forwards;
}

.home-showcase:not(.showcase-live) .code-deco__line--1 { animation-delay: 0.08s; }
.home-showcase:not(.showcase-live) .code-deco__line--2 { animation-delay: 0.18s; }
.home-showcase:not(.showcase-live) .code-deco__line--3 { animation-delay: 0.28s; }

.home-page.motion-on .map-deco__grid,
.home-page.motion-on .map-deco__radar {
  animation-play-state: running;
}

@keyframes codeLineIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.spotlight-btn {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.home-showcase:not(.showcase-live) .spotlight-card:hover .spotlight-btn {
  transform: translateY(-2px) scale(1.02);
}

/* Trust strip — fallback glow (showcase-live usa trustStripIn sopra) */
.home-showcase:not(.showcase-live) .home-trust-strip {
  animation: trustGlow 6s ease-in-out infinite;
}

/* Portali — path animato nella card (no pulse su intelligence) */
.portal-card.is-active .portal-tagline {
  animation: tagPulse 2.5s ease-in-out infinite;
}

.portal-card--intel .portal-tagline,
.portal-card--intel.is-active .portal-tagline {
  animation: none;
}

@keyframes tagPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes trustGlow {
  0%, 100% { border-color: rgba(245, 158, 11, 0.15); }
  50% { border-color: rgba(0, 255, 156, 0.28); }
}

/* Topics — hover più vivo */
.home-topic {
  cursor: default;
}

.home-topic:hover {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

/* Etica */
.home-ethics.home-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.home-ethics.home-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.home-footer.home-reveal:not(.is-visible) .footer-col,
.home-footer.home-reveal:not(.is-visible) .home-footer-brandline {
  opacity: 1;
  transform: none;
}

/* Sezioni — linea laterale che si riempie allo scroll */
.home-showcase,
.home-portals,
.home-starters {
  position: relative;
}

.home-showcase::before,
.home-portals::before,
.home-starters::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--home-amber), var(--home-accent));
  border-radius: 2px;
  transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0.5;
}

.home-showcase.is-visible::before,
.home-portals.is-visible::before,
.home-starters.is-visible::before {
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .home-page.motion-on .spotlight-card,
  .home-page.motion-on .portal-card,
  .home-page.motion-on .home-starters.starters-live .home-starter-card,
  .home-trust-strip,
  .portal-card.is-active .portal-tagline,
  .home-starters.is-visible .home-starter-num,
  .home-starters.is-visible .home-starter-pillar,
  .home-starters.is-visible::after {
    animation: none !important;
  }

  .home-showcase.is-visible::after,
  .home-showcase.showcase-live .spotlight-card,
  .home-showcase.showcase-live .spotlight-deco--code .code-deco__line,
  .home-showcase.showcase-live .spotlight-deco--code .code-deco__cursor,
  .home-showcase.showcase-live .spotlight-deco--code .code-deco__scan,
  .home-showcase.showcase-live .code-deco__grid,
  .home-showcase.showcase-live .code-deco__glow,
  .home-showcase.showcase-live .map-deco__grid,
  .home-showcase.showcase-live .map-deco__radar,
  .home-showcase.showcase-live .map-deco__blip,
  .home-showcase.showcase-live .spotlight-deco--map .map-lines line,
  .home-showcase.showcase-live .spotlight-deco--map .map-dot,
  .home-showcase.showcase-live .trust-icon,
  .home-showcase.is-visible .home-trust-strip,
  .home-showcase.is-visible .home-section-title {
    animation: none !important;
  }

  .spotlight-card:hover {
    transform: none;
  }
  .home-starter-card::after {
    display: none;
  }

  .home-starter-card:hover {
    transform: none;
  }

  .home-reveal .home-section-head > *,
  .home-reveal .spotlight-card,
  .home-reveal .portal-card,
  .home-reveal .home-topic,
  .home-reveal .home-trust-strip,
  .home-reveal .home-jump-link,
  .home-ethics.home-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .spotlight-card::before {
    display: none;
  }
}

/* === home-footer.css === */
/* ═══ Footer home — editorial (sempre visibile, override style.css) ═══ */

.home-page footer.home-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 3rem;
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 4vw, 2.75rem) !important;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 8, 14, 0.75) 28%, rgba(6, 8, 14, 0.92) 100%) !important;
  border-top: 1px dashed rgba(255, 255, 255, 0.12) !important;
  border-bottom: none !important;
  color: #94a3b8;
  opacity: 1 !important;
  animation: none !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.home-page .home-footer .footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: clamp(1.5rem, 4vw, 2.75rem) !important;
  align-items: start;
  padding: 0 !important;
  border: none !important;
}

.home-page .home-footer .footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 1 !important;
  transform: none !important;
}

.home-footer-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 80% at 15% 100%, rgba(167, 139, 250, 0.12), transparent 55%),
    radial-gradient(ellipse 45% 70% at 85% 100%, rgba(245, 158, 11, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 60% at 50% 100%, rgba(0, 255, 156, 0.06), transparent 45%);
}

/* Nasconde vecchio stile .footer-label verde se presente */
.home-page .home-footer .footer-label {
  display: none;
}

.home-page .home-footer .footer-kicker {
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f59e0b;
}

.home-page .home-footer .footer-heading {
  margin: 0 0 0.15rem;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 400;
  color: #f8fafc;
  line-height: 1.25;
}

.home-page .home-footer .footer-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #94a3b8 !important;
  opacity: 1 !important;
}

.home-page .home-footer .footer-meta {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  color: #cbd5e1;
}

.home-page .home-footer .footer-github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #00ff9c;
  text-decoration: none;
  font-weight: 600;
}

.home-page .home-footer .footer-github-link::after {
  content: ' →';
}

.home-page .home-footer .footer-github-link:hover {
  color: #fbbf24;
}

.home-footer-brandline {
  position: relative;
  z-index: 1;
  margin: clamp(1.75rem, 4vw, 2.25rem) auto 0;
  max-width: 1120px;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  text-align: center;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.55);
  opacity: 1 !important;
}

@media (max-width: 900px) {
  .home-page .home-footer .footer-inner {
    grid-template-columns: 1fr !important;
  }
}
