/* ===========================
   CTA Announcement Bar (v1)
   - Standalone file
   - Does NOT touch nav layout rules
   - Works with injected bar
   =========================== */

:root {
  --announcement-bg: #b91c1c;
  --announcement-text: #ffffff;
  --announcement-border: rgba(255, 255, 255, 0.18);
  --announcement-height: 0px; /* JS sets this when bar is visible */
}

/* The bar container */
.site-announcement {
  width: 100%;
  background: var(--announcement-bg);
  color: var(--announcement-text);
  border-bottom: 1px solid var(--announcement-border);
}

/* Inner wrapper keeps it centered and readable */
.site-announcement__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 20px;
  text-align: center;
}

/* Text */
.site-announcement__text {
  display: block;
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1.25;
  font-size: 0.98rem;
  text-wrap: balance;
}

/* Mobile tighten */
@media (max-width: 900px) {
  .site-announcement__inner {
    padding: 10px 16px;
  }
  .site-announcement__text {
    font-size: 0.92rem;
  }
}

/* -----------------------------------
   Optional eye-grabber (OFF by default)
   Enable by adding class: .is-eyegrabber
   ----------------------------------- */

.site-announcement.is-eyegrabber {
  position: relative;
  overflow: hidden;
}

/* subtle “sheen” sweep */
.site-announcement.is-eyegrabber::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-18deg);
  animation: cta_sheen 3.2s ease-in-out infinite;
  pointer-events: none;
}

/* tiny “attention pulse” without being obnoxious */
.site-announcement.is-eyegrabber .site-announcement__text {
  animation: cta_pulse 2.6s ease-in-out infinite;
}

@keyframes cta_sheen {
  0% {
    left: -45%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  35% {
    left: 110%;
    opacity: 0;
  }
  100% {
    left: 110%;
    opacity: 0;
  }
}

@keyframes cta_pulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .site-announcement.is-eyegrabber::before,
  .site-announcement.is-eyegrabber .site-announcement__text {
    animation: none !important;
  }
}
