/* ========== Home Hero Header – Scrolly ========== */

/* ── Story Hero Section ────────────────────────────────── */
.story-hero {
  position: relative;
}

.story-sticky {
  position: relative;
  width: 100%;
  height: calc(100dvh - 6rem);
  overflow: hidden;
  background: transparent;
}

@supports not (height: 100dvh) {
  .story-sticky {
    height: 100vh;
  }
}

/* ── Background Image ──────────────────────────────────── */
.story-image-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  z-index: 0;
}

/* ── Cinematic gradient overlay (sits between image and text) ── */
.story-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    /* Dark bottom fade → gives CTA strip its depth */
          linear-gradient(
                  to bottom,
                  rgba(0, 0, 0, 0)        0%,
                  rgba(0, 0, 0, 0.08)    30%,
                  rgba(37, 14, 69, 0.42) 58%,
                  rgba(8,  4,  18, 0.82) 100%
          );
}

/* ── Overlay & Copy ────────────────────────────────────── */
.story-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* 2-row grid: copy auto-centers in the space above the CTA bar */
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  pointer-events: none;
}

.story-copy {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;       /* horizontal center within the grid column */
  text-align: center;
  padding: var(--mp16);
  top: 30%;
  /* width: min(100%, 56rem); */
}

.story-copy::before {
  content: "";
  position: absolute;
  inset: -5% -15%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(252.65deg, #250d46 8.18%, #250d46 91.82%);
  filter: blur(4.615rem) saturate(120%);
  opacity: 0.55;
  border-radius: 50%;
}

/* ── Title & Subtitle ──────────────────────────────────── */
.story-title,
.story-subtitle {
  position: relative;
  z-index: 1;
  color: var(--text-white);
}

.story-title {
  font-weight: var(--font-weight-700);
  font-size: var(--font-size-100);
  line-height: 1;
  text-shadow: 0 0.462rem 1.846rem rgba(0, 0, 0, 0.35);
  margin: 0 0 0 0;
  letter-spacing: 0.039rem;
}

.story-subtitle {
  font-weight: var(--font-weight-500);
  font-size: var(--font-size-48);
}

/* ── Scroll Indicator ──────────────────────────────────── */
.scroll-indicator {
  position: relative;
  z-index: 1;
  margin: 2rem auto 0;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  color: var(--text-white);
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
}

.scroll-indicator .chev {
  width: 1.75rem;
  height: 1.75rem;
  opacity: 0;
  animation: chev-drop 1.6s ease-out infinite;
  filter: drop-shadow(0 0.154rem 0.462rem rgba(0, 0, 0, 0.45));
}

.scroll-indicator:hover,
.scroll-indicator:focus-visible {
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-indicator .chev {
    animation: none;
    opacity: 1;
  }
}

/* ── Slot (scroll-in content, empty placeholder) ──────── */
.story-quiz-slot {
  display: none;
}

/* ── CTA Bar (always visible, not scroll-controlled) ───── */
.story-cta-bar {
  position: relative;          /* in grid flow – auto row, always at bottom */
  z-index: 3;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

/* ── CTA Strip ─────────────────────────────────────────── */
.story-cta-strip {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100vw;
  padding: 1.5rem 3 rem;
  /* background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(0.923rem);
  -webkit-backdrop-filter: blur(0.923rem); */
  pointer-events: auto;
  margin-bottom: 64px;
  max-width: 1240px;
}

.story-cta-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
}

.story-cta-heading {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-weight: var(--font-weight-700);
  font-size: clamp(var(--font-size-18), 2vw, var(--font-size-24));
  line-height: 1.3;
  color: var(--text-white);
  margin: 0;
}

.button-story-cta {
  background: #E11D48 !important;
  color: var(--text-white) !important;
}

.story-cta-heading span {
  display: block;
}

.story-cta-sub {
  font-size: clamp(var(--font-size-14), 1.2vw, var(--font-size-16));
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.5;
}

.story-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.story-cta-buttons .uk-button {
  min-width: 16rem;
  white-space: nowrap;
  border-radius: 3rem;
  padding: 0.6rem 1.5rem;
}

/*
 * OUTLINE-type buttons in shared-button.php always add `bg-transparent`.
 * On the dark hero that makes them invisible. Force solid backgrounds here.
 */
.story-cta-buttons .uk-button.bg-transparent.uk-text-primary {
  background-color: var(--primary-color);
  color: var(--text-white);
  border-color: transparent;
}

.story-cta-buttons .uk-button.bg-transparent:not(.uk-text-primary) {
  background-color: rgba(255, 255, 255, 1);
  color: rgba(51, 51, 51, 1);
  border-color: rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .story-cta-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 2rem;
    margin-bottom: 0; /* remove desktop floating margin on mobile */
  }

  .story-cta-buttons {
    width: 100%;
  }

  .story-cta-buttons .uk-button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .story-cta-strip {
    gap: 1rem;
    padding: 1rem 1.25rem;
  }

  .story-cta-heading {
    font-size: var(--font-size-16);
  }

  .story-cta-sub {
    font-size: var(--font-size-13);
  }
}

