/* ==========================================================================
   FilterLabs.org — site styles
   Plain CSS, no build step. Colors and spacing live in the custom properties
   below; change them here and the whole site follows.
   ========================================================================== */

:root {
  --navy: #0f4099;          /* from the FilterLabs.ORG logo */
  --navy-dark: #0a2c6b;
  --sky: #9dbaf2;           /* eyebrow text on black */
  --ink: #1d1d1f;
  --body: #333333;
  --muted: #444444;
  --on-dark: #d6d6d6;
  --on-dark-muted: #a8a8a8;
  --line: #d6d6d6;
  --line-dark: #4a4a4a;
  --light: #f4f6fb;
  --black: #000000;
  --white: #ffffff;

  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --container: 1200px;
  --gutter: 40px;
  --radius: 4px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--navy-dark); }
h1, h2, h3, p, ul, ol { margin: 0; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; color: var(--white); }

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

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 96px 0; }
.section--light { background: var(--light); }
.section--dark { background: var(--black); color: var(--white); }
.section--dark a { color: #e8e8e8; }
.section--dark a:hover { color: var(--white); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack--lg { gap: 40px; }
.intro { max-width: 820px; }

/* Two-column split; collapses to one column on narrow screens */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }

.rule { height: 3px; background: var(--black); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--navy);
}
.section--dark .eyebrow, .hero .eyebrow { color: var(--sky); }
.display { font-size: 64px; line-height: 1.03; font-weight: 800; letter-spacing: -.015em; }
.display--md { font-size: 56px; line-height: 1.04; }
.h2 { font-size: 44px; line-height: 1.08; font-weight: 800; }
.h2--sm { font-size: 38px; line-height: 1.1; }
.h3 { font-size: 22px; line-height: 1.25; font-weight: 700; }
.lede { font-size: 19px; line-height: 1.55; }
.body-lg { font-size: 18px; line-height: 1.6; color: var(--body); }
.body { font-size: 16px; line-height: 1.6; color: var(--body); }
.small { font-size: 15px; line-height: 1.55; color: var(--muted); }
.section--dark .body-lg, .section--dark .body, .section--dark .small { color: #cfcfcf; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 24px; border-radius: var(--radius); border: 1.5px solid var(--navy);
  background: var(--navy); color: var(--white); font: 600 15px/1 var(--font-sans);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }
