/* ==========================================================================
   HPM rotating banners  ·  ads/banner.css
   Everything is scoped under .hpmb / .hpmb-* so it cannot collide with the
   site's own CSS (including sitescope.css's .hpm-ad, which is a different thing).
   Artwork colours are fixed brand colours on purpose: the banner looks the same
   on any page background.
   ========================================================================== */

.hpmb { box-sizing: border-box; width: 100%; max-width: 760px; margin: 40px auto; padding: 0 8px; }
.hpmb *, .hpmb *::before, .hpmb *::after { box-sizing: border-box; }

.hpmb-eyebrow {
  margin: 0 0 8px; text-align: center;
  font: 400 10px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: #7C89B0;
}

/* Reserve the height so the page does not jump when the banner appears. */
.hpmb-stage { position: relative; min-height: 250px; display: flex; justify-content: center; align-items: flex-start; }
@media (min-width: 768px) { .hpmb-stage { min-height: 90px; } }

.hpmb-slide { display: none; width: 100%; }
.hpmb-slide.is-on { display: flex; justify-content: center; animation: hpmbFade .9s ease both; }
@keyframes hpmbFade { from { opacity: 0; } to { opacity: 1; } }

.hpmb-link { display: block; color: inherit; text-decoration: none; border-radius: 6px; }
.hpmb-link:focus-visible { outline: 3px solid #38E1FF; outline-offset: 3px; }

.hpmb-dots { display: flex; justify-content: center; margin-top: 6px; }
.hpmb-dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.hpmb-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7C89B0; opacity: .45; }
.hpmb-dot.is-on::before { opacity: 1; background: #38E1FF; }
.hpmb-dot:focus-visible { outline: 2px solid #38E1FF; outline-offset: 0; border-radius: 50%; }

/* ---------- ad frames ---------- */
.hpmb-ad { position: relative; overflow: hidden; background: #0A0F1E; border: 1px solid #232c4d; border-radius: 6px; color: #F6F7FB; font-family: 'Space Grotesk', system-ui, sans-serif; }
.hpmb-ad > *:not(.hpmb-sweep) { position: relative; }

/* 728 x 90 desktop leaderboard (shown from 768px up) */
.hpmb-lb { width: 728px; height: 90px; display: none; align-items: center; gap: 18px; padding: 0 18px; background: linear-gradient(90deg, #2a0f1a 0%, #0A0F1E 38%); }
/* 300 x 250 medium rectangle (shown below 768px) */
.hpmb-sq { width: 300px; height: 250px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 18px; background: radial-gradient(ellipse 320px 180px at 100% 0%, #3a1220 0%, #0A0F1E 70%); }
@media (min-width: 768px) { .hpmb-lb { display: flex; } .hpmb-sq { display: none; } }
/* 270 x 480 (9:16) for social and stories; not used by the site include, see extras/ */
.hpmb-tall { width: 270px; height: 480px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; padding: 24px 22px; background: radial-gradient(ellipse 360px 280px at 50% 0%, #3a1220 0%, #0A0F1E 72%); }

/* ---------- shared parts ---------- */
.hpmb-wm { font-family: 'Anton', Impact, sans-serif; letter-spacing: 1px; color: #38E1FF; }
.hpmb-hl { font-family: 'Anton', Impact, sans-serif; line-height: 1.05; letter-spacing: .3px; }
.hpmb-red { color: #FF3B3B; }
.hpmb-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.hpmb-cta { display: block; text-align: center; background: #38E1FF; color: #0A0F1E; font-family: 'Anton', Impact, sans-serif; letter-spacing: .5px; border-radius: 40px; white-space: nowrap; }

.hpmb-flags { display: flex; align-items: flex-start; gap: 3px; flex: none; }
.hpmb-pole { display: block; background: #7C89B0; border-radius: 3px; flex: none; }
.hpmb-pens { display: flex; flex-direction: column; }
.hpmb-pen { display: block; background: #FF3B3B; clip-path: polygon(0 0, 100% 0, 74% 50%, 100% 100%, 0 100%); }
.hpmb-soft { background: rgba(255, 59, 59, .75); }

.hpmb-flags-lb { height: 62px; }
.hpmb-flags-lb .hpmb-pole { width: 4px; height: 62px; }
.hpmb-flags-lb .hpmb-pens { gap: 5px; padding-top: 2px; }
.hpmb-flags-lb .hpmb-pen-a { width: 38px; height: 26px; }
.hpmb-flags-lb .hpmb-pen-b { width: 26px; height: 18px; }

.hpmb-flags-mini { height: 36px; gap: 2px; }
.hpmb-flags-mini .hpmb-pole { width: 3px; height: 36px; }
.hpmb-flags-mini .hpmb-pens { gap: 4px; margin-top: 1px; }
.hpmb-flags-mini .hpmb-pen-a { width: 32px; height: 20px; }
.hpmb-flags-mini .hpmb-pen-b { width: 22px; height: 13px; }

.hpmb-flags-tall { height: 110px; gap: 4px; }
.hpmb-flags-tall .hpmb-pole { width: 6px; height: 110px; }
.hpmb-flags-tall .hpmb-pens { gap: 6px; margin-top: 2px; }
.hpmb-flags-tall .hpmb-pen-a { width: 92px; height: 46px; box-shadow: 0 0 26px rgba(255, 59, 59, .55); }
.hpmb-flags-tall .hpmb-pen-b { width: 66px; height: 32px; }
.hpmb-flags-tall .hpmb-pen-c { width: 44px; height: 20px; background: rgba(255, 59, 59, .6); }

/* 728 x 90 layout */
.hpmb-lb .hpmb-lbtext { flex: 1 1 auto; min-width: 0; }
.hpmb-lb .hpmb-hl { font-size: 24px; }
.hpmb-lb .hpmb-sub { height: 15px; margin-top: 6px; font-size: 11.5px; color: #8c97c0; }
.hpmb-lb .hpmb-cta { flex: none; padding: 13px 22px; font-size: 16px; }

/* 300 x 250 layout */
.hpmb-sqtop { display: flex; align-items: flex-start; justify-content: space-between; }
.hpmb-sqtop .hpmb-wm { font-size: 14px; padding-top: 2px; }
.hpmb-sq .hpmb-hl-sm { font-size: 22px; white-space: nowrap; }
.hpmb-sq .hpmb-hl-xl { font-size: 42px; line-height: 1; margin-top: 2px; white-space: nowrap; }
.hpmb-sq .hpmb-sub { height: 18px; font-size: 13px; color: #C9D2EE; }
.hpmb-sq .hpmb-cta { padding: 11px 0; font-size: 16px; }

/* 270 x 480 layout */
.hpmb-tallhead { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hpmb-tallhead .hpmb-wm { font-size: 16px; }
.hpmb-tallhead .hpmb-rule { width: 36px; height: 2px; background: #38E1FF; opacity: .6; }
.hpmb-tall .hpmb-hl-sm { font-size: 24px; }
.hpmb-tall .hpmb-hl-xl { font-size: 42px; line-height: 1; margin-top: 4px; white-space: nowrap; }
.hpmb-tall .hpmb-sub { width: 100%; height: 40px; font-size: 14px; line-height: 1.4; color: #C9D2EE; }
.hpmb-tall .hpmb-sub .hpmb-cyc { white-space: normal; }
.hpmb-tall .hpmb-cta { width: 100%; padding: 14px 0; font-size: 18px; }
.hpmb-tall .hpmb-foot { font-size: 10.5px; letter-spacing: .5px; color: #7C89B0; }

/* ---------- motion: calm and slow ---------- */
@keyframes hpmbWave { 0% { transform: skewY(1deg) scaleX(1.02); } 50% { transform: skewY(-3deg) scaleX(.95); } 100% { transform: skewY(1.5deg) scaleX(1.01); } }
@keyframes hpmbPlant { 0% { opacity: 0; transform: translateX(-8px) scale(.85); } 10% { opacity: 1; transform: translateX(0) scale(1); } 92% { opacity: 1; transform: translateX(0) scale(1); } 100% { opacity: 0; transform: translateX(0) scale(1); } }
@keyframes hpmbSweep { 0% { transform: translateX(-160px); } 100% { transform: translateX(780px); } }
@keyframes hpmbThrob { 0% { text-shadow: 0 0 0 rgba(255, 59, 59, 0); } 100% { text-shadow: 0 0 10px rgba(255, 59, 59, .5); } }
@keyframes hpmbGlow { 0% { box-shadow: 0 0 14px 1px rgba(56, 225, 255, .35); } 50% { box-shadow: 0 0 24px 4px rgba(56, 225, 255, .45); } 100% { box-shadow: 0 0 14px 1px rgba(56, 225, 255, .35); } }
@keyframes hpmbCycle { 0% { opacity: 0; transform: translateY(7px); } 6% { opacity: 1; transform: translateY(0); } 30% { opacity: 1; transform: translateY(0); } 36% { opacity: 0; transform: translateY(-7px); } 100% { opacity: 0; transform: translateY(-7px); } }
@keyframes hpmbRise { 0% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: translateY(0); } }

.hpmb-wave { transform-origin: 0 50%; animation: hpmbWave 4s ease-in-out infinite alternate; }
.hpmb-plant1 { animation: hpmbPlant 12s ease-in-out .5s infinite; }
.hpmb-plant2 { animation: hpmbPlant 12s ease-in-out 1.6s infinite; }
.hpmb-plant3 { animation: hpmbPlant 12s ease-in-out 2.7s infinite; }
.hpmb-sweep { position: absolute; top: 0; bottom: 0; left: 0; width: 140px; pointer-events: none; background: linear-gradient(90deg, rgba(56, 225, 255, 0), rgba(56, 225, 255, .14)); border-right: 1px solid rgba(56, 225, 255, .35); animation: hpmbSweep 10s ease-in-out infinite; }
.hpmb-throb { animation: hpmbThrob 3.2s ease-in-out infinite alternate; }
.hpmb-glow { animation: hpmbGlow 4.5s ease-in-out infinite; }
.hpmb-sub { position: relative; }
.hpmb-cyc { position: absolute; left: 0; right: 0; top: 0; opacity: 0; white-space: nowrap; animation: hpmbCycle 12s ease-in-out infinite; }
.hpmb-cyc2 { animation-delay: 4s; }
.hpmb-cyc3 { animation-delay: 8s; }
.hpmb-rise1 { animation: hpmbRise 1.2s ease-out .2s both; }
.hpmb-rise3 { animation: hpmbRise 1.2s ease-out 1.2s both; }

/* Devices set to reduce motion get a still frame with the first message showing. */
@media (prefers-reduced-motion: reduce) {
  .hpmb *, .hpmb *::before, .hpmb *::after { animation: none !important; }
  .hpmb-sweep { display: none; }
  .hpmb-cyc1 { opacity: 1; }
}
