/* ════════════════════════════════════════════════════════════════════════
 * clever-prep-nhero.css — homepage "new hero" (sticky scroll-grow).
 *  - Tall section + sticky stage pins for the scroll duration.
 *  - 5 cards centred; outer cards bleed off the screen edges.
 *  - Entry: blur+fade+rise, staggered from the centre outward.
 *  - Scroll: the centre video grows from its slot to full screen; the intro
 *    and side cards fade out; three statements reveal line-by-line over it.
 *  - Because the grow video lives inside the sticky stage (not fixed), it
 *    releases naturally once the section scrolls past.
 * ════════════════════════════════════════════════════════════════════════ */

/* Hide the original Reforma hero — the new hero replaces it. Reversible. */
.section_hero-home-a { display: none !important; }

.cp-nhero {
  position: relative;
  height: 240vh;                         /* scroll distance for the grow */
  background: var(--cp-cream-bg, #F7F4ED);
}
.cp-nhero__sticky {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding-top: clamp(104px, 13vw, 168px);   /* clear the fixed nav header */
  text-align: center;
}

/* ── Intro ── */
.cp-nhero__intro {
  position: relative; z-index: 3;
  max-width: 760px;
  padding: 0 clamp(20px, 5vw, 48px);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  will-change: opacity, transform;
}

/* Research-preview badge above the H1 (styles ported from the original hero,
   which scoped them to .section_hero-home-a). */
.cp-nhero .cp-hero-badge {
  display: flex; width: max-content; max-width: 100%;
  align-items: center; gap: 10px;
  margin: 0 auto;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(40, 53, 74, 0.10);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(20, 30, 50, 0.06);
  font-family: var(--cp-font-mono, var(--cp-font-body));
  font-size: 12px; font-weight: 500; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--color-dark-100, #28354A);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.cp-nhero .cp-hero-badge:hover {
  transform: translateY(-1px); background: #fff;
  box-shadow: 0 6px 14px rgba(20, 30, 50, 0.10);
}
.cp-nhero .cp-hero-badge__dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px;
  background: var(--cp-orange, #ED863C);
  box-shadow: 0 0 0 4px rgba(237, 134, 60, 0.18);
  animation: cp-hero-badge-pulse 2.4s ease-in-out infinite;
}
@keyframes cp-hero-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(237, 134, 60, 0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(237, 134, 60, 0.04); }
}
.cp-nhero .cp-hero-badge__arrow { font-size: 13px; line-height: 1; transition: transform .2s ease; }
.cp-nhero .cp-hero-badge:hover .cp-hero-badge__arrow { transform: translateX(2px); }
.cp-nhero__body {
  font-family: var(--cp-font-body); font-weight: 400;
  font-size: clamp(16px, 1.5vw, 20px); line-height: 1.55;
  color: var(--color-dark-64, #28354aa3); margin: 0; max-width: 44ch;
}
.cp-nhero__ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* ── Card row ── */
.cp-nhero__stage {
  position: relative; z-index: 2;
  margin-top: clamp(36px, 5vw, 72px);
  width: 100%;
  display: flex; justify-content: center;   /* centre the over-wide row */
}
.cp-nhero__row {
  display: flex; align-items: flex-end;
  gap: clamp(14px, 1.6vw, 26px);
  width: max-content;
}
.cp-nhero__card {
  flex: 0 0 auto;
  width: clamp(220px, 23vw, 340px);
  aspect-ratio: 3 / 4.3;
  border-radius: 18px;
  overflow: hidden;
  background: var(--color-dark-8, #28354a14);   /* faint placeholder until image loads */
  position: relative;
  /* entry pre-state + per-card fade hook */
  opacity: 0;
  filter: blur(22px);
  transform: translateY(48px) scale(.96);
  transition: opacity .9s ease, filter .9s ease, transform .9s cubic-bezier(.16,1,.3,1);
  transition-delay: calc(abs(var(--i) - 2) * 130ms);
}
.cp-nhero__card > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.cp-nhero.is-in .cp-nhero__card {
  opacity: 1; filter: blur(0); transform: translateY(0) scale(1);
}
/* Centre slot is just a sizing placeholder — the grow video sits over it. */
.cp-nhero__card--slot { background: transparent; }

/* ── Grow video (overlays the centre slot, expands to fill the sticky) ── */
.cp-nhero__grow {
  position: absolute; z-index: 5;
  overflow: hidden;
  border-radius: 18px;
  opacity: 0;
  /* left/top/width/height set by JS each frame */
}
.cp-nhero.is-in .cp-nhero__grow { opacity: 1; transition: opacity .9s ease .26s; }
.cp-nhero__grow-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Scroll statements ── */
.cp-nhero__statements { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
/* Every statement is absolutely centred, so each one reveals at the exact
   same spot (screen centre) — not stacked at different heights. */
.cp-nhero__statement {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(18ch, 86vw); margin: 0; text-align: center; color: #fff;
  font-family: var(--cp-font-heading, Georgia, serif); font-weight: 400;
  font-size: clamp(26px, 3.8vw, 54px); line-height: 1.14; letter-spacing: -0.01em;
  text-shadow: 0 2px 40px rgba(0,0,0,0.45);
  opacity: 0;                       /* container fade (crossfade-out) driven by JS */
}
/* Per-word masked rise (SplitText style): inner span rises out of a clipped
   box, so words "swirl"/rotate up into view one after another. */
.cp-nhero__word {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding-bottom: .14em; margin-bottom: -.14em;   /* descender room, no clipping */
}
.cp-nhero__word-in {
  display: inline-block; opacity: 0;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .cp-nhero__card { transition-duration: .01ms; }
  .cp-nhero { height: auto; }
  .cp-nhero__sticky { position: static; height: auto; padding-bottom: 80px; }
}

@media (max-width: 767px) {
  .cp-nhero__card { width: clamp(180px, 56vw, 260px); }
  .cp-nhero__row { gap: 12px; }
}
