html {
  /* Prevent horizontal "wiggle" when navigating between pages with/without vertical scrollbars */
  scrollbar-gutter: stable;
  overflow-y: scroll; /* fallback for browsers without scrollbar-gutter */
}

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-light: #475569;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --accent: #10b981;
  --accent-light: #d1fae5;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Navigation */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 1rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.nav-links a.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.12);
}

.nav-cta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: var(--panel);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-support {
  background: var(--warning);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-support:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.menu-toggle {
  display: none;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.page-header-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

/* Section */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* Footer */
footer.site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 900;
  color: white;
  margin-bottom: 0.75rem;
}

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

.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 1.5rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  body.nav-open .nav-links { display: flex; }

  .nav-links a {
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
  }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .btn { width: 100%; }
  .nav-cta { width: 100%; justify-content: flex-end; }
}
