/* =========================================================
   BRAINBOX — DARK LUXURY AI EDUCATION FUNNEL
   ========================================================= */

:root {
  /* Brand palette (from BrainBox brand guide) */
  --bb-violet:        #5a0afa;   /* Electric Violet — PRIMARY */
  --bb-lime:          #d7fa46;   /* Lime Spark — accent CTA */
  --bb-indigo:        #302baa;   /* Deep Indigo */
  --bb-periwinkle:    #7378e6;
  --bb-soft-violet:   #bebefa;
  --bb-cloud:         #96aafa;
  --bb-mist:          #5078dc;

  /* Surfaces — luxury dark base */
  --bb-bg:            #08070d;
  --bb-bg-2:          #0d0b18;
  --bb-bg-3:          #14112a;
  --bb-line:          rgba(255,255,255,.08);
  --bb-line-strong:   rgba(255,255,255,.16);

  /* Text */
  --bb-fg:            #f6f5ff;
  --bb-fg-2:          rgba(246,245,255,.72);
  --bb-fg-3:          rgba(246,245,255,.50);
  --bb-fg-4:          rgba(246,245,255,.32);

  /* Type — Zalando Sans is on Google Fonts */
  --bb-display: "Zalando Sans Expanded", "Zalando Sans", "Helvetica Neue", system-ui, sans-serif;
  --bb-body:    "Zalando Sans", "Helvetica Neue", system-ui, sans-serif;
  --bb-cn:      "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bb-mono:    "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;

  /* Effects */
  --bb-glow-violet: 0 0 80px rgba(90,10,250,.35), 0 0 200px rgba(90,10,250,.18);
  --bb-glow-lime:   0 0 60px rgba(215,250,70,.30);
  --bb-card:        linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  --bb-card-hi:     linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));

  --bb-radius: 18px;
  --bb-radius-lg: 28px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  color: var(--bb-fg);
  font-family: var(--bb-body);
  font-feature-settings: "ss01","ss02","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Fixed atmosphere — gradient lights anchored to viewport so they don't get
   cut off at section boundaries when scrolling. */
html {
  background:
    radial-gradient(1100px 900px at -10% -10%, rgba(90,10,250,.38), transparent 55%),
    radial-gradient(900px 900px at 110% 110%, rgba(48,43,170,.42), transparent 55%),
    radial-gradient(700px 700px at 80% -10%, rgba(115,120,230,.18), transparent 60%),
    var(--bb-bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100%;
}
body { background: transparent; position: relative; }

/* Global fixed grid overlay — same vibe as the hero, applied across the
   whole page so the design feels 一体式 (unified) at every scroll position
   and on every viewport. */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 78%);
}
/* Soft grain on top, also fixed, very subtle */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.025) 1px, transparent 0);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: .5;
}
@media (max-width: 720px) {
  body::before { background-size: 56px 56px; }
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* Typography utilities */
.bb-cn { font-family: var(--bb-cn); font-weight: 700; letter-spacing: -0.01em; }
.bb-en { font-family: var(--bb-display); }
.bb-mono { font-family: var(--bb-mono); }
.bb-eyebrow {
  font-family: var(--bb-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bb-fg-3);
}

/* Container */
.bb-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .bb-wrap { padding: 0 20px; } }

/* Section vertical rhythm */
.bb-section { padding: 140px 0; position: relative; z-index: 1; }
@media (max-width: 720px) { .bb-section { padding: 88px 0; } }

/* =========================================================
   ATMOSPHERE — Cinematic gradient mesh backgrounds
   ========================================================= */
/* Per-section mesh now disabled — atmosphere is global (see html background). */
.bb-mesh { display: none; }

/* Per-section grain/grid disabled — now global (see body::before/::after). */
.bb-grain, .bb-grid-overlay { display: none; }

/* =========================================================
   NAV
   ========================================================= */
