/* ============================================================
   BABS-O-MATIC — global.css
   Shared across all pages. Contains:
   - CSS custom properties (light + dark theme)
   - Base / reset
   - Navigation
   - Mobile drawer
   - Buttons
   - Shared layout utilities
   - Scroll reveal animation
   - Footer
   - Shared JS-driven component styles
   ============================================================ */


/* ────────────────────────────────────────────────────────────
   THEME TOKENS — LIGHT (default)
──────────────────────────────────────────────────────────── */
:root,
[data-theme="light"] {
  --bg-base:       #f3f5fe;
  --bg-surface:    #ffffff;
  --bg-elevated:   #eaedfa;
  --bg-nav:        rgba(243, 245, 254, 0.88);
  --bg-alt:        #eaedfa;

  --text-1:        #090e28;
  --text-2:        #374370;
  --text-3:        #7382b0;
  --text-4:        #a8b4d4;

  --border-1:      rgba(20, 40, 110, 0.07);
  --border-2:      rgba(20, 40, 110, 0.13);
  --border-3:      rgba(20, 40, 110, 0.22);

  --blue:          #2a72e0;
  --blue-bg:       rgba(26, 86, 196, 0.07);
  --blue-ring:     rgba(26, 86, 196, 0.18);

  --yellow:        #f5c518;
  --yellow-h:      #f9d44a;
  --yellow-label:  #c89300;
  --yellow-bg:     rgba(245, 197, 24, 0.09);
  --yellow-ring:   rgba(245, 197, 24, 0.32);

  --green:         #1a7040;
  --green-bg:      rgba(26, 112, 64, 0.08);
  --green-ring:    rgba(26, 112, 64, 0.18);

  --blob1:  rgba(26, 86, 196, 0.09);
  --blob2:  rgba(245, 197, 24, 0.10);
  --blob3:  rgba(42, 114, 224, 0.07);
  --grid:   rgba(20, 40, 180, 0.04);
  --noise:  0.015;

  --sh1:    0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --sh2:    0 8px 24px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
}


/* ────────────────────────────────────────────────────────────
   THEME TOKENS — DARK
──────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-base:       #030917;
  --bg-surface:    #060d22;
  --bg-elevated:   #08183c;
  --bg-nav:        rgba(3, 9, 23, 0.86);
  --bg-alt:        #060d22;

  --text-1:        #eef2ff;
  --text-2:        #7d97cb;
  --text-3:        #4a608e;
  --text-4:        #2b3d62;

  --border-1:      rgba(255, 255, 255, 0.055);
  --border-2:      rgba(255, 255, 255, 0.10);
  --border-3:      rgba(255, 255, 255, 0.18);

  --blue:          #5797f5;
  --blue-bg:       rgba(42, 114, 224, 0.14);
  --blue-ring:     rgba(42, 114, 224, 0.32);

  --yellow:        #f5c518;
  --yellow-h:      #f9d44a;
  --yellow-label:  #f5c518;
  --yellow-bg:     rgba(245, 197, 24, 0.11);
  --yellow-ring:   rgba(245, 197, 24, 0.28);

  --green:         #22c55e;
  --green-bg:      rgba(34, 197, 94, 0.10);
  --green-ring:    rgba(34, 197, 94, 0.22);

  --blob1:  rgba(42, 114, 224, 0.28);
  --blob2:  rgba(245, 197, 24, 0.14);
  --blob3:  rgba(87, 151, 245, 0.16);
  --grid:   rgba(255, 255, 255, 0.022);
  --noise:  0.025;

  --sh1:    0 1px 3px rgba(0,0,0,.2), 0 8px 32px rgba(0,0,0,.4);
  --sh2:    0 8px 32px rgba(0,0,0,.5);
}


/* ────────────────────────────────────────────────────────────
   BASE RESET
──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 300;
  background: var(--bg-base);
  color: var(--text-1);
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar           { width: 4px; }
::-webkit-scrollbar-track     { background: transparent; }
::-webkit-scrollbar-thumb     { background: var(--blue); border-radius: 2px; }

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: var(--noise);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ────────────────────────────────────────────────────────────
   NAVIGATION
──────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  height: 62px;
  background: var(--bg-nav);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-1);
  transition: height 0.3s, box-shadow 0.3s, background 0.3s;
}

:root { --notif-bar-h: 0px; }

nav {
  top: var(--notif-bar-h);
}

nav.scrolled {
  height: 52px;
  box-shadow: 0 1px 0 var(--border-1), 0 4px 20px rgba(0,0,0,.05);
}

[data-theme="dark"] nav.scrolled {
  box-shadow: 0 1px 0 var(--border-1), 0 6px 28px rgba(0,0,0,.45);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 34px;
  width: auto;
}

.logo-fb {
  display: none;
  align-items: center;
  gap: 9px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--yellow);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #030917;
  flex-shrink: 0;
}

.logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.4px;
}

.logo-text em {
  font-style: normal;
  color: var(--yellow-label);
}

/* Nav right cluster */
.nav-r {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin-right: 8px;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-links a:hover    { color: var(--text-1); background: var(--bg-elevated); }
.nav-links a.active   { color: var(--text-1); }

/* CTA button in nav */
.nav-cta {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #030917 !important;
  background: var(--yellow) !important;
  padding: 8px 17px !important;
  border-radius: 8px !important;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s !important;
}

.nav-cta:hover {
  background: var(--yellow-h) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(245, 197, 24, .32) !important;
}

/* Theme toggle */
.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--bg-elevated);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--text-3);
  flex-shrink: 0;
}

