/* =================================================================
   base.css — grc.engineering shared stylesheet
   Loaded by every page. Do NOT add :root variable declarations here.
   Variables are managed by nav.js and per-page <style> blocks.
   ================================================================= */

/* 1. Box-sizing reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

/* 2. Body defaults */
body {
  font-family: var(--font-body, 'Sora', -apple-system, BlinkMacSystemFont, sans-serif);
  background: var(--bg, var(--navy-900, #0a0e1a));
  color: var(--text, var(--slate-200, #e2e8f0));
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 3. Container */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* 4. Typography */
h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--slate-50, #f8fafc);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--slate-50, #f8fafc);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--navy-700, #1e293b);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--slate-50, #f8fafc);
  margin: 1.5rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--slate-300, #cbd5e1);
}

a {
  color: var(--cyan, #22d3ee);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
li {
  margin-bottom: 0.35rem;
  color: var(--slate-300, #cbd5e1);
}

code {
  font-family: var(--font-mono, 'Fira Code', 'Consolas', monospace);
  font-size: 0.85em;
  color: var(--cyan, #22d3ee);
  background: var(--navy-800, #0f172a);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-xs, 4px);
}

/* 5. Utility classes */
.lede {
  font-size: 1.1rem;
  color: var(--slate-300, #cbd5e1);
  margin-bottom: 1.5rem;
  max-width: 680px;
}

.muted {
  color: var(--slate-400, #94a3b8);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--cyan, #22d3ee);
  background: var(--glow-cyan-medium, rgba(34,211,238,0.1));
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs, 4px);
  margin-bottom: 1rem;
  font-family: var(--font-mono, 'Fira Code', monospace);
}

/* 6. Components */
.card {
  background: var(--surface, var(--navy-800, #0f172a));
  border: 1px solid var(--navy-700, #1e293b);
  border-radius: var(--radius, 10px);
  padding: 1.5rem;
}

.callout {
  background: var(--surface, var(--navy-800, #0f172a));
  border: 1px solid var(--navy-700, #1e293b);
  border-radius: var(--radius, 10px);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.pill {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill, 999px);
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-weight: 500;
}

/* 7. Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

th, td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--navy-700, #1e293b);
}

th {
  color: var(--slate-400, #94a3b8);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 8. Footer */
footer {
  border-top: 1px solid var(--navy-700, #1e293b);
  padding: 2rem 0;
  margin-top: 3rem;
  color: var(--slate-400, #94a3b8);
  font-size: 0.85rem;
}

/* 9. Focus styles — WCAG 2.4.7 */
:focus-visible {
  outline: 2px solid var(--cyan, #22d3ee);
  outline-offset: 2px;
}

a:focus-visible {
  border-radius: 4px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan, #22d3ee);
  outline-offset: 2px;
}
