html {
  background-color: #050a10;
  color-scheme: dark;
}

:root {
  /* SVG rumore (feTurbulence) — stesso tile su body e sul velo hero */
  --noise-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --bg: #050a10;
  --accent: #00f0ff;
  --accent-dim: rgba(0, 240, 255, 0.35);
  --text: #e8f4ff;
  --veil: rgba(5, 10, 16, 0.38);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/*
 * Grana sullo sfondo: deve stare SOPRA il colore di body (non su html sotto body opaco).
 * Sulla home l’immagine copre il centro: il dither sul velo (.hero__veil::after) è quello che conta.
 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: var(--noise-tile);
  background-size: 160px 160px;
  background-repeat: repeat;
  mix-blend-mode: soft-light;
}

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

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.hero__stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Contenitore parallax (bg + fluo): transform applicato da hero-home-effects.js */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
  transition: transform 0.35s ease-out;
}

.hero__bg-stack,
.hero__fluo-stack {
  position: absolute;
  inset: 0;
}

.hero__bg-layer,
.hero__fluo-layer {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transition:
    opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.5s ease;
}

.hero__bg-layer--dark {
  z-index: 1;
  background-color: var(--bg);
  background-image: url("/images/hero-bg.png");
  filter: saturate(1.08);
}

.hero__bg-layer--light {
  z-index: 2;
  background-color: #f9f9f7;
  background-image: url("/images/hero-bg-light.png?v=3");
  opacity: 0;
  pointer-events: none;
}

html[data-theme="light"] .hero__bg-layer--dark {
  opacity: 0;
}

html[data-theme="light"] .hero__bg-layer--light {
  opacity: 1;
}

/* Secondo strato: al hover le parti chiare (linee ciano) si accendono come fluorescenti */
.hero__fluo-layer {
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero__fluo-layer--dark {
  z-index: 1;
  background-image: url("/images/hero-bg.png");
  filter: brightness(1.45) saturate(2) contrast(1.08)
    drop-shadow(0 0 14px rgba(0, 255, 240, 0.55))
    drop-shadow(0 0 28px rgba(0, 200, 255, 0.35));
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.hero__fluo-layer--light {
  z-index: 2;
  background-image: url("/images/hero-bg-light.png?v=3");
  filter: brightness(1.25) saturate(1.65) contrast(1.04)
    drop-shadow(0 0 10px rgba(0, 200, 220, 0.4))
    drop-shadow(0 0 22px rgba(0, 160, 190, 0.28));
  opacity: 0;
}

html[data-theme="light"] .hero__fluo-layer--dark {
  opacity: 0;
}

/* fluo chiaro: spento fino a hover (opacity in theme.css / sotto) */
html[data-theme="light"] .hero__fluo-layer--light {
  opacity: 0;
}

/* Griglia + particelle (sopra media, sotto velo) */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.4;
  animation: hero-grid-breathe 12s ease-in-out infinite alternate;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 42%, black 0%, transparent 78%);
}

.hero__particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

@keyframes hero-grid-breathe {
  0% {
    opacity: 0.28;
  }
  100% {
    opacity: 0.48;
  }
}

/* Illuminazione solo sopra la faccia (non su tutta la hero) — tema scuro */
html:not([data-theme="light"]) .hero:has(.hero__face:hover) .hero__bg-layer--dark {
  filter: saturate(1.18) brightness(1.05);
}

html:not([data-theme="light"]) .hero:has(.hero__face:hover) .hero__fluo-layer--dark {
  opacity: 0.52;
  filter: brightness(1.65) saturate(2.15) contrast(1.1)
    drop-shadow(0 0 18px rgba(100, 255, 255, 0.75))
    drop-shadow(0 0 36px rgba(0, 240, 255, 0.45));
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Più fermi intermedi = meno bande visibili sul blu */
  background: linear-gradient(
    180deg,
    rgba(5, 10, 16, 0.38) 0%,
    rgba(6, 11, 18, 0.34) 18%,
    rgba(5, 10, 17, 0.28) 38%,
    rgba(5, 10, 16, 0.25) 50%,
    rgba(4, 9, 15, 0.38) 72%,
    rgba(5, 10, 16, 0.52) 88%,
    rgba(5, 10, 16, 0.55) 100%
  );
  pointer-events: none;
  transition: opacity 0.5s ease, background 0.5s ease;
}

