/* ═══════════════════════════════════════════════
   SEO IS ALIVE — Shared Design System
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&family=Space+Mono:wght@400;700&display=swap');

/* ── DARK THEME (default) ── */
:root, [data-theme="dark"] {
  --bg:           oklch(0.11 0.025 240);
  --bg2:          oklch(0.14 0.03 240);
  --bg3:          oklch(0.18 0.03 235);
  --green:        oklch(0.78 0.22 145);
  --green-dim:    oklch(0.55 0.16 145);
  --green-pale:   oklch(0.22 0.07 145);
  --blue:         oklch(0.62 0.18 232);
  --blue-dim:     oklch(0.42 0.13 232);
  --blue-pale:    oklch(0.20 0.07 232);
  --amber:        oklch(0.78 0.18 75);
  --amber-pale:   oklch(0.22 0.06 75);
  --fg:           oklch(0.96 0.008 240);
  --fg2:          oklch(0.70 0.02 240);
  --fg3:          oklch(0.48 0.02 240);
  --border:       oklch(0.25 0.03 240);
  --shadow:       oklch(0 0 0 / 0.25);
  --shadow-lg:    oklch(0 0 0 / 0.40);
  --nav-bg:       oklch(0.11 0.025 240 / 0.90);
  --card-bg:      oklch(0.14 0.03 240);
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg:           oklch(0.99 0.004 240);
  --bg2:          oklch(0.96 0.006 230);
  --bg3:          oklch(0.93 0.008 230);
  --green:        oklch(0.52 0.18 145);
  --green-dim:    oklch(0.68 0.14 145);
  --green-pale:   oklch(0.94 0.06 145);
  --blue:         oklch(0.48 0.18 232);
  --blue-dim:     oklch(0.65 0.13 232);
  --blue-pale:    oklch(0.93 0.06 232);
  --amber:        oklch(0.72 0.16 75);
  --amber-pale:   oklch(0.96 0.05 80);
  --fg:           oklch(0.12 0.02 240);
  --fg2:          oklch(0.38 0.02 240);
  --fg3:          oklch(0.58 0.015 240);
  --border:       oklch(0.88 0.012 230);
  --shadow:       oklch(0 0 0 / 0.07);
  --shadow-lg:    oklch(0 0 0 / 0.12);
  --nav-bg:       oklch(0.99 0.004 240 / 0.90);
  --card-bg:      oklch(1 0 0);
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  gap: 20px;
  transition: background 0.3s, border-color 0.3s;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--fg);
  flex-shrink: 0;
}
.nav-logo .dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--fg2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--green); border-bottom-color: var(--green); }

.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  color: var(--fg2);
}
.theme-toggle:hover { border-color: var(--green-dim); color: var(--green); }

.nav-cta {
  background: var(--green);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
}
.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: transparent;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--fg); border-radius: 2px; transition: all 0.3s; }

.nav-mobile {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  z-index: 190;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav-mobile .mobile-cta {
  margin-top: 10px;
  background: var(--green);
  color: #fff;
  padding: 13px;
  text-align: center;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  text-decoration: none;
}

/* ─── PAGE WRAPPER ─── */
.page-wrap {
  padding-top: 68px;
  min-height: 100vh;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--fg3);
  letter-spacing: 0.04em;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--fg3); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .sep { opacity: 0.5; }

/* ─── SECTION LABEL ─── */
.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before { content: ''; display: inline-block; width: 20px; height: 1px; background: var(--green); }

