/* ═══════════════════════════════════════════════════════════════════════════
   BibitStudio — Main Studio Legal & Policy Stylesheet
   100% Clean • Zero Decorative Emoji Characters • Modern Glassmorphic Theme
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --brand-primary: #0066FF;
  --brand-secondary: #00C6FF;
  --brand-gradient: linear-gradient(135deg, #00C6FF 0%, #0066FF 100%);
  --brand-glow: rgba(0, 102, 255, 0.25);

  --bg-main: #0B101B;
  --bg-card: #131B2E;
  --bg-card-hover: #19233C;
  --bg-subtle: #19233C;
  --bg-pill: rgba(0, 198, 255, 0.1);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-white: #FFFFFF;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --max-w: 1200px;
}

[data-theme="light"] {
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;
  --bg-subtle: #F1F5F9;
  --bg-pill: rgba(0, 102, 255, 0.08);
  --border-card: rgba(148, 163, 184, 0.22);
  --border-subtle: rgba(148, 163, 184, 0.14);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-white: #0F172A;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.65;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  transition: all 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

.bg-glow-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}

.orb-1 {
  top: -100px;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 198, 255, 0.25) 0%, transparent 70%);
}

.orb-2 {
  bottom: 10%;
  right: -50px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.2) 0%, transparent 70%);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  height: 72px;
  background: rgba(11, 16, 27, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}

[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.85);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.1;
  display: block;
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-secondary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 14px var(--brand-glow);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.doc-hero {
  padding: 56px 0 32px;
  text-align: center;
}

.breadcrumb-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-nav a:hover {
  color: var(--brand-secondary);
}

.doc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--bg-pill);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.doc-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 14px;
}

.doc-hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 20px;
}

/* ── Layout & Document ───────────────────────────────────────────────────── */
.doc-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  padding: 40px 0 80px;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: 96px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-link {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  line-height: 1.4;
}

.toc-link:hover, .toc-link.active {
  color: var(--brand-secondary);
  background: var(--bg-pill);
  font-weight: 600;
}

.doc-body {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 48px;
}

.doc-section {
  margin-bottom: 44px;
  scroll-margin-top: 100px;
}

.doc-section h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-secondary);
  background: var(--bg-pill);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-section p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.doc-section ul {
  padding-left: 24px;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-secondary);
}

.doc-section strong {
  color: var(--text-white);
}

.doc-callout {
  background: var(--bg-pill);
  border-left: 4px solid var(--brand-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin: 24px 0;
}

.doc-callout p {
  margin-bottom: 0;
  color: var(--text-primary);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 32px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.footer-nav-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-nav-links a:hover {
  color: var(--brand-secondary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 14px;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-legal-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-legal-links a:hover {
  color: var(--brand-secondary);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .doc-layout {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .doc-sidebar {
    position: static;
    min-width: 0;
  }
  .doc-body {
    padding: 24px 16px;
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .site-header {
    height: 62px;
  }
  .site-header .btn {
    display: none;
  }
  .brand-tagline {
    display: none;
  }
  .footer-top, .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .footer-nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .footer-legal-links {
    flex-wrap: wrap;
    gap: 10px 14px;
  }
}
