/* ============================================================
   MAYACODES — hero.css  (Hero section with CSS animated background)
   ============================================================ */

/* ——— HERO ——— */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 24%, rgba(26,138,82,0.22), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(201,168,76,0.14), transparent 28%),
    linear-gradient(135deg, #071009 0%, #0b1610 35%, #050705 100%);
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: -25%;
  pointer-events: none;
}

.hero::before {
  z-index: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(26,138,82,0.18), transparent 18%),
    radial-gradient(circle at 70% 40%, rgba(201,168,76,0.12), transparent 16%),
    radial-gradient(circle at 55% 70%, rgba(16,100,60,0.22), transparent 24%);
  filter: blur(28px);
  animation: heroAurora 16s ease-in-out infinite alternate;
}

.hero::after {
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.9) 18%, rgba(0,0,0,0.9) 100%);
  opacity: 0.35;
  transform: perspective(1000px) rotateX(72deg) translateY(22%);
  transform-origin: center bottom;
  animation: heroGrid 18s linear infinite;
}

/* Canvas container for old 3D scene — intentionally disabled for CSS-only animation */
#hero-canvas {
  display: none;
}

/* Gradient overlays */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, rgba(6,8,6,0.88) 34%, rgba(6,8,6,0.45) 62%, rgba(6,8,6,0.16) 100%),
    linear-gradient(to top, rgba(6,8,6,0.76) 0%, rgba(6,8,6,0.18) 48%, rgba(6,8,6,0.06) 100%);
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  width: 100%;
}

.hero-text { padding-top: 5rem; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--jade-light);
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: heroReveal 1s 0.2s cubic-bezier(0.16,1,0.3,1) forwards;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--jade-light);
  display: inline-block;
}

.hero-title {
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: heroReveal 1s 0.4s cubic-bezier(0.16,1,0.3,1) forwards;
}
.hero-title em {
  font-style: italic;
  color: var(--jade-light);
  display: block;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--grey-400);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: heroReveal 1s 0.6s cubic-bezier(0.16,1,0.3,1) forwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroReveal 1s 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
}

/* Hero stats panel */
.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 5rem;
  opacity: 0;
  animation: heroFade 1.2s 1s ease forwards;
}

.hero-stat-card {
  background: rgba(6,8,6,0.52);
  border: var(--border-jade);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.8rem;
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  transition: all var(--t-base);
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
}
.hero-stat-card:hover {
  background: rgba(16,100,60,0.12);
  border-color: var(--jade-light);
  transform: translateX(6px);
}
.hero-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16,100,60,0.15);
  border: var(--border-jade);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-stat-icon svg { width: 20px; height: 20px; stroke: var(--jade-light); }
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.72rem;
  color: var(--grey-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: heroFade 1s 1.5s ease forwards;
}
.hero-scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--jade-light));
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { opacity: 0.4; transform: scaleY(1) translateY(0); }
  50% { opacity: 1; transform: scaleY(1.1) translateY(4px); }
}
.hero-scroll-text {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-600);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* Location badge */
.hero-location {
  position: absolute;
  bottom: 2.5rem;
  right: 2rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(6,8,6,0.7);
  border: var(--border-gold);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: heroFade 1s 1.4s ease forwards;
}
.hero-location svg { width: 12px; height: 12px; stroke: var(--gold); }

/* ——— Hero-specific keyframes ——— */
@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes heroFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes heroAurora {
  0% {
    transform: translate3d(-3%, -2%, 0) scale(1);
    opacity: 0.82;
  }
  50% {
    transform: translate3d(2%, 3%, 0) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translate3d(4%, -1%, 0) scale(1.02);
    opacity: 0.86;
  }
}
@keyframes heroGrid {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 0 120px, 120px 0;
  }
}

/* Stat cards stagger */
.hero-stat-card:nth-child(1) { animation: heroReveal 0.7s 1.1s cubic-bezier(0.16,1,0.3,1) both; }
.hero-stat-card:nth-child(2) { animation: heroReveal 0.7s 1.25s cubic-bezier(0.16,1,0.3,1) both; }
.hero-stat-card:nth-child(3) { animation: heroReveal 0.7s 1.4s cubic-bezier(0.16,1,0.3,1) both; }

@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-stats { display: none; }
}
@media (max-width: 768px) {
  .hero {
    height: 100svh;
    min-height: 600px;
  }
  .hero::after {
    background-size: 72px 72px;
    opacity: 0.25;
  }
  .hero-location { display: none; }
  .hero-scroll { display: none; }
  .hero-eyebrow { display: none; }
}