/* ─── BADGES / TAGS ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 9px;
  border-radius: 4px;
  white-space: nowrap;
}
.badge-green  { background: var(--green-pale); color: var(--green); border: 1px solid oklch(0.52 0.18 145 / 0.2); }
.badge-blue   { background: var(--blue-pale);  color: var(--blue);  border: 1px solid oklch(0.48 0.18 232 / 0.2); }
.badge-amber  { background: var(--amber-pale); color: var(--amber); border: 1px solid oklch(0.72 0.16 75 / 0.2); }
.badge-gray   { background: var(--bg3); color: var(--fg3); border: 1px solid var(--border); }

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--green);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 24px oklch(0.52 0.18 145 / 0.22); }

.btn-secondary {
  color: var(--fg2);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: transparent;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--blue-dim); color: var(--fg); background: var(--blue-pale); }

/* ─── CARDS ─── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.22s;
}
.card:hover { border-color: oklch(0.48 0.18 232 / 0.3); box-shadow: 0 12px 40px var(--shadow-lg); transform: translateY(-2px); }

/* ─── FOOTER ─── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 52px 72px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; }
.footer-tagline { font-size: 13px; color: var(--fg3); line-height: 1.6; max-width: 200px; margin-bottom: 20px; }
.footer-social { display: flex; gap: 8px; }
.social-btn { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; transition: all 0.2s; color: var(--fg3); background: transparent; }
.social-btn:hover { border-color: var(--blue-dim); color: var(--blue); }
.footer-col-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 13px; margin-bottom: 14px; color: var(--fg); }
.footer-links { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.footer-links a { color: var(--fg3); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--fg); }
.footer-bottom { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-copy { font-family: 'Space Mono', monospace; font-size: 10px; color: var(--fg3); }

/* ─── SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── TICKER ─── */
.ticker { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg2); padding: 12px 0; overflow: hidden; }
.ticker-track { display: flex; animation: ticker-anim 28s linear infinite; width: max-content; }
.ticker-item { display: flex; align-items: center; gap: 10px; padding: 0 32px; font-family: 'Space Mono', monospace; font-size: 10px; color: var(--fg3); text-transform: uppercase; letter-spacing: 0.07em; white-space: nowrap; }
.ticker-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
@keyframes ticker-anim { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ─── PROSE (article content) ─── */
.prose { max-width: 720px; }
.prose h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.025em;
  margin: 40px 0 14px;
  color: var(--fg);
  line-height: 1.2;
}
.prose h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  margin: 28px 0 10px;
  color: var(--fg);
}
.prose p { color: var(--fg2); line-height: 1.75; margin-bottom: 18px; font-size: 16px; font-weight: 300; }
.prose ul, .prose ol { color: var(--fg2); line-height: 1.75; margin-bottom: 18px; padding-left: 24px; font-weight: 300; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { color: var(--green); text-decoration: none; border-bottom: 1px solid oklch(0.52 0.18 145 / 0.3); transition: border-color 0.2s; }
.prose a:hover { border-color: var(--green); }
.prose .callout {
  background: var(--green-pale);
  border-left: 3px solid var(--green);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}
.prose .callout p { color: var(--fg); margin-bottom: 0; font-weight: 400; font-size: 14px; }
.prose img { width: 100%; border-radius: 10px; border: 1px solid var(--border); margin: 24px 0; }

/* ─── GLOSSARY LAYOUT (What-Is Pages) ─── */
.what-is-layout {
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  gap: 28px;
  align-items: start;
  padding: 40px 0 80px;
}

.glossary-nav-sidebar {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
}

.glossary-nav-sidebar::-webkit-scrollbar { width: 4px; }
.glossary-nav-sidebar::-webkit-scrollbar-track { background: transparent; }
.glossary-nav-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.gn-header {
  padding: 12px 14px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg2);
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}

.gn-section { border-bottom: 1px solid var(--border); }
.gn-section:last-child { border-bottom: none; }

.gn-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition);
  color: var(--fg2);
}

.gn-btn:hover { background: var(--green-pale); }
.gn-btn.open { background: var(--green-pale); }

.gn-letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--fg3);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gn-btn.open .gn-letter { background: var(--green); }

.gn-label {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--fg2);
  flex: 1;
  text-align: left;
}

.gn-chevron {
  font-size: 0.68rem;
  color: var(--fg3);
  transition: transform 0.22s;
}

.gn-btn.open .gn-chevron { transform: rotate(180deg); }

.gn-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.gn-link {
  display: block;
  padding: 6px 12px 6px 46px;
  font-size: 0.77rem;
  color: var(--green);
  border-top: 1px solid var(--border);
  transition: all var(--transition);
  text-decoration: none;
}

.gn-link:hover { background: var(--bg3); color: var(--green); }
.gn-link.gn-current { color: var(--green); font-weight: 600; background: var(--green-pale); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  footer { padding: 40px 24px; grid-template-columns: 1fr 1fr; gap: 32px; }
  .what-is-layout { grid-template-columns: 1fr; }
  .what-is-layout > * { min-width: 0; }
  .glossary-nav-sidebar { display: none; }
}

@media (max-width: 560px) {
  nav { padding: 0 16px; }
  .nav-cta { display: none; }
  footer { grid-template-columns: 1fr; gap: 24px; padding: 32px 16px; }
  .what-is-layout { padding: 24px 0 60px; }
}