.bb-nav {
  position: sticky; top: 0; z-index: 100;
  padding: 16px 0;
  background: rgba(8,7,13,.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--bb-line);
}
.bb-nav-inner { display:flex; align-items:center; justify-content:space-between; gap:32px; }
.bb-nav-logo { display:flex; align-items:center; gap:10px; font-family: var(--bb-display); font-weight: 800; letter-spacing: -0.01em; font-size: 18px; }
.bb-nav-links { display:flex; gap:28px; font-size:14px; color: var(--bb-fg-2); align-items: center; }
.bb-nav-links > a, .bb-nav-dd > a { transition: color .2s ease; }
.bb-nav-links a:hover { color: var(--bb-fg); }
.bb-nav-active { color: var(--bb-fg) !important; position: relative; }
.bb-nav-active::after { content:""; position:absolute; left:0; right:0; bottom:-22px; height:2px; background: var(--bb-lime); }
.bb-nav-cta { display:flex; gap:12px; align-items:center; }
.bb-nav-login {
  font-size: 14px; color: var(--bb-fg-2);
  padding: 10px 14px; border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.bb-nav-login:hover { color: var(--bb-fg); background: rgba(255,255,255,.04); }
.bb-nav-burger { display:none; background:transparent; border:1px solid var(--bb-line-strong); width:40px; height:40px; border-radius:10px; padding:0; flex-direction:column; gap:4px; align-items:center; justify-content:center; }
.bb-nav-burger span { display:block; width:16px; height:1.5px; background: var(--bb-fg); }

/* Dropdown */
.bb-nav-dd { position: relative; padding: 18px 0; margin: -18px 0; }
.bb-nav-dd > a { color: var(--bb-fg-2); }
.bb-nav-dd:hover > a { color: var(--bb-fg); }
.bb-nav-menu {
  position: absolute; top: 100%; left: -16px;
  min-width: 280px;
  background: rgba(13,11,24,.92);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--bb-line-strong);
  border-radius: 16px;
  padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 60px rgba(90,10,250,.15);
  margin-top: 8px;
}
.bb-nav-menu-h { font-family: var(--bb-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--bb-fg-4); text-transform: uppercase; padding: 8px 12px 4px; }
.bb-nav-menu a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--bb-fg);
  transition: background .2s ease;
}
.bb-nav-menu a:hover { background: rgba(255,255,255,.06); }
.bb-nav-menu a b { font-family: var(--bb-cn); font-weight: 700; font-size: 14px; }
.bb-nav-menu a span { font-family: var(--bb-cn); font-size: 12px; color: var(--bb-fg-3); font-weight: 400; }

.bb-mobile-menu {
  display: none;
  flex-direction: column; gap: 4px;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--bb-line);
  background: rgba(8,7,13,.95);
  backdrop-filter: blur(20px);
}
.bb-mobile-menu a { padding: 12px 0; font-family: var(--bb-cn); color: var(--bb-fg); }

@media (max-width: 1100px) {
  .bb-nav-links { display:none; }
  .bb-nav-burger { display: flex; }
  .bb-nav-login { display: none; }
  .bb-mobile-menu { display: flex; }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.bb-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-family: var(--bb-body); font-weight: 600;
  font-size: 14px; letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.bb-btn:hover { transform: translateY(-1px); }
.bb-btn:active { transform: translateY(0); }

.bb-btn-primary {
  background: var(--bb-lime);
  color: #0a0814;
  box-shadow: var(--bb-glow-lime);
}
.bb-btn-primary:hover {
  box-shadow: 0 0 80px rgba(215,250,70,.55), 0 0 160px rgba(215,250,70,.25);
}

.bb-btn-violet {
  background: var(--bb-violet);
  color: #fff;
  box-shadow: var(--bb-glow-violet);
}
.bb-btn-violet:hover { background: #6a1afe; }

.bb-btn-ghost {
  background: transparent;
  color: var(--bb-fg);
  border-color: var(--bb-line-strong);
}
.bb-btn-ghost:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.28);
}

.bb-btn-lg { padding: 18px 28px; font-size: 15px; }
.bb-btn-arrow {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.15);
  display:inline-flex; align-items:center; justify-content:center;
  font-size: 11px;
}

/* =========================================================
   PILL / TAG
   ========================================================= */
.bb-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--bb-line);
  font-family: var(--bb-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bb-fg-2);
}
.bb-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bb-lime);
  box-shadow: 0 0 10px var(--bb-lime);
}

/* =========================================================
   CARDS
   ========================================================= */
.bb-card {
  background: var(--bb-card);
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease, background .3s ease;
}
.bb-card:hover {
  border-color: var(--bb-line-strong);
  background: var(--bb-card-hi);
  transform: translateY(-2px);
}

/* =========================================================
   HEADLINES
   ========================================================= */
.bb-h1 {
  font-family: var(--bb-cn);
  font-weight: 900;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
}
.bb-h2 {
  font-family: var(--bb-cn);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}
