/* ============================================================
   BASE — Reset, typography, body defaults, keyframes
   ============================================================ */

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

body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Smooth theme transitions on key elements */
body, .hero, .stage-box, .entity, .mode, .callout, .insight,
.gloss-group, .iface-cell, .theme-switcher {
  transition: background-color 0.3s ease, color 0.3s ease,
              border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Dark mode: bump light (300) weights to regular (400) for readability */
[data-mode="dark"] {
  --weight-light: 400;
}
[data-mode="light"] {
  --weight-light: 300;
}

/* ── Typography defaults ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: hsl(var(--primary) / 0.8);
}

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

@keyframes flash-border {
  0%, 100% { box-shadow: -4px 0 0 0 transparent; }
  20%, 80% { box-shadow: -4px 0 0 0 var(--human); }
}
