/* ================================================================
   BYR — Hero System (Cleaned v4)
   Priority: 10
   ================================================================
   Single source of truth for all hero sections.
   Uses tokens from 01-core-tokens-base.css
   ================================================================ */

/* ── Base Hero Styles ───────────────────────────────────────── */
.byr-hero-home,
.byr-hero-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.byr-hero-home  { min-height: 100vh; }
.byr-hero-inner { min-height: 55vh; }

/* Background layer */
.byr-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.byr-hero-bg img,
.byr-hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Home hero zebra positioning */
.byr-hero-home .byr-hero-bg img {
  object-position: 65% center;
}

/* Video overlay (for readability) */
.byr-hero-video-overlay,
.byr-hero-groups-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.38) 35%,
    rgba(0,0,0,0.12) 65%,
    transparent 100%
  );
  pointer-events: none;
}

.mode-light .byr-hero-video-overlay,
.mode-light .byr-hero-groups-overlay {
  background: linear-gradient(to top,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.22) 35%,
    rgba(0,0,0,0.06) 65%,
    transparent 100%
  );
}

/* Content container */
.byr-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 140px clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 6vw, 5rem);
}

/* Home hero — left aligned */
.byr-hero-home .byr-hero-content {
  max-width: min(56ch, 42vw);
  margin-left: clamp(18px, 26vw, 320px);
  margin-right: auto;
}

/* Inner pages — centered */
.byr-hero-inner .byr-hero-content {
  max-width: 1200px;
  margin-inline: auto;
}

/* ============================================================
   Headline — Warm Rotating Gradient
   ============================================================ */
.byr-hero-headline {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
  margin-bottom: var(--space-sm);

  background-image: linear-gradient(125deg,
    #e2e8f0   0%,
    #67e8f9  10%,
    #22D3EE  20%,
    #14B8A6  32%,
    #10B981  44%,
    #34D399  54%,
    #FBBF24  68%,
    #F59E0B  78%,
    #22D3EE  90%,
    #e2e8f0 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;

  filter: drop-shadow(0 2px 18px rgba(0,0,0,0.65))
          drop-shadow(0 0 40px rgba(34,211,238,0.10));

  animation: byrHeroGradientRotate 10s ease-in-out infinite;
}

.byr-hero-headline:hover {
  filter: drop-shadow(0 6px 30px rgba(0,0,0,0.50))
          drop-shadow(0 0 50px rgba(16,185,129,0.15))
          drop-shadow(0 0 30px rgba(251,191,36,0.08));
}

@keyframes byrHeroGradientRotate {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 50% 100%; }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

/* Underline accent */
.byr-hero-headline::after {
  content: "";
  display: block;
  width: min(280px, 50vw);
  height: 3px;
  margin-top: 0.85rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #22D3EE, #14B8A6, #10B981, #FBBF24, #22D3EE);
  background-size: 200% 100%;
  animation: byrHeroBarSlide 6s ease-in-out infinite;
  opacity: 0.9;
}

@keyframes byrHeroBarSlide {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Light mode headline */
.mode-light .byr-hero-headline {
  background-image: linear-gradient(125deg,
    #134E4A 0%, #0E7490 20%, #0284C7 40%,
    #1D4ED8 60%, #4338CA 80%, #0891B2 100%);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.06));
}

.mode-light .byr-hero-headline:hover {
  filter: drop-shadow(0 0 14px rgba(8,145,178,0.18))
          drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

/* ============================================================
   Subtitle
   ============================================================ */
.byr-hero-sub {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
  max-width: 55ch;
  margin-bottom: 1.75rem;
  text-shadow: 0 2px 16px rgba(0,0,0,0.75);
}

.mode-light .byr-hero-sub {
  color: var(--color-text-secondary-light, #3B425C);
  text-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ============================================================
   CTA Buttons
   ============================================================ */
.byr-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.byr-hero-cta-primary,
.byr-hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.16,1,0.3,1);
}

.byr-hero-cta-primary {
  background: linear-gradient(135deg, #22D3EE, #3B82F6);
  color: #FFFFFF !important;
  border: 1px solid rgba(34,211,238,0.3);
  box-shadow: 0 4px 16px rgba(34,211,238,0.2);
}

.byr-hero-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34,211,238,0.35);
}

.byr-hero-cta-secondary {
  background: rgba(255,255,255,0.06);
  color: #FFFFFF !important;
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
}

.byr-hero-cta-secondary:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* ============================================================
   Page-Specific Heroes
   ============================================================ */

/* Stories */
.byr-hero-stories {
  min-height: 70vh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
}

/* Groups */
.byr-hero-groups {
  min-height: 50vh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
}

/* Contact — Pillarbox Blur */
.byr-hero-contact {
  min-height: 62vh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
}

.byr-contact-blur-video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  filter: blur(40px) saturate(1.3) brightness(0.6) !important;
  transform: scale(1.15) !important;
  z-index: 0 !important;
}

.byr-contact-sharp-video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  z-index: 1 !important;
}

/* Fundraiser */
.byr-hero-fundraiser {
  min-height: 75vh !important;
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .byr-hero-headline,
  .byr-hero-headline::after {
    animation: none !important;
  }

  .byr-hero-headline:hover {
    filter: none !important;
  }
}