/* Black2Africa BLE sitewide system, v0.15.0.
   Shared visual language for public routes and member-facing portal pages. */

:root {
  --b2a-ble-paper: #f6f1e7;
  --b2a-ble-white: #fffefa;
  --b2a-ble-ink: #101012;
  --b2a-ble-green: #087443;
  --b2a-ble-blue: #103db8;
  --b2a-ble-red: #d63f2d;
  --b2a-ble-violet: #6e2cc2;
  --b2a-ble-rule: rgba(16, 16, 18, 0.2);
  --b2a-ble-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --b2a-ble-heading: "Fraunces", "Cormorant Garamond", Georgia, serif;
}

body:has(.b2a-shell) {
  background: var(--b2a-ble-paper) !important;
  color: var(--b2a-ble-ink) !important;
  font-family: var(--b2a-ble-body) !important;
}

.b2a-shell,
.b2a-shell :is(*, *::before, *::after) {
  box-sizing: border-box;
}

.b2a-shell {
  --b2a-ink: var(--b2a-ble-ink);
  --b2a-paper: var(--b2a-ble-paper);
  --b2a-green: var(--b2a-ble-green);
  --b2a-red: var(--b2a-ble-red);
  --b2a-line: var(--b2a-ble-rule);
  color: var(--b2a-ble-ink) !important;
  font-family: var(--b2a-ble-body) !important;
}

.b2a-shell :is(h1, h2, h3, h4) {
  color: var(--b2a-ble-ink) !important;
  font-family: var(--b2a-ble-heading) !important;
  letter-spacing: -0.025em !important;
  text-wrap: pretty;
}

.b2a-shell :is(p, li, label, input, select, textarea, button, a, small, dd, dt) {
  font-family: var(--b2a-ble-body);
}

.b2a-shell a {
  text-underline-offset: 0.2em;
}

.b2a-shell :is(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--b2a-ble-blue) !important;
  outline-offset: 3px;
}

.b2a-shell .b2a-portal-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.7rem, 2vw, 1.8rem);
  margin: 0;
  padding: 0.65rem clamp(1rem, 4vw, 3.5rem);
  border: 0;
  border-bottom: 1px solid var(--b2a-ble-rule);
  border-radius: 0;
  background: rgba(255, 254, 250, 0.97) !important;
  box-shadow: none !important;
  backdrop-filter: blur(14px);
}

.b2a-shell .b2a-portal-nav::after {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--b2a-ble-green) 0 33.333%, var(--b2a-ble-blue) 33.333% 66.666%, var(--b2a-ble-red) 66.666% 100%);
  content: "";
  pointer-events: none;
}

.b2a-shell .b2a-portal-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  color: var(--b2a-ble-ink) !important;
  font-family: var(--b2a-ble-heading) !important;
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.b2a-shell .b2a-portal-brand::before {
  display: none !important;
  content: none !important;
}

