/* ── Cubiq Announcement Bar ────────────────────────────────────────────────
   Brand ramp (teal → blue → indigo) darkened just enough that white copy holds
   4.5:1 contrast. All rules scoped under .cqab so nothing leaks. */

:root { --cqab-h: 0px; }               /* live height of the visible bar; JS keeps it current */
html.cqab-dismissed { --cqab-h: 0px !important; }
html.cqab-dismissed .cqab { display: none !important; }

.cqab,
.cqab *,
.cqab *::before,
.cqab *::after { box-sizing: border-box; }

.cqab {
  --c1: 20, 171, 218;
  --c2: 3, 139, 241;
  --c3: 114, 89, 191;

  position: relative;
  z-index: 99980;                       /* under the nav pill (100000) and its backdrop (99990) */
  overflow: hidden;
  isolation: isolate;
  font-family: 'Open Sauce One', system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #fff;
  background:
    linear-gradient(100deg, #1a62d6 0%, #2b55cf 45%, #5b45bd 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .14);
  transition: height .6s cubic-bezier(.2, .7, .2, 1), opacity .45s ease;
}

/* Slow light sweep — one smooth lobe, long duration, starts and ends off-stage. */
.cqab-sheen {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(100deg,
    transparent 30%,
    rgba(var(--c1), .55) 46%,
    rgba(255, 255, 255, .28) 50%,
    rgba(var(--c1), .55) 54%,
    transparent 70%);
  transform: translateX(-100%);
  animation: cqab-sheen 9s cubic-bezier(.45, 0, .25, 1) 1.2s infinite;
  will-change: transform;
}
@keyframes cqab-sheen {
  0%        { transform: translateX(-100%); }
  45%, 100% { transform: translateX(100%); }
}

.cqab-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 40px;
  padding: 7px 56px;                     /* room for the close button either side */
  max-width: 92rem;
  margin: 0 auto;
}

.cqab-label {
  flex: none;
  padding: 3px 11px 3px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1.5;
  color: #020b31;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .16);
}

.cqab-msg {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-wrap: balance;
}

.cqab-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  background-size: 0% 1.5px;
  transition: background-size .5s cubic-bezier(.2, .7, .2, 1);
}
.cqab-link svg { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.cqab-link:hover,
.cqab-link:focus-visible { background-size: calc(100% - 23px) 1.5px; }
.cqab-link:hover svg,
.cqab-link:focus-visible svg { transform: translateX(6px); }
.cqab-link:focus-visible,
.cqab-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }

.cqab-close {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .0);
  cursor: pointer;
  transition: background .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1);
}
.cqab-close:hover { background: rgba(255, 255, 255, .2); transform: rotate(90deg); }

/* Dismissing: collapse smoothly (height set from JS) then remove. */
.cqab.is-closing { opacity: 0; }

/* ── Cohabiting with the floating Cubiq Nav pill ───────────────────────────
   The pill is position:fixed at top:18px. While the bar is on screen it would
   sit right over it, so it rides --cqab-h (the bar's visible height, tracked
   against scroll in JS) — pill sits just under the bar, then glides up to its
   usual spot as the bar scrolls off. */
.cqn .cqn-bar { top: calc(18px + var(--cqab-h, 0px)); }
/* Only while dismissing: let the pill glide up instead of snapping. Normally
   `top` must NOT transition or it would lag the scroll-tracked offset. */
html.cqab-closing .cqn .cqn-bar {
  transition:
    width .55s var(--bob),
    border-radius .5s ease,
    transform .45s cubic-bezier(.2, .7, .2, 1),
    top .6s cubic-bezier(.2, .7, .2, 1);
}

/* ── Phones: let the headline wrap, tuck the link underneath ─────────────── */
@media (max-width: 760px) {
  .cqab-inner {
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 9px 46px 9px 16px;
    gap: 6px 10px;
    justify-content: flex-start;
    min-height: 0;
  }
  .cqab-msg  { font-size: 11px; letter-spacing: .12em; flex: 1 1 calc(100% - 90px); }
  .cqab-link { font-size: 11px; letter-spacing: .12em; padding: 2px 4px 2px 0; }
  .cqab-close { right: 8px; top: 12px; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cqab-sheen { animation: none; opacity: 0; }
  .cqab-link, .cqab-link svg, .cqab-close { transition: none; }
}