.theme-btn:hover {
  border-color: var(--border-3);
  color: var(--text-1);
}

.theme-btn svg { width: 15px; height: 15px; }

/* Sun/moon icon swap */
.t-sun  { display: block; }
.t-moon { display: none; }
[data-theme="dark"] .t-sun  { display: none; }
[data-theme="dark"] .t-moon { display: block; }


/* ────────────────────────────────────────────────────────────
   HAMBURGER
──────────────────────────────────────────────────────────── */
.hb {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 9px;
  border-radius: 8px;
  background: transparent;
  border: none;
}

.hb:hover { background: var(--bg-elevated); }

.hb span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-1);
  border-radius: 2px;
  transition: all 0.28s ease;
  transform-origin: center;
}

.hb.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hb.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hb.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* ────────────────────────────────────────────────────────────
   MOBILE DRAWER
──────────────────────────────────────────────────────────── */
.mob-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--bg-surface);
  flex-direction: column;
  padding: 86px 28px 40px;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}

.mob-menu.open { transform: none; }

.mob-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mob-menu ul a {
  display: block;
  font-size: 28px;
  font-weight: 200;
  color: var(--text-1);
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-1);
  letter-spacing: -0.5px;
  transition: color 0.15s;
}

.mob-menu ul a:hover { color: var(--blue); }

.mob-cta { margin-top: 36px; }


/* ────────────────────────────────────────────────────────────
   BUTTONS
──────────────────────────────────────────────────────────── */
.btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
  letter-spacing: -0.1px;
  white-space: nowrap;
}

.btn svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}

/* Primary — yellow */
.btn-p {
  background: var(--yellow);
  color: #030917;
}

.btn-p:hover {
  background: var(--yellow-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245, 197, 24, .38);
}

.btn-p:hover svg { transform: translateX(3px); }

/* Ghost — bordered */
.btn-g {
  background: var(--bg-elevated);
  color: var(--text-1);
  border: 1px solid var(--border-2);
}

.btn-g:hover {
  background: var(--blue-bg);
  border-color: var(--blue-ring);
  transform: translateY(-2px);
}


/* ────────────────────────────────────────────────────────────
   LAYOUT UTILITIES
──────────────────────────────────────────────────────────── */
section { position: relative; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 60px;
}

.sp     { padding: 112px 0; }
.sp-sm  { padding: 72px 0; }

/* Section overline label */
.overline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}

.ov-bar {
  width: 22px;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--blue));
  flex-shrink: 0;
}

/* Heading scale */
.headline {
  font-size: clamp(28px, 3.8vw, 50px);
  font-weight: 200;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-1);
}

.headline b { font-weight: 800; }

/* Body text scale */
.body-lg { font-size: 17px; color: var(--text-2); line-height: 1.78; }
.body-md { font-size: 15px; color: var(--text-2); line-height: 1.78; }
.body-sm { font-size: 14px; color: var(--text-2); line-height: 1.72; }

/* Blue label (used as section kicker) */
.label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}


