/* ═══════════════════════════════════════════════════════════════════════
   B-CONNECT — "DISPATCH" LAYER
   Loads AFTER mai.css.

   Structure only: pill navigation, a bento of live figures in the hero,
   rounded cards, Sora/Manrope, a single-column auth flow.

   COLOUR IS LEFT ALONE. mai.css already alternates light and dark
   sections — about / products / process / contact are light, while
   lucky-draw / mission / earn-section / why-us / cta are dark with white
   text. This file must never repaint those grounds or the text on them
   stops being readable. Everything colour-related below is scoped to a
   section whose ground is known, never applied globally.

   Remove the <link> to this file in header.php to fall back completely.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* light-section surfaces */
  --d-page:   #ffffff;
  --d-alt:    #f0f8f5;    /* --off-white */
  --d-card:   #ffffff;

  /* dark-section surfaces */
  --d-dark:   #061c2e;    /* --navy-dark */
  --d-dark-2: #0b2d48;    /* --navy */

  /* ink on light */
  --d-ink:   #0b2d48;     /* --navy */
  --d-body:  #3a4a55;     /* --gray-dark */
  --d-faint: #7a8a95;     /* --gray */

  /* ink on dark */
  --d-ink-i:   #f0f8f5;   /* --off-white */
  --d-body-i:  #a8bcc9;
  --d-faint-i: #8fa3b0;

  /* lines: solid on light, alpha on dark */
  --d-line:     #ddeee8;  /* --gray-light */
  --d-line-2:   #c6ddd5;
  --d-line-i:   rgba(255,255,255,.10);
  --d-line-i-2: rgba(255,255,255,.18);

  /* accent = teal */
  --d-accent:   #0a6b58;  /* --teal, 5.9:1 on white */
  --d-accent-2: #0d9b7e;  /* --teal-light, for dark grounds */
  --d-accent-w: #e6f3ef;
  --d-accent-b: rgba(10,107,88,.32);

  /* action = orange with navy ink — white on orange is 2.7:1 */
  --d-cta:     #f5821f;
  --d-cta-2:   #d96a10;
  --d-cta-ink: #06192c;

  /* gold: type on dark only, tinted chip on light */
  --d-gold:   #f5c518;
  --d-gold-w: #fdf3d0;
  --d-gold-b: #e8c65a;
  --d-ok:     #4caf50;

  --d-r:      14px;
  --d-r-lg:   22px;
  --d-r-pill: 999px;
  --d-lift:   0 1px 2px rgba(11,45,72,.04), 0 16px 40px -24px rgba(11,45,72,.30);
  --d-lift-i: 0 1px 0 rgba(255,255,255,.06) inset, 0 28px 60px -34px rgba(0,0,0,.85);
  --d-glow:   0 10px 26px -12px rgba(245,130,31,.45);

  --d-stage:
    radial-gradient(760px 460px at 20% 2%,  rgba(13,155,126,.28), transparent 64%),
    radial-gradient(560px 400px at 86% 12%, rgba(245,130,31,.14), transparent 62%);

  --d-display: "Sora", "Helvetica Neue", Arial, sans-serif;
  --d-text:    "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --d-mono:    "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ═══ 1 · TYPOGRAPHY — family only, never colour ══════════════════════ */
body,
.hero-desc, .section-desc, p, li, input, select, textarea, button, .btn {
  font-family: var(--d-text);
}
h1, h2, h3, h4, h5,
.hero-title, .section-title, .nav-brand,
.lucky-draw-title, .cta-title {
  font-family: var(--d-display) !important;
  letter-spacing: -.025em;
  font-weight: 700;
}
.hero-title { font-weight: 800; }
.section-label, .hero-top-badge, .stat-label, .chip-label { font-family: var(--d-mono); }
.hero-amount, .inc-prize-amount, .stat-number, .d-val { font-variant-numeric: tabular-nums; }

/* ═══ 2 · SECTION LABELS — a pill, keyed to its ground ════════════════ */
.section-label {
  display: inline-flex;
  border-radius: var(--d-r-pill);
  padding: 6px 14px;
  font-size: .7rem;
  letter-spacing: .16em;
  background: var(--d-accent-w);
  border: 1px solid var(--d-accent-b);
  color: var(--d-accent) !important;
}
.section-label::before, .section-label::after { display: none; }

.lucky-draw .section-label,
.mission .section-label,
.earn-section .section-label,
.why-us .section-label,
.cta .section-label {
  background: rgba(13,155,126,.16);
  border-color: rgba(13,155,126,.40);
  color: var(--d-accent-2) !important;
}

