/* ════════════════════════════════════════════════════════════════
   Study Buddy — public.css
   Award-Winning, World-Class Professional UI/UX Theme
   Inspired by Linear, Stripe, Apple Education, and Vercel
   ════════════════════════════════════════════════════════════════ */

:root {
  /* Ultra-Premium Obsidian Canvas */
  --sb-bg:           #07090e;
  --sb-surface:      #0d111a;
  --sb-surface-2:    #131824;
  --sb-surface-3:    #1a2233;
  --sb-surface-glass:rgba(13, 17, 26, 0.72);

  /* Hairline Borders with Optical Top Highlights */
  --sb-border:       rgba(255, 255, 255, 0.07);
  --sb-border-sub:   rgba(255, 255, 255, 0.04);
  --sb-border-hover: rgba(99, 102, 241, 0.45);
  --sb-border-focus: rgba(56, 189, 248, 0.5);

  /* High-Contrast Typography */
  --sb-text:         #f8fafc;
  --sb-text-body:    #cbd5e1;
  --sb-text-muted:   #94a3b8;
  --sb-text-dim:     #64748b;

  /* Executive Brand Accents */
  --sb-primary:      #6366f1;
  --sb-primary-hover:#4f46e5;
  --sb-primary-glow: 0 0 28px rgba(99, 102, 241, 0.45);
  --sb-cyan:         #06b6d4;
  --sb-blue:         #3b82f6;
  --sb-emerald:      #10b981;
  --sb-amber:        #f59e0b;
  --sb-rose:         #f43f5e;
  --sb-violet:       #8b5cf6;

  /* Cinematic Gradients */
  --sb-gradient-hero: radial-gradient(circle at 50% -10%, rgba(99, 102, 241, 0.16) 0%, transparent 65%),
                      radial-gradient(circle at 10% 25%, rgba(6, 182, 212, 0.09) 0%, transparent 45%),
                      radial-gradient(circle at 90% 45%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                      radial-gradient(circle at 50% 85%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);

  --sb-gradient-primary: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
  --sb-gradient-text:    linear-gradient(135deg, #ffffff 10%, #c7d2fe 55%, #38bdf8 100%);
  --sb-gradient-card:    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.005) 100%);

  /* Typography Stacks */
  --sb-font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --sb-font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --sb-font-mono:    'JetBrains Mono', monospace;

  /* Layout & Elevations */
  --sb-nav-h:        64px;
  --sb-r-sm:         8px;
  --sb-r-md:         14px;
  --sb-r-lg:         20px;
  --sb-r-xl:         28px;
  --sb-r-full:       9999px;

  --sb-shadow-subtle: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --sb-shadow-card:   0 20px 45px -15px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --sb-shadow-glow:   0 0 40px rgba(99, 102, 241, 0.22);
}

/* ──────────────────────────────────────────────────────────────
   GLOBAL CANVAS & BASE RESETS
   ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body.pub-body {
  background-color: var(--sb-bg);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 10% 30%, rgba(6, 182, 212, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 90% 60%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  color: var(--sb-text-body);
  font-family: var(--sb-font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle Geometric Background Dot Matrix */
body.pub-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

main { position: relative; z-index: 1; flex: 1; }

a { text-decoration: none; color: inherit; }

/* ──────────────────────────────────────────────────────────────
   PUBLIC NAVBAR (FROSTED GLASS)
   ────────────────────────────────────────────────────────────── */
.sb-navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--sb-nav-h);
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--sb-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: background, border-color, box-shadow;
}

.sb-navbar.scrolled {
  background: rgba(7, 9, 14, 0.92) !important;
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.sb-navbar.scrolled .sb-navbar__nav {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.09);
}

.sb-navbar__inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.sb-navbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sb-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--sb-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--sb-primary-glow);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sb-navbar__logo:hover .sb-logo-icon {
  transform: scale(1.08) rotate(6deg);
}
.logo-sparkle {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}
.sb-logo-wordmark {
  display: flex;
  flex-direction: column;
}
.sb-logo-name {
  font-family: var(--sb-font-heading);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
  line-height: 1.15;
}
.sb-logo-tagline {
  font-family: var(--sb-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.6px;
}

/* Nav Links */
.sb-navbar__nav-wrap { display: flex; align-items: center; }
.sb-navbar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  background: rgba(255, 255, 255, 0.025);
  padding: 4px;
  border-radius: var(--sb-r-full);
  border: 1px solid var(--sb-border-sub);
}
.sb-nav-link {
  font-family: var(--sb-font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--sb-text-muted);
  padding: 6px 14px;
  border-radius: var(--sb-r-full);
  transition: all 0.16s ease;
}
.sb-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}
.sb-nav-link.active {
  color: #ffffff;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

/* Actions */
.sb-navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sb-btn-login {
  font-family: var(--sb-font-heading);
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid var(--sb-border);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.15s ease;
}
.sb-btn-login:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}
.sb-btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: var(--sb-gradient-primary);
  color: #ffffff;
  border-radius: 10px;
  font-family: var(--sb-font-heading);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.sb-btn-cta:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 26px rgba(99, 102, 241, 0.65);
}

