/* ======================================
   VARIABILI / LEVE DI CONTROLLO
====================================== */
:root {
  --landing-bg: url("../backgrounds/BG_Landing.webp");

  /* POSIZIONI VERTICALI - RIDOTTE PER PORTARE TUTTO IN ALTO */
  --logo-top: 14vh;          /* Era 14vh - Spinge tutto il blocco verso l'alto */
  --gap-logo-claim: -40px;   /* Era 40px - Accorcia distanza tra Logo e Claim */
  --gap-claim-btn: 25px;    /* Era 60px - Accorcia distanza tra Claim e Bottone */

  /* DIMENSIONI / SCALE STANDARD */
  --logo-h: 260px;
  --logo-scale: 1;
  --claim-w: 640px;
  --claim-scale: 1;
  --btn-w: 280px;

  /* COLORI BASE */
  --bg: #000;
  --fg: #fff;
}

/* ======================================
   BASE PAGE
====================================== */
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100dvh; 
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ======================================
   BACKGROUND LANDING
====================================== */
.landing {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 40px; 
}

.landing::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--landing-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

/* ======================================
   HERO (logo + claim + bottone)
====================================== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  margin-top: var(--logo-top);
  text-align: center;
}

/* LOGO */
.landing-logo {
  height: var(--logo-h);
  width: auto;
  transform: scale(var(--logo-scale));
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, .55));
}

/* CLAIM */
.landing-claim {
  margin-top: var(--gap-logo-claim);
  width: min(var(--claim-w), 92vw);
  transform: scale(var(--claim-scale));
  filter: brightness(1.35) drop-shadow(0 2px 6px rgba(0, 0, 0, .65));
}

/* BOTTONE ENTRA */
.btn-entra {
  margin-top: var(--gap-claim-btn);
  display: inline-block;
  width: var(--btn-w);
  max-width: 60vw;
  cursor: pointer;
  transition: transform 0.2s ease;
  outline: none;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-entra img {
  border: 0;
  outline: none;
  display: block;
}

@media (hover: hover) {
  .btn-entra:hover {
    transform: scale(1.08);
  }
}

.btn-entra:active {
  transform: scale(0.95);
}

/* ======================================
   PRELOADER & OVERLAY
====================================== */
#preloader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 9999;
  transition: opacity 0.35s ease, visibility 0.35s; 
}

#preloader img {
  width: 120px;
}

#enter-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

#enter-overlay.show {
  opacity: 1;
  pointer-events: all;
}
#enter-overlay img{
  width:1024px;     /* cambia qui: 80px / 100px / 140px */
  height: auto;
}

.fade-in {
  animation: fadeIn 1.1s ease forwards;
  opacity: 0;
}

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

/* ======================================
   FOOTER
====================================== */
footer {
  position: fixed;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  color: #aaa;
  letter-spacing: .4px;
  text-shadow: 0 0 3px rgba(0, 0, 0, .6);
  z-index: 10;
}

/* ======================================
   RESPONSIVE & LANDSCAPE FIX
====================================== */

/* 1. Schermi bassi generici */
@media (max-height: 700px) {
  :root {
    --logo-h: 180px;
    --logo-top: 4vh;
    --gap-logo-claim: 5px;
    --gap-claim-btn: 20px;
  }
}

/* 2. Mobile Smartphone (Portrait) */
@media (max-width: 480px) {
  :root {
    --logo-h: 170px;
    --logo-top: 6vh;
    --claim-w: 280px;
    --btn-w: 220px;
    --gap-logo-claim: 8px;
  }
}

/* 3. Mobile Landscape (Orizzontale) */
@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --logo-top: 10px;
    --logo-h: 100px;
    --gap-logo-claim: 2px;
    --gap-claim-btn: 12px;
    --claim-w: 260px;
    --btn-w: 180px;
  }

  .landing {
    justify-content: center; 
    padding-bottom: 20px;
  }

  .hero {
    margin-top: 0;
  }
  
  footer {
    position: static; 
    margin-top: 15px;
    padding-bottom: 10px;
  }
}

.btn-entra img {
  animation: pulseGlow 2s infinite ease-in-out;
  display: block;
}

@keyframes pulseGlow {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px rgba(180, 0, 0, 0));
  }

  50% {
    transform: scale(1.10);
    filter: drop-shadow(0 0 18px rgba(41, 158, 236, 0.8));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px rgba(180, 0, 0, 0));
  }
}