/* RESET BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: transparent;
  font-family: "Orbitron", sans-serif;
  overflow: hidden;
  color: #fff;
}

/* VIDEO DI SFONDO */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 1;
}

/* ─────────────────────────────────────────────── */
/* VIDEO INTRO + CORNICE LUMINOSA (VERSIONE FISSA) */
/* ─────────────────────────────────────────────── */

/* Contenitore generale */
.intro-video-frame {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: none;
}

/* Cornice luminosa pulsante (NON tocca il video) */
.intro-video-glow {
  position: absolute;
  inset: -25px;
  border-radius: 16px;
  z-index: -1;
  pointer-events: none;

  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow:
      0 0 25px rgba(0,255,255,0.4),
      0 0 45px rgba(0,255,255,0.25),
      0 0 70px rgba(0,255,255,0.15);
  }
  50% {
    box-shadow:
      0 0 35px rgba(0,255,255,0.6),
      0 0 65px rgba(0,255,255,0.35),
      0 0 95px rgba(0,255,255,0.25);
  }
  100% {
    box-shadow:
      0 0 25px rgba(0,255,255,0.4),
      0 0 45px rgba(0,255,255,0.25),
      0 0 70px rgba(0,255,255,0.15);
  }
}

/* Wrapper del video (immobile) */
.intro-video-wrapper {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}

/* Video fisso e centrato */
.intro-video {
  width: 80vw;
  max-width: 1280px;
  height: auto;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: black;
  border-radius: 12px;
}

.intro-video.visible {
  display: block;
  opacity: 1;
}

.intro-video.hidden {
  opacity: 0;
  display: none;
}

/* ─────────────────────────────────────────────── */
/* LOGO */
.logo-fixed {
  position: fixed;
  top: 20px;
  left: 30px;
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  opacity: 0.8;
  z-index: 10;
}

/* OVERLAY INIZIALE */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 5;
  transition: opacity 0.8s ease;
}

.overlay-content {
  background: rgba(0,0,0,0.35);
  padding: 40px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
}


.overlay.hidden {
  opacity: 0;
  pointer-events: none;
  background: transparent !important;
  display: none !important;
}

.overlay-content {
  text-align: center;
}

.title {
  font-size: 2.4rem;
  letter-spacing: 0.35em;
  margin-bottom: 20px;
}

/* PULSANTE RISVEGLIO */
.wake-btn {
  padding: 12px 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.7);
  background: transparent;
  color: #fff;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: 0.3s ease;
  position: relative;
  overflow: visible;
  box-shadow:
    0 0 12px rgba(0, 180, 255, 0.45),
    0 0 24px rgba(0, 180, 255, 0.25);
}

.wake-btn:hover {
  background: #fff;
  color: #000;
}

/* Glow pulsante */
.wake-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(0, 180, 255, 0.35) 0%,
    rgba(0, 180, 255, 0.15) 40%,
    transparent 70%
  );
  filter: blur(12px);
  animation: pulseGlow 2.4s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

.subtitle {
  margin-top: 16px;
  opacity: 0.7;
  letter-spacing: 0.18em;
}

/* ─────────────────────────────────────────────── */
/* PANNELLO CHIAVE COGNITIVA */
.intro-panel {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(640px, 90vw);
  max-height: 80vh;
  padding: 32px;
  background: rgba(0,0,0,0.35); /* ← uguale al pannello del Risveglio */
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 18px;
  backdrop-filter: blur(6px);   /* ← identico */
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  z-index: 6;
  transition: opacity 1s ease;
}


.intro-panel.visible {
  opacity: 1;
  pointer-events: auto;
}

.intro-panel-content {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #e0e0e0;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.intro-panel.visible .intro-panel-content {
  opacity: 1;
  transform: translateY(0);
}

/* FORM */
label {
  display: block;
  margin-top: 22px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  opacity: 0.8;
}

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.6);
  color: #fff;
}

input::placeholder {
  color: rgba(255,255,255,0.4);
}

/* BOTTONI */
.buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.buttons button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.6);
  background: #f5f5f5;
  color: #000;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: 0.25s ease;
}

