/* ============================================================
   029 PROJECT — HERO / DIGITAL WALL
   <!-- Developed by 029 Project - Code is Art -->
   ============================================================ */

/* ------------------------------------------------------------
   LAYOUT PRINCIPALE
   Asimmetrico: copy a sinistra (55%) / visual a destra (45%)
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 140px 120px;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: var(--z-base);
}

/* ------------------------------------------------------------
   SFONDO — griglia isometrica blueprint
   ------------------------------------------------------------ */
.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(96,160,224,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,160,224,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ------------------------------------------------------------
   SFONDO — blob di luce colorata (neon sul muro)
   ------------------------------------------------------------ */
.hero__glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  /* GPU layer per animazione fluida su mobile */
  will-change: transform;
  transform: translateZ(0);
}
.hero__glow-blob--red {
  width: 500px;
  height: 400px;
  top: -100px;
  right: -100px;
  background: radial-gradient(
    ellipse,
    rgba(224, 56, 32, 0.18) 0%,
    transparent 70%
  );
  animation: blob-drift-red 12s ease-in-out infinite alternate;
}
.hero__glow-blob--blue {
  width: 400px;
  height: 350px;
  bottom: -80px;
  left: -60px;
  background: radial-gradient(
    ellipse,
    rgba(96, 160, 224, 0.14) 0%,
    transparent 70%
  );
  animation: blob-drift-blue 15s ease-in-out infinite alternate;
}

@keyframes blob-drift-red {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(1.1); }
}
@keyframes blob-drift-blue {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.08); }
}

/* ------------------------------------------------------------
   COLONNA SINISTRA — COPY
   ------------------------------------------------------------ */
.hero__badge {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.hero__badge-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--dark-mid);
}

/* H1 — Titolo forte */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 5.5rem);
  line-height: 1.0;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--off-white);
  margin-bottom: var(--space-md);
}

/* Parola "visioni" — accento colorato + sottolineatura neon */
.hero__title-accent {
  font-style: normal;
  color: var(--primary-red);
  position: relative;
  display: inline-block;
}
.hero__title-accent::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-red),
    var(--electric-blue)
  );
  box-shadow: 0 0 10px var(--glow-red), 0 0 20px var(--glow-blue);
  border-radius: 2px;
}

/* Sottotitolo */
.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--muted-gray);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
  max-width: 48ch;
}
.hero__subtitle strong {
  color: var(--electric-blue);
  font-weight: 700;
}

/* Meta-info stack tecnologico */
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.hero__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted-gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

/* CTA buttons */
.hero__ctas {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
}

.hero__cta-main {
  font-size: 1.15rem;
  padding: 14px 32px;
  /* Override neon glow più intenso per il CTA principale */
  box-shadow:
    0 0 16px var(--glow-red),
    0 0 32px var(--glow-red),
    inset 0 0 0 1px rgba(255,255,255,0.08);
}
.hero__cta-main:hover {
  box-shadow:
    0 0 24px var(--glow-red),
    0 0 60px var(--glow-red),
    inset 0 0 0 1px rgba(255,255,255,0.12);
  transform: translateY(-3px);
}

.btn__icon {
  font-size: 0.7em;
  transition: transform var(--transition-fast);
}
.hero__cta-main:hover .btn__icon {
  transform: scale(1.3);
}

/* ------------------------------------------------------------
   COLONNA DESTRA — VISUAL / PANNELLO
   ------------------------------------------------------------ */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Numero enorme di sfondo */
.hero__bg-number {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(12rem, 22vw, 22rem);
  color: rgba(255,255,255,0.02);
  letter-spacing: -0.04em;
  line-height: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

/* Pannello / cornice stile pannello elettrico */
.hero__frame {
  position: relative;
  z-index: var(--z-base);
  border: 1px solid var(--dark-mid);
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  /* Angolo tagliato in alto a destra — effetto pannello */
  clip-path: polygon(
    0 0,
    calc(100% - 24px) 0,
    100% 24px,
    100% 100%,
    24px 100%,
    0 calc(100% - 24px)
  );
  max-width: 400px;
  width: 100%;
}

/* Angoli decorativi */
.hero__corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--primary-red);
  border-style: solid;
  opacity: 0.7;
}
.hero__corner--tl { top: 8px;  left: 8px;  border-width: 2px 0 0 2px; }
.hero__corner--tr { top: 8px;  right: 8px; border-width: 2px 2px 0 0; }
.hero__corner--bl { bottom: 8px; left: 8px;  border-width: 0 0 2px 2px; }
.hero__corner--br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

/* Barra terminale superiore */
.hero__terminal-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--dark-mid);
  font-size: 0.72rem;
}
.hero__terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Logo principale */
.hero__logo-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__logo-img {
  width: 240px;
  height: 240px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  /* Glitch permanente leggero + halo */
  filter: drop-shadow(0 0 16px rgba(224,56,32,0.5))
          drop-shadow(0 0 40px rgba(224,56,32,0.2));
  animation: logo-halo 5s ease-in-out infinite;
}

@keyframes logo-halo {
  0%, 100% {
    filter:
      drop-shadow(0 0 12px rgba(224,56,32,0.5))
      drop-shadow(0 0 36px rgba(224,56,32,0.2));
  }
  50% {
    filter:
      drop-shadow(0 0 20px rgba(224,56,32,0.7))
      drop-shadow(0 0 60px rgba(224,56,32,0.3))
      drop-shadow(0 0  4px rgba(96,160,224,0.4));
  }
}

/* Riflesso logo sul "pavimento" */
.hero__logo-reflection {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 30px;
  background: radial-gradient(
    ellipse,
    rgba(224,56,32,0.25) 0%,
    transparent 70%
  );
  filter: blur(8px);
  z-index: 1;
}

/* Label neon sotto il logo */
.hero__neon-label {
  line-height: 1;
  padding-top: 4px;
}

/* Footer del pannello */
.hero__frame-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--dark-mid);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--muted-gray);
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   SCROLL INDICATOR
   ------------------------------------------------------------ */
.hero__scroll-cue {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: var(--z-base);
  opacity: 0;
  animation: fade-in-scroll 1s ease 3s forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--primary-red), transparent);
  animation: scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes fade-in-scroll {
  to { opacity: 0.5; }
}
@keyframes scroll-pulse {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__badge {
    justify-content: center;
  }

  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__ctas {
    justify-content: center;
  }

  .hero__visual {
    order: -1; /* Logo sopra su mobile */
    margin-bottom: var(--space-lg);
  }

  .hero__frame {
    max-width: 320px;
  }

  .hero__logo-img {
    width: 180px;
    height: 180px;
  }

  .hero__logo-wrap {
    width: 200px;
    height: 200px;
  }

  .hero__bg-number {
    font-size: 40vw;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-block: 100px 80px;
  }

  .hero__frame {
    max-width: 90vw;
  }
}