.b2a-shell .b2a-portal-brand-mark {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.b2a-shell .b2a-portal-brand-lockup {
  display: grid;
  gap: 0.28rem;
}

.b2a-shell .b2a-portal-brand-lockup > span {
  font-family: var(--b2a-ble-heading) !important;
}

.b2a-shell .b2a-portal-brand-lockup small {
  color: var(--b2a-ble-ink);
  font-family: var(--b2a-ble-body) !important;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.b2a-shell .b2a-portal-menu {
  min-width: 0;
  flex: 1 1 auto;
}

.b2a-shell .b2a-portal-menu > summary {
  display: none;
}

.b2a-shell .b2a-portal-menu:not([open]) > .b2a-portal-links {
  display: flex !important;
}

.b2a-shell .b2a-portal-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.12rem;
  flex-wrap: wrap;
}

.b2a-shell .b2a-portal-links a {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.62rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent !important;
  color: var(--b2a-ble-ink) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.b2a-shell .b2a-portal-links a:is(:hover, :focus-visible, .is-active) {
  border-bottom-color: var(--b2a-ble-green);
  color: var(--b2a-ble-green) !important;
}

.b2a-shell .b2a-portal-links a[href*="sponsor"],
.b2a-shell .b2a-portal-links a[href*="login"] {
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--b2a-ble-ink) !important;
}

.b2a-shell .b2a-portal-links a[href*="sponsor"]:is(:hover, :focus-visible),
.b2a-shell .b2a-portal-links a[href*="login"]:is(:hover, :focus-visible) {
  background: transparent !important;
  color: var(--b2a-ble-green) !important;
}

.b2a-shell .b2a-skip-link {
  background: var(--b2a-ble-ink) !important;
  color: var(--b2a-ble-white) !important;
}

.b2a-shell.b2a-content-page,
.b2a-shell.b2a-home,
.b2a-shell.b2a-dashboard,
.b2a-shell.b2a-app-backend {
  max-width: 100% !important;
  border-radius: 0 !important;
  background: var(--b2a-ble-paper) !important;
  box-shadow: none !important;
}

.b2a-shell.b2a-content-page {
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.b2a-shell :is(.b2a-page-hero, .b2a-bright-hero, .b2a-directory-head) {
  margin: clamp(1.2rem, 3vw, 2.5rem) auto 0;
  padding: clamp(2rem, 6vw, 5.5rem) clamp(1.25rem, 5vw, 4.5rem);
  border: 1px solid var(--b2a-ble-rule);
  border-bottom: 3px solid var(--b2a-ble-ink);
  border-radius: 0;
  background: var(--b2a-ble-white) !important;
  box-shadow: none !important;
}

.b2a-shell :is(.b2a-page-hero, .b2a-bright-hero, .b2a-directory-head) h1 {
  max-width: 18ch;
  margin-top: 0.35rem;
  font-size: clamp(2.5rem, 6.7vw, 5.8rem) !important;
  line-height: 0.98 !important;
}

.b2a-shell :is(.b2a-page-hero, .b2a-bright-hero, .b2a-directory-head) p {
  max-width: 68ch;
  color: #343630 !important;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.65;
}

.b2a-shell :is(.b2a-page-hero, .b2a-bright-hero) .b2a-reclaim-line,
.b2a-shell .b2a-panel-kicker {
  color: var(--b2a-ble-green) !important;
  font-family: var(--b2a-ble-body) !important;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
}

.b2a-shell :is(.b2a-panel, .b2a-form-panel, .b2a-form-shell, .b2a-dashboard-panel, .b2a-opportunity-card, .b2a-empty-state, .b2a-auth-card, .b2a-auth-side, .b2a-ops-card, .b2a-app-session) {
  border: 1px solid var(--b2a-ble-rule) !important;
  border-radius: 0 !important;
  background: var(--b2a-ble-white) !important;
  color: var(--b2a-ble-ink) !important;
  box-shadow: none !important;
}

.b2a-shell .b2a-auth-card {
  align-content: start;
  gap: 1.1rem;
}

.b2a-shell .b2a-auth-card :is(p, .b2a-auth-divider, .b2a-auth-recovery) {
  color: var(--b2a-ble-ink) !important;
}

.b2a-shell .b2a-auth-card h1 {
  font-size: clamp(2.25rem, 4.5vw, 4rem) !important;
  line-height: 1 !important;
}

.b2a-shell .b2a-auth-side {
  align-content: start;
}

.b2a-shell .b2a-auth-side::before {
  background: linear-gradient(90deg, var(--b2a-ble-green), var(--b2a-ble-blue), var(--b2a-ble-red)) !important;
  opacity: 0.12 !important;
}

.b2a-shell .b2a-auth-side :is(strong, span, p, a) {
  color: var(--b2a-ble-ink) !important;
}

.b2a-shell .b2a-auth-side .b2a-auth-rail span {
  border-color: var(--b2a-ble-rule) !important;
  border-radius: 0 !important;
}

.b2a-shell .b2a-google-button {
  border-color: var(--b2a-ble-ink) !important;
  border-radius: 0 !important;
  background: var(--b2a-ble-white) !important;
  color: var(--b2a-ble-ink) !important;
}

.b2a-shell .b2a-auth-divider::before,
.b2a-shell .b2a-auth-divider::after {
  background: var(--b2a-ble-rule) !important;
}

.b2a-shell :is(.b2a-process-list, .b2a-route-ledger) {
  border-top: 1px solid var(--b2a-ble-rule);
  border-bottom: 1px solid var(--b2a-ble-ink);
}

.b2a-shell .b2a-process-step {
  border-radius: 0 !important;
  background: var(--b2a-ble-white) !important;
}

.b2a-shell .b2a-process-step:nth-child(3n + 1) > span,
.b2a-shell .b2a-route-ledger article:nth-child(3n + 1) > span {
  color: var(--b2a-ble-green) !important;
}

.b2a-shell .b2a-process-step:nth-child(3n + 2) > span,
.b2a-shell .b2a-route-ledger article:nth-child(3n + 2) > span {
  color: var(--b2a-ble-blue) !important;
}

.b2a-shell .b2a-process-step:nth-child(3n) > span,
.b2a-shell .b2a-route-ledger article:nth-child(3n) > span {
  color: var(--b2a-ble-red) !important;
}

.b2a-shell :is(.b2a-form, form) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 2.9rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #62645d !important;
  border-radius: 0 !important;
  background: var(--b2a-ble-white) !important;
  color: var(--b2a-ble-ink) !important;
  font-size: 1rem;
}

.b2a-shell :is(.b2a-form, form) textarea {
  min-height: 8rem;
}

.b2a-shell :is(.b2a-form, form) :is(input[type="checkbox"], input[type="radio"]) {
  width: 1.1rem !important;
  min-width: 1.1rem;
  min-height: 1.1rem !important;
  height: 1.1rem;
  flex: 0 0 auto;
  padding: 0 !important;
  accent-color: var(--b2a-ble-green);
}

.b2a-shell .b2a-checkbox {
  align-items: flex-start;
  color: var(--b2a-ble-ink) !important;
}

.b2a-shell :is(.b2a-form, form) :is(input, select, textarea)::placeholder {
  color: #4c4d48 !important;
  opacity: 1;
}

.b2a-shell :is(.b2a-form, form) :is(input, select, textarea):focus {
  border-color: var(--b2a-ble-blue) !important;
  box-shadow: 0 0 0 3px rgba(16, 61, 184, 0.18) !important;
  outline: 0 !important;
}

.b2a-shell :is(.b2a-button, .b2a-button-primary, .b2a-button-secondary, .b2a-button-tertiary, button[type="submit"]) {
  min-height: 2.9rem;
  padding: 0.72rem 1.1rem;
  border: 1px solid var(--b2a-ble-ink) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.b2a-shell :is(.b2a-button-primary, button[type="submit"]) {
  border-color: var(--b2a-ble-green) !important;
  background: var(--b2a-ble-green) !important;
  color: #fff !important;
}

.b2a-shell :is(.b2a-button-primary, button[type="submit"]):is(:hover, :focus-visible) {
  background: #055b35 !important;
  color: #fff !important;
}

.b2a-shell :is(.b2a-button-secondary, .b2a-button-tertiary) {
  background: transparent !important;
  color: var(--b2a-ble-ink) !important;
}

.b2a-shell :is(.b2a-button-secondary, .b2a-button-tertiary):is(:hover, :focus-visible) {
  background: var(--b2a-ble-ink) !important;
  color: var(--b2a-ble-white) !important;
}

.b2a-shell .b2a-dashboard-tabs {
  border-bottom: 1px solid var(--b2a-ble-ink) !important;
}

.b2a-shell .b2a-dashboard-tabs a {
  border-radius: 0 !important;
  color: var(--b2a-ble-ink) !important;
}

.b2a-shell .b2a-dashboard-tabs a.is-active {
  background: var(--b2a-ble-ink) !important;
  color: #fff !important;
}

.b2a-shell .b2a-notice {
  border-left: 4px solid var(--b2a-ble-green);
  border-radius: 0 !important;
  background: #eaf5ed !important;
  color: var(--b2a-ble-ink) !important;
}

.b2a-shell .b2a-notice-error {
  border-left-color: var(--b2a-ble-red);
  background: #fff0ed !important;
}

.b2a-shell .b2a-portal-footer {
  margin-top: clamp(3rem, 7vw, 6rem);
  border-top: 2px solid var(--b2a-ble-ink) !important;
  background: var(--b2a-ble-ink) !important;
  color: #fff !important;
}

.b2a-shell .b2a-portal-footer :is(a, p, strong) {
  color: #fff !important;
}

.b2a-shell .b2a-portal-footer a:focus-visible {
  outline-color: #fff !important;
}

/* Put the existing BLE band first on the homepage so the cycle frames the site. */
.b2a-atlas-v2 .b2a-atlas-main > .b2a-ble-home-band {
  position: relative;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  margin: 0 auto clamp(1.5rem, 3vw, 2.7rem);
  padding: clamp(2rem, 4.8vw, 4.25rem) clamp(1.25rem, 5vw, 4.5rem);
  border: 0;
  border-bottom: 1px solid var(--b2a-ble-rule);
  background: var(--b2a-ble-paper);
}

.b2a-atlas-v2 .b2a-ble-home-copy h2 {
  max-width: 18ch;
  color: var(--b2a-ble-ink) !important;
  font-size: clamp(2.55rem, 4.1vw, 4.25rem);
  line-height: 0.94;
}

.b2a-atlas-v2 .b2a-ble-home-copy h2 span {
  display: block;
}

.b2a-atlas-v2 .b2a-ble-home-copy h2 span {
  color: var(--b2a-ble-green) !important;
}

.b2a-atlas-v2 .b2a-ble-home-cycle > div:nth-of-type(1) strong {
  border-color: var(--b2a-ble-green);
  color: var(--b2a-ble-green);
}

.b2a-atlas-v2 .b2a-ble-home-cycle > div:nth-of-type(2) strong {
  border-color: var(--b2a-ble-blue);
  background: var(--b2a-ble-blue);
}

.b2a-atlas-v2 .b2a-ble-home-cycle > div:nth-of-type(3) strong {
  border-color: var(--b2a-ble-red);
  color: var(--b2a-ble-red);
}

.b2a-atlas-v2 .b2a-ble-home-cycle > div:nth-of-type(1) span {
  color: var(--b2a-ble-green);
}

.b2a-atlas-v2 .b2a-ble-home-cycle > div:nth-of-type(2) span {
  color: var(--b2a-ble-blue);
}

.b2a-atlas-v2 .b2a-ble-home-cycle > div:nth-of-type(3) span {
  color: var(--b2a-ble-red);
}

.b2a-atlas-v2 .b2a-ble-home-cycle > svg path {
  stroke: var(--b2a-ble-green);
}

@media (max-width: 1080px) {
  .b2a-shell .b2a-portal-nav {
    min-height: 72px;
    flex-wrap: wrap;
  }

  .b2a-shell .b2a-portal-menu {
    flex: 0 0 auto;
  }

  .b2a-shell .b2a-portal-menu > summary {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--b2a-ble-ink);
    color: var(--b2a-ble-ink);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    list-style: none;
    text-transform: uppercase;
  }

  .b2a-shell .b2a-portal-menu > summary::-webkit-details-marker {
    display: none;
  }

  .b2a-shell .b2a-portal-menu-icon,
  .b2a-shell .b2a-portal-menu-icon::before,
  .b2a-shell .b2a-portal-menu-icon::after {
    display: block;
    width: 1rem;
    height: 2px;
    background: var(--b2a-ble-ink);
    content: "";
  }

  .b2a-shell .b2a-portal-menu-icon {
    position: relative;
  }

  .b2a-shell .b2a-portal-menu-icon::before,
  .b2a-shell .b2a-portal-menu-icon::after {
    position: absolute;
    left: 0;
  }

  .b2a-shell .b2a-portal-menu-icon::before {
    top: -5px;
  }

  .b2a-shell .b2a-portal-menu-icon::after {
    top: 5px;
  }

  .b2a-shell .b2a-portal-menu[open] .b2a-portal-menu-icon {
    background: transparent;
  }

  .b2a-shell .b2a-portal-menu[open] .b2a-portal-menu-icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .b2a-shell .b2a-portal-menu[open] .b2a-portal-menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .b2a-shell .b2a-portal-menu:not([open]) > .b2a-portal-links {
    display: none !important;
  }

  .b2a-shell .b2a-portal-menu[open] > .b2a-portal-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0.65rem clamp(1rem, 4vw, 3.5rem) 1rem;
    border-bottom: 1px solid var(--b2a-ble-rule);
    background: var(--b2a-ble-white);
    box-shadow: 0 14px 24px rgba(16, 16, 18, 0.12);
  }

  .b2a-shell .b2a-portal-links a {
    justify-content: flex-start;
    border-bottom: 1px solid var(--b2a-ble-rule);
    text-align: left;
  }

  .b2a-atlas-v2 .b2a-atlas-main > .b2a-ble-home-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .b2a-shell .b2a-portal-nav {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    padding: 0.65rem 1rem;
  }

  .b2a-shell .b2a-portal-brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .b2a-shell .b2a-portal-brand-lockup small {
    font-size: 0.54rem;
  }

  .b2a-shell .b2a-portal-menu[open] > .b2a-portal-links {
    grid-template-columns: 1fr 1fr;
  }

  .b2a-shell :is(.b2a-page-hero, .b2a-bright-hero, .b2a-directory-head) {
    padding: 1.65rem 1.2rem 2rem;
  }

  .b2a-shell :is(.b2a-page-hero, .b2a-bright-hero, .b2a-directory-head) h1 {
    font-size: clamp(2.3rem, 13vw, 4rem) !important;
  }

  .b2a-shell .b2a-process-list,
  .b2a-shell .b2a-route-ledger {
    grid-template-columns: 1fr !important;
  }

  .b2a-atlas-v2 .b2a-atlas-main > .b2a-ble-home-band {
    padding: 2.3rem 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .b2a-shell :is(*, *::before, *::after) {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