@media (max-width: 360px) {
  .story-cta-strip {
    padding: 0.75rem 1rem;
  }

  .story-cta-heading {
    font-size: var(--font-size-14);
  }
}

/* ── Videos (when used instead of image) ───────────────── */
.video-header-home {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  padding-bottom: 0 !important;
  background: var(--primary-color);
  isolation: isolate;
}

.video-header-home .video-bg-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(1.538rem) brightness(0.75);
  transform: scale(1.12);
  z-index: 1;
}

.video-header-home .video-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

.video-header-home video::-webkit-media-controls,
.video-header-home video::-webkit-media-controls-enclosure,
.video-header-home video::-webkit-media-controls-panel {
  display: none !important;
}

.story-video-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  z-index: 0;
}

.story-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  z-index: 1;
  box-shadow: 0 0 3.077rem 3.077rem rgba(0, 0, 0, 0.35);
}

/* ── Legacy classes (hero text) ────────────────────────── */
.hero-title {
  text-align: center !important;
  color: var(--text-white);
}

.hero-text {
  color: var(--text-white);
  text-shadow:
          0.154rem 0.154rem 0.308rem rgba(0, 0, 0, 0.6),
          0 0 0.615rem rgba(0, 0, 0, 0.4);
}

.header-text-content {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translateX(-50%);
  width: min(92.308rem, 90vw);
  text-align: center;
  color: var(--text-white);
  z-index: 3;
  pointer-events: none;
}

#quizStartup {
  display: none;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 992px) {
  .header-text-content { top: 40%; }

  .story-title {
    font-size: var(--font-size-56);
    line-height: 1.1;
  }

  .story-subtitle {
    font-size: var(--font-size-28);
  }
}

@media (max-width: 640px) {
  .header-text-content { top: 42%; }

  .story-title {
    font-size: var(--font-size-40);
    line-height: 1.15;
  }

  .story-subtitle {
    font-size: var(--font-size-20);
  }
}

@media (max-width: 76.308rem) {
  .story-video-blur { display: none; }
  .story-video-bg { object-fit: cover; }
}

/* ── Scroll-margin for next section ────────────────────── */
.section-item {
  scroll-margin-top: 6rem;
}

/* ── Animations ────────────────────────────────────────── */
@keyframes chev-drop {
  0%   { transform: translateY(0);      opacity: 0; }
  15%  { opacity: 1; }
  60%  { transform: translateY(0.923rem); opacity: 1; }
  100% { transform: translateY(1.385rem); opacity: 0; }
}

@keyframes fadeBlurIn {
  0%   { opacity: 0; filter: blur(0.923rem); }
  100% { opacity: 1; filter: blur(0); }
}

.fade-blur-in {
  animation: fadeBlurIn 1s ease-out forwards;
}
