/* ==========================================================================
   Ninja Pandas — Base
   Reset, typography, page scaffolding. No component styles in here.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--np-bg);
  color: var(--np-ink);
  font-family: var(--np-font);
  font-size: var(--np-text-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--np-s3);
}

h1 { font-size: var(--np-text-xl); font-weight: 750; }
h2 { font-size: var(--np-text-lg); font-weight: 700; }
h3 { font-size: var(--np-text-md); font-weight: 650; }

p { margin: 0 0 var(--np-s3); }

a { color: var(--np-accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

::selection { background: var(--np-accent-dim); color: var(--np-ink); }

/* Layout primitives
   -------------------------------------------------------------------- */

.wrap {
  max-width: var(--np-maxw);
  margin-inline: auto;
  padding-inline: var(--np-s4);
}

.section { padding-block: var(--np-s6); }
.section + .section { padding-top: 0; }

.muted { color: var(--np-ink-muted); }
.small { font-size: var(--np-text-sm); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--np-s4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--np-s4);
}

/* Accessibility
   -------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--np-accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Screen-reader-only text */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