/* ═══ 3 · NAVIGATION — pill group on a white bar ══════════════════════
   mai.css sets .nav-links a colour with !important (written for a
   transparent bar over the dark hero), so these must be !important too
   or the links stay white on white.                                   */
.navbar { background: var(--d-page) !important; padding: 12px 0; }
.navbar.scrolled {
  background: rgba(255,255,255,.95) !important;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--d-line);
  box-shadow: 0 2px 20px rgba(11,45,72,.06);
}
.nav-links {
  gap: 4px;
  background: var(--d-alt);
  border: 1px solid var(--d-line);
  border-radius: var(--d-r-pill);
  padding: 5px;
}
.nav-links a {
  color: var(--d-body) !important;
  padding: 8px 16px;
  border-radius: var(--d-r-pill);
  font-weight: 600;
  font-size: .875rem;
  transition: background .18s ease, color .18s ease;
}
.nav-links a::after { display: none !important; }
.nav-links a:hover {
  background: var(--d-card);
  color: var(--d-ink) !important;
}
.nav-links a.active {
  background: var(--d-card);
  color: var(--d-accent) !important;
  box-shadow: 0 1px 3px rgba(11,45,72,.10);
}
.nav-links a:focus-visible { outline: 2px solid var(--d-accent); outline-offset: 2px; }

.nav-auth-btn { border-radius: var(--d-r-pill) !important; padding: 9px 20px !important; }
.nav-links a.nav-login {
  background: transparent !important;
  color: var(--d-accent) !important;
  border: 1px solid var(--d-accent) !important;
  box-shadow: none !important;
}
.nav-links a.nav-login:hover { background: var(--d-accent-w) !important; transform: none !important; }
.nav-links a.nav-register {
  background: linear-gradient(135deg, var(--d-cta), var(--d-cta-2)) !important;
  color: var(--d-cta-ink) !important;
  border: none !important;
  box-shadow: var(--d-glow) !important;
}
.nav-links a.nav-register:hover { transform: translateY(-1px) !important; }

/* the mobile drawer is a full-height panel, not a pill — undo the pill */
@media (max-width: 768px) {
  .nav-links {
    background: var(--d-page) !important;
    border: none;
    border-radius: 0;
    padding: 40px;
    gap: 6px;
  }
  .nav-links a {
    color: var(--d-ink) !important;
    font-size: 1rem;
    padding: 12px 14px;
    width: 100%;
    text-align: center;
    min-height: 44px;
  }
  .nav-links a.active { background: var(--d-alt); }
  .nav-links a.nav-auth-btn { width: 100%; justify-content: center; margin-top: 6px; }
}

/* ═══ 4 · BUTTONS ═════════════════════════════════════════════════════ */
.btn { border-radius: var(--d-r-pill); font-weight: 700; }
.btn-orange, .hero-cta-primary, .btn-primary, .btn-submit {
  background: linear-gradient(135deg, var(--d-cta), var(--d-cta-2)) !important;
  color: var(--d-cta-ink) !important;
  border: none !important;
  box-shadow: var(--d-glow);
}
/* the ghost button lives on the dark hero */
.hero-cta-ghost {
  background: transparent !important;
  color: var(--d-ink-i) !important;
  border: 1px solid var(--d-line-i-2) !important;
}
.hero-cta-ghost:hover { background: rgba(255,255,255,.08) !important; }

/* ═══ 5 · HERO — dark navy, centred, bento of live figures ════════════ */
.hero {
  background: var(--d-dark) !important;
  min-height: auto;
  padding: 128px 0 82px;
  display: block;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--d-stage);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-bg-grid, .hero-diamonds, .hero-particles,
.hero-bg-glow, .hero-float-badge { display: none !important; }

.hero-content { text-align: center; max-width: 900px; margin: 0 auto; }
.hero-top-badge {
  background: rgba(13,155,126,.16) !important;
  border: 1px solid rgba(13,155,126,.40) !important;
  color: var(--d-accent-2) !important;
  border-radius: var(--d-r-pill);
  font-size: .7rem;
  letter-spacing: .14em;
  padding: 7px 16px;
}
.hero-title {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  line-height: 1.03;
  margin: 22px auto 0;
  max-width: 18ch;
  text-wrap: balance;
  color: var(--d-ink-i) !important;
}
/* gold is 10:1 on navy — the one place it can carry type */
.hero-amount, .hero-title-accent { color: var(--d-gold) !important; }
.hero-desc {
  color: var(--d-body-i) !important;
  max-width: 60ch;
  margin: 18px auto 0;
  font-size: 1rem;
}
.hero-buttons { justify-content: center; margin-top: 28px; }

