/* =============================================================
   Solmateria — HERO
   Narrative beat 0: cold / dormant. Sunlight crosses the building
   but is NOT yet captured. Palette stays blue; one warm CTA is the
   first spark. The filament begins here.
   ============================================================= */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(68px + var(--space-12));
  padding-bottom: calc(var(--space-16) + var(--space-12));
  background:
    radial-gradient(120% 90% at 78% -10%, #25394f 0%, transparent 55%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--brand-slate) 70%, var(--ramp-1) 100%);
}

/* ---- Background light: a cool sun + uncaptured rays ---------- */
.hero__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Self-sufficient COLD dawn. This layer IS the hero background whenever the
     video is not played (phones, data-saver, reduced-motion — see initHeroVideo
     / bgVideoAllowed). A cool horizon glow lifts it off the near-black surface so
     the fallback reads as an intentional cold sky, not an empty/black panel. It
     sits at z-index:-1, so the video (desktop) fully covers it when it plays —
     the desktop-with-video look is unchanged. */
  background:
    radial-gradient(118% 78% at 74% 2%,
      rgba(63, 101, 148, 0.55) 0%,
      rgba(41, 65, 101, 0.30) 40%,
      transparent 72%),
    linear-gradient(180deg, #16273a 0%, #1e3149 52%, #223a5a 100%);
}
/* dormant sun — cool, desaturated (light not yet turned to energy). Sized and
   placed to stay ON-SCREEN on narrow phones (was mostly off the top-right, so
   the fallback had no visible light source). */
.hero__sun {
  position: absolute;
  top: -6%;
  right: -6%;
  width: min(70vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(152, 186, 222, 0.55) 0%,
    rgba(94, 132, 174, 0.26) 36%,
    transparent 70%);
  filter: blur(2px);
}
/* light rays sweeping across, fading out — passing through, uncaptured */
.hero__rays {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 150%;
  background: repeating-linear-gradient(
    108deg,
    transparent 0,
    transparent 46px,
    rgba(170, 198, 226, 0.05) 46px,
    rgba(170, 198, 226, 0.05) 48px
  );
  -webkit-mask-image: radial-gradient(120% 80% at 75% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(120% 80% at 75% 0%, #000 0%, transparent 70%);
  opacity: 0.9;
}

/* ---- Static poster + background video + dark overlay --------- */
/* The poster (a still frame of the video) is the visible background whenever the
   video isn't played (phones, data-saver, reduced-motion). The video shares the
   same box and fades in OVER it on desktop, so the poster acts as an instant
   placeholder there too. Both sit above the CSS sky (z-index:-1) and below the
   overlay (z-index:1), which cools them into the narrative. */
.hero__fallback,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.hero__video {
  opacity: 0;
  transition: opacity 1s var(--ease-out);
}
.hero__video.is-playing { opacity: 1; }

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* darker on the left (under the copy) + at top/bottom — keeps the title,
     buttons and cue fully legible over the footage */
  background:
    linear-gradient(90deg, rgba(13, 20, 29, 0.9) 0%, rgba(13, 20, 29, 0.62) 48%, rgba(13, 20, 29, 0.34) 100%),
    linear-gradient(180deg, rgba(13, 20, 29, 0.34) 0%, rgba(13, 20, 29, 0) 30%, rgba(13, 20, 29, 0.58) 100%);
}

/* COLD / darker variant — opt-in for comparison. The warm overlay above is
   the default; add class="hero-cold" on <body> to preview this one instead.
   Nothing is removed, so switching back is just deleting that class. */
body.hero-cold .hero__overlay {
  background:
    linear-gradient(90deg, rgba(8, 14, 24, 0.95) 0%, rgba(8, 14, 24, 0.76) 48%, rgba(10, 18, 30, 0.5) 100%),
    linear-gradient(180deg, rgba(8, 14, 24, 0.5) 0%, rgba(8, 14, 24, 0.12) 30%, rgba(8, 14, 24, 0.66) 100%),
    linear-gradient(0deg, rgba(34, 62, 102, 0.24), rgba(34, 62, 102, 0.24)); /* cool blue wash */
}

/* Soft seam: the bottom of the hero melts into the next section's colour
   (ramp-1 = the constat's top) so there is no hard cut under the video. */
.hero__seam {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  z-index: 1;
  pointer-events: none;
  /* Reach ramp-1 before the very bottom and hold it flat, so the hero arrives at
     the seam with ZERO slope — the constat also holds ramp-1 at its top. Both flat
     at the join → the old bright ramp-1 ridge (Mach band) becomes a soft plateau. */
  background: linear-gradient(180deg, rgba(41, 65, 101, 0) 0%, var(--ramp-1) 82%, var(--ramp-1) 100%);
}

/* ---- Layout ------------------------------------------------- */
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__copy { max-width: 40rem; }

.hero__title {
  font-size: var(--text-display);
  margin: var(--space-4) 0 var(--space-6);
}
.hero__title .warm {
  /* the word that carries the latent energy idea */
  color: var(--brand-orange);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 38rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}
.hero__trust li { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero__trust svg { width: 16px; height: 16px; color: var(--brand-steel); flex: none; }

/* ---- Scroll cue -------------------------------------------- */
.hero__cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-8);
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.hero__cue svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .hero__cue svg { animation: cue-bob 2.4s var(--ease-in-out) infinite; }
}
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---- Desktop ----------------------------------------------- */
@media (min-width: 880px) {
  .hero__title { margin-top: var(--space-2); }
}
