/* ============================================================
   AFSS — Base / Resets / Typography
   Source: app/globals.css lines 79-143 + AFSS design system
   ============================================================ */

/* ---------- Imports ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;800&display=swap');

/* ---------- Reset / Normalize ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-spacer-h);
  scrollbar-color: #1c4d9c #f1f5f9;
  scrollbar-width: thin;
}
html, body { overflow-x: hidden; max-width: 100vw; }

/* ---------- Custom Blue Scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #1c4d9c;
  border-radius: 5px;
  border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
  background: #0b1d36;
}
body {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.005em;
  font-feature-settings: "ss01", "cv11";
  margin: 0;
  overflow-x: clip;
  -webkit-font-feature-settings: "ss01", "cv11";
}
img, picture, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
}
input, textarea, select { font-size: inherit; color: inherit; }
section[id] { scroll-margin-top: var(--navbar-spacer-h); }
h1, h2, h3, h4, h5, h6, p, a, span {
  overflow-wrap: anywhere;
}
a, button, input, select, textarea, [tabindex] { touch-action: manipulation; }

/* ---------- Section & Footer Subtle Watermark ---------- */
section, footer {
  position: relative;
}
section::before, footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/icon.png');
  background-repeat: no-repeat;
  background-size: clamp(300px, 40vw, 550px);
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
}
section:nth-of-type(odd)::before {
  background-position: right -60px center;
}
section:nth-of-type(even)::before {
  background-position: left -60px center;
}
footer::before {
  background-position: center center;
}

/* ---------- Focus ---------- */
*:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Typography scale ---------- */
.h-display {
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.96;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--color-ink);
  margin: 0;
}
.h-display--md {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0;
}
.h-display--light { color: #fff; }
.h-section {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-ink);
  margin: 0 0 1rem;
}
.h-section--sm {
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
}
.h-section--light { color: #fff; }
.h-3 {
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin: 0 0 0.5rem;
}
.h-4 {
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  margin: 0 0 0.5rem;
}
.h-eyebrow {
  font-size: 0.75rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin: 0 0 0.75rem;
}
.h-eyebrow--light { color: var(--color-accent-red); }
.text-lead {
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  margin: 0 0 1rem;
}
.text-body {
  font-size: clamp(1rem, 1.18vw, 1.08rem);
  line-height: 1.6;
  color: var(--color-ink-muted);
  margin: 0 0 1rem;
}
.text-body--light { color: rgba(255, 255, 255, 0.78); }
.text-small {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-ink-muted);
}
.text-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.gradient-text {
  background: var(--color-brand-text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.max-w-prose { max-width: 65ch; }
.max-w-narrow { max-width: 36rem; }

/* ---------- Layout ---------- */
.container-shell {
  position: relative;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container-inner {
  position: relative;
  width: 100%;
  max-width: var(--container-inner);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.section-y { padding-block: var(--section-y); }
.section-y-tight { padding-block: var(--section-y-tight); }
@media (max-width: 767px) {
  .container-shell, .container-inner {
    padding-inline: var(--container-pad-mobile);
  }
}

/* Section header (two-column on desktop, stacked on mobile) */
.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.7fr);
  column-gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(1.5rem, 2.5vw, 2rem);
}
@media (max-width: 991px) {
  .section-header {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    justify-items: start;
  }
}

/* Section watermark shield (per globals.css — section::before) */
section.has-watermark, footer.has-watermark { position: relative; }
section.has-watermark::before, footer.has-watermark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/afss-shield-mark.svg");
  background-repeat: no-repeat;
  background-size: clamp(300px, 45vw, 600px);
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}
section.has-watermark:nth-of-type(odd)::before  { background-position: right -100px center; }
section.has-watermark:nth-of-type(even)::before { background-position: left -100px center; }
footer.has-watermark::before { background-position: center center; }
section.has-watermark > * { position: relative; z-index: 1; }

/* ---------- Reveal animation (CSS scroll-driven) ---------- */
.reveal {
  opacity: 1;
  will-change: transform, opacity;
}
/* Scroll reveal disabled for 100% solid opacity stability */
.reveal {
  opacity: 1 !important;
  transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
@media (max-width: 1023px) {
  .reveal {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}

/* ---------- Utility ---------- */
.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;
}
.text-center { text-align: center; }
.no-margin { margin: 0; }
.row-gap-2 { row-gap: 1rem; }