.d-bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 48px; text-align: left; }
.d-card {
  background: var(--d-dark-2);
  border: 1px solid var(--d-line-i);
  border-radius: var(--d-r);
  padding: 20px;
  box-shadow: var(--d-lift-i);
}
.d-card--wide { grid-column: span 2; }
.d-k {
  font-family: var(--d-mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--d-faint-i);
  display: flex; align-items: center; gap: 8px;
}
.d-val {
  font-family: var(--d-display); font-weight: 800; font-size: 2.05rem;
  letter-spacing: -.03em; line-height: 1; margin-top: 12px; color: var(--d-ink-i);
}
.d-val small { font-size: .4em; font-weight: 600; color: var(--d-body-i); letter-spacing: 0; }
.d-val.is-bv { color: var(--d-gold); }
.d-s { font-size: .82rem; color: var(--d-body-i); margin-top: 9px; line-height: 1.55; }
.d-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--d-ok); }
.d-live i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--d-ok); display: block;
  animation: dPulse 1.8s ease-in-out infinite;
}
@keyframes dPulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.d-spark { display: flex; align-items: flex-end; gap: 4px; height: 44px; margin-top: 16px; }
.d-spark i { flex: 1; display: block; border-radius: 3px 3px 0 0; background: rgba(13,155,126,.20); }
.d-spark i.is-now { background: linear-gradient(180deg, var(--d-cta), var(--d-cta-2)); }
.d-people { display: flex; align-items: center; margin-top: 14px; }
.d-people span {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: .68rem; font-weight: 700; color: var(--d-cta-ink);
  margin-left: -8px; border: 2px solid var(--d-dark-2);
}
.d-people span:first-child { margin-left: 0; }
.hero-visual { display: none !important; }

@media (max-width: 900px) { .d-bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) {
  .d-bento { grid-template-columns: 1fr; }
  .d-card--wide { grid-column: span 1; }
  .hero { padding: 104px 0 62px; }
}

/* ═══ 6 · CARDS — shape everywhere, colour only where the ground is known ══ */
.product-card, .why-card, .process-step, .contact-card,
.lucky-draw-card, .earn-card, .mission-card {
  border-radius: var(--d-r) !important;
  transition: transform .18s ease, border-color .18s ease;
}
.product-card:hover, .why-card:hover, .process-step:hover { transform: translateY(-3px); }

/* cards on LIGHT sections: white, hairline border, soft lift */
.products .product-card,
.process .process-step,
.contact .contact-card {
  background: var(--d-card) !important;
  border: 1px solid var(--d-line) !important;
  box-shadow: var(--d-lift) !important;
}
.products .product-card:hover,
.process .process-step:hover { border-color: var(--d-accent-b) !important; }

/* cards on DARK sections stay translucent — their text is already light */
.why-us .why-card,
.lucky-draw .lucky-draw-card,
.earn-section .earn-card,
.mission .mission-card {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid var(--d-line-i) !important;
  box-shadow: none !important;
}
.why-us .why-card:hover { border-color: rgba(13,155,126,.45) !important; }

/* icons: a mint chip reads on both grounds */
.product-icon, .step-icon, .contact-icon {
  background: var(--d-accent-w) !important;
  border: 1px solid var(--d-accent-b);
  color: var(--d-accent) !important;
  border-radius: 12px !important;
}
.why-icon {
  background: rgba(13,155,126,.16) !important;
  border: 1px solid rgba(13,155,126,.40);
  color: var(--d-accent-2) !important;
  border-radius: 12px !important;
}
.step-number { color: var(--d-accent) !important; font-family: var(--d-mono); }

/* BV chip on light sections: gold wash, navy ink — gold type is 1.7:1 on white */
.products .bv-badge, .products .product-bv, .products .earns-bv,
.process .bv-badge {
  color: var(--d-ink) !important;
  background: var(--d-gold-w) !important;
  border: 1px solid var(--d-gold-b);
  border-radius: var(--d-r-pill) !important;
  font-weight: 700;
}

