:root {
  color-scheme: dark;
  /* Warm night + African-inspired accents (ochre, terracotta, savanna) */
  --bg: #120a1a;
  --bg-deep: #0a0610;
  --panel: #1a1228;
  --panel-2: #241432;
  --text: #fff8f0;
  --muted: #c9b8d4;
  --accent: #e8a317;
  --accent-2: #2d9b6a;
  --accent-warm: #e0703a;
  --ochre: #d4a20c;
  --terracotta: #c75b3a;
  --savanna: #2f8f6a;
  --kente-stripe: rgba(232, 163, 23, 0.14);
  --danger: #ff6584;
  --radius: 16px;
  --shadow: 0 22px 48px rgba(8, 2, 12, 0.45);
  --group-pad: clamp(1rem, 3vw, 1.75rem);
}

body[data-theme="vibrant"] {
  --accent: #ffb020;
  --accent-2: #34d399;
  --accent-warm: #ff8c42;
}

body[data-theme="neo"] {
  --accent: #c084fc;
  --accent-2: #2dd4bf;
  --accent-warm: #fb7185;
}

body[data-theme="elegant"] {
  --accent: #4ade80;
  --accent-2: #38bdf8;
  --accent-warm: #f472b6;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(199, 91, 58, 0.18), transparent 45%),
    radial-gradient(ellipse 90% 70% at 0% 100%, rgba(45, 155, 106, 0.16), transparent 50%),
    radial-gradient(circle at 70% 40%, rgba(232, 163, 23, 0.08), transparent 55%),
    linear-gradient(165deg, var(--bg-deep) 0%, var(--bg) 38%, #1a0f24 100%);
  color: var(--text);
  line-height: 1.55;
  transition: background 250ms ease, color 250ms ease;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Subtle woven-strip ambience (abstract; not a copy of any specific sacred textile) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    repeating-linear-gradient(
      125deg,
      transparent,
      transparent 14px,
      var(--kente-stripe) 14px,
      var(--kente-stripe) 15px
    ),
    repeating-linear-gradient(
      -125deg,
      transparent,
      transparent 22px,
      rgba(45, 155, 106, 0.06) 22px,
      rgba(45, 155, 106, 0.06) 23px
    );
  mix-blend-mode: soft-light;
}

main,
.footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(180deg, rgba(26, 15, 36, 0.94), rgba(18, 10, 26, 0.88));
  border-bottom: 1px solid rgba(232, 163, 23, 0.22);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent), var(--accent-warm), var(--accent-2));
  color: #1a0a08;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  position: relative;
  overflow: hidden;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.brand-mark::before {
  width: 18px;
  height: 18px;
}

.brand-mark::after {
  width: 10px;
  height: 10px;
}

.vc-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(232, 163, 23, 0.35);
  background: linear-gradient(140deg, rgba(232, 163, 23, 0.25), rgba(45, 155, 106, 0.24));
  margin-bottom: 0.5rem;
}

.vc-icon::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 248, 240, 0.9);
}

.vc-icon-route::before {
  border-radius: 2px;
  transform: rotate(45deg);
}

.vc-icon-ai::before {
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 248, 240, 0.45) inset;
}

.vc-icon-trust::before {
  border-radius: 3px;
  clip-path: polygon(50% 0%, 100% 28%, 82% 100%, 18% 100%, 0% 28%);
}

.vc-icon-life::before {
  border-radius: 999px 999px 2px 999px;
  transform: rotate(45deg);
}

.vc-icon-legal::before {
  border-radius: 2px;
}

.vc-icon-account::before {
  border-radius: 999px;
  box-shadow: 0 6px 0 -2px rgba(255, 248, 240, 0.9);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: rgba(232, 163, 23, 0.15);
  color: #fffef8;
}

.nav-links .nav-settings {
  border: 1px solid rgba(232, 163, 23, 0.35);
  background: linear-gradient(135deg, rgba(232, 163, 23, 0.2), rgba(45, 155, 106, 0.12));
}

.cta-small {
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(232, 163, 23, 0.25), rgba(45, 155, 106, 0.2));
  border: 1px solid rgba(232, 163, 23, 0.35);
}

main,
.footer {
  width: min(1120px, 94%);
  margin: 0 auto;
}

/* Grouped content bands — scan in three beats instead of one long wall */
.page-group {
  margin: 0 auto 2.75rem;
  padding: var(--group-pad);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(165deg, rgba(36, 20, 50, 0.55), rgba(18, 10, 28, 0.35));
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.2);
  border-left: 5px solid var(--ochre);
  transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}

.page-group:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 163, 23, 0.24);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.26);
}

.page-group--discover {
  border-left-color: var(--ochre);
  background: linear-gradient(168deg, rgba(60, 35, 18, 0.22), rgba(26, 15, 40, 0.5));
}