.sb-user-greeting {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(19, 24, 36, 0.7);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-r-full);
  padding: 3px 12px 3px 4px;
}
.user-greeting-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sb-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}
.user-greeting-text { font-size: 12px; color: #e2e8f0; }
.sb-btn-logout {
  font-size: 12px;
  color: var(--sb-text-dim);
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s;
}
.sb-btn-logout:hover { color: #f87171; }

.sb-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.sb-hamburger__bar {
  width: 22px; height: 2px; background: #cbd5e1; border-radius: 2px;
}

@media (max-width: 900px) {
  .sb-navbar__nav-wrap { display: none; }
  .sb-hamburger { display: flex; }
  .sb-navbar__actions { display: none; }
}

/* Mobile Navigation Drawer (Dark Obsidian Theme) */
.sb-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(10, 14, 23, 0.96) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.75) !important;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  z-index: 999;
}
.sb-mobile-menu.is-open {
  max-height: 520px;
  opacity: 1;
}
.sb-mobile-menu__inner {
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sb-mobile-nav-link {
  font-family: var(--sb-font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--sb-text-muted) !important;
  padding: 10px 14px;
  border-radius: var(--sb-r-md);
  display: block;
  transition: all 0.15s ease;
  text-decoration: none;
}
.sb-mobile-nav-link:hover,
.sb-mobile-nav-link.active {
  color: #ffffff !important;
  background: rgba(99, 102, 241, 0.15) !important;
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-weight: 600;
}
.sb-mobile-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08) !important;
  margin: 10px 0;
}
.sb-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sb-mobile-user-greeting {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--sb-r-md);
  border: 1px solid var(--sb-border);
}
.sb-mobile-user-greeting .user-greeting-name {
  color: #ffffff;
  font-size: 13px;
}


/* ──────────────────────────────────────────────────────────────
   HERO SECTION
   ────────────────────────────────────────────────────────────── */
.pub-hero {
  position: relative;
  padding: 68px 24px 60px;
  overflow: hidden;
  text-align: center;
}
.pub-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Shimmer Pill */
.pub-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 6px 18px;
  border-radius: var(--sb-r-full);
  font-family: var(--sb-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 26px;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.25);
}
.pub-hero__badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulse-dot 2s infinite ease-in-out;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.35); opacity: 0.5; }
}

/* Big Hero Typography */
.pub-hero__headline {
  font-family: var(--sb-font-heading);
  font-size: clamp(2.4rem, 5.8vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #ffffff;
  line-height: 1.12;
  margin-bottom: 22px;
}
.pub-hero__headline .highlight {
  background: var(--sb-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.35));
}

.pub-hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--sb-text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* Hero CTA Row */
.pub-hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.pub-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: var(--sb-r-full);
  font-family: var(--sb-font-heading);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.pub-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}


/* ──────────────────────────────────────────────────────────────
   INTERACTIVE LIVE CHAT SHOWCASE
   ────────────────────────────────────────────────────────────── */
.hero-mockup-wrapper {
  max-width: 920px;
  width: 100%;
  margin: 0 auto 48px;
  text-align: left;
}

