/* ==========================================================================
   BASE / RESET
   ========================================================================== */

*, *::before, *::after { 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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0;
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); font-family: var(--font-sub); letter-spacing: 0.04em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

/* Focus visibility (WCAG AA) */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: 860px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--gold);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 1000;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 1rem; }

/* Section rhythm */
.section {
  padding: var(--space-9) 0;
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .section { padding: var(--space-8) 0; }
}

.section--navy {
  background: var(--navy-950);
  color: var(--white);
}
.section--navy-grad {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-900) 60%, var(--navy-800));
  color: var(--white);
}
.section--mist {
  background: var(--mist);
  color: var(--ink);
}
.section--white {
  background: var(--white);
  color: var(--ink);
}

/* Reveal-on-scroll (progressive enhancement via IntersectionObserver in main.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * { transition-delay: calc(var(--stagger-i, 0) * 70ms); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* no-js fallback: content stays visible if main.js hasn't run yet */
.no-js .reveal, .reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
