/* =============================================
   BA Stack — Shared Brand System
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette */
  --purple: #7C4DFF;
  --purple-dark: #5c35cc;
  --purple-light: #f4f1ff;
  --purple-glow: rgba(124, 77, 255, 0.15);
  --dark: #0A0814;
  --dark-card: #13111A;
  --dark-card2: #1A1725;
  --dark-border: #2A2535;
  --text-light: #E8E0FF;
  --text-muted: #A89CC8;
  --orange: #FF9800;

  /* Neutral palette */
  --white: #FFFFFF;
  --off-white: #F9F9FB;
  --grey-100: #f0f0f0;
  --grey-200: #e5e5e5;
  --grey-300: #d4d4d4;
  --grey-500: #888888;
  --grey-700: #444444;
  --grey-900: #1a1a1a;

  /* Semantic */
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;

  /* Spacing scale */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 40px;
  --sp-2xl: 64px;
  --sp-3xl: 96px;

  /* Layout */
  --max-w: 1120px;
  --max-w-narrow: 760px;
  --radius: 12px;
  --radius-lg: 20px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.7;
  color: var(--grey-700);
  background: var(--off-white);
}

a { color: var(--purple); font-weight: 600; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  line-height: 1.25;
  font-weight: 700;
}

/* --- Typography Scale --- */
.t-hero { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
.t-h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
.t-h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
.t-h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
.t-body { font-size: 1rem; }
.t-small { font-size: 0.875rem; }
.t-micro { font-size: 0.75rem; }

/* --- Layout --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-lg); }
.container--narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 var(--sp-lg); }
.section { padding: var(--sp-3xl) 0; }
.section--dark { background: var(--dark); color: var(--text-light); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: var(--text-muted); }
.section--purple { background: var(--purple-light); }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: 1px solid var(--dark-border);
  padding: 0 var(--sp-lg);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  text-decoration: none;
}
.nav__logo svg { flex-shrink: 0; }
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  list-style: none;
}
.nav__links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover, .nav__links a.active { color: var(--white); opacity: 1; }
.nav__cta {
  background: var(--purple);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
}
.nav__cta:hover { opacity: 0.9; }
.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-light);
  margin: 6px 0;
  transition: all 0.3s;
}
.nav__mobile {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark);
  z-index: 99;
  padding: var(--sp-xl) var(--sp-lg);
}
.nav__mobile.open { display: flex; flex-direction: column; gap: var(--sp-md); }
.nav__mobile a {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 500;
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--dark-border);
}

@media (max-width: 768px) {
  .nav__links { display: none !important; }
  .nav__burger { display: block !important; }
}
@media (max-width: 480px) {
  .nav__logo svg { width: 130px; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 14px 32px;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn--primary { background: var(--purple); color: var(--white); }
.btn--white { background: var(--white); color: var(--purple); }
.btn--outline { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn--dark-outline { background: transparent; color: var(--text-light); border: 2px solid var(--dark-border); }
.btn--full { width: 100%; }
.btn--sm { padding: 10px 20px; font-size: 0.875rem; }
.btn--lg { padding: 18px 40px; font-size: 1.05rem; }

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--sp-xl);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.card--dark {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
}
.card--dark:hover { border-color: var(--purple); }
.card--highlight {
  background: var(--purple-light);
  border-left: 4px solid var(--purple);
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge--purple { background: var(--purple-glow); color: var(--purple); }
.badge--green { background: rgba(34,197,94,0.1); color: var(--green); }
.badge--orange { background: rgba(255,152,0,0.1); color: var(--orange); }

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: var(--text-muted);
  padding: var(--sp-2xl) var(--sp-lg) var(--sp-xl);
  border-top: 1px solid var(--dark-border);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-xl);
}
.footer__brand p { font-size: 0.85rem; line-height: 1.6; margin-top: var(--sp-md); color: var(--text-muted); }
.footer__col h4 { color: var(--white); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--sp-md); }
.footer__col a { display: block; color: var(--text-muted); font-size: 0.85rem; font-weight: 400; margin-bottom: var(--sp-sm); }
.footer__col a:hover { color: var(--white); }
.footer__bottom {
  max-width: var(--max-w);
  margin: var(--sp-xl) auto 0;
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--dark-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.footer__disclaimer {
  max-width: var(--max-w);
  margin: var(--sp-lg) auto 0;
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.6;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: var(--sp-xl) var(--sp-lg); }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; gap: var(--sp-sm); text-align: center; }
}
@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-muted { color: var(--text-muted); }
.text-purple { color: var(--purple); }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }
.mt-2xl { margin-top: var(--sp-2xl); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }
.mb-xl { margin-bottom: var(--sp-xl); }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: var(--sp-2xl) 0; }
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}
.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }
.fade-up-d4 { animation-delay: 0.4s; }

/* --- Video embed --- */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
}
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* --- Mobile Readability --- */
@media (max-width: 600px) {
  html { font-size: 17px; }
  body { line-height: 1.75; }
  .t-small { font-size: 0.95rem; }
  .t-micro { font-size: 0.82rem; }
  .t-body { font-size: 1.05rem; }
  p { font-size: 1rem; }
  .card { padding: var(--sp-lg); }
  .badge { font-size: 0.75rem; padding: 5px 14px; }
  .btn { padding: 16px 28px; font-size: 1rem; }
  .btn--sm { padding: 12px 20px; font-size: 0.9rem; }
  .footer__col a { font-size: 0.9rem; margin-bottom: var(--sp-sm); }
  .footer__brand p { font-size: 0.9rem; }
  .footer__disclaimer { font-size: 0.75rem; }
  .nav__mobile a { font-size: 1.15rem; padding: var(--sp-md) 0; }
}
