/* ==========================================================================
   IIRF — Reset, typography and layout primitives
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

input, button, textarea, select { font: inherit; color: inherit; }

/* ----- Headings ----- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--navy-700);
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); text-transform: uppercase; }
h2 { font-size: var(--fs-2xl); text-transform: uppercase; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }

p, li { text-wrap: pretty; }

p { max-width: var(--measure); }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

ul, ol { padding-left: 1.25em; }
li + li { margin-top: var(--sp-2); }

strong { font-weight: 600; color: var(--ink-900); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--sp-8) 0;
}

/* ----- Skip link ----- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--navy-900);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* ----- Layout primitives ----- */

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

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

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section--subtle { background: var(--bg-subtle); }
.section--muted  { background: var(--bg-muted); }

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: #fff; }
.section--dark p { color: var(--text-on-dark-muted); }
.section--dark a { color: var(--green-400); }
.section--dark a:hover { color: var(--gold-400); }

/* Grid helpers */

.grid { display: grid; gap: var(--sp-5); }

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.flow > * + * { margin-top: var(--sp-4); }
.flow--lg > * + * { margin-top: var(--sp-6); }

/* ----- Section heading block ----- */

.section-head {
  max-width: var(--container-narrow);
  margin-bottom: var(--sp-8);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head--center p { margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: var(--sp-3);
}
.section--dark .eyebrow { color: var(--gold-400); }

.section-head h2 { margin-bottom: var(--sp-4); }

.section-head p {
  font-size: var(--fs-md);
  color: var(--text-secondary);
}
.section--dark .section-head p { color: var(--text-on-dark-muted); }

.lead {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
}

/* ----- Utilities ----- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.measure-none { max-width: none; }

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

/* ----- Motion ----- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ----- Print ----- */

@media print {
  .site-header, .site-footer, .backtotop, .hero__actions { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