.btn--outline { background: transparent; color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.section--dark .btn, .hero .btn { background: var(--white); border-color: var(--white); color: var(--black); }
.section--dark .btn:hover, .hero .btn:hover { background: #e3e3e3; border-color: #e3e3e3; color: var(--black); }
.section--dark .btn--outline, .hero .btn--outline { background: transparent; color: var(--white); border-color: var(--white); }
.section--dark .btn--outline:hover, .hero .btn--outline:hover { background: var(--white); color: var(--black); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.text-link { font-weight: 700; }

/* ---------- Header & navigation ---------- */
.site-header { background: var(--white); border-bottom: 1px solid #e3e3e3; position: relative; z-index: 20; }
.site-header__inner { display: flex; align-items: center; gap: 28px; min-height: 88px; padding-top: 12px; padding-bottom: 12px; }
.site-header__logo img { height: 50px; width: auto; }
.nav { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 28px; }
.nav__list { list-style: none; padding: 0; display: flex; gap: 28px; }
.nav__item { position: relative; }
.nav__link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.nav__link:hover { color: var(--navy); }
.nav__link[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }
.nav__caret { width: 10px; height: 10px; }
.nav__sub {
  display: none; position: absolute; top: 100%; left: -16px; min-width: 220px;
  list-style: none; padding: 8px 0; background: var(--white);
  border: 1px solid #e3e3e3; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.nav__sub a { display: block; padding: 10px 16px; color: var(--ink); text-decoration: none; font-size: 15px; }
.nav__sub a:hover { background: var(--light); color: var(--navy); }
.nav__item:hover .nav__sub, .nav__item:focus-within .nav__sub { display: block; }
.nav__actions { display: flex; align-items: center; gap: 20px; }
.nav__login { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.nav__login img { width: 22px; }
.nav-toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; border: 1.5px solid var(--ink);
  border-radius: var(--radius); background: transparent; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Heroes ---------- */
.hero { background-color: var(--black); color: var(--white); background-repeat: no-repeat; background-position: right top; background-size: auto 100%; }
.hero--home { background-image: url("../img/bg-hero-home.webp"); }
.hero--technology { background-image: url("../img/bg-hero-technology.webp"); }
.hero__inner { padding-top: 112px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 24px; }
.hero__inner > .display { max-width: 640px; }
.hero__inner > .lede { max-width: 540px; color: var(--on-dark); }
.hero__row { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 104px; padding-bottom: 104px; }
.hero__text { flex: 1 1 520px; display: flex; flex-direction: column; gap: 22px; }
.hero__text .lede { color: var(--on-dark); max-width: 560px; }
.hero__fine { font-size: 15px; line-height: 1.55; color: var(--on-dark-muted); max-width: 560px; }
.hero__graphic { flex: 0 1 340px; max-width: 340px; width: 100%; }

/* Light page header with a graphic resting on a black rule (Resources) */
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
.page-head__text { padding: 72px 48px 56px max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); display: flex; flex-direction: column; gap: 18px; }
.page-head__text .lede { color: var(--body); max-width: 560px; }
.page-head__plain { padding-top: 88px; padding-bottom: 64px; }

/* ---------- Home: Why a .org ---------- */
.why { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); row-gap: 28px; }
.why__img, .why__text { align-self: end; }
.why__cards { grid-column: 2; display: flex; flex-wrap: wrap; gap: 14px; }
.org-card { flex: 1 1 210px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.org-card__title { font-weight: 800; font-size: 19px; }
.org-card--accent { background: var(--navy); border-color: var(--navy); color: var(--white); }
.org-card--accent .small { color: #e3ebfa; }

/* ---------- Stats & conditions ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.stat { display: flex; flex-direction: column; gap: 12px; }
.stat__bar { width: 100%; height: 10px; object-fit: cover; }
.stat__bar--shift { filter: hue-rotate(-60deg); }
.stat__num { font-size: 56px; font-weight: 800; line-height: 1; }
.stat__unit { font-size: 24px; font-weight: 700; letter-spacing: 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.feature { display: flex; flex-direction: column; gap: 14px; }
.feature__icon { width: 96px; }
.feature__icon--lg { width: 100px; }
.feature__label { font-size: 22px; font-weight: 800; letter-spacing: .06em; }

/* ---------- Partnership tracks ---------- */
.tracks { display: flex; flex-wrap: wrap; gap: 24px; }
.track { flex: 1 1 400px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.track__bar { width: 100%; height: 24px; object-fit: cover; }
.track__body { padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.track__title { font-size: 26px; font-weight: 800; line-height: 1.2; }
.pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { border: 1px solid var(--navy); color: var(--navy); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.check { display: flex; gap: 14px; align-items: flex-start; }
.check img { width: 36px; height: 36px; flex: none; }
.check__title { font-weight: 700; }
.check .small { margin-top: 6px; }

/* ---------- Contact ---------- */
.contact { background: var(--black) url("../img/bg-contact.webp") right top / auto 100% no-repeat; }
.contact__inner { display: flex; flex-wrap: wrap; gap: 56px; padding-top: 96px; padding-bottom: 104px; }
.contact__intro { flex: 1 1 380px; display: flex; flex-direction: column; gap: 18px; }
.form { flex: 1 1 440px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form__full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea {
  min-height: 46px; padding: 10px 12px; font: 400 16px/1.4 var(--font-sans);
  border: 1px solid #7a7a7a; border-radius: 3px; background: rgba(0,0,0,.72); color: var(--white);
}
.field textarea { resize: vertical; }
.hidden-field { display: none; }

/* ---------- Technology: partners section ---------- */
.partners { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: stretch; }
.partners__intro { display: flex; flex-direction: column; gap: 16px; }
.partners__img { flex: 1 1 0; min-height: 200px; position: relative; }
.partners__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: left bottom; }
.outputs { align-self: start; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.output { background: var(--white); padding: 26px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; }
.output img { width: 64px; }
.output__title { font-weight: 700; font-size: 19px; }

/* Theory of change */
.toc { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.toc__step { border: 1px solid var(--line-dark); padding: 22px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.toc__step p { font-size: 15px; line-height: 1.55; color: var(--on-dark); }
.toc__step--impact { background: var(--navy); border-color: var(--navy); }
.toc__step--impact .eyebrow, .toc__step--impact p { color: var(--white); }
.toc-graphic { width: 100%; max-width: 1000px; margin: 0 auto; }
.section--toc { padding-bottom: 0; }

.case { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.case__img { flex: 1 1 420px; max-width: 560px; min-width: 0; width: 100%; }
.case__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

/* Closing call to action band */
.cta { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-top: 80px; padding-bottom: 88px; }
.cta__text { flex: 1 1 480px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Resources ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--navy); border-radius: 99px; background: var(--white); color: var(--navy);
  font: 600 14px/1 var(--font-sans); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.list-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.card[hidden] { display: none; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card__title { font-size: 22px; font-weight: 700; line-height: 1.3; }
.card:hover .card__title { color: var(--navy); }
.card__more { font-weight: 700; color: var(--navy); }

.newsletter { display: flex; flex-wrap: wrap; gap: 56px; }
.newsletter__intro { flex: 1 1 400px; display: flex; flex-direction: column; gap: 18px; }
.issues { flex: 1 1 480px; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.issues > img { width: 100%; height: 200px; object-fit: cover; }
.issues__list { list-style: none; padding: 8px 28px 0; }
.issues__list a { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid #dddddd; text-decoration: none; color: var(--ink); font-weight: 700; }
.issues__list a:hover { color: var(--navy); }
.issues__date { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #666666; white-space: nowrap; }
.issues__more { display: inline-block; padding: 18px 28px 24px; }

/* ---------- About ---------- */
.mission { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: end; }
.mission__text { padding: 72px 56px 104px max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); display: flex; flex-direction: column; gap: 22px; }
.mission__statement { font-size: 30px; line-height: 1.35; font-weight: 700; }
.mission__img { width: 100%; max-width: 440px; justify-self: end; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 280px)); gap: 40px; }
.people--board { grid-template-columns: repeat(auto-fill, minmax(200px, 240px)); gap: 36px; }
.person { display: flex; flex-direction: column; gap: 12px; }
.person__photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
/* Name-only entry (no photo yet): a thin rule above keeps the row structured */
.person--text { border-top: 3px solid var(--navy); padding-top: 16px; gap: 6px; }
/* Initials tile used until a headshot is supplied */
.person__initials {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  background: #e8edf7; color: var(--navy); font-size: 44px; font-weight: 800;
}
.section--dark .person__initials { background: #1a1f2b; color: var(--sky); }
.person__name { display: flex; gap: 10px; align-items: center; font-size: 21px; font-weight: 700; }
.people--board .person__name { font-size: 18px; }
.person__name img { width: 26px; height: 26px; }
.person__role { font-size: 15px; color: var(--muted); }
.section--dark .person__role { color: #cfcfcf; }

/* ---------- Simple text pages ---------- */
.prose { max-width: 760px; display: flex; flex-direction: column; gap: 18px; }
.prose h2 { font-size: 26px; font-weight: 800; margin-top: 16px; }
.prose p, .prose li { font-size: 17px; line-height: 1.65; color: var(--body); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: #e8e8e8; padding: 64px 0 40px; border-top: 1px solid #222222; }
.site-footer a { color: #e8e8e8; }
.site-footer a:hover { color: var(--white); }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 40px 56px; justify-content: space-between; align-items: flex-start; }
.site-footer__col { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.6; font-style: normal; }
.site-footer__heading { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.site-footer__social { display: flex; gap: 10px; margin-bottom: 4px; }
.site-footer__social img { width: 44px; height: 44px; }
.site-footer__logo { height: 72px; width: auto; }
.site-footer__legal { margin-top: 40px; border-top: 1px solid #2a2a2a; padding-top: 20px; font-size: 13px; line-height: 1.6; color: var(--on-dark-muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1000px) {
  .site-header__inner { gap: 20px; }
  .nav, .nav__list { gap: 20px; }
  .nav__actions { gap: 14px; }
  .nav .btn { padding: 0 16px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid #e3e3e3; padding: 8px var(--gutter) 24px;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { width: 100%; border-bottom: 1px solid #eeeeee; }
  .nav__link[aria-current="page"] { border-bottom-color: #eeeeee; }
  .nav__caret { display: none; }
  .nav__sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 8px 16px; min-width: 0; }
  .nav__sub a { padding: 10px 0; }
  .nav__actions { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 16px; }
}

@media (max-width: 860px) {
  .split, .why, .partners, .page-head, .mission { grid-template-columns: minmax(0, 1fr); }
  .why__cards { grid-column: auto; }
  .page-head__text, .mission__text { padding-left: var(--gutter); padding-right: var(--gutter); }
  .partners__img { flex: none; height: 300px; }
  .display { font-size: 48px; }
  .display--md { font-size: 44px; }
  .h2 { font-size: 34px; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .section { padding: 72px 0; }
  .hero__inner, .hero__row { padding-top: 72px; padding-bottom: 72px; }
  .display, .display--md { font-size: 38px; }
  .h2 { font-size: 30px; }
  .h2--sm { font-size: 28px; }
  .mission__statement { font-size: 24px; }
  .site-header__logo img { height: 42px; }
  /* the crowd photos fade to white at their right edge; drop them on phones so white text stays legible */
  .hero, .contact { background-image: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