.buttons button:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-1px);
}

.buttons button:disabled {
  opacity: 0.4;
}

/* PARALLASSE */
.parallax-active .bg-video {
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
}
/* MOBILE: schermi sotto i 768px */
@media (max-width: 768px) {

  /* Riduce la dimensione del video */
  .intro-video {
    width: 95vw;        /* quasi tutta la larghezza */
    max-width: none;
  }

  /* Riduce la cornice luminosa */
  .intro-video-glow {
    inset: -15px;       /* cornice più piccola */
    border-radius: 10px;
  }

  /* Riduce il wrapper */
  .intro-video-wrapper {
    border-radius: 10px;
  }

  /* Riduce il pannello */
  .intro-panel {
    width: 92vw;
    padding: 22px;
  }

  /* Testo più leggibile su schermi piccoli */
  .intro-panel-content {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  /* Pulsanti più grandi e più distanziati */
  .buttons button {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
}

/* SCHERMI MOLTO PICCOLI (iPhone SE, Android mini) */
@media (max-width: 480px) {

  .intro-video {
    width: 100vw;       /* usa tutta la larghezza */
  }

  .intro-video-glow {
    inset: -10px;
  }

  .intro-panel {
    width: 95vw;
    padding: 18px;
  }

  .intro-panel-content {
    font-size: 0.9rem;
  }
}
/* ─────────────────────────────────────────────── */
/* RESPONSIVE INTRO – MOBILE */
/* ─────────────────────────────────────────────── */

@media (max-width: 768px) {

  /* Video più piccolo e adattivo */
  .intro-video {
    width: 95vw;
    max-width: none;
  }

  /* Cornice luminosa ridotta */
  .intro-video-glow {
    inset: -15px;
    border-radius: 10px;
  }

  .intro-video-wrapper {
    border-radius: 10px;
  }

  /* Frame centrato e più compatto */
  .intro-video-frame {
    transform: translate(-50%, -50%) scale(0.9);
  }

  /* Pannello più leggibile */
  .intro-panel {
    width: 92vw;
    padding: 22px;
  }

  .intro-panel-content {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  /* Pulsanti più comodi */
  .buttons button {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
}

/* Schermi molto piccoli (iPhone SE, Android mini) */
@media (max-width: 480px) {

  .intro-video {
    width: 100vw;
  }

  .intro-video-glow {
    inset: -10px;
  }

  .intro-video-frame {
    transform: translate(-50%, -50%) scale(0.8);
  }

  .intro-panel {
    width: 95vw;
    padding: 18px;
  }

  .intro-panel-content {
    font-size: 0.9rem;
  }
}
/* ─────────────────────────────────────────────── */
/* RESPONSIVE PER LA PAGINA "IL RISVEGLIO" */
/* ─────────────────────────────────────────────── */

@media (max-width: 768px) {

  .overlay-content {
    transform: scale(0.85);
    padding: 0 20px;
  }

  .title {
    font-size: 2rem !important;
    letter-spacing: 0.25em !important;
  }

  .overlay h2 {
    font-size: 0.9rem !important;
    letter-spacing: 0.25em !important;
  }

  .wake-btn {
    padding: 12px 28px;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
  }

  .subtitle {
    font-size: 0.85rem;
    margin-top: 12px;
  }
}

/* Schermi molto piccoli (iPhone SE, Android mini) */
@media (max-width: 480px) {

  .overlay-content {
    transform: scale(0.75);
  }

  .title {
    font-size: 1.7rem !important;
    letter-spacing: 0.22em !important;
  }

  .overlay h2 {
    font-size: 0.8rem !important;
  }

  .wake-btn {
    padding: 10px 24px;
    font-size: 0.85rem;
  }

  .subtitle {
    font-size: 0.8rem;
  }
}
/* Popup vetroso BrainBook */
.neural-popup {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  transition: all 0.6s ease;
  z-index: 100000;
  pointer-events: none;
}

.neural-popup.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.neural-popup-inner {
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  padding: 18px 28px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-align: center;
  box-shadow: 0 0 18px rgba(0,0,0,0.25);
}
