/* ─── Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ─── Theme tokens ─────────────────────────── */
:root {
  --g:       #30C245;
  --g-dim:   #27a339;
  --au:      #DFA020;
  --font:    'DM Sans', sans-serif;
  --radius:  16px;
  --trans:   0.3s ease;
}

/* DARK */
[data-theme="dark"] {
  --bg:             #07111D;
  --bg2:            #0D1C2E;
  --nav-bg:         rgba(7,17,29,0.88);
  --line:           rgba(255,255,255,0.07);
  --muted:          rgba(255,255,255,0.38);
  --body-c:         rgba(255,255,255,0.68);
  --heading:        #FFFFFF;
  --card-bg:        #0D1C2E;
  --card-bd:        rgba(255,255,255,0.07);
  --feat-hover:     rgba(48,194,69,0.2);
  --stat-bg:        rgba(255,255,255,0.04);
  --cta-bg:         linear-gradient(135deg,rgba(48,194,69,0.12) 0%,rgba(11,25,41,0.8) 60%);
  --cta-bd:         rgba(48,194,69,0.2);
  --grid-ln:        rgba(48,194,69,0.025);
  --shadow:         none;
  --btn-ghost-bd:   rgba(255,255,255,0.15);
  --btn-ghost-c:    rgba(255,255,255,0.68);
  --btn-ghost-hbd:  rgba(255,255,255,0.35);
  --toggle-bg:      rgba(255,255,255,0.08);
  --toggle-c:       #ffffff;
}

/* LIGHT */
[data-theme="light"] {
  --bg:             #F5F7F2;
  --bg2:            #FFFFFF;
  --nav-bg:         rgba(245,247,242,0.92);
  --line:           rgba(0,0,0,0.08);
  --muted:          rgba(0,0,0,0.4);
  --body-c:         rgba(0,0,0,0.6);
  --heading:        #0B1929;
  --card-bg:        #FFFFFF;
  --card-bd:        rgba(0,0,0,0.08);
  --feat-hover:     rgba(48,194,69,0.12);
  --stat-bg:        rgba(0,0,0,0.03);
  --cta-bg:         linear-gradient(135deg,rgba(48,194,69,0.08) 0%,rgba(240,247,241,0.9) 60%);
  --cta-bd:         rgba(48,194,69,0.25);
  --grid-ln:        rgba(48,194,69,0.06);
  --shadow:         0 2px 16px rgba(0,0,0,0.06);
  --btn-ghost-bd:   rgba(0,0,0,0.15);
  --btn-ghost-c:    rgba(0,0,0,0.65);
  --btn-ghost-hbd:  rgba(0,0,0,0.3);
  --toggle-bg:      rgba(0,0,0,0.06);
  --toggle-c:       #0B1929;
}

/* ─── Base ─────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--heading);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background var(--trans), color var(--trans);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-ln) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-ln) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Nav ──────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  height: 68px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background var(--trans), border-color var(--trans);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-wordmark {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--g);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--heading); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Theme Toggle ─────────────────────────── */
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--toggle-bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--trans), transform 0.15s;
  color: var(--toggle-c);
}
.theme-toggle:hover { transform: scale(1.08); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ─── Buttons ──────────────────────────────── */
.btn-ghost {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--heading); }

.btn-primary {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--g);
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover { background: var(--g-dim); transform: translateY(-1px); }

.btn-hero {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--g);
  border: none;
  border-radius: 10px;
  padding: 14px 32px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-hero:hover { background: var(--g-dim); transform: translateY(-2px); }

.btn-hero-ghost {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  color: var(--btn-ghost-c);
  background: none;
  border: 1px solid var(--btn-ghost-bd);
  border-radius: 10px;
  padding: 14px 32px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}
.btn-hero-ghost:hover { border-color: var(--btn-ghost-hbd); color: var(--heading); }

/* ─── Footer ───────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 48px 5vw;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 40px;
  transition: border-color var(--trans);
}
.footer-tagline {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  max-width: 280px;
  margin-top: 14px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--heading); }

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 20px 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color var(--trans);
}
.footer-bottom span { font-size: 12px; color: var(--muted); }
.footer-bottom a { color: var(--muted); text-decoration: none; font-size: 12px; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--heading); }

/* ─── Animations ───────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.7); }
}

/* ─── Responsive ────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  footer { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
