/* ============================================================
   POWDER HOUSE BEND — Announcement Banner
   Normal: bold gradient ticker, grabs attention year-round
   Retro:  CRT cyan ticker, matches retro system
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   BASE BANNER
──────────────────────────────────────────────────────────── */
.announcement-banner {
  position: relative;
  height: 2.5rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  isolation: isolate;

  /* High-energy gradient — electric sky blue to deep glacier */
  background: linear-gradient(
    90deg,
    #0ea5e9 0%,
    #38bdf8 22%,
    #0284c7 44%,
    #62c1db 66%,
    #0ea5e9 88%,
    #0284c7 100%
  );
  background-size: 200% 100%;
  animation: banner-gradient-shift 8s linear infinite;

  /* Bottom shadow to separate from page */
  box-shadow:
    0 3px 12px rgba(14, 165, 233, 0.45),
    0 1px 0 rgba(255,255,255,0.12) inset;

  /* Soft edge fade */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 4%,
    black 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 4%,
    black 96%,
    transparent 100%
  );
}

/* Subtle sheen sweep overlay */
.announcement-banner::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.10) 50%,
    transparent 70%
  );
  background-size: 300% 100%;
  animation: banner-sheen 4s ease-in-out infinite;
  z-index: 0;
}

.announcement-banner span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding-left: 100%;

  font-family: '', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: #fff;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 255, 255, 0.2);

  animation: banner-scroll 20s linear infinite;
  will-change: transform;
}

/* Pause on hover */
.announcement-banner:hover span,
.announcement-banner:hover {
  animation-play-state: paused;
}
.announcement-banner:hover::before {
  animation-play-state: paused;
}

/* ── Keyframes ── */
@keyframes banner-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes banner-gradient-shift {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

@keyframes banner-sheen {
  0%   { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}


/* ============================================================
   POWDER HOUSE BEND — Announcement Banner
   Normal: bold gradient ticker, grabs attention year-round
   Retro:  Phosphor terminal — Fallout amber-green, Tron edge glow
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   BASE BANNER (unchanged)
──────────────────────────────────────────────────────────── */
.announcement-banner {
  position: relative;
  height: 2.5rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  isolation: isolate;

  background: linear-gradient(
    90deg,
    #0ea5e9 0%,
    #38bdf8 22%,
    #0284c7 44%,
    #62c1db 66%,
    #0ea5e9 88%,
    #0284c7 100%
  );
  background-size: 200% 100%;
  animation: banner-gradient-shift 8s linear infinite;

  box-shadow:
    0 3px 12px rgba(14, 165, 233, 0.45),
    0 1px 0 rgba(255,255,255,0.12) inset;

  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 4%,
    black 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 4%,
    black 96%,
    transparent 100%
  );
}

.announcement-banner::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.10) 50%,
    transparent 70%
  );
  background-size: 300% 100%;
  animation: banner-sheen 4s ease-in-out infinite;
  z-index: 0;
}

.announcement-banner span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding-left: 100%;

  font-family: '', system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: #fff;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 255, 255, 0.2);

  animation: banner-scroll 20s linear infinite;
  will-change: transform;
}

.announcement-banner:hover span,
.announcement-banner:hover {
  animation-play-state: paused;
}
.announcement-banner:hover::before {
  animation-play-state: paused;
}

@keyframes banner-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
@keyframes banner-gradient-shift {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}
@keyframes banner-sheen {
  0%   { background-position: 200% 0; }
  100% { background-position: -100% 0; }
}


/* ════════════════════════════════════════════════════════════
   RETRO MODE — Phosphor terminal  (Fallout amber · Tron edge)
   
   Palette:
     --retro-phosphor : #c8f135   warm yellow-green, classic P1 tube
     --retro-amber    : #ffb347   hot amber, Pip-Boy warning tone
     --retro-tron     : #00e5ff   ice blue edge trim only
     --retro-bg       : #050a03   near-black with green tint
     --retro-dim      : #2a3d10   mid-ground surface
════════════════════════════════════════════════════════════ */

body.retro-mode .announcement-banner {
  /* Deep terminal black with the faintest green tint */
  background: #050a03;
  background-size: auto;
  animation: none;

  /* Tron-style hard edge line top + bottom */
  border-top:    1px solid rgba(0, 229, 255, 0.55);
  border-bottom: 1px solid rgba(0, 229, 255, 0.55);

  box-shadow:
    /* Outer tron glow */
    0 0 18px rgba(0, 229, 255, 0.12),
    /* Inner phosphor ambient */
    inset 0 0 40px rgba(200, 241, 53, 0.04);

  /* No edge fade — hard boundaries feel more CRT */
  -webkit-mask-image: none;
  mask-image: none;
}

/* Scanlines — tighter than before, more authentic */
body.retro-mode .announcement-banner::before {
  background: repeating-linear-gradient(
    to bottom,
    transparent            0px,
    transparent            3px,
    rgba(0, 0, 0, 0.28)    3px,
    rgba(0, 0, 0, 0.28)    4px
  );
  background-size: auto;
  animation: none;
  z-index: 2; /* sits above text so scanlines overlay it */
  pointer-events: none;
}

/* Slow horizontal phosphor burn sweep — the ::after is new */
body.retro-mode .announcement-banner::after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    transparent                      0%,
    rgba(200, 241, 53, 0.035)        45%,
    rgba(200, 241, 53, 0.07)         50%,
    rgba(200, 241, 53, 0.035)        55%,
    transparent                      100%
  );
  background-size: 300% 100%;
  animation: retro-phosphor-sweep 6s ease-in-out infinite;
}

body.retro-mode .announcement-banner span {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  /* P1 phosphor green — warm, not neon-garish */
  color: #c8f135;
  text-shadow:
    /* tight core glow */
    0 0 4px  rgba(200, 241, 53, 1.0),
    /* mid bloom */
    0 0 12px rgba(200, 241, 53, 0.55),
    /* wide ambient */
    0 0 28px rgba(200, 241, 53, 0.18);

  animation: banner-scroll 22s linear infinite;
  position: relative;
  z-index: 3; /* above scanlines AND sweep */
  will-change: transform;
}

/* Pause on hover */
body.retro-mode .announcement-banner:hover span,
body.retro-mode .announcement-banner:hover {
  animation-play-state: paused;
}
body.retro-mode .announcement-banner:hover::after {
  animation-play-state: paused;
}

/* Phosphor sweep keyframes */
@keyframes retro-phosphor-sweep {
  0%   { background-position:  200% 0; }
  100% { background-position: -100% 0; }
}


/* ────────────────────────────────────────────────────────────
   REDUCED MOTION
──────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .announcement-banner,
  .announcement-banner::before,
  .announcement-banner::after,
  .announcement-banner span,
  body.retro-mode .announcement-banner,
  body.retro-mode .announcement-banner::after,
  body.retro-mode .announcement-banner span {
    animation: none !important;
  }
  .announcement-banner span,
  body.retro-mode .announcement-banner span {
    padding-left: 1.5rem;
  }
}