/* hero.css - split hero with particle spark. Owner: HERO. */

/* Landing split-hero rules — scoped to :not(.panel) so they do NOT hit the merged
   alethia FRAME hero (id="hero" class="panel hero") on index.html / templates.
   The bare id would otherwise beat the .alethia .hero classes on specificity. */
#hero:not(.panel) {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 41rem) 1fr;
  align-items: center;
  padding: clamp(5rem, 12vh, 6rem) var(--gutter) 3rem;
  /* body owns the petrol to ink ground; hero only adds a soft sky glow */
  background: radial-gradient(ellipse 58% 64% at 72% 52%, rgba(94, 154, 200, 0.09), transparent 70%);
}

#spark-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 41rem;
}

.hero-inner .label {
  font-size: var(--step-label);
  font-weight: var(--w-regular);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1.25rem;
}

#hero:not(.panel) h1 {
  font-size: var(--step-hero);
  font-weight: var(--w-light);
  letter-spacing: var(--track-tight);
  line-height: 1.08;
  color: var(--pale);
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

#hero:not(.panel) h1 em.accent {
  font-style: normal;
}

.hero-sub {
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--steel);
  max-width: 38ch;
  margin: 0 0 2.25rem;
}

.hero-inner .cta {
  display: inline-block;
}

/* Entry: staggered fade and rise, transform/opacity only */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * {
    opacity: 0;
    transform: translateY(20px);
    animation: hero-in 0.9s var(--ease-out) forwards;
  }
  .hero-inner > :nth-child(1) { animation-delay: 0.15s; }
  .hero-inner > :nth-child(2) { animation-delay: 0.3s; }
  .hero-inner > :nth-child(3) { animation-delay: 0.5s; }
  .hero-inner > :nth-child(4) { animation-delay: 0.7s; }
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================================
   VARIANT HERO — a lighter header echo of the landing hero for the sub-pages.
   Same typographic system (.label / h1 / .hero-sub / .cta) but NO point-cloud
   canvas, NO video, NO chess pieces, and a reduced height so it reads as a page
   header rather than a full-viewport takeover. Themed via [data-theme]: dark uses
   the ink/petrol ground + light text; light uses the pale ground + ink text.
   Selectors use #hero.hero-variant so they beat the #hero:not(.panel) split-hero
   rules above without touching them.
   ============================================================================ */
#hero.hero-variant {
  position: relative;
  min-height: 62vh;
  max-width: none;      /* undo base.css section cage → full-bleed ground */
  margin-inline: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(7rem, 16vh, 9rem) var(--gutter) clamp(3rem, 8vh, 4.5rem);
}
#hero.hero-variant[data-theme="dark"] {
  background:
    radial-gradient(ellipse 60% 70% at 72% 46%, rgba(94, 154, 200, 0.10), transparent 68%),
    linear-gradient(180deg, var(--ink), var(--navy) 62%, var(--ink));
}
#hero.hero-variant[data-theme="light"] {
  background:
    radial-gradient(ellipse 62% 72% at 72% 44%, rgba(94, 154, 200, 0.10), transparent 70%),
    linear-gradient(180deg, var(--pale), #DCE7F0 60%, var(--pale));
}

#hero.hero-variant .hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 46rem;
}
#hero.hero-variant .label {
  font-size: var(--step-label);
  font-weight: var(--w-regular);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1.1rem;
}
#hero.hero-variant h1 {
  font-size: var(--step-hero);
  font-weight: var(--w-light);
  letter-spacing: var(--track-tight);
  line-height: 1.08;
  margin: 0 0 1.35rem;
  text-wrap: balance;
}
#hero.hero-variant[data-theme="dark"] h1 { color: var(--pale); }
#hero.hero-variant[data-theme="light"] h1 { color: var(--ink); }
#hero.hero-variant h1 em.accent {
  font-style: normal;
  font-weight: var(--w-accent);
  color: var(--sky);
}
#hero.hero-variant .hero-sub {
  font-size: var(--step-body);
  line-height: 1.6;
  max-width: 46ch;
  margin: 0 0 2rem;
}
#hero.hero-variant[data-theme="dark"] .hero-sub { color: var(--steel); }
#hero.hero-variant[data-theme="light"] .hero-sub { color: #41586a; }
#hero.hero-variant .cta { display: inline-block; }

@media (max-width: 767px) {
  #hero.hero-variant {
    min-height: 54vh;
    padding-top: 6.5rem;
    text-align: center;
  }
  #hero.hero-variant .hero-inner { margin-inline: auto; }
  #hero.hero-variant .hero-sub { margin-inline: auto; }
}

/* Mobile: centered stack, spark sits behind the copy */
@media (max-width: 767px) {
  #hero:not(.panel) {
    grid-template-columns: 1fr;
    padding-top: 5.5rem;
    padding-bottom: 2.5rem;
    text-align: center;
    background: radial-gradient(ellipse 90% 55% at 50% 56%, rgba(94, 154, 200, 0.09), transparent 72%);
  }
  .hero-inner {
    margin-inline: auto;
  }
  .hero-sub {
    margin-inline: auto;
  }
  .hero-inner .label {
    margin-bottom: 1rem;
  }
  #hero h1 {
    margin-bottom: 1.25rem;
  }
}