/* ────────────────────────────────────────────────────────────
   SCROLL REVEAL
──────────────────────────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.rv.in           { opacity: 1; transform: none; }
.rv-d1           { transition-delay: 0.10s; }
.rv-d2           { transition-delay: 0.20s; }
.rv-d3           { transition-delay: 0.30s; }


/* ────────────────────────────────────────────────────────────
   FOOTER
──────────────────────────────────────────────────────────── */
footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border-1);
  padding: 60px 0 32px;
}

.fi {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 60px;
}

.ft {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 52px;
  margin-bottom: 48px;
}

/* Footer logo */
.f-logo-img {
  height: 32px;
  width: auto;
  margin-bottom: 14px;
}

.f-logo-fb {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.f-tagline {
  font-size: 13.5px;
  color: var(--text-3);
  line-height: 1.65;
  margin-bottom: 22px;
  max-width: 230px;
}

/* Social buttons */
.soc-row { display: flex; gap: 7px; }

.soc-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  text-decoration: none;
  transition: all 0.18s;
}

.soc-btn svg      { width: 13px; height: 13px; }
.soc-btn:hover    { border-color: var(--border-3); color: var(--text-1); }

/* Footer columns */
.fc-ttl {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 14px;
}

.fc-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.fc-links a {
  font-size: 13.5px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}

.fc-links a:hover { color: var(--text-1); }

/* Footer bottom bar */
.fb {
  border-top: 1px solid var(--border-1);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.fb-copy { font-size: 12.5px; color: var(--text-3); }
.fb-copy a { color: var(--text-2); text-decoration: none; }

.fb-legal { display: flex; gap: 20px; }

.fb-legal a {
  font-size: 12.5px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}

.fb-legal a:hover { color: var(--text-1); }


/* ────────────────────────────────────────────────────────────
   RESPONSIVE — SHARED BREAKPOINTS
──────────────────────────────────────────────────────────── */

/* Tablet landscape */
@media (max-width: 1024px) {
  nav          { padding: 0 36px; }
  .container   { padding: 0 36px; }
  .fi          { padding: 0 36px; }
  .ft          { grid-template-columns: 1fr 1fr; gap: 36px; }
}

/* Tablet portrait — hamburger kicks in */
@media (max-width: 768px) {
  nav            { padding: 0 20px; }
  nav.scrolled   { height: 52px; }
  .container     { padding: 0 20px; }
  .fi            { padding: 0 20px; }
  .sp            { padding: 80px 0; }
  .sp-sm         { padding: 56px 0; }

  /* Hide desktop nav, show hamburger */
  .nav-links     { display: none; }
  .hb            { display: flex; }
  .mob-menu      { display: flex; }

  .ft            { grid-template-columns: 1fr 1fr; gap: 28px; }
  .fb            { flex-direction: column; align-items: flex-start; }
}

/* Mobile */
@media (max-width: 480px) {
  .ft            { grid-template-columns: 1fr; }
  .fb-legal      { gap: 14px; }
}

/* Small phones */
@media (max-width: 360px) {
  nav          { padding: 0 14px; }
  .container   { padding: 0 14px; }
  .fi          { padding: 0 14px; }
  .sp          { padding: 64px 0; }
}

/* Logo light/dark switching */
.logo-light { display: block; height: 34px; width: auto; }
.logo-dark  { display: none;  height: 34px; width: auto; }

[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark  { display: block; }

/* ═══════════════════════════════════════════════════════
   FOOTER — NEW STYLES (add to global.css)
   ═══════════════════════════════════════════════════════ */

/* ── CTA Strip above footer grid ──────────────────────── */
.f-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  margin-bottom: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-1);
  border-radius: 12px;
}
.f-cta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.f-cta-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -.3px;
}
.f-cta-sub {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
}
.f-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--yellow);
  color: #111;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s, transform .15s;
}
.f-cta-btn:hover {
  opacity: .9;
  transform: translateY(-1px);
}

/* ── Sub-heading inside footer columns ────────────────── */
.fc-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-4);
  margin-top: 22px;
  margin-bottom: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-1);
}

/* ── Footer grid: 4 columns with brand wider ──────────── */
.ft {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}

/* ── Brand column spacing ─────────────────────────────── */
.f-brand {
  padding-right: 20px;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .ft {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .ft {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }
  .f-brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }
  .f-cta {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 22px 20px;
  }
  .f-cta-text {
    align-items: center;
  }
  .f-cta-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .ft {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}