/* NPGAM Research — design system */

:root {
  --color-cream: #f0ece0;
  --color-cream-dark: #e8e4d8;
  --color-forest: #1c3a2a;
  --color-forest-light: #2e5e42;
  --color-cta: #3a7a55;
  --color-white: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #4a4f4c;
  --color-border: rgba(28, 58, 42, 0.12);
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-card: 0 4px 24px rgba(28, 58, 42, 0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --focus-ring: 2px solid var(--color-cta);
  --focus-offset: 2px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-cream);
}

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

a {
  color: var(--color-forest-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-forest);
}

a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--color-forest);
  color: var(--color-white);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-forest);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-white);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}

.site-logo:focus-visible {
  outline-color: var(--color-white);
}

.site-logo__mark {
  width: 40px;
  height: 40px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--color-forest);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.site-nav a:focus-visible {
  outline-color: var(--color-white);
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-sans);
}

.btn--primary {
  background: var(--color-cta);
  color: var(--color-white);
  border-color: var(--color-cta);
}

.btn--primary:hover {
  background: var(--color-forest-light);
  border-color: var(--color-forest-light);
  color: var(--color-white);
}

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

.btn--cream {
  background: var(--color-cta);
  color: var(--color-white);
}

.btn--cream:hover {
  background: var(--color-forest);
  color: var(--color-white);
}

.btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(85vh, 640px);
  display: flex;
  align-items: center;
  padding: 4rem 1.5rem;
  background-color: var(--color-forest);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(2px);
  transform: scale(1.02);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(28, 58, 42, 0.92) 0%,
    rgba(28, 58, 42, 0.75) 55%,
    rgba(28, 58, 42, 0.55) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
}

.hero h1 {
  color: var(--color-white);
  max-width: 18ch;
}

.hero__lead {
  color: rgba(255, 255, 255, 0.92);
  max-width: 42ch;
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Sections */
.section {
  padding: 4rem 1.5rem;
}

.section--sage {
  background: #dfe6d8;
}

.section--cream {
  background: var(--color-cream);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__label {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3d5a8c;
  margin-bottom: 0.5rem;
}

.section__title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section__title--start {
  text-align: left;
}

.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;
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pillar {
  padding-top: 1rem;
  border-top: 3px solid var(--color-forest);
}

.pillar h3 {
  font-size: 1.15rem;
}

.pillar p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--color-forest-light);
  display: flex;
  flex-direction: column;
}

.card__image {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

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

.card__title a:hover {
  color: var(--color-forest-light);
  text-decoration: underline;
}

.card__meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.card__excerpt {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.card__link {
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-forest);
}

.card__link:hover {
  text-decoration: underline;
}

/* Data section */
.data-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.data-split__lead {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.stat-tile {
  background: var(--color-white);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.stat-tile__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-forest);
  line-height: 1.1;
}

.stat-tile__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

.chart-card {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.chart-card__caption {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* About split */
.about-split__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3d5a8c;
  margin-bottom: 0.5rem;
}

.about-split__lead {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.stat-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Footer */
.site-footer {
  background: var(--color-cream);
  border-top: 1px solid var(--color-border);
  padding: 3rem 1.5rem 0;
}

.site-footer__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.site-footer .site-logo {
  color: var(--color-forest);
  margin-bottom: 0.75rem;
}

.site-footer .site-logo__mark {
  background: var(--color-forest);
  color: var(--color-white);
}

.site-footer__brand p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 28ch;
}

.footer-section-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-forest-light);
  margin: 0 0 0.75rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.5rem;
}

.site-footer a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-text);
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-disclosure {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
}

.footer-disclosure__title {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem;
}

.footer-disclosure p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.55;
}

.footer-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-bar__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bar a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-bar a:hover {
  text-decoration: underline;
}

/* Page article */
.page-hero {
  background: var(--color-forest);
  color: var(--color-white);
  padding: 3rem 1.5rem;
}

.page-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-hero h1 {
  color: var(--color-white);
}

.page-hero__meta {
  font-size: 0.9rem;
  opacity: 0.9;
}

.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.article h2 {
  margin-top: 2rem;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

.article th,
.article td {
  border: 1px solid var(--color-border);
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.article th {
  background: var(--color-cream-dark);
}

/* Contact form */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
}

.form label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form input,
.form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
}

.form input:focus-visible,
.form textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 0;
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

/* FAQ */
.faq {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.faq-item {
  margin-bottom: 1.25rem;
}

.faq-item strong {
  display: block;
  margin-bottom: 0.35rem;
}

/* 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

/* Responsive */
@media (max-width: 960px) {
  .pillars {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .data-split {
    grid-template-columns: 1fr;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .stat-row,
  .stat-grid-4 {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
}
