/* Northwood Society — prestigious navy / cream satirical foundation site
   WCAG 2.2 AA: contrast, focus, reduced-motion, tap targets */

:root {
  --navy: #0e0f19;
  --navy-elevated: #161822;
  --slate: #2f3e58;
  --slate-text: #2a3a52; /* darkened slightly for body accents on cream */
  --cream: #f7f4ee;
  --cream-dark: #ebe6dc;
  --white: #ffffff;
  --ink: #141820;
  --muted: #3a4558; /* ≥4.5:1 on cream */
  --gold: #6f5628; /* darker gold for text on cream (≥4.5:1) */
  --gold-on-navy: #e0c878; /* ≥3:1 large / decorative on navy */
  --focus: #e0c878;
  --focus-ring: #0e0f19;
  --danger: #8b1e1e;
  --success-bg: #e7efe6;
  --success-ink: #1e3d28;
  --radius: 2px;
  --shadow: 0 12px 40px rgba(14, 15, 25, 0.12);
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
  --header-h: 4.5rem;
  --space: clamp(1rem, 2.5vw, 2rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--slate-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

/* —— Focus (never remove without replacement) —— */
:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.btn:focus-visible,
.nav-toggle:focus-visible,
.brand:focus-visible {
  outline-offset: 4px;
}

/* Skip link — first focusable */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 10000;
  padding: 0.75rem 1.1rem;
  background: var(--gold-on-navy);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

/* —— Header / Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  color: var(--white);
  border-bottom: 1px solid rgba(224, 200, 120, 0.25);
  min-height: var(--header-h);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  padding: 0.15rem 0.25rem;
}

.brand-logo {
  width: clamp(140px, 28vw, 200px);
  height: auto;
  display: block;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  align-items: center;
}

.site-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.65rem 0.85rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
}

.site-nav a:hover {
  color: var(--gold-on-navy);
  background: rgba(255, 255, 255, 0.06);
}

.site-nav a[aria-current="page"] {
  color: var(--gold-on-navy);
  box-shadow: inset 0 -2px 0 var(--gold-on-navy);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--navy-elevated);
    border-bottom: 1px solid rgba(224, 200, 120, 0.25);
    padding: 0.5rem var(--space) 1rem;
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    width: 100%;
  }
}

/* —— Layout helpers —— */
.section {
  padding: clamp(3rem, 7vw, 5.5rem) var(--space);
}

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

.section-kicker {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 42rem;
}

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

.section--navy h2 {
  color: var(--white);
}

.section--navy .section-kicker {
  color: var(--gold-on-navy);
}

.section--navy .lead,
.section--navy p {
  color: #d9d4cb; /* cream-muted on navy, ≥4.5:1 */
}

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

/* —— Hero —— */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--navy);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 15, 25, 0.55) 0%,
    rgba(14, 15, 25, 0.72) 45%,
    rgba(14, 15, 25, 0.92) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) var(--space) clamp(3.5rem, 8vw, 5.5rem);
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0 0 1.25rem;
  color: var(--white);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 36rem;
  color: #f0ebe3;
  margin: 0 0 1.75rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--gold-on-navy);
  color: var(--navy);
  border-color: var(--gold-on-navy);
}

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

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

.btn--ghost:hover {
  border-color: var(--gold-on-navy);
  color: var(--gold-on-navy);
}

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

.btn--navy:hover {
  background: var(--slate);
  border-color: var(--slate);
  color: var(--white);
}

.btn--block {
  width: 100%;
}

/* —— Mission —— */
.mission-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.2fr 1fr;
  align-items: start;
}

@media (max-width: 800px) {
  .mission-grid {
    grid-template-columns: 1fr;
  }
}

.mission-statement {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.4;
  color: var(--navy);
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--gold);
}

.values {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.values li {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}

.values h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  color: var(--navy);
}

.values p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.mission-aside {
  background: var(--navy);
  color: var(--cream);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
}

.mission-aside h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  color: var(--white);
}

.mission-aside p {
  margin: 0 0 1rem;
  color: #d9d4cb;
}

.mission-aside p:last-child {
  margin-bottom: 0;
}

.mission-aside strong {
  color: var(--gold-on-navy);
  font-weight: 600;
}

/* —— Impact metrics —— */
.metrics {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .metrics {
    grid-template-columns: 1fr;
  }
}

.metric {
  background: var(--navy-elevated);
  border: 1px solid rgba(224, 200, 120, 0.28);
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.metric-value {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--gold-on-navy);
  margin: 0 0 0.4rem;
  line-height: 1.1;
}

.metric-label {
  margin: 0;
  font-size: 0.95rem;
  color: #d9d4cb;
}

/* —— Our Work photo grid —— */
.work-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 700px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

.work-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.work-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--slate);
}

.work-card-body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.work-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
  color: var(--navy);
}

.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* —— Leadership —— */
.leaders {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .leaders {
    grid-template-columns: 1fr;
  }
}

.leader {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leader-top {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.leader-avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-on-navy);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  border: 2px solid var(--gold);
}

.leader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.leader h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin: 0 0 0.2rem;
  color: var(--navy);
}

.leader-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
}

.leader blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  font-style: italic;
  color: var(--muted);
  font-size: 0.98rem;
}

.leader blockquote p {
  margin: 0;
}

.leader blockquote p::before {
  content: "“";
}

.leader blockquote p::after {
  content: "”";
}

/* —— Membership —— */
.membership-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .membership-layout {
    grid-template-columns: 1fr;
  }
}

.membership-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
}

.form-field {
  margin-bottom: 1.15rem;
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--slate);
  border-radius: var(--radius);
}

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

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--navy);
  background: var(--white);
}

.form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.form-status {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 2px solid var(--success-ink);
  background: var(--success-bg);
  color: var(--success-ink);
}

.form-status[hidden] {
  display: none;
}

.form-status h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--success-ink);
}

.form-status p {
  margin: 0;
}

.checklist {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.checklist li {
  margin-bottom: 0.5rem;
}

/* —— Contact / Footer —— */
.site-footer {
  background: var(--navy);
  color: #d9d4cb;
  padding: 3rem var(--space) 2rem;
}

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

@media (max-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-brand .brand-logo {
  width: 180px;
  margin-bottom: 1rem;
}

.footer-brand p {
  margin: 0;
  max-width: 28rem;
}

.site-footer h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--white);
  margin: 0 0 0.75rem;
}

.site-footer a {
  color: var(--gold-on-navy);
}

.site-footer a:hover {
  color: var(--white);
}

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

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

.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  padding: 0.25rem 0;
}

.footer-meta {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
}

.footer-meta p {
  margin: 0;
}

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

.sr-only-focusable:not(:focus):not(:focus-visible) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

img.leader-avatar {
  display: block;
  object-fit: cover;
  padding: 0;
  border: 2px solid var(--gold);
  background: var(--navy);
}


/* Honeypot — visually hidden from everyone; leave in tab order off */
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #8b2e2e;
  background: #fceeee;
  color: #5c1a1a;
  border-radius: 6px;
  font-size: 0.95rem;
}
