/* qe-countdown-popup.css
 *
 * Styles for the next-batch countdown popup (partials/countdown-banner.html
 * — kept its legacy filename because the old sticky-top-banner is being
 * replaced in-place via the same @include directive across all pages).
 *
 * Visual brief: "very elite". Dark glass card on a blurred backdrop, a
 * gradient hairline at the top edge, premium spacing, monospaced timer
 * digits with subtle tick animation, and a single primary CTA. The
 * popup is opt-in (JS reveals it once an upcoming batch is loaded and
 * the user has been on the page long enough to engage).
 */

/* ── Root: full-viewport overlay ─────────────────────────────────────── */
.qe-cp {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.qe-cp.is-open {
  opacity: 1;
  pointer-events: auto;
}
.qe-cp[hidden] {
  display: none;
}

/* ── Backdrop: blurred dark glass ────────────────────────────────────── */
.qe-cp__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(15, 26, 58, 0.78) 0%, rgba(5, 10, 24, 0.92) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

/* ── Card ────────────────────────────────────────────────────────────── */
.qe-cp__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 36px 32px 28px;
  border-radius: 14px;
  /* Top of the card is pure black so the hero image's fading shadow
     reads as a real black fade (instead of getting tinted by the navy
     card that used to sit directly beneath the gradient). The body
     transitions through a near-black into the deep navy further down,
     so the rest of the card still reads as the established dark-glass
     aesthetic. */
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(0, 212, 170, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, #000000 0%, #050813 45%, #080c1d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 60px 120px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 204, 102, 0.06) inset;
  font-family: Poppins, sans-serif;
  color: #e4e9f2;
  transform: translateY(12px) scale(0.97);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  text-align: center;
  overflow: hidden;
}
.qe-cp.is-open .qe-cp__card {
  transform: translateY(0) scale(1);
}
/* Gradient hairline at the top edge — quiet luxury detail. */
.qe-cp__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #00d4aa 30%, #9b8aff 55%, #ffcc66 80%, transparent 100%);
  opacity: 0.7;
}

/* ── Hero image banner ───────────────────────────────────────────────── */
/* Bootcamp action shot at the top of the card. Negative margins extend
   it edge-to-edge inside the padded card; the ::after gradient fades it
   into the dark card background so the badge below sits cleanly with
   no hard image edge. */
.qe-cp__hero {
  margin: -36px -32px 22px;
  height: 180px;
  position: relative;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}
.qe-cp__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}
.qe-cp__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Pure-black shadow stops AND a pure-black endpoint — the card top
     beneath has been shifted to #000 so the gradient resolves cleanly
     into the card with no navy seam. */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.9) 88%,
    #000000 100%
  );
  pointer-events: none;
}

/* ── Close (×) button ────────────────────────────────────────────────── */
.qe-cp__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  /* Slightly stronger backdrop than before because the button now sits
     on top of the hero image — needs to stay readable against any frame. */
  background: rgba(5, 10, 24, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.qe-cp__close:hover {
  background: rgba(5, 10, 24, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ── Live badge ──────────────────────────────────────────────────────── */
/* Default styling = `open` urgency tier (teal). JS adds a modifier
   class (--filling / --closing-soon) when the loaded batch is closer to its
   start date, swapping the colour to gold / coral respectively. The
   same urgency tiers feed the sticky-footer drawer's pill colours. */
.qe-cp__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.25);
  color: #4ee3c0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.qe-cp__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00d4aa;
  box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.6);
  animation: qe-cp-pulse-teal 1.6s ease-out infinite;
}
@keyframes qe-cp-pulse-teal {
  0%   { box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 212, 170, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 170, 0); }
}

/* `filling` tier (8-14 days out) — gold accent. */
.qe-cp__badge.qe-cp__badge--filling {
  background: rgba(255, 204, 102, 0.08);
  border-color: rgba(255, 204, 102, 0.32);
  color: #ffd98c;
}
.qe-cp__badge--filling .qe-cp__dot {
  background: #ffcc66;
  animation: qe-cp-pulse-gold 1.6s ease-out infinite;
}
@keyframes qe-cp-pulse-gold {
  0%   { box-shadow: 0 0 0 0 rgba(255, 204, 102, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 204, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 204, 102, 0); }
}

