/* =========================================================================
   AFA site — shared stylesheet
   Used by every page. Page-specific styles (e.g. the cream event-detail
   background) live in a small block at the bottom, scoped to a body class.

   Colour and font values are CSS custom properties below — change a theme
   colour or font pairing here and it updates everywhere.
   ========================================================================= */

:root {
  /* Brand colours (navy sampled directly from the AFA logo file) */
  --color-navy: #0e2a4b;
  --color-navy-dark: #081b32;
  --color-navy-light: #1c3f68;
  --color-white: #ffffff;
  --color-cream: #f7f3ec;
  --color-accent-blue: #1e5aa8;
  --color-accent-blue-dark: #164380;
  --color-tan: #cfa15f;
  --color-tan-dark: #b78945;

  /* Fonts */
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --container-width: 1200px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

p {
  margin: 0 0 var(--space-2);
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

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

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  background: var(--color-white);
  color: var(--color-navy);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  padding: 0.85em 1.6em;
  min-height: 44px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-pill {
  border-radius: 999px;
  background: var(--color-accent-blue);
  color: var(--color-white);
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9em 2.4em;
}

.btn-pill:hover,
.btn-pill:focus-visible {
  background: var(--color-accent-blue-dark);
}

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

.btn-white:hover,
.btn-white:focus-visible {
  background: var(--color-cream);
}

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

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn-tan {
  background: var(--color-tan);
  color: var(--color-navy-dark);
}

.btn-tan:hover,
.btn-tan:focus-visible {
  background: var(--color-tan-dark);
}

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

.btn-navy:hover,
.btn-navy:focus-visible {
  background: var(--color-navy);
}

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

.card-email {
  font-family: var(--font-sans);
  font-weight: 600;
}

.card-email a {
  text-decoration: none;
}

.card-email a:hover,
.card-email a:focus-visible {
  text-decoration: underline;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--color-navy);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-2);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-white);
}

.logo-mark {
  width: 48px;
  height: 48px;
}

.logo-wordmark {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Hamburger toggle — mobile only */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-strip {
  background: var(--color-navy-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: none;
}

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

.nav-strip-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-block: var(--space-3);
}

.nav-email {
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-email:hover,
.nav-email:focus-visible {
  text-decoration: underline;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-nav a {
  text-decoration: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: var(--space-2);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: var(--color-white);
}

@media (min-width: 700px) {
  .nav-toggle {
    display: none;
  }

  .nav-strip {
    display: block;
  }

  .nav-strip-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-block: var(--space-2);
  }

  .site-nav ul {
    flex-direction: row;
    gap: var(--space-3);
  }
}

/* ---------- Hero / welcome band (home page) ---------- */
.hero-band {
  display: grid;
  gap: var(--space-3);
  padding-block: var(--space-4);
}

.hero-photo img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
}

.hero-card {
  background: var(--color-white);
  color: var(--color-navy);
  border-radius: 8px;
  padding: var(--space-4);
}

.hero-card h1 {
  font-size: 1.75rem;
}

.hero-card p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

@media (min-width: 700px) {
  .hero-band {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .hero-photo img {
    height: 100%;
    min-height: 380px;
  }
}

.join-cta {
  text-align: center;
  padding-block: var(--space-2) var(--space-5);
}

/* ---------- Current event block (home page) ---------- */
.current-event {
  padding-block: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.event-block {
  display: grid;
  gap: var(--space-3);
}

.event-title {
  font-size: 1.5rem;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-block: var(--space-3);
}

.meta-label {
  font-family: var(--font-serif);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  display: block;
  margin-bottom: var(--space-1);
}

.meta-col hr {
  border: none;
  border-top: 2px solid var(--color-white);
  width: 48px;
  margin: 0 0 var(--space-1);
}

.event-photo img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
}

.event-details .btn {
  margin-bottom: var(--space-3);
}

.event-details .social-links a {
  width: 40px;
  height: 40px;
}

@media (min-width: 700px) {
  .event-block {
    grid-template-columns: 3fr 2fr;
    align-items: center;
  }

  .event-photo img {
    height: 100%;
    min-height: 320px;
  }
}

/* ---------- Interior page hero (About / Board / Partners / Join) ---------- */
.page-hero {
  position: relative;
}

.page-hero img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(14, 42, 75, 0.35),
    rgba(14, 42, 75, 0.55)
  );
}

.page-hero-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
  color: var(--color-white);
  text-align: center;
  padding-inline: var(--space-2);
}

@media (min-width: 700px) {
  .page-hero img {
    height: 320px;
  }

  .page-hero-title {
    font-size: 2.75rem;
  }
}

/* ---------- White content card (About / Join) ---------- */
.card-section {
  padding-block: var(--space-4);
}

.card {
  background: var(--color-white);
  color: var(--color-navy);
  border-radius: 8px;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.card-photo img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
}

.card-text h2 {
  font-size: 1.3rem;
  text-align: center;
}

.card-text h2:not(:first-child) {
  margin-top: var(--space-4);
}

.card-text p {
  font-family: var(--font-sans);
}

@media (min-width: 700px) {
  .card {
    grid-template-columns: 3fr 2fr;
    align-items: center;
    padding: var(--space-5);
  }

  .card-photo img {
    height: 100%;
    min-height: 420px;
  }
}