/* Dither sopra immagine + velo (prima era invisibile: rumore solo sotto body) */
.hero__veil::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--noise-tile);
  background-size: 160px 160px;
  background-repeat: repeat;
  opacity: 0.1;
  mix-blend-mode: soft-light;
}

.hero:has(.hero__face:hover) .hero__veil {
  background: linear-gradient(
    180deg,
    rgba(5, 10, 16, 0.22) 0%,
    rgba(6, 12, 19, 0.18) 22%,
    rgba(5, 10, 16, 0.12) 50%,
    rgba(4, 9, 15, 0.22) 78%,
    rgba(5, 10, 16, 0.38) 100%
  );
}

/*
 * Hover su un link: il layer fluo (linee ciano del PNG = capelli, occhi, dettagli)
 * si accende più che sul solo volto — più luminosità, saturazione e alone.
 */
html:not([data-theme="light"]) .hero:has(.hotspot:hover) .hero__bg-layer--dark,
html:not([data-theme="light"]) .hero:has(.hotspot:focus-visible) .hero__bg-layer--dark {
  filter: saturate(1.32) brightness(1.12);
}

html:not([data-theme="light"]) .hero:has(.hotspot:hover) .hero__fluo-layer--dark,
html:not([data-theme="light"]) .hero:has(.hotspot:focus-visible) .hero__fluo-layer--dark {
  opacity: 0.78;
  filter: brightness(2) saturate(2.55) contrast(1.14)
    drop-shadow(0 0 24px rgba(140, 255, 255, 0.95))
    drop-shadow(0 0 48px rgba(0, 245, 255, 0.62))
    drop-shadow(0 0 72px rgba(0, 200, 255, 0.38))
    drop-shadow(0 0 96px rgba(0, 160, 255, 0.18));
}

.hero:has(.hotspot:hover) .hero__veil,
.hero:has(.hotspot:focus-visible) .hero__veil {
  background: linear-gradient(
    180deg,
    rgba(5, 10, 16, 0.12) 0%,
    rgba(6, 11, 17, 0.09) 28%,
    rgba(5, 10, 16, 0.04) 50%,
    rgba(4, 9, 15, 0.18) 76%,
    rgba(5, 10, 16, 0.28) 100%
  );
}

/* Ellisse sul volto: hover qui mostra tutte le etichette sui pallini */
.hero__face {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(32vw, 260px);
  height: min(48vh, 420px);
  border-radius: 50%;
  pointer-events: auto;
  cursor: default;
}

.hero__hotspots {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  /* Più spazio sotto il logo in alto a sinistra */
  transform: translateY(8vh);
}

/*
 * Solo area cliccabile invisibile: nessun pallino disegnato da noi,
 * si usano i pallini già presenti nell’immagine hero-bg.png.
 */