/* `closing-soon` tier (0-7 days out — Today / Tomorrow / N days / Closing
   soon) — coral accent so the urgency reads on sight. */
.qe-cp__badge.qe-cp__badge--closing-soon {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffa0a0;
}
.qe-cp__badge--closing-soon .qe-cp__dot {
  background: #ff6b6b;
  animation: qe-cp-pulse-coral 1.6s ease-out infinite;
}
@keyframes qe-cp-pulse-coral {
  0%   { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

/* ── Title ───────────────────────────────────────────────────────────── */
.qe-cp__title {
  margin: 0 0 22px;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: 0.005em;
}
.qe-cp__title strong {
  background: linear-gradient(135deg, #00d4aa 0%, #9b8aff 50%, #ffcc66 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  font-style: italic;
}

/* ── Timer ───────────────────────────────────────────────────────────── */
.qe-cp__timer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
}
.qe-cp__block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
}
.qe-cp__digits {
  display: inline-flex;
  gap: 4px;
}
.qe-cp__digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 42px;
  border-radius: 6px;
  background: linear-gradient(180deg, #0a1024 0%, #050a18 100%);
  /* Subtle outline so each digit box reads as its own tile against the
     dark card behind it. Previous 6% white was nearly invisible. */
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 22px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 12px -4px rgba(0, 0, 0, 0.6);
  transition: transform .12s ease;
}
.qe-cp__digit.is-ticking {
  animation: qe-cp-tick .35s ease-out;
}
@keyframes qe-cp-tick {
  0%   { transform: translateY(-3px); opacity: 0.7; }
  100% { transform: translateY(0);    opacity: 1; }
}
.qe-cp__unit {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.qe-cp__sep {
  align-self: center;
  margin-top: -18px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 22px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.25);
}

/* ── Subline ─────────────────────────────────────────────────────────── */
.qe-cp__sub {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.01em;
  line-height: 1.55;
}
/* The amount inside the subline — keep it visually quiet but bold enough
   to register as the price. White with a subtle gold-tint shadow so it
   reads as a real number, not throwaway copy. */
.qe-cp__sub .qe-cp__amount {
  color: #ffffff;
  font-weight: 600;
}

/* ── Primary CTA ─────────────────────────────────────────────────────── */
.qe-cp__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f4ff 100%);
  color: #0b1020;
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 18px 36px -12px rgba(0, 212, 170, 0.35),
    0 0 0 1px rgba(0, 212, 170, 0.2);
  transition: transform .2s ease, box-shadow .2s ease;
}
.qe-cp__cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 22px 44px -12px rgba(0, 212, 170, 0.5),
    0 0 0 1px rgba(0, 212, 170, 0.4);
}
.qe-cp__cta-arrow {
  font-size: 17px;
  line-height: 1;
  transition: transform .2s ease;
}
.qe-cp__cta:hover .qe-cp__cta-arrow {
  transform: translateX(2px);
}

/* ── Secondary "Maybe later" link ────────────────────────────────────── */
.qe-cp__dismiss {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: 0;
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.4);
  font-family: Poppins, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color .2s ease;
}
.qe-cp__dismiss:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ── Mobile tweaks ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .qe-cp { padding: 16px; }
  .qe-cp__card { padding: 30px 22px 24px; border-radius: 12px; }
  .qe-cp__hero {
    margin: -30px -22px 18px;
    height: 150px;
    border-radius: 12px 12px 0 0;
  }
  .qe-cp__title { font-size: 22px; margin-bottom: 18px; }
  .qe-cp__timer { gap: 4px; }
  .qe-cp__block { min-width: 52px; }
  .qe-cp__digit { width: 24px; height: 38px; font-size: 19px; border-radius: 5px; }
  .qe-cp__sep { font-size: 19px; margin-top: -16px; }
  .qe-cp__unit { font-size: 9px; letter-spacing: 0.15em; }
  .qe-cp__sub { font-size: 12px; margin-bottom: 18px; }
  .qe-cp__cta { padding: 12px 18px; font-size: 13px; }
}