/* ═══ 7 · FORMS — contact and auth sections are light ═════════════════ */
.contact .form-group label, .contact .form-label,
.page-auth .form-group label, .page-auth .form-label {
  color: var(--d-ink) !important;
  font-size: .78rem;
  font-weight: 600;
}
.contact .form-control, .page-auth .form-control,
.page-auth input[type="text"], .page-auth input[type="email"],
.page-auth input[type="tel"], .page-auth input[type="password"],
.page-auth input[type="number"], .page-auth select, .page-auth textarea {
  background: var(--d-card) !important;
  border: 1px solid var(--d-line-2) !important;
  border-radius: var(--d-r) !important;
  color: var(--d-ink) !important;
  font-family: var(--d-text);
  font-size: 16px;      /* below 16px and iOS zooms the page on focus */
  min-height: 48px;
}
.contact .form-control:focus, .page-auth .form-control:focus,
.page-auth input:focus, .page-auth select:focus, .page-auth textarea:focus {
  border-color: var(--d-accent) !important;
  box-shadow: 0 0 0 3px var(--d-accent-b) !important;
  outline: none;
}
.page-auth ::placeholder { color: var(--d-faint) !important; }

.login-tabs {
  background: var(--d-alt);
  border: 1px solid var(--d-line);
  border-radius: var(--d-r-pill);
  padding: 5px;
  gap: 4px;
}
.login-tab {
  border-radius: var(--d-r-pill) !important;
  border: none !important;
  background: transparent !important;
  color: var(--d-body) !important;
  font-weight: 700;
  font-size: .82rem;
  padding: 10px 12px !important;
}
.login-tab.active, .login-tab:hover {
  background: var(--d-card) !important;
  color: var(--d-accent) !important;
  box-shadow: 0 1px 3px rgba(11,45,72,.12);
}

/* ═══ 8 · AUTH PAGES — one centred column, no marketing sidebar ═══════ */
.page-auth section.contact {
  background: var(--d-alt) !important;
  padding: 118px 0 72px !important;
  min-height: 100vh;
}
.page-auth .login-left-panel,
.page-auth .reg-left-panel { display: none !important; }

.page-auth .auth-shell {
  display: block !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  gap: 0 !important;
}
.page-auth .auth-shell--wide { max-width: 660px !important; }

.page-auth .section-header { margin-bottom: 26px !important; max-width: 520px; }
.page-auth .section-title { color: var(--d-ink) !important; font-size: clamp(1.7rem, 4vw, 2.3rem) !important; }
.page-auth .section-desc  { color: var(--d-body) !important; font-size: .95rem !important; }

.page-auth .contact-form {
  background: var(--d-card) !important;
  border: 1px solid var(--d-line) !important;
  border-radius: var(--d-r-lg) !important;
  box-shadow: var(--d-lift) !important;
  padding: 2.1rem !important;
  width: 100%;
}
.page-auth .contact-form h1, .page-auth .contact-form h2,
.page-auth .contact-form h3, .page-auth .contact-form h4,
.page-auth .modal-title {
  font-family: var(--d-display) !important;
  color: var(--d-ink) !important;
}
.page-auth .modal-content { border-radius: var(--d-r-lg) !important; border: none !important; }

.page-auth .btn-submit, .page-auth button[type="submit"] {
  background: linear-gradient(135deg, var(--d-cta), var(--d-cta-2)) !important;
  color: var(--d-cta-ink) !important;
  border: none !important;
  border-radius: var(--d-r-pill) !important;
  box-shadow: var(--d-glow) !important;
  font-family: var(--d-text) !important;
  font-weight: 700 !important;
  min-height: 50px;
  width: 100%;
}

/* long-form dividers: left-aligned label, one trailing rule.
   The originals were centred #bbb text — 2.1:1 on white, invisible. */
.page-auth .form-divider { gap: 12px !important; margin: 26px 0 14px !important; }
.page-auth .form-divider > div:first-child { display: none !important; }
.page-auth .form-divider > div { background: var(--d-line) !important; }
.page-auth .form-divider-label {
  font-family: var(--d-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--d-faint);
  font-weight: 500;
  white-space: nowrap;
}

.page-auth .cred-box, .page-auth .credential-box {
  background: var(--d-gold-w) !important;
  border: 1px solid var(--d-gold-b) !important;
  border-radius: var(--d-r) !important;
}

@media (max-width: 560px) {
  .page-auth section.contact { padding: 100px 0 56px !important; }
  .page-auth .contact-form { padding: 1.5rem !important; }
}

/* ═══ 9 · MISC ════════════════════════════════════════════════════════ */
.back-to-top {
  background: linear-gradient(135deg, var(--d-accent-2), var(--d-accent)) !important;
  border: none !important;
  color: #fff !important;
  border-radius: var(--d-r-pill) !important;
}
::selection { background: var(--d-accent-w); color: var(--d-ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