/* ---------- Partners page ---------- */
.plain-title {
  text-align: center;
  font-size: 2rem;
  padding-block: var(--space-5) var(--space-3);
}

.partners-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding-block: var(--space-3) var(--space-5);
}

.partner-entry {
  max-width: 32rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.partner-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.partner-logo img {
  max-height: 90px;
  width: auto;
  max-width: 100%;
}

.partner-logo--panel {
  background: var(--color-white);
  border-radius: 8px;
  padding: var(--space-2) var(--space-3);
}

.partner-desc {
  font-size: 0.95rem;
  white-space: pre-line;
}

.partner-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.9rem;
}

.badge-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (min-width: 700px) {
  .plain-title {
    font-size: 2.75rem;
  }
}

/* ---------- Board page ---------- */
.board-section {
  padding-block: var(--space-4);
}

.board-section h2 {
  text-align: center;
  font-size: 1.6rem;
}

.board-intro {
  max-width: 60ch;
  margin: 0 auto var(--space-4);
  text-align: center;
  font-family: var(--font-sans);
}

.board-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4) var(--space-3);
}

@media (min-width: 600px) {
  .board-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .board-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.board-card {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.board-card-photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 6px;
  background: var(--color-white);
}

.board-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.board-card-photo.is-placeholder img {
  object-fit: contain;
  padding: var(--space-4);
  filter: none;
}

.board-card:hover .board-card-photo img,
.board-card:focus-visible .board-card-photo img {
  filter: grayscale(0.4);
}

.board-card-name {
  font-weight: 700;
  margin-top: var(--space-2);
}

.board-card-detail {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ---------- Board lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--color-white);
  color: var(--color-navy);
}

.lightbox.is-open {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.lightbox-close {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.lightbox-close svg {
  width: 22px;
  height: 22px;
  fill: var(--color-navy);
}

.lightbox-photo {
  width: 100%;
  height: 45vh;
  flex-shrink: 0;
}

.lightbox-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.lightbox-body {
  padding: var(--space-4) var(--space-3);
  flex: 1;
}

.lightbox-name {
  font-size: 1.6rem;
}

.lightbox-meta p {
  font-family: var(--font-sans);
  margin: 0 0 var(--space-1);
}

.lightbox-linkedin {
  display: inline-block;
  margin-top: var(--space-2);
  text-decoration: underline;
  font-weight: 600;
}

.lightbox-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-2) 0 var(--space-4);
}

.lightbox-nav button {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-cream);
}

.lightbox-nav button svg {
  width: 24px;
  height: 24px;
  fill: var(--color-navy);
}

@media (min-width: 700px) {
  .lightbox.is-open {
    flex-direction: row;
    overflow-y: hidden;
  }

  .lightbox-photo {
    width: 50%;
    height: 100%;
  }

  .lightbox-body {
    width: 50%;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-5);
  }

  .lightbox-nav {
    position: absolute;
    inset: 0 var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    justify-content: space-between;
    pointer-events: none;
    padding: 0;
  }

  .lightbox-nav button {
    pointer-events: auto;
  }
}

/* ---------- Events listing page ---------- */
.plain-title--sans {
  font-family: var(--font-sans);
}

.recap-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-block: var(--space-3) var(--space-5);
}

.recap-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: center;
}

.recap-photo img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
}

.recap-text {
  text-align: center;
}

.recap-title {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 var(--space-1);
}

.recap-date {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0 0 var(--space-2);
}

.recap-text p {
  font-family: var(--font-sans);
}

@media (min-width: 700px) {
  .recap-entry {
    grid-template-columns: 1fr 1fr;
  }

  .recap-photo img {
    height: 100%;
    min-height: 280px;
  }
}

/* ---------- Event detail pages (cream background — the one exception) ---------- */
.event-main {
  background: var(--color-cream);
  color: var(--color-navy);
  padding-block: var(--space-4) var(--space-5);
}

.event-title {
  text-align: center;
  font-size: 1.75rem;
}

.event-summary {
  text-align: center;
  font-family: var(--font-sans);
  opacity: 0.8;
  margin-top: calc(-1 * var(--space-1));
  margin-bottom: var(--space-3);
}

.event-register,
.event-location {
  text-align: center;
  margin-bottom: var(--space-4);
}

.event-photo-full img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--space-4);
}

.event-section {
  max-width: 65ch;
  margin: 0 auto;
  padding-block: var(--space-3);
  text-align: center;
}

.event-section h2 {
  font-size: 1.3rem;
}

.event-section p {
  font-family: var(--font-sans);
  text-align: left;
}

.event-address {
  font-family: var(--font-sans);
}

.event-location-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: underline;
  font-weight: 600;
  font-family: var(--font-sans);
}

.event-location-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.event-share .social-links {
  justify-content: center;
}

.social-links--dark svg {
  fill: var(--color-navy);
}

@media (min-width: 700px) {
  .event-photo-full img {
    height: 420px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: var(--space-4);
  margin-top: var(--space-4);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.footer-logo img {
  width: 40px;
  height: 40px;
}

.footer-address a {
  text-decoration: none;
  font-style: normal;
}

.footer-address a:hover,
.footer-address a:focus-visible {
  text-decoration: underline;
}

.footer-email {
  text-decoration: none;
}

.footer-email:hover,
.footer-email:focus-visible {
  text-decoration: underline;
}

.footer-legal {
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 0;
}

.footer-legal a {
  text-decoration: underline;
}
