/* =========================================================
   BASE — resets, typography, layout primitives
   ========================================================= */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  background-color: var(--aa-bg-base);
  background-image:
    linear-gradient(180deg, var(--aa-bg-base) 0%, #0f1413 100%);
  color: var(--aa-text-primary);
  font-family: var(--aa-font-body);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--aa-font-display);
  font-weight: 600;
  color: var(--aa-text-primary);
  line-height: 1.25;
  margin: 0 0 var(--aa-space-4);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--aa-space-4); color: var(--aa-text-secondary); }

a {
  color: var(--aa-teal);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--aa-amber); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--aa-teal);
  outline-offset: 2px;
}

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

code {
  background: var(--aa-bg-inset);
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-sm);
  padding: 0.15em 0.4em;
  font-size: 0.9em;
  color: var(--aa-teal);
}

pre {
  background: var(--aa-bg-inset);
  border: 1px solid var(--aa-border);
  border-left: 3px solid var(--aa-teal-dim);
  border-radius: var(--aa-radius-md);
  padding: var(--aa-space-4);
  overflow-x: auto;
}
pre code { background: none; border: none; padding: 0; color: var(--aa-text-primary); }

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

.aa-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--aa-space-6);
}

@media (max-width: 600px) {
  .aa-container { padding: 0 var(--aa-space-4); }
}

.aa-eyebrow {
  font-family: var(--aa-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aa-text-muted);
}

.aa-section {
  padding: var(--aa-space-12) 0;
}

.aa-divider {
  border: none;
  border-top: 1px solid var(--aa-border);
  margin: var(--aa-space-8) 0;
}

/* Scroll-reveal base state — JS toggles .is-visible */
.aa-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.aa-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .aa-reveal { opacity: 1; transform: none; transition: none; }
}

/* Visually-hidden helper for accessible labels */
.aa-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
