/* ==========================================================================
   Hero Spotlight — front page only (enqueued via is_front_page())
   Cursor-following spotlight reveals the "energized" AI network image.
   ========================================================================== */

.hero-spotlight {
  position: relative;
  width: 100%;
  height: 100vh; /* fallback */
  height: 100dvh;
  overflow: hidden;
  background: #000;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

.hero-spotlight .font-playfair {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
}

/* --- Layers -------------------------------------------------------------- */

.hero-spotlight__base {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: url('../img/hero-base.svg') center / cover no-repeat;
}

.hero-spotlight__reveal {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: url('../img/hero-reveal.svg') center / cover no-repeat;
  pointer-events: none;
  /* Hidden until JS paints the first mask (or touch fallback kicks in) */
  opacity: 0;
}

.hero-spotlight__reveal.is-masked {
  opacity: 1;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* Touch devices: no cursor, show the energized layer as a soft static blend */
.hero-spotlight__reveal.is-static {
  opacity: 0.35;
}

/* --- Heading ------------------------------------------------------------- */

.hero-spotlight__heading {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Slight upward bias so the block reads centered against the bottom notes */
  padding: 0 1.25rem 10vh;
  pointer-events: none;
}

.hero-spotlight__heading h1 {
  margin: 0;
  color: var(--text-color, #fff);
  line-height: 0.95;
  font-weight: 400;
}

.hero-spotlight__heading .hero-line-1 {
  display: block;
  font-size: 3rem;
  letter-spacing: -0.05em;
}

.hero-spotlight__heading .hero-line-2 {
  display: block;
  font-size: 3rem;
  letter-spacing: -0.08em;
  margin-top: -0.15rem;
  font-weight: 500;
}

.hero-spotlight__heading .hero-line-2 .highlight {
  color: var(--primary-color);
  text-shadow: 0 0 18px rgba(0, 230, 118, 0.55);
}

.hero-spotlight__tagline {
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --- Bottom notes + CTA --------------------------------------------------- */

.hero-spotlight__note--left {
  display: none;
  position: absolute;
  bottom: 3.5rem;
  left: 2.5rem;
  z-index: 50;
  max-width: 320px;
}

.hero-spotlight__note--left p,
.hero-spotlight__note--right p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-spotlight__note--right {
  position: absolute;
  bottom: 2.5rem;
  left: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.hero-spotlight__cta {
  display: inline-block;
  background: var(--primary-color);
  color: #041c10;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-spotlight__cta:hover {
  background: var(--primary-dark, #00c853);
  color: #041c10;
  transform: scale(1.03);
  box-shadow: 0 8px 30px rgba(0, 230, 118, 0.35);
}

.hero-spotlight__cta:active {
  transform: scale(0.95);
}

.hero-spotlight__cta--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-spotlight__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.hero-spotlight__cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --- Scroll hint ----------------------------------------------------------- */

.hero-spotlight__scroll {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  animation: heroScrollBob 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroScrollBob {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* --- Fixed glass nav overlay (front page only, via body.is-hero-page) ----- */

body.is-hero-page #header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 12, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

body.is-hero-page #header .nav-links {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  padding: 0.35rem 0.5rem;
}

body.is-hero-page #header .nav-links li a {
  color: rgba(255, 255, 255, 0.82);
  border-radius: 9999px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.25s ease, color 0.25s ease;
}

body.is-hero-page #header .nav-links li a:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

body.is-hero-page #header .nav-links li a.active {
  background: var(--primary-color);
  color: #041c10;
}

body.is-hero-page #header .hamburger .bar {
  background-color: #fff;
}

/* --- Load animations ------------------------------------------------------- */

@keyframes heroReveal {
  0% { opacity: 0; transform: translateY(28px); filter: blur(12px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes heroFadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes heroZoom {
  0% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.hero-anim {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-reveal-anim {
  animation-name: heroReveal;
  animation-duration: 1.1s;
}

.hero-fade-anim {
  animation-name: heroFadeUp;
  animation-duration: 1s;
}

.hero-spotlight__base {
  animation: heroZoom 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Scroll-in reveals for the rest of the page (JS adds .in-view) -------- */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-anim,
  .hero-spotlight__base,
  .hero-spotlight__scroll {
    animation: none;
    opacity: 1;
  }
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Responsiveness -------------------------------------------------------- */

@media (min-width: 640px) {
  .hero-spotlight__heading .hero-line-1,
  .hero-spotlight__heading .hero-line-2 {
    font-size: 4.5rem;
  }

  .hero-spotlight__note--left {
    display: block;
  }

  .hero-spotlight__note--right {
    left: auto;
    right: 2.5rem;
    bottom: 8.5rem; /* keeps CTAs clear of the fixed chat widget */
    max-width: 330px;
  }
}

@media (min-width: 768px) {
  .hero-spotlight__heading .hero-line-1,
  .hero-spotlight__heading .hero-line-2 {
    font-size: 6rem;
  }

  .hero-spotlight__note--right {
    right: 3.5rem;
  }

  .hero-spotlight__note--left {
    left: 3.5rem;
  }
}
