/* DM Sans is loaded via a <link> in index.html (parallel fetch instead of a
   render-blocking @import chain: css → font-css → font). */

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

/* ══════════════════════════════════════
   LIGHT MODE (default)
   New palette — derived from brand blue #225fe6
   ══════════════════════════════════════ */
:root {
  --blue: #225fe6;
  --blue-dark: #1a4fc4;
  --blue-light: #eef2ff;
  --dark: #0c152d;
  --body: #2b3a50;
  --muted: #6b7a8e;
  --border: #dce3f0;
  --bg: #f5f7fc;
  --white: #ffffff;
  --green: oklch(0.62 0.13 152);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 4px rgba(12,21,45,.06);
  --shadow: 0 4px 20px rgba(12,21,45,.08);
  --shadow-lg: 0 12px 48px rgba(12,21,45,.12);
  --font: 'DM Sans', system-ui, sans-serif;

  /* Theme toggle */
  --toggle-bg: var(--bg);
  --toggle-border: var(--border);
  --toggle-icon: var(--muted);
}

/* ══════════════════════════════════════
   DARK MODE
   Old brand palette — deep blue
   ══════════════════════════════════════ */
[data-theme="dark"] {
  --blue: #225fe6;
  --blue-dark: #6c98ef;
  --blue-light: #0c152d;
  --dark: #f0f4f8;
  --body: #c8d1dc;
  --muted: #94a0b2;
  --border: #1b263b;
  --bg: #060e1f;
  --white: #030719;
  --green: oklch(0.72 0.15 152);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.3);
  --shadow: 0 4px 20px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.5);

  /* Comparison table legacy column */
  --legacy-th-bg: #1a1020;
  --legacy-bg: #120d18;
  --legacy-text: #c47070;

  --toggle-bg: #0c152d;
  --toggle-border: #1b263b;
  --toggle-icon: #6c98ef;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--body);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex; align-items: center;
  transition: background .3s, border-color .3s;
}
[data-theme="dark"] .navbar {
  background: rgba(3,7,25,0.92);
}

.nav-inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 0 32px;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; margin-right: 12px; }
.nav-logo img { height: 28px; transition: filter .3s; }
[data-theme="dark"] .nav-logo img { filter: brightness(0) invert(1); }

.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-item { position: relative; padding-bottom: 12px; margin-bottom: -12px; }
.nav-item > a, .nav-item > button {
  font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--body);
  text-decoration: none; border: none; background: none; cursor: pointer;
  padding: 8px 12px; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 4px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-item > a:hover, .nav-item > button:hover { color: var(--blue); background: var(--blue-light); }
.nav-item > a.active { color: var(--blue); }
.dropdown-arrow { font-size: 10px; opacity: .6; transition: transform .2s; }
.nav-item:hover .dropdown-arrow { transform: rotate(180deg); }

.dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 200px; padding: 8px;
  transition: background .3s, border-color .3s;
}
[data-theme="dark"] .dropdown {
  background: #0c152d;
  border-color: #1b263b;
}
.nav-item:hover .dropdown { display: block; }
.dropdown a {
  display: block; padding: 10px 14px; font-size: 14px; color: var(--body);
  text-decoration: none; border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.dropdown a:hover { background: var(--blue-light); color: var(--blue); }
.dropdown a span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 1px; }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--toggle-icon);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
  transform: rotate(15deg);
}

/* ── BUTTONS (nav) ── */
.btn-ghost {
  font-family: var(--font); font-size: 14px; font-weight: 500;
  color: var(--body); background: none; border: none; cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none;
  transition: color .15s, background .15s;
}
.btn-ghost:hover { color: var(--blue); background: var(--blue-light); }
.btn-outline {
  font-family: var(--font); font-size: 14px; font-weight: 500;
  color: var(--blue); background: none; border: 1.5px solid var(--blue);
  cursor: pointer; padding: 8px 18px; border-radius: var(--radius-sm);
  text-decoration: none; transition: all .15s;
}
.btn-outline:hover { background: var(--blue-light); }
.btn-primary {
  font-family: var(--font); font-size: 14px; font-weight: 600;
  color: #ffffff; background: var(--blue); border: none; cursor: pointer;
  padding: 9px 20px; border-radius: var(--radius-sm); text-decoration: none;
  transition: background .15s, transform .1s; white-space: nowrap;
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:active { transform: scale(.98); }

/* ── SECTIONS ── */
section { padding: 96px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px); font-weight: 700;
  color: var(--dark); line-height: 1.2; margin-bottom: 16px;
}
.section-subtitle { font-size: 17px; color: var(--muted); max-width: 600px; line-height: 1.6; }
.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ── BUTTONS (large) ── */
.btn-lg {
  font-family: var(--font); font-size: 16px; font-weight: 600;
  padding: 14px 28px; border-radius: var(--radius-sm); cursor: pointer;
  border: none; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; transition: all .15s;
}
.btn-lg.primary { background: var(--blue); color: #ffffff; }
.btn-lg.primary:hover { background: var(--blue-dark); }
.btn-lg.secondary { background: var(--white); color: var(--dark); border: 1.5px solid var(--border); }
.btn-lg.secondary:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

/* ── CARDS ── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm);
  transition: background .3s, border-color .3s;
}

/* ── FOOTER ── */
footer {
  background: var(--dark); color: #A8BED0; padding: 64px 0 32px;
  transition: background .3s;
}
[data-theme="dark"] footer { background: #020510; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand img { height: 28px; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 260px; color: #6A8A9E; }
.footer-col h4 {
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: #D0E4F0; margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 14px; color: #6A8A9E;
  text-decoration: none; margin-bottom: 10px; transition: color .15s;
}
.footer-col a:hover { color: var(--blue); }
[data-theme="dark"] .footer-col a:hover { color: #6c98ef; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #4A6275;
}
.footer-bottom a { color: #4A6275; text-decoration: none; }
.footer-bottom a:hover { color: var(--blue); }
[data-theme="dark"] .footer-bottom a:hover { color: #6c98ef; }

/* ── UTILITIES ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.badge.blue { background: var(--blue-light); color: var(--blue); }
.badge.green { background: oklch(0.95 0.05 152); color: var(--green); }
.divider { height: 1px; background: var(--border); margin: 0; border: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions .btn-ghost,
  .nav-actions .btn-outline { display: none; }
  section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
