/* ===================================================
   BRIDGE GRC — HERO REDESIGN
   Split layout: copy (left) + animated layered stage (right).
   Loaded AFTER styles.css to override the legacy hero rules.
   =================================================== */

/* ---- LAYOUT ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: clamp(100px, 13vh, 150px) 0 var(--space-xl);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Big soft glow behind the stage — removed (artwork glows on its own) */
.hero__glow {
  display: none;
}

/* Faint dotted grid that fades around the stage */
.hero__grid-fade {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 74% 50%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 60% at 74% 50%, #000 0%, transparent 72%);
  opacity: 0.6;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: var(--space-md);
  align-items: center;
}

/* ---- COPY ---- */
.hero__copy {
  max-width: 640px;
}

.hero__label {
  opacity: 0;
  transform: translateY(20px);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  visibility: visible;
}

.hero__line {
  display: block;
  overflow: hidden;
}

.hero__line > span {
  display: block;
  will-change: transform;
}

.hero__line--accent {
  color: var(--accent-primary);
}

.hero__subtitle {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.7;
  margin: 0 0 var(--space-lg);
  opacity: 0;
  transform: translateY(20px);
}

.hero__actions {
  display: flex;
  justify-content: flex-start;
  gap: var(--space-sm);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

/* ---- HERO TRUST ROW ---- */
.hero__trust {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(20px);
}

.hero__trust-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-tertiary);
}

.hero__trust-logos {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.hero__trust-logo {
  height: 24px;
  width: auto;
  opacity: 0.4;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s ease;
}

.hero__trust-logo:hover {
  opacity: 0.7;
}

/* ===================================================
   ANIMATED STAGE
   =================================================== */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.hero-stage {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

/* Inner halo bloom — removed per request (no glow behind the artwork) */
.hero-stage__halo {
  display: none;
}

/* Stacked, aligned layers (all source PNGs are 1254x1254, same center).
   Each layer has a dark background matching the site, so SCREEN blend drops
   the black out and the green glows add together across layers. */
.hero-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

/* Horizontal core-disc / portal glow — sits LOW, beneath the shield base */
.hero-layer--portal {
  transform: translateY(22%);
  animation: heroGlow 5s ease-in-out infinite;
}

/* Orbital rings — bigger, gentle vertical drift + shimmer, NO rotation */
.hero-layer--rings {
  transform: scale(1.12);
  animation: heroRings 7s ease-in-out infinite, heroGlowSoft 8s ease-in-out infinite;
}

/* Shield + pedestal — gently hovers */
.hero-layer--shield {
  animation: heroFloat 7s ease-in-out infinite;
}

/* Energy beam — faded, sits at the very back as a soft backdrop glow */
.hero-layer--beam {
  opacity: 0.3;
  animation: heroBeamFaint 4.5s ease-in-out infinite;
}

/* Pulsing energy core highlight (sits on the shield's core point) */
.hero-core {
  position: absolute;
  left: 50%;
  top: 49%;
  width: 26%;
  height: 26%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(52, 232, 150, 0.45), transparent 62%);
  filter: blur(6px);
  pointer-events: none;
  animation: heroPulse 3.4s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes heroGlow {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 1; }
}

@keyframes heroGlowSoft {
  0%, 100% { opacity: 0.68; }
  50% { opacity: 0.95; }
}

/* Rings: bigger (scale baked in) + slightly stronger vertical drift */
@keyframes heroRings {
  0%, 100% { transform: scale(1.12) translateY(0); }
  50% { transform: scale(1.12) translateY(-16px); }
}

/* Beam: faint background glow pulse */
@keyframes heroBeamFaint {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.4; }
}

@keyframes heroPulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.14); }
}

/* ---- FLANKING NODE COLUMNS ---- */
.hero-nodes {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 9% 0;
  z-index: 3;
  pointer-events: none;
}

/* Columns pushed outboard of the shield so labels never overlap it */
.hero-nodes--left {
  left: -17%;
  align-items: flex-start;
}

.hero-nodes--right {
  right: -26%;
  align-items: flex-start;
}

/* Per-node horizontal offset (--cx) bows each column into an arc that
   curves around the round shield (middle items sit further out). */
.hero-node {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: var(--cx, 0);
  opacity: 0;
  pointer-events: auto;
  /* Fade-in (staggered) + float synced 1:1 with the artwork (7s, no delay) */
  animation:
    heroNodeIn 0.6s ease forwards,
    heroFloat 7s ease-in-out infinite;
  animation-delay: var(--d, 0.7s), 0s;
}

.hero-node__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--accent-glow);
  filter: drop-shadow(0 0 7px rgba(45, 200, 130, 0.5));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-node__icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.hero-node__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  white-space: nowrap;
}

.hero-node__text strong {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.hero-node__text em {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.hero-node:hover .hero-node__icon {
  transform: scale(1.12);
  filter: drop-shadow(0 0 12px rgba(45, 200, 130, 0.75));
}

@keyframes heroNodeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ===================================================
   RESPONSIVE
   =================================================== */

/* Tablet & down — single column, centered, labels hidden */
@media (max-width: 1180px) {
  .hero {
    padding-top: clamp(110px, 16vh, 160px);
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .hero__copy {
    max-width: 640px;
    margin: 0 auto;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__trust {
    align-items: center;
    margin-top: var(--space-lg);
  }

  .hero__trust-logos {
    justify-content: center;
  }

  .hero__visual {
    order: 2;
  }

  .hero-stage {
    margin: 0 auto;
    max-width: 460px;
  }

  /* Flanking columns don't fit a centered stage — show the centerpiece alone */
  .hero-nodes {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero-stage {
    max-width: 340px;
  }

  .hero__glow {
    right: 50%;
    transform: translate(50%, -50%);
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-layer--portal,
  .hero-layer--rings,
  .hero-layer--shield,
  .hero-layer--beam,
  .hero-core {
    animation: none !important;
  }

  .hero-node {
    animation: heroNodeIn 0.4s ease forwards;
    animation-delay: var(--d);
  }
}