.page-group--grow {
  border-left-color: var(--savanna);
  background: linear-gradient(168deg, rgba(20, 60, 45, 0.2), rgba(22, 12, 32, 0.52));
}

.page-group--assurance {
  border-left-color: var(--terracotta);
  background: linear-gradient(168deg, rgba(70, 28, 22, 0.2), rgba(20, 12, 30, 0.55));
}

.page-group .section {
  margin: 1.15rem auto;
}

.page-group .section:first-of-type {
  margin-top: 0.35rem;
}

.page-group .hero {
  margin: 0.75rem auto 1.25rem;
}

.hero {
  margin: 2rem auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.4rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(1.95rem, 4vw, 3.25rem);
  margin-bottom: 0.8rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(232, 163, 23, 0.15);
}

.hero-copy p {
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 99px;
  color: #1a0a08;
  background: linear-gradient(130deg, #f0c14a, #e8a317, #2d9b6a);
  font-weight: 700;
}

/* Hero badge is a <p>; .hero-copy p would otherwise force muted gray and ruin contrast. */
.hero-copy p.badge,
#heroBadge.badge {
  color: #1a0a08;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(130deg, #ffd54a, #e8a317, #3daa7a);
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 2px 8px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.hero-image img,
.card img,
.product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.hero-image {
  min-height: 320px;
  transition: transform 240ms ease;
  will-change: transform;
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-trust-row {
  margin-top: 1rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.hero-trust-row span {
  background: rgba(30, 18, 40, 0.88);
  border: 1px solid rgba(232, 163, 23, 0.28);
  color: #fff4e0;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.86rem;
}

.signature-strip {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.signature-strip span {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.26rem 0.56rem;
  background: linear-gradient(120deg, rgba(232, 163, 23, 0.16), rgba(45, 155, 106, 0.12));
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 0.66rem 1rem;
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.btn-primary {
  color: #0c1328;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
}

.btn-secondary {
  color: var(--text);
  background: linear-gradient(135deg, #2a1f38, #1e1530);
  border: 1px solid rgba(232, 163, 23, 0.2);
}

.section {
  margin: 2rem auto;
  scroll-margin-top: 86px;
}

.section > h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  letter-spacing: 0.02em;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid rgba(232, 163, 23, 0.35);
  width: fit-content;
  max-width: 100%;
}

.section-divider {
  height: 2px;
  width: min(340px, 86%);
  margin: 0.5rem auto 1.2rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(232, 163, 23, 0.75), rgba(45, 155, 106, 0.75), transparent);
  opacity: 0.9;
  background-size: 180% 100%;
  animation: dividerFlow 4.2s ease-in-out infinite;
}

@keyframes dividerFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.settings-hub {
  border: 1px solid rgba(232, 163, 23, 0.24);
  background: linear-gradient(165deg, rgba(34, 21, 51, 0.95), rgba(18, 10, 30, 0.88));
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
  margin-top: 0.75rem;
}

.settings-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(10, 16, 30, 0.55);
  padding: 1rem;
}

.settings-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-links a {
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(232, 163, 23, 0.24);
  background: rgba(232, 163, 23, 0.08);
}

/* Luxury motion system: staged reveal */
body.luxe-ready .section,
body.luxe-ready .hero,
body.luxe-ready .home-cta-strip,
body.luxe-ready .bento-card,
body.luxe-ready .product,
body.luxe-ready .shop,
body.luxe-ready .settings-card {
  opacity: 0;
  transform: translateY(14px) scale(0.992);
  transition: opacity 520ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.luxe-ready .is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  body.luxe-ready .section,
  body.luxe-ready .hero,
  body.luxe-ready .home-cta-strip,
  body.luxe-ready .bento-card,
  body.luxe-ready .product,
  body.luxe-ready .shop,
  body.luxe-ready .settings-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.alt {
  background: linear-gradient(160deg, rgba(36, 22, 52, 0.92), rgba(20, 12, 30, 0.88));
  border: 1px solid rgba(232, 163, 23, 0.15);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.card,
.shop,
.product {
  background: linear-gradient(165deg, rgba(42, 26, 58, 0.95), rgba(24, 14, 36, 0.92));
  border-radius: var(--radius);
  border: 1px solid rgba(232, 163, 23, 0.12);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.card:hover,
.shop:hover,
.product:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 163, 23, 0.45);
  box-shadow: 0 12px 40px rgba(232, 163, 23, 0.08);
}

.card h3,
.product h3 {
  margin: 0.7rem 0;
  padding: 0 0.8rem;
}

.card img {
  height: 170px;
}

.shop-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.shop {
  padding: 1rem;
}

.shop p,
.product p {
  color: var(--muted);
}

.market-pillars {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pill-card {
  background: linear-gradient(170deg, rgba(50, 28, 22, 0.55), rgba(24, 14, 36, 0.92));
  border: 1px solid rgba(232, 163, 23, 0.2);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.pill-card h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.55rem;
}

.pill-card p {
  margin: 0;
  color: #e8dcc8;
}

.home-cta-strip {
  border: 1px solid rgba(45, 155, 106, 0.35);
  background: linear-gradient(135deg, rgba(45, 155, 106, 0.18), rgba(36, 20, 50, 0.85));
  border-radius: var(--radius);
  padding: 1.2rem;
}

.home-cta-strip h3 {
  margin: 0 0 0.35rem 0;
}

.home-cta-strip p {
  margin: 0;
  color: #f0e6d8;
}

.market-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

#categoryFilter {
  background: #16203b;
  border: 1px solid #2a3459;
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}

.product-grid {
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.product {
  padding: 0.7rem;
}

.product img {
  height: 180px;
}

.price {
  color: #ffd666;
  font-weight: 700;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.steps article {
  background: rgba(30, 18, 42, 0.9);
  border: 1px solid rgba(45, 155, 106, 0.25);
  border-radius: var(--radius);
  padding: 1rem;
}

.security-list {
  padding-left: 1rem;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer {
  margin: 2rem auto 3rem;
  color: var(--muted);
  text-align: center;
}

.messages-box {
  min-height: 140px;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid #32406b;
  background: #111b33;
  padding: 0.7rem;
  display: grid;
  gap: 0.5rem;
}

.msg {
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  max-width: 85%;
  color: #f2f6ff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.msg-buyer {
  background: #2a3a64;
  justify-self: start;
}

.msg-seller {
  background: #1d4a47;
  justify-self: end;
}

.chat-input-row {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

#chatSafetyAlert {
  margin-top: 0.7rem;
}

.safety-alert {
  border: 1px solid #77591c;
  background: #2f2410;
  color: #f8dea2;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

#chatInput {
  border-radius: 10px;
  border: 1px solid #2a3459;
  background: #121b34;
  color: var(--text);
  padding: 0.6rem 0.7rem;
}

.admin-grid {
  display: grid;
  gap: 0.7rem;
}

.admin-grid input,
.admin-grid textarea,
.admin-grid select {
  border-radius: 10px;
  border: 1px solid #2a3459;
  background: #121b34;
  color: var(--text);
  padding: 0.6rem 0.7rem;
  font: inherit;
}

.admin-grid textarea {
  min-height: 90px;
  resize: vertical;
}

.note {
  color: var(--muted);
}

.hidden {
  display: none;
}

.ai-grid {
  display: grid;
  gap: 0.6rem;
}

.ai-grid input,
.ai-grid select {
  border-radius: 10px;
  border: 1px solid #2a3459;
  background: #121b34;
  color: var(--text);
  padding: 0.6rem 0.7rem;
  font: inherit;
}

.ai-result {
  margin-top: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 163, 23, 0.12);
  background: rgba(12, 8, 20, 0.75);
  padding: 0.8rem;
  color: var(--muted);
}

#coachDashboard {
  white-space: normal;
  line-height: 1.5;
}

.tracking-timeline {
  display: grid;
  gap: 0.55rem;
}

.tracking-step {
  border: 1px solid #2a3459;
  background: #0d1427;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
}

.ad-card {
  border: 1px solid #2a3459;
  background: #0f1730;
  border-radius: 12px;
  padding: 0.9rem;
}

.ad-badge {
  display: inline-block;
  font-size: 0.75rem;
  border-radius: 99px;
  background: #1f2b55;
  color: #c9d3ff;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.45rem;
}

.rewards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.reward-pill {
  border: 1px solid #2a3459;
  background: #10172d;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  color: var(--muted);
}

.rewards-progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #0d1427;
  border: 1px solid #2a3459;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.rewards-progress-fill {
  height: 100%;
  width: 35%;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  transition: width 200ms ease;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 22, 0.82);
  display: grid;
  place-items: center;
  z-index: 999;
  padding: 1rem;
}

.modal-card {
  width: min(540px, 96%);
  border-radius: 16px;
  border: 1px solid #2a3459;
  background: #0f1730;
  padding: 1rem;
  box-shadow: var(--shadow);
}

/* Fail-safe: disclaimer modal is permanently disabled. */
#disclaimerGateModal {
  display: none !important;
}

/* Fail-safe: onboarding modal is permanently disabled. */
#onboardingModal {
  display: none !important;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    gap: 0.7rem;
    flex-direction: column;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.7rem;
    font-size: 0.92rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.6rem, 6.5vw, 2.3rem);
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .market-pillars {
    grid-template-columns: 1fr;
  }
}
