.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Background layers */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}


.hero-grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--grid);

  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;

  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 0%, transparent 100%);

  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

/* Wrapper gives the glows a stable positioning context tied to the image */
.hero-image-outer {
  position: relative;
  width: fit-content;
  max-width: min(50vw, 100%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -40%, 0);
  pointer-events: none;
  filter: blur(40px);
  will-change: opacity, transform;
  animation: glow-pulse 6s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 1;    transform: translate3d(-50%, -40%, 0) scale(1); }
  50%      { opacity: 0.55; transform: translate3d(-50%, -40%, 0) scale(0.92); }
}

.hero-glow--1 {
  width: 480px;
  height: 280px;
  background: radial-gradient(
    circle,
    rgba(248, 220, 120, 0.40) 0%,
    rgba(230, 194, 84, 0.28) 12%,
    rgba(212, 168, 48, 0.18) 25%,
    rgba(212, 168, 48, 0.10) 38%,
    rgba(212, 168, 48, 0.04) 52%,
    transparent 70%
  );
}

.hero-glow--2 {
  width: 320px;
  height: 120px;
  animation-delay: -3s;
  background: radial-gradient(
    circle,
    rgba(74, 139, 127, 0.36) 0%,
    rgba(74, 139, 127, 0.26) 12%,
    rgba(74, 139, 127, 0.16) 25%,
    rgba(74, 139, 127, 0.09) 38%,
    rgba(74, 139, 127, 0.04) 52%,
    transparent 70%
  );
}

/* Hero content */
.hero-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: 0 var(--px);
  max-width: 680px;
  width: 100%;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 1.1rem;
  background: rgba(28, 18, 8, 0.8);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  color: var(--accent);
  white-space: nowrap;
}

/* Image placeholder */
.hero-image {
  width: 100%;
  background: transparent;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
}

.hero-logo {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Each colored block of the logo drops in independently */
.logo-block {
  transform-box: fill-box;
  transform-origin: center bottom;
  /* Out-of-view / pre-drop state: held above and hidden */
  transform: translateY(-400%);
  opacity: 0;
}

.hero-logo.visible .logo-block {
  animation: logo-drop 0.8s ease-in both;
}

/* Contact shadow under the blocks: softened + fades in as they land */
.logo-shadow {
  fill: #000;
  fill-opacity: 0.5;
  opacity: 0;
}

.hero-logo.visible .logo-shadow {
  animation: shadow-fade 0.4s ease-out 0.25s both;
}

@keyframes shadow-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-logo.visible .b1 { animation-delay: 0ms;   }
.hero-logo.visible .b2 { animation-delay: 60ms;  }
.hero-logo.visible .b3 { animation-delay: 25ms; }
.hero-logo.visible .b4 { animation-delay: 80ms; }
.hero-logo.visible .b5 { animation-delay: 110ms; }

@keyframes logo-drop {
  0%   {  
    opacity: 0; 
    transform: translateY(-400%); 
  }

  10%  {  
    opacity: 1; 
  }

  30%  { 
    transform: 
      translateY(0) 
      scaleX(1)  
      scaleY(1);    
    animation-timing-function: ease-out;
 }

  40%  { 
    transform: 
      scaleX(1.2) 
      scaleY(0.8);  
    animation-timing-function: ease-in; 
  }
  
  60%  { 
    transform: 
      scaleX(0.85) 
      scaleY(1.15);
    animation-timing-function: ease-out;
  }

  80%  { 
    transform: 
      scaleX(1.1) 
      scaleY(0.9);
    animation-timing-function: ease-in;
  }

  100% { 
    opacity: 1; 
    transform: 
      translateY(0)
      scaleX(1)    
      scaleY(1);
    animation-timing-function: ease-out;
  }

}

@media (prefers-reduced-motion: reduce) {
  .logo-block,
  .hero-logo.visible .logo-block,
  .logo-shadow,
  .hero-logo.visible .logo-shadow {
    animation: none;
    transform: none;
    opacity: 1;
  }

  .hero-glow {
    animation: none;
    opacity: 1;
  }
}

.hero-image-label {
  position: absolute;
  bottom: 0.6rem;
  left: 0.65rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: rgba(244,229,184,0.22);
  pointer-events: none;
}

.hero-role {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  color: var(--accent);
}

.hero-tagline {
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--third);
  max-width: 450px;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 4.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: opacity 0.4s ease;
}

.hero-scroll.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  opacity: 0;
  animation: chevron-fall 1.8s ease-in-out infinite;
}
.hero-chevron:nth-child(3) { animation-delay: 0s;    }
.hero-chevron:nth-child(2) { animation-delay: 0.18s; }
.hero-chevron:nth-child(1) { animation-delay: 0.36s; }

@keyframes chevron-fall {
  0%        { opacity: 0;   transform: rotate(45deg) translate(-3px, -3px); }
  45%       { opacity: 0.8; }
  80%, 100% { opacity: 0;   transform: rotate(45deg) translate(3px, 3px);  }
}
