/* ============================================================================
   FLAG VIDEO HERO — Evident Technologies (CANONICAL VERSION 1.0.0)
   ============================================================================
   
   DO NOT MODIFY WITHOUT ARCHITECTURAL REVIEW
   
   This is the finalized, court-defensible flag hero component for Evident.
   
   Features:
   - Full-width video background with American flag
   - Mission statement overlay with patriotic messaging
   - Smooth video fade-in on load
   - Gradient overlay for text contrast
   - Full WCAG 2.1 AA compliance
   - Reduced-motion fallback (static flag image)
   - Mobile-responsive layout
   
   Dependencies:
   - HTML: /src/_includes/components/flag-hero.njk
   - Video: /assets/media/flag.mp4, /assets/media/renditions/flag-1080p.mp4
   - Fallback: /assets/img/flags/us-flag-50.svg
   
   Last locked: 2026-02-11
   ============================================================================ */

.flag-hero {
  position: relative;
  width: 100%;
  min-height: 80vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Fallback gradient + static flag when video absent */
  background:
    linear-gradient(
      180deg,
      rgba(8, 12, 28, 0.8) 0%,
      rgba(10, 18, 42, 0.6) 40%,
      rgba(12, 24, 52, 0.7) 100%
    ),
    url('/assets/img/flags/us-flag-50.svg') center / cover no-repeat;
  color: #fff;
}

/* ---- Video layer ---- */
.flag-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s ease-in;
}

/* ---- Contrast overlay ---- */
.flag-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      180deg,
      rgba(6, 8, 18, 0.45) 0%,
      rgba(6, 8, 18, 0.25) 40%,
      rgba(6, 8, 18, 0.55) 100%
    );
  pointer-events: none;
}

/* ---- Content ---- */
.flag-hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 6rem 2rem 5rem;
  text-align: center;
}

.flag-hero__title {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(2rem, 4vw + 1rem, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  color: #fff;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.25);
}

.flag-hero__tagline {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 2.5rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow:
    0 1px 4px rgba(0, 0, 0, 0.5),
    0 3px 12px rgba(0, 0, 0, 0.3);
}

/* ---- Call to action ---- */
.flag-hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.flag-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.flag-hero__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.flag-hero__cta--primary {
  background-color: #0b73d2;
  color: #fff;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(11, 115, 210, 0.35);
}

.flag-hero__cta--primary:hover {
  background-color: #0962b3;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 6px 20px rgba(11, 115, 210, 0.4);
  transform: translateY(-1px);
}

.flag-hero__cta--secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.flag-hero__cta--secondary:hover {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

/* ---- Accessibility: reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .flag-hero__video {
    display: none;
  }

  .flag-hero {
    background:
      linear-gradient(
        180deg,
        rgba(8, 12, 28, 0.85) 0%,
        rgba(12, 24, 52, 0.8) 100%
      ),
      url('/assets/img/flags/us-flag-50.svg') center / cover no-repeat;
  }

  .flag-hero__cta:hover {
    transform: none;
  }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .flag-hero {
    min-height: 70vh;
  }

  .flag-hero__content {
    padding: 4rem 1.25rem 3.5rem;
  }

  .flag-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .flag-hero__cta {
    justify-content: center;
  }
}
