/*
 * EFM Homepage Animated Section — styles
 * Drops into the existing site; uses the same tokens as css/style.css.
 */

.efm-anim-section {
  background-color: var(--dark-blue, #0E0F1D);
  color: var(--light-bg, #DDE2E8);
  /* Brief: ~80vh on desktop, min 600px */
  min-height: 640px;
  height: 82vh;
  max-height: 880px;
  padding: 48px 40px 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* When the section sits directly below the hero, kill any visible seam */
.hero.dark + .efm-anim-section {
  margin-top: 0;
  border-top: none;
}

.efm-anim-stage {
  position: relative;
  width: 100%;
  max-width: 1200px;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.efm-anim-canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* Fallback gradient while canvas initializes */
  background-color: var(--dark-blue, #0E0F1D);
}

.efm-anim-caption {
  /* Real DOM text so SR and SEO see it. Brief: Termina Demi.
     On-site fallback: DM Sans 700 (the existing H1 stack), then Montserrat Bold, then system. */
  font-family: 'Termina', 'DM Sans', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--light-bg, #DDE2E8);
  max-width: 100%;
  margin: 32px auto 0;
  padding: 0 24px;
}

/* Only force one-line at widths where the full sentence comfortably fits */
@media (min-width: 900px) {
  .efm-anim-caption {
    white-space: nowrap;
  }
}

/* Kept as a no-op for backward compatibility with efm-section.js */
.efm-anim-caption.is-visible {
  opacity: 1;
  transform: none;
}

.efm-anim-caption .gold {
  color: var(--yellow, #D8A428);
}

/* Respect reduced motion: caption visible immediately */
@media (prefers-reduced-motion: reduce) {
  .efm-anim-caption {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Mobile — brief allows full arc, just less dense; shrink the vertical footprint */
@media (max-width: 768px) {
  .efm-anim-section {
    min-height: 480px;
    height: 70vh;
    padding: 32px 20px 80px;
  }
  .efm-anim-caption {
    font-size: clamp(15px, 4.2vw, 19px);
    margin-top: 24px;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .efm-anim-section {
    min-height: 420px;
    height: 65vh;
  }
}