.bb-h3 {
  font-family: var(--bb-cn);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}
.bb-sub {
  font-family: var(--bb-cn);
  font-weight: 400;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--bb-fg-2);
  margin: 0;
}

/* =========================================================
   GRADIENT TEXT
   ========================================================= */
.bb-grad {
  background: linear-gradient(120deg, #fff 0%, var(--bb-soft-violet) 50%, var(--bb-cloud) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.bb-grad-violet {
  background: linear-gradient(120deg, var(--bb-soft-violet) 0%, var(--bb-violet) 60%, var(--bb-indigo) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.bb-grad-lime {
  background: linear-gradient(120deg, var(--bb-lime) 0%, #b5e02f 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes bb-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bb-pulse {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}
@keyframes bb-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes bb-spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes bb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Reveal-on-scroll: default to VISIBLE so content never gets stuck hidden
   if IntersectionObserver doesn't fire (background tabs, throttled mobile, etc).
   The .is-pre class is only added by JS when IO is actively observing. */
.bb-reveal { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s ease; }
.bb-reveal.is-pre { opacity: 0; transform: translateY(24px); }
.bb-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   FLOATING WHATSAPP
   ========================================================= */
.bb-wa {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 40px rgba(37,211,102,.4);
  transition: transform .25s ease;
  border: 0;
}
.bb-wa:hover { transform: scale(1.08); }
.bb-wa::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(37,211,102,.4); animation: bb-pulse 2s ease-in-out infinite;
}

/* =========================================================
   MARQUEE STRIP
   ========================================================= */
.bb-marquee {
  display: flex; gap: 56px;
  animation: bb-marquee 36s linear infinite;
  width: max-content;
}
.bb-marquee-mask {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0, black 8%, black 92%, transparent 100%);
}

/* =========================================================
   FAQ ACCORDION
   ========================================================= */
.bb-faq-item {
  border-bottom: 1px solid var(--bb-line);
  padding: 28px 0;
  cursor: pointer;
}
.bb-faq-q {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  font-family: var(--bb-cn); font-weight: 700; font-size: clamp(18px,1.8vw,22px);
  line-height: 1.4; letter-spacing: -0.005em;
}
.bb-faq-a {
  max-height: 0; overflow: hidden;
  font-family: var(--bb-cn); font-weight: 400; color: var(--bb-fg-2);
  font-size: 16px; line-height: 1.6;
  transition: max-height .4s ease, padding .4s ease;
}
.bb-faq-item.is-open .bb-faq-a {
  max-height: 400px; padding-top: 16px;
}
.bb-faq-toggle {
  flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--bb-line-strong);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s ease, background .3s ease;
}
.bb-faq-item.is-open .bb-faq-toggle {
  transform: rotate(45deg);
  background: var(--bb-lime);
  color: #08070d;
  border-color: var(--bb-lime);
}

/* =========================================================
   STICKY MOBILE CTA
   ========================================================= */
.bb-sticky-mobile {
  display: none;
}
@media (max-width: 720px) {
  .bb-sticky-mobile {
    display: flex;
    position: fixed; left: 12px; right: 12px; bottom: 12px;
    z-index: 80;
    background: rgba(8,7,13,.85);
    backdrop-filter: blur(20px);
    border: 1px solid var(--bb-line-strong);
    border-radius: 999px;
    padding: 8px 8px 8px 18px;
    align-items: center; justify-content: space-between;
    gap: 12px;
  }
  .bb-wa { right: 12px; bottom: 84px; width: 52px; height: 52px; }
}

/* =========================================================
   THREE PILLAR LOGO MARK ANIMATION
   ========================================================= */
.bb-mark {
  display: inline-block;
}
.bb-mark-large {
  filter: drop-shadow(0 0 30px rgba(90,10,250,.6));
  animation: bb-float 6s ease-in-out infinite;
}

/* =========================================================
   RESPONSIVE — keep things 一体式 across mobile/iPad
   ========================================================= */
@media (max-width: 720px) {
  .bb-ba { grid-template-columns: 1fr !important; }
  .bb-photos { grid-template-columns: 1fr 1fr !important; }
}
@media (min-width: 721px) and (max-width: 980px) {
  .bb-photos { grid-template-columns: 1fr 1fr !important; }
}

/* =========================================================
   SCROLL BAR (subtle)
   ========================================================= */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bb-bg); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.08);
  border-radius: 6px; border: 2px solid var(--bb-bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.14); }
