/* Farewell Fund — Base reset, typography, and layout utilities */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

*, *::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(--fs-300);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--navy-900);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 var(--space-4);
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--white); }

h1 { font-size: var(--fs-800); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-700); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }

p { margin: 0 0 var(--space-4); color: var(--color-text-muted); }
p:last-child { margin-bottom: 0; }

a { color: var(--color-secondary); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--color-secondary-hover); }

ul, ol { padding-left: 1.25em; color: var(--color-text-muted); }

strong { color: inherit; font-weight: 600; }

button { font-family: inherit; }

/* Focus visibility — never remove, only restyle */
:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  background: var(--color-primary);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
  transition: top var(--duration-base) var(--ease-out);
}
.skip-link:focus {
  top: var(--space-4);
}

/* Layout primitives */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
@media (max-width: 640px) {
  .container { padding-inline: var(--space-4); }
}

.container--narrow { max-width: var(--container-narrow); }

.section {
  padding-block: var(--space-24);
}
@media (max-width: 768px) {
  .section { padding-block: var(--space-16); }
}
.section--tight { padding-block: var(--space-16); }
@media (max-width: 768px) {
  .section--tight { padding-block: var(--space-10); }
}

.band-cream { background: var(--cream-100); }
.band-white { background: var(--white); }
.band-navy { background: var(--navy-900); color: var(--color-text-on-dark); }
.band-teal-tint { background: var(--teal-050); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--fs-100);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-12);
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { font-size: var(--fs-400); }

.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; }
.muted { color: var(--color-text-muted); }

/* Grid utilities */
.grid { display: grid; gap: var(--space-8); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/*
  Reveal-on-scroll: default to fully visible so content never depends on
  JS to be seen (no-JS / slow-network safe). motion-init.js opts elements
  into a hidden starting state only once it has successfully loaded and
  is about to animate them in.
*/
[data-reveal] {
  opacity: 1;
  transform: none;
}
[data-reveal].reveal-armed {
  opacity: 0;
  transform: translateY(16px);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
