/* ============================================================
   mind4all.com — Design System
   No framework. Custom properties. Dark-first.
   Accent: Emerald (#34d399) — matches the MIND logo glow.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

/* ============================================================
   TOKENS — Dark (default)
   ============================================================ */
:root {
  --bg:          #050a05;
  --bg-alt:      #080f08;
  --surface:     #0d1a0d;
  --surface-2:   #111f11;
  --border:      #1a2e1a;
  --border-2:    #234023;

  --text:        #e8f5e8;
  --text-2:      #9ab89a;
  --muted:       #4d6b4d;

  --accent:      #34d399;
  --accent-2:    #6ee7b7;
  --accent-dim:  rgba(52, 211, 153, 0.10);
  --accent-glow: rgba(52, 211, 153, 0.20);

  --radius:      10px;
  --radius-lg:   16px;

  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'Inter', system-ui, sans-serif;

  --transition: 180ms ease;

  color-scheme: dark;
}

/* ============================================================
   TOKENS — Light
   ============================================================ */
[data-theme="light"] {
  --bg:          #f0faf4;
  --bg-alt:      #e6f5ed;
  --surface:     #ffffff;
  --surface-2:   #f0faf4;
  --border:      #c8e8d4;
  --border-2:    #a8d8bc;

  --text:        #0a1a0a;
  --text-2:      #2d5a3d;
  --muted:       #6b9b7b;

  --accent:      #059669;
  --accent-2:    #34d399;
  --accent-dim:  rgba(5, 150, 105, 0.10);
  --accent-glow: rgba(5, 150, 105, 0.18);

  color-scheme: light;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--accent-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }

img, svg { display: block; max-width: 100%; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { color: var(--text-2); }

code, .code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  color: var(--accent);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container       { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

section { padding: 96px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: none; }

/* ============================================================
   SITE HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 10, 5, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

[data-theme="light"] .site-header {
  background: rgba(240, 250, 244, 0.90);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo — image + wordmark */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo__img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  /* logo has black bg — make it blend on dark, invert on light */
  border-radius: 6px;
}

[data-theme="light"] .site-logo__img {
  filter: none;
  background: #0a0a0a;
  padding: 2px;
}

.site-logo__text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.08em;
}

.site-logo__text span { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--transition);
}
.site-nav a:hover,
.site-nav a.active { color: var(--text); }

.site-nav__actions { display: flex; align-items: center; gap: 12px; }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  background: transparent;
  cursor: pointer;
  color: var(--text-2);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.theme-toggle svg { width: 16px; height: 16px; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #000 !important;
  border-color: var(--accent);
  font-weight: 700;
}
.btn--primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #000 !important;
  box-shadow: 0 0 28px var(--accent-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}
.btn--ghost:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.btn--sm { padding: 8px 16px; font-size: 0.875rem; }

.btn:disabled, .btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-2); }

.card__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}

.card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.card p  { font-size: 0.9375rem; line-height: 1.6; }

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--text-2);
  max-width: 600px;
  line-height: 1.7;
  margin-top: 16px;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0; }

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-footer__copy { font-size: 0.8125rem; color: var(--muted); }

.site-footer__links { display: flex; gap: 24px; }
.site-footer__links a { font-size: 0.8125rem; color: var(--muted); }
.site-footer__links a:hover { color: var(--text-2); }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--muted); }
.text-center { text-align: center; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mt-8  { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }

  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    z-index: 99;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 24px; width: 100%; }
  .site-nav__actions { padding: 10px 24px; width: 100%; border-top: 1px solid var(--border); margin-top: 4px; }
  .nav-toggle { display: flex; }
  .site-header { position: relative; }
}
