/* ═══════════════════════════════════════════════════════════════
   eSIMDB Design System — Unified Tokens & Layout
   Shared across ALL pages (landing, chat, legal, etc.)
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Brand tokens */
  --font-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --color-primary: #000000;
  --color-accent: #0B57D0;
  --color-accent-soft: rgba(11, 87, 208, 0.08);
  --color-text: #1F2936;
  --color-muted: #64748B;
  --color-bg: #F2F6FF;
  --color-surface: #FFFFFF;
  --color-border: rgba(31, 41, 54, 0.12);
  --color-border-hover: rgba(31, 41, 54, 0.24);

  --color-success: #15803D;
  --color-success-soft: #E9F8EF;
  --color-warn: #B45309;
  --color-warn-soft: #FFF7ED;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  line-height: 1.5;
  padding-top: 64px;
}

/* ── Utilities ─────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* ── Universal Header ─────────────────────────────────────── */
.universal-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(242, 246, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s ease;
}

.universal-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.universal-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

@media (min-width: 768px) {
  .universal-header__inner { padding: 0 32px; }
}

.universal-brand {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
}

.universal-brand .brand-logo {
  height: 42px;
  width: auto;
  display: block;
}

.universal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.universal-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: color 0.2s, background 0.2s;
}

.universal-nav a:hover {
  color: var(--color-text);
}

.universal-nav a.is-active {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions .link-login {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-muted);
  transition: color 0.2s;
  display: none;
}

.header-actions .link-login:hover {
  color: var(--color-text);
}

.header-actions .btn-try {
  display: none;
  padding: 8px 20px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
}

.header-actions .btn-try:hover { opacity: 0.88; }

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--color-text);
  padding: 0;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: 16px 24px 24px;
  z-index: 99;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu a:last-child { border-bottom: none; }

.mobile-menu a.is-active {
  color: var(--color-accent);
}

.mobile-menu .mobile-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  margin-top: 4px;
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
  .header-actions .link-login,
  .header-actions .btn-try { display: inline-flex; }
}

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

/* ── Universal Footer ─────────────────────────────────────── */
.universal-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.universal-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px;
}

@media (min-width: 768px) {
  .universal-footer__inner { padding: 56px 32px; }
}

.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.5fr repeat(4, 1fr);
}

.footer-brand .universal-brand {
  display: inline-block;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-muted);
  max-width: 260px;
  line-height: 1.6;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--color-muted);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--color-text); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--color-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 13px;
  color: var(--color-muted);
  transition: color 0.2s;
}

.footer-bottom-links a:hover { color: var(--color-text); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Buttons (shared) ──────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: transparent;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-outline:hover {
  border-color: var(--color-border-hover);
  color: var(--color-accent);
}

/* ── Card base ─────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