.hero-mockup-card {
  background: var(--sb-surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--sb-r-xl);
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(99, 102, 241, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.hero-mockup-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

/* Window Header Bar */
.mockup-header {
  background: rgba(11, 15, 25, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.mockup-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctrl-dot { width: 11px; height: 11px; border-radius: 50%; }
.ctrl-dot.red    { background: #ef4444; }
.ctrl-dot.yellow { background: #f59e0b; }
.ctrl-dot.green  { background: #10b981; }

.mockup-title {
  font-family: var(--sb-font-heading);
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-left: 10px;
}
.mockup-pills {
  display: flex;
  gap: 8px;
}
.demo-model-pill {
  font-family: var(--sb-font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 2px 9px;
  border-radius: 999px;
}

/* Subject Tabs */
.mockup-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}
.mockup-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #94a3b8;
  font-family: var(--sb-font-heading);
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.16s ease;
}
.mockup-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.mockup-tab-btn.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

/* Chat Feed */
.mockup-chat-feed {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 240px;
}
.mockup-msg {
  display: flex;
  gap: 12px;
  max-width: 90%;
  animation: fadeIn 0.22s ease;
}
.mockup-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.mockup-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.mockup-avatar.user {
  background: var(--sb-gradient-primary);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}
.mockup-avatar.bot {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #818cf8;
}

.mockup-bubble {
  border-radius: 16px;
  padding: 13px 18px;
  font-size: 13.5px;
  line-height: 1.68;
  transition: opacity 0.16s ease;
}
.mockup-bubble.user {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  color: #ffffff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
}
.mockup-bubble.bot {
  background: rgba(22, 28, 44, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-bottom-left-radius: 3px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.mockup-bubble p { margin-bottom: 8px; }
.mockup-bubble ul { margin: 6px 0 10px 20px; font-size: 13px; }
.mockup-bubble li { margin-bottom: 4px; }
.mockup-bubble code {
  font-family: var(--sb-font-mono);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  color: #38bdf8;
}

/* Verified Book Citation Badge */
.mockup-citation {
  margin-top: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.32);
  padding: 5px 12px;
  border-radius: 7px;
  font-family: var(--sb-font-mono);
  font-size: 11px;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.1);
}

/* Mockup Input Dock */
.mockup-input-dock {
  background: rgba(11, 15, 25, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.dock-icon { font-size: 15px; opacity: 0.6; }
.dock-placeholder { color: var(--sb-text-dim); flex: 1; }
.dock-shortcut {
  font-family: var(--sb-font-mono);
  font-size: 9.5px;
  color: var(--sb-text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
}
.dock-btn {
  background: var(--sb-gradient-primary);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 9px;
  font-family: var(--sb-font-heading);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--sb-primary-glow);
}


/* ──────────────────────────────────────────────────────────────
   HERO STATS BAR
   ────────────────────────────────────────────────────────────── */
.pub-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 850px) {
  .pub-hero__stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .pub-hero__stats { grid-template-columns: 1fr; }
}

.pub-stat {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(14px);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-r-md);
  padding: 22px 18px;
  text-align: center;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.pub-stat:hover {
  border-color: var(--sb-border-hover);
  background: rgba(22, 31, 51, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}
.pub-stat__num {
  font-family: var(--sb-font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pub-stat__label {
  font-size: 0.85rem;
  color: var(--sb-text-muted);
  margin-top: 6px;
  font-weight: 500;
}


/* ──────────────────────────────────────────────────────────────
   BENTO GRID ARCHITECTURE (CORE CAPABILITIES)
   ────────────────────────────────────────────────────────────── */
.pub-bento-section {
  padding: 96px 24px;
  position: relative;
}
.pub-bento-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-badge {
  display: inline-block;
  font-family: var(--sb-font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-header-center {
  text-align: center;
  margin-bottom: 56px;
}
.section-title {
  font-family: var(--sb-font-heading);
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  line-height: 1.22;
  margin-bottom: 14px;
}
.section-sub {
  font-size: 1.08rem;
  color: var(--sb-text-muted);
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Bento Layout */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 950px) {
  .bento-grid { grid-template-columns: 1fr; }
}

.bento-card {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-r-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.bento-card:hover {
  background: rgba(22, 31, 51, 0.9);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 0 24px rgba(99, 102, 241, 0.2);
}

.bento-span-2 {
  grid-column: span 2;
}
@media (max-width: 950px) {
  .bento-span-2 { grid-column: span 1; }
}

.bento-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 4px;
}
.bento-card-icon.indigo  { background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.35); }
.bento-card-icon.cyan    { background: rgba(6, 182, 212, 0.15);  border: 1px solid rgba(6, 182, 212, 0.35); }
.bento-card-icon.emerald { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); }
.bento-card-icon.violet  { background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.35); }

.bento-title {
  font-family: var(--sb-font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}
.bento-desc {
  font-size: 0.95rem;
  color: var(--sb-text-muted);
  line-height: 1.65;
}

/* Interactive RAG Visualization inside Bento */
.rag-visual-box {
  margin-top: 14px;
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rag-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.rag-pill-tag {
  font-family: var(--sb-font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
}
.pill-match { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.pill-chunk { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }


/* ──────────────────────────────────────────────────────────────
   COMPARISON TABLE (STUDY BUDDY VS GENERIC CHATGPT)
   ────────────────────────────────────────────────────────────── */
.pub-compare-section {
  padding: 80px 24px;
  background: rgba(11, 16, 28, 0.45);
  border-top: 1px solid var(--sb-border);
  border-bottom: 1px solid var(--sb-border);
}
.pub-compare-inner {
  max-width: 980px;
  margin: 0 auto;
}

.compare-table-wrapper {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-r-lg);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.compare-table th, .compare-table td {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.compare-table th {
  font-family: var(--sb-font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(11, 15, 25, 0.9);
}
.compare-table th.col-highlight {
  color: #38bdf8;
  background: rgba(99, 102, 241, 0.15);
}
.compare-table td {
  font-size: 13px;
  color: var(--sb-text-muted);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.compare-feature-name {
  font-weight: 600;
  color: #f1f5f9;
}
.compare-badge-yes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #34d399;
  font-weight: 600;
  font-size: 12.5px;
}
.compare-badge-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f87171;
  font-size: 12.5px;
}


/* ──────────────────────────────────────────────────────────────
   FAQ ACCORDION SECTION
   ────────────────────────────────────────────────────────────── */
.pub-faq-section {
  padding: 96px 24px;
}
.pub-faq-inner {
  max-width: 860px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(14px);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-r-md);
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-item:hover {
  border-color: rgba(99, 102, 241, 0.35);
}
.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 20px 24px;
  font-family: var(--sb-font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-chevron {
  font-size: 16px;
  color: #38bdf8;
  transition: transform 0.25s ease;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  display: none;
  padding: 0 24px 22px;
  font-size: 13.5px;
  color: var(--sb-text-muted);
  line-height: 1.7;
}
.faq-item.open .faq-answer {
  display: block;
  animation: fadeIn 0.2s ease;
}


/* ──────────────────────────────────────────────────────────────
   GRAND CALL TO ACTION (CTA)
   ────────────────────────────────────────────────────────────── */
.pub-cta-banner {
  padding: 40px 24px 90px;
}
.pub-cta-inner {
  max-width: 1060px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--sb-r-xl);
  padding: 56px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.cta-title {
  font-family: var(--sb-font-heading);
  font-size: clamp(2rem, 3.8vw, 2.7rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  line-height: 1.2;
}
.cta-sub {
  font-size: 1.1rem;
  color: var(--sb-text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.65;
}


/* ──────────────────────────────────────────────────────────────
   PUBLIC FOOTER
   ────────────────────────────────────────────────────────────── */
.pub-footer {
  background: rgba(7, 9, 14, 0.95);
  border-top: 1px solid var(--sb-border);
  color: var(--sb-text-muted);
  padding: 64px 24px 32px;
  margin-top: auto;
}
.pub-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 40px;
}
.pub-footer__brand p {
  font-size: 0.9rem;
  color: var(--sb-text-dim);
  margin-top: 12px;
  line-height: 1.65;
  max-width: 320px;
}
.footer-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.f-badge {
  font-family: var(--sb-font-mono);
  font-size: 10px;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
}

.pub-footer__col h4 {
  font-family: var(--sb-font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.pub-footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pub-footer__col ul li a {
  font-size: 0.9rem;
  color: var(--sb-text-dim);
  transition: color 0.15s;
}
.pub-footer__col ul li a:hover {
  color: #38bdf8;
}

.pub-footer__divider {
  max-width: 1180px;
  margin: 40px auto 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.pub-footer__bottom {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--sb-text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────────────────
   SUBPAGE SHARED LAYOUT & HERO SYSTEM
   ────────────────────────────────────────────────────────────── */
.pub-page-hero {
  padding: 68px 24px 44px;
  text-align: center;
  position: relative;
}
.pub-page-hero__inner {
  max-width: 860px;
  margin: 0 auto;
}
.pub-page-hero .section-title {
  margin-top: 14px;
  font-size: clamp(2.3rem, 4.5vw, 3.4rem);
}
.pub-page-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Grid & Cards for Subpages */
.pub-subpage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 950px) {
  .pub-subpage-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .pub-subpage-grid { grid-template-columns: 1fr; }
}

.pub-resource-card {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.pub-resource-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(22, 31, 51, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}
.pub-resource-icon {
  font-size: 26px;
  margin-bottom: 4px;
}
.pub-resource-title {
  font-family: var(--sb-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}
.pub-resource-desc {
  font-size: 0.92rem;
  color: var(--sb-text-muted);
  line-height: 1.6;
  flex: 1;
}
.pub-resource-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: var(--sb-text-dim);
}

/* Category Filter Pills */
.pub-filter-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.pub-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sb-border);
  color: var(--sb-text-muted);
  padding: 7px 16px;
  border-radius: var(--sb-r-full);
  font-family: var(--sb-font-heading);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pub-filter-btn:hover, .pub-filter-btn.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
  color: #ffffff;
}