.hero:not(.hotspots-ready) .hotspot {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero.hotspots-ready .hotspot {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (pointer: coarse) {
  .hotspot {
    --hit: 3.35rem;
  }
}

.hotspot {
  position: absolute;
  --hit: 2.75rem;
  width: var(--hit);
  height: var(--hit);
  margin-left: calc(var(--hit) / -2);
  margin-top: calc(var(--hit) / -2);
  display: grid;
  place-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 50%;
  outline: none;
  background: transparent;
  transition:
    left 0.7s cubic-bezier(0.33, 0.86, 0.2, 1),
    top 0.7s cubic-bezier(0.33, 0.86, 0.2, 1),
    opacity 0.35s ease,
    visibility 0.35s ease,
    transform 0.42s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.hotspot:hover,
.hotspot:focus-visible {
  transform: scale(1.1);
  z-index: 4;
}

/* Focus tastiera: alone sul punto hit (la pill ha outline proprio) */
.hotspot:focus-visible {
  outline: 2px solid rgba(0, 240, 255, 0.85);
  outline-offset: 3px;
}

.hotspot__label {
  position: absolute;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.4rem;
  width: min(17.5rem, calc(100vw - 2rem));
  min-width: min(13rem, calc(100vw - 2rem));
  max-width: min(17.5rem, calc(100vw - 2rem));
  padding: 0.62rem 1rem 0.7rem;
  text-align: center;
  color: var(--text);
  background: linear-gradient(
    165deg,
    rgba(6, 18, 32, 0.97) 0%,
    rgba(4, 14, 28, 0.94) 50%,
    rgba(8, 22, 38, 0.96) 100%
  );
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  cursor: inherit;
  overflow: hidden;
  isolation: isolate;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    border-color 0.4s ease,
    box-shadow 0.45s ease;
}

.hotspot__label-title {
  display: block;
  font-size: clamp(0.78rem, 2.1vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.28;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 calc(100% - 1px);
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition:
    color 0.35s ease,
    letter-spacing 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    text-shadow 0.35s ease,
    background-size 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hotspot__label-sub {
  display: block;
  max-width: 100%;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: clamp(0.65rem, 1.85vw, 0.74rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-transform: none;
  color: rgba(200, 245, 255, 0.9);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

/* Lampo ciano + riflesso bianco (doppio passaggio) */
.hotspot__label::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    118deg,
    transparent 0%,
    transparent 34%,
    rgba(0, 255, 250, 0.08) 42%,
    rgba(180, 255, 255, 0.55) 49.5%,
    rgba(0, 245, 255, 0.95) 50%,
    rgba(120, 255, 255, 0.45) 50.5%,
    rgba(0, 220, 255, 0.12) 58%,
    transparent 66%,
    transparent 100%
  );
  transform: translateX(-130%) skewX(-14deg);
  opacity: 0;
  pointer-events: none;
  filter: blur(0.5px);
  mix-blend-mode: screen;
  transition: opacity 0.25s ease;
}

.hotspot:hover .hotspot__label::before,
.hotspot__label:hover::before {
  opacity: 1;
  animation: hotspot-label-shine 1.35s cubic-bezier(0.33, 1, 0.45, 1) both;
}

@keyframes hotspot-label-shine {
  0% {
    transform: translateX(-135%) skewX(-14deg);
  }
  42% {
    transform: translateX(135%) skewX(-14deg);
  }
  48% {
    transform: translateX(-135%) skewX(-14deg);
  }
  100% {
    transform: translateX(135%) skewX(-14deg);
  }
}

/* Linea neon sotto il testo */
.hotspot__label::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 240, 255, 0.2) 15%,
    rgba(180, 255, 255, 1) 50%,
    rgba(0, 240, 255, 0.2) 85%,
    transparent
  );
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 255, 250, 0.9), 0 0 28px rgba(0, 200, 255, 0.5);
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.hotspot:hover .hotspot__label::after,
.hotspot__label:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

/* Alone pulsante (solo box-shadow/border: no transform sulla pill) */
@keyframes hotspot-pill-aura {
  0%,
  100% {
    border-color: rgba(0, 255, 250, 0.75);
    box-shadow:
      0 10px 36px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(0, 240, 255, 0.45),
      0 0 32px rgba(0, 240, 255, 0.4),
      0 0 56px rgba(0, 180, 255, 0.22);
  }
  50% {
    border-color: rgba(160, 255, 255, 0.95);
    box-shadow:
      0 14px 44px rgba(0, 0, 0, 0.58),
      0 0 0 2px rgba(0, 255, 250, 0.75),
      0 0 48px rgba(0, 245, 255, 0.65),
      0 0 80px rgba(0, 220, 255, 0.45),
      0 0 120px rgba(0, 160, 255, 0.2);
  }
}

.hotspot:hover .hotspot__label,
.hotspot__label:hover,
.hotspot:focus-visible .hotspot__label,
.hero:has(.hero__face:hover) .hotspot:hover .hotspot__label,
.hero:has(.hotspot:hover) .hotspot__label:hover,
.hero.hero--labels-unlocked .hotspot__label:hover {
  animation: hotspot-pill-aura 2.1s ease-in-out infinite;
}

.hotspot:hover .hotspot__label-title,
.hotspot__label:hover .hotspot__label-title,
.hotspot:focus-visible .hotspot__label-title,
.hero:has(.hero__face:hover) .hotspot:hover .hotspot__label-title,
.hero:has(.hotspot:hover) .hotspot__label:hover .hotspot__label-title,
.hero.hero--labels-unlocked .hotspot__label:hover .hotspot__label-title {
  color: #f0ffff;
  letter-spacing: 0.11em;
  background-size: 100% 2px;
  text-shadow:
    0 0 20px rgba(0, 255, 250, 0.85),
    0 0 40px rgba(0, 200, 255, 0.45),
    0 0 2px rgba(255, 255, 255, 0.9);
}

.hotspot:hover .hotspot__label-sub,
.hotspot__label:hover .hotspot__label-sub,
.hotspot:focus-visible .hotspot__label-sub,
.hero:has(.hero__face:hover) .hotspot:hover .hotspot__label-sub,
.hero:has(.hotspot:hover) .hotspot__label:hover .hotspot__label-sub,
.hero.hero--labels-unlocked .hotspot__label:hover .hotspot__label-sub {
  color: rgba(220, 255, 255, 0.95);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.45);
}

.hotspot:focus-visible .hotspot__label {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Stesso <a>: con etichetta visibile, il testo riceve il clic */
.hero:has(.hero__face:hover) .hotspot__label,
.hero:has(.hotspot:hover) .hotspot__label,
.hero.hero--labels-unlocked .hotspot__label,
.hotspot:hover .hotspot__label,
.hotspot:focus-visible .hotspot__label {
  pointer-events: auto;
  cursor: pointer;
}

/* Etichetta sopra il punto */
.hotspot--tip-top .hotspot__label {
  bottom: calc(100% + 0.5rem);
  transform: translate(-50%, 0.5rem);
}

.hotspot--tip-top:hover .hotspot__label,
.hotspot--tip-top:focus-visible .hotspot__label,
.hero:has(.hero__face:hover) .hotspot--tip-top .hotspot__label,
.hero:has(.hotspot:hover) .hotspot--tip-top .hotspot__label,
.hero.hero--labels-unlocked .hotspot--tip-top .hotspot__label {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Etichetta sotto il punto */
.hotspot--tip-bottom .hotspot__label {
  top: calc(100% + 0.5rem);
  transform: translate(-50%, -0.5rem);
}

.hotspot--tip-bottom:hover .hotspot__label,
.hotspot--tip-bottom:focus-visible .hotspot__label,
.hero:has(.hero__face:hover) .hotspot--tip-bottom .hotspot__label,
.hero:has(.hotspot:hover) .hotspot--tip-bottom .hotspot__label,
.hero.hero--labels-unlocked .hotspot--tip-bottom .hotspot__label {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Etichetta a sinistra del punto (pallini a destra) */
.hotspot--tip-left .hotspot__label {
  left: auto;
  right: calc(100% + 0.5rem);
  top: 50%;
  bottom: auto;
  transform: translate(0.5rem, -50%);
}

.hotspot--tip-left:hover .hotspot__label,
.hotspot--tip-left:focus-visible .hotspot__label,
.hero:has(.hero__face:hover) .hotspot--tip-left .hotspot__label,
.hero:has(.hotspot:hover) .hotspot--tip-left .hotspot__label,
.hero.hero--labels-unlocked .hotspot--tip-left .hotspot__label {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Etichetta a destra del punto (pallini a sinistra) */
.hotspot--tip-right .hotspot__label {
  left: calc(100% + 0.5rem);
  right: auto;
  top: 50%;
  bottom: auto;
  transform: translate(-0.5rem, -50%);
}

.hotspot--tip-right:hover .hotspot__label,
.hotspot--tip-right:focus-visible .hotspot__label,
.hero:has(.hero__face:hover) .hotspot--tip-right .hotspot__label,
.hero:has(.hotspot:hover) .hotspot--tip-right .hotspot__label,
.hero.hero--labels-unlocked .hotspot--tip-right .hotspot__label {
  opacity: 1;
  transform: translate(0, -50%);
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .hero__veil::after {
    opacity: 0;
  }

  .hero .hotspot {
    transition: none;
  }

  .hotspot:hover,
  .hotspot:focus-visible {
    transform: none;
  }

  .hotspot__label {
    transition: opacity 0.2s ease;
  }

  .hotspot__label::before {
    animation: none !important;
    opacity: 0 !important;
    mix-blend-mode: normal;
  }

  .hotspot:hover .hotspot__label,
  .hotspot__label:hover,
  .hotspot:focus-visible .hotspot__label,
  .hero:has(.hero__face:hover) .hotspot:hover .hotspot__label,
  .hero:has(.hotspot:hover) .hotspot__label:hover,
  .hero.hero--labels-unlocked .hotspot__label:hover {
    animation: none !important;
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(0, 240, 255, 0.5),
      0 0 28px rgba(0, 240, 255, 0.35) !important;
  }

  .hotspot:hover .hotspot__label-title,
  .hotspot__label:hover .hotspot__label-title,
  .hotspot:focus-visible .hotspot__label-title,
  .hero:has(.hero__face:hover) .hotspot:hover .hotspot__label-title,
  .hero:has(.hotspot:hover) .hotspot__label:hover .hotspot__label-title,
  .hero.hero--labels-unlocked .hotspot__label:hover .hotspot__label-title {
    letter-spacing: 0.07em !important;
    text-shadow: 0 0 14px rgba(0, 240, 255, 0.4) !important;
  }

  .hotspot:hover .hotspot__label::after,
  .hotspot__label:hover::after {
    transform: scaleX(1);
    opacity: 1;
    transition: none;
  }

  .hero__media,
  .hero__bg-layer,
  .hero__fluo-layer,
  .hero__veil,
  .hero__grid {
    transition-duration: 0.15s;
    animation: none !important;
  }

  .hero__particles {
    opacity: 0 !important;
  }

  .site-footer {
    animation: none !important;
    color: rgba(0, 240, 255, 0.5) !important;
  }
}

/*
 * Tema scuro: voci menu sempre leggibili (non solo al passaggio del mouse sul volto).
 */
html:not([data-theme="light"]) .hero.hotspots-ready.hero--labels-unlocked .hotspot--tip-top .hotspot__label,
html:not([data-theme="light"]) .hero.hotspots-ready.hero--labels-unlocked .hotspot--tip-bottom .hotspot__label,
html:not([data-theme="light"]) .hero.hotspots-ready.hero--labels-unlocked .hotspot--tip-left .hotspot__label,
html:not([data-theme="light"]) .hero.hotspots-ready.hero--labels-unlocked .hotspot--tip-right .hotspot__label {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

html:not([data-theme="light"]) .hero.hotspots-ready.hero--labels-unlocked .hotspot--tip-top .hotspot__label {
  transform: translate(-50%, 0);
}

html:not([data-theme="light"]) .hero.hotspots-ready.hero--labels-unlocked .hotspot--tip-bottom .hotspot__label {
  transform: translate(-50%, 0);
}

html:not([data-theme="light"]) .hero.hotspots-ready.hero--labels-unlocked .hotspot--tip-left .hotspot__label {
  transform: translate(0, -50%);
}

html:not([data-theme="light"]) .hero.hotspots-ready.hero--labels-unlocked .hotspot--tip-right .hotspot__label {
  transform: translate(0, -50%);
}

html:not([data-theme="light"]) .hero.hotspots-ready .hotspot:not([data-route="percorso-guidato"])::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
  pointer-events: none;
}

/* Tema scuro: Percorso guidato — niente alone sul punto (solo pallino nell’immagine) */
html:not([data-theme="light"]) .hero.hotspots-ready .hotspot[data-route="percorso-guidato"] {
  z-index: 6;
  box-shadow: none;
}

html:not([data-theme="light"]) .hero.hotspots-ready .hotspot[data-route="percorso-guidato"]::before {
  display: none;
}

html:not([data-theme="light"]) .hero .hotspot[data-route="percorso-guidato"] .hotspot__label::after {
  display: none;
}

/* left/top degli hotspot: public/data/hotspot-positions.json */

.hero-intro {
  position: absolute;
  z-index: 4;
  right: max(1.35rem, 5%);
  left: auto;
  bottom: calc(5.35rem + env(safe-area-inset-bottom, 0px));
  width: min(21.5rem, calc(100vw - 2.7rem));
  padding: 0.72rem 0.88rem 0.8rem;
  border: 1px solid rgba(0, 240, 255, 0.32);
  border-radius: 10px;
  background: linear-gradient(
    165deg,
    rgba(6, 18, 32, 0.94) 0%,
    rgba(4, 14, 28, 0.9) 55%,
    rgba(8, 22, 38, 0.92) 100%
  );
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 240, 255, 0.08);
  pointer-events: auto;
}

.hero-intro__kicker {
  margin: 0 0 0.35rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0, 240, 255, 0.72);
}

.hero-intro__title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.02rem, 2.4vw, 1.28rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: #eaf9ff;
}

.hero-intro__text {
  margin: 0;
  font-size: clamp(0.78rem, 1.85vw, 0.88rem);
  line-height: 1.5;
  color: rgba(200, 235, 248, 0.88);
}

.hero-intro__text a {
  color: rgba(160, 250, 255, 0.95);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 240, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-intro__text a:hover {
  color: #f0ffff;
  border-bottom-color: rgba(0, 240, 255, 0.75);
}

.hero-intro__text a:focus-visible {
  outline: 2px solid rgba(0, 240, 255, 0.85);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-height: 640px) and (min-width: 769px) {
  .hero-intro {
    display: none;
  }
}

/* ─── Mobile: hamburger + layout sotto l’immagine hero ─── */
.hero-mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .hero__stage {
    position: relative;
    width: 100%;
    height: min(72vh, 34rem);
    min-height: 17.5rem;
    flex-shrink: 0;
    overflow: hidden;
  }

  .hero__hotspots,
  .hero__face {
    display: none !important;
  }

  .hero-mobile-nav {
    display: block;
  }

  .hero-mobile-nav__toggle {
    position: fixed;
    top: max(0.65rem, env(safe-area-inset-top, 0px));
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    z-index: 10060;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid rgba(0, 240, 255, 0.45);
    border-radius: 10px;
    background: linear-gradient(
      165deg,
      rgba(6, 18, 32, 0.96) 0%,
      rgba(4, 14, 28, 0.94) 100%
    );
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    color: #eaf9ff;
  }

  .hero-mobile-nav__icon {
    position: relative;
    display: block;
    width: 1.15rem;
    height: 2px;
    margin: 0 auto;
    border-radius: 2px;
    background: currentColor;
    transition: background 0.22s ease;
  }

  .hero-mobile-nav__icon::before,
  .hero-mobile-nav__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.22s ease, top 0.22s ease;
  }

  .hero-mobile-nav__icon::before {
    top: -6px;
  }

  .hero-mobile-nav__icon::after {
    top: 6px;
  }

  .hero-mobile-nav.is-open .hero-mobile-nav__icon {
    background: transparent;
  }

  .hero-mobile-nav.is-open .hero-mobile-nav__icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .hero-mobile-nav.is-open .hero-mobile-nav__icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .hero-mobile-nav__backdrop {
    position: fixed;
    inset: 0;
    z-index: 10058;
    background: rgba(2, 6, 12, 0.62);
    backdrop-filter: blur(3px);
  }

  .hero-mobile-nav__panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10059;
    width: min(18.5rem, 88vw);
    height: 100%;
    height: 100dvh;
    padding: calc(4.2rem + env(safe-area-inset-top, 0px)) 1rem 1.5rem;
    overflow-y: auto;
    border-left: 1px solid rgba(0, 240, 255, 0.28);
    background: linear-gradient(
      180deg,
      rgba(6, 16, 28, 0.98) 0%,
      rgba(4, 10, 18, 0.99) 100%
    );
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.45, 1);
  }

  .hero-mobile-nav__panel[hidden] {
    display: block;
    visibility: hidden;
    pointer-events: none;
  }

  .hero-mobile-nav.is-open .hero-mobile-nav__panel {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .hero-mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .hero-mobile-nav__list a {
    display: block;
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(0, 240, 255, 0.22);
    border-radius: 9px;
    text-decoration: none;
    background: rgba(8, 20, 34, 0.55);
    transition: border-color 0.2s ease, background 0.2s ease;
  }

  .hero-mobile-nav__list a:hover,
  .hero-mobile-nav__list a:focus-visible {
    border-color: rgba(0, 240, 255, 0.55);
    background: rgba(10, 26, 42, 0.85);
  }

  .hero-mobile-nav__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #eaf9ff;
  }

  .hero-mobile-nav__sub {
    display: block;
    margin-top: 0.2rem;
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-size: 0.68rem;
    color: rgba(180, 230, 245, 0.82);
  }

  body.hero-mobile-menu-open {
    overflow: hidden;
  }

  .hero-intro {
    position: static;
    right: auto;
    left: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    display: block !important;
    box-shadow: none;
  }

  .site-footer {
    position: static;
    margin-top: 0;
  }
}

.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.35rem 1.15rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(0, 240, 255, 0.5);
  border-top: 1px solid rgba(0, 240, 255, 0.12);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(5, 12, 22, 0.75) 40%,
    rgba(5, 10, 16, 0.92) 100%
  );
  text-shadow: 0 0 24px rgba(0, 240, 255, 0.25);
  animation: site-footer-pulse 5s ease-in-out infinite;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.65rem;
  letter-spacing: 0.12em;
}

.site-footer__nav a {
  color: rgba(160, 250, 255, 0.75);
  text-decoration: none;
  text-transform: none;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.site-footer__nav a:hover {
  color: #e8ffff;
  text-decoration: underline;
}

.site-footer__nav a:focus-visible {
  outline: 2px solid rgba(0, 240, 255, 0.85);
  outline-offset: 3px;
  border-radius: 2px;
}

.site-footer__sep {
  color: rgba(0, 240, 255, 0.35);
  user-select: none;
}

@keyframes site-footer-pulse {
  0%,
  100% {
    color: rgba(0, 240, 255, 0.45);
  }
  50% {
    color: rgba(160, 255, 255, 0.75);
  }
}
