@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Brand Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --accent-dark: #b45309;

  --success: #16a34a;
  --success-light: #dcfce7;

  /* Neutral Slate Palette */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --bg-color: #ffffff;
  --surface-color: #f8fafc;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;

  --container-width: 1180px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

.header-container {
  max-width: var(--container-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--slate-900);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

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

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--slate-600);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--primary);
  color: white !important;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Hero Section */
.hero {
  background: radial-gradient(1200px 400px at 50% 0%, #eff6ff 0%, #ffffff 100%);
  padding: 64px 24px 48px;
  border-bottom: 1px solid var(--slate-200);
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-amber {
  background-color: var(--accent-light);
  color: var(--accent-dark);
  border-color: #fde68a;
}

.badge-green {
  background-color: var(--success-light);
  color: var(--success);
  border-color: #bbf7d0;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--slate-900);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--slate-600);
  max-width: 640px;
  margin: 0 auto 24px;
}

.meta-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 0.88rem;
  color: var(--slate-500);
  flex-wrap: wrap;
}

.meta-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Main Hub / Layout */
.hub-content {
  max-width: var(--container-width);
  margin: 48px auto 80px;
  padding: 0 24px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 56px;
}

.hub-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-border);
}

.hub-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.hub-card-icon.amber {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.hub-card-icon.green {
  background: var(--success-light);
  color: var(--success);
}

.hub-card h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 12px;
}

.hub-card p {
  font-size: 0.95rem;
  color: var(--slate-600);
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

/* Legal Document Layout */
.doc-wrapper {
  max-width: var(--container-width);
  margin: 40px auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 24px;
  max-height: calc(100vh - var(--header-height) - 48px);
  overflow-y: auto;
}

.doc-sidebar h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  margin-bottom: 16px;
}

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

.doc-toc a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--slate-600);
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  line-height: 1.4;
}

.doc-toc a:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.doc-body {
  min-width: 0;
}

.doc-article {
  background: white;
}

.doc-article section {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--slate-200);
}

.doc-article section:last-child {
  border-bottom: none;
}

.doc-article h2 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.doc-article h2 .section-num {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 700;
}

.doc-article h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--slate-800);
  margin: 24px 0 12px;
}

.doc-article p {
  margin-bottom: 16px;
  color: var(--slate-700);
}

.doc-article ul,
.doc-article ol {
  margin: 0 0 20px 24px;
  color: var(--slate-700);
}

.doc-article li {
  margin-bottom: 8px;
}

.doc-article strong {
  color: var(--slate-900);
}

/* Callout Box */
.callout {
  background-color: var(--slate-50);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px;
  margin: 24px 0;
}

.callout-amber {
  background-color: #fffbeb;
  border-left-color: var(--accent);
}

.callout-green {
  background-color: #f0fdf4;
  border-left-color: var(--success);
}

.callout h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Tables in Docs */
.doc-table-container {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.doc-table th {
  background-color: var(--slate-100);
  color: var(--slate-800);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--slate-200);
}

.doc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
}

.doc-table tr:last-child td {
  border-bottom: none;
}

/* App Info Box */
.app-meta-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.app-meta-item h5 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  margin-bottom: 4px;
}

.app-meta-item p {
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: var(--slate-900);
  color: var(--slate-400);
  padding: 48px 24px 32px;
  margin-top: auto;
  border-top: 1px solid var(--slate-800);
}

.footer-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  max-width: 380px;
}

.footer-brand .brand-logo {
  color: white;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col h5 {
  font-family: var(--font-heading);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--slate-400);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--slate-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive */
@media (max-width: 900px) {
  .doc-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .doc-sidebar {
    position: static;
    max-height: none;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 40px 20px 32px;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .footer-top {
    flex-direction: column;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .doc-sidebar,
  .btn-primary {
    display: none !important;
  }

  .doc-wrapper {
    display: block;
    padding: 0;
    margin: 0;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
