@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital@0;1&family=League+Spartan:wght@400;500&family=IBM+Plex+Serif:ital@0;1&display=swap');

:root {
  --ink: #222222;
  --muted: #888888;
  --rule: #e4e0d8;
  --panel: #f2efe9;
  --content-width: 800px;
  --hero-width: 896px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "IBM Plex Serif", serif;
}

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

a {
  color: inherit;
}

.wrap {
  max-width: var(--hero-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 100px 0 56px;
  flex-wrap: wrap;
}

.eyebrow {
  font-family: "League Spartan", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 8px;
}

.hero h1 {
  font-family: "Libre Baskerville", serif;
  font-weight: 400;
  font-size: 56px;
  line-height: 1.1;
  margin: 0 0 10px;
}

.hero-text {
  flex: 1 1 380px;
  min-width: 0;
}

.hero .dates {
  font-family: "Libre Baskerville", serif;
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  margin: 0;
}

.hero-photo {
  flex-shrink: 0;
  width: 353px;
  max-width: 100%;
}

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.caption {
  font-family: "League Spartan", sans-serif;
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 0;
}

/* Body copy */

main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-bottom: 60px;
}

main p {
  font-size: 18px;
  line-height: 1.77;
  margin: 0 0 24px;
}

main p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

main h2 {
  font-family: "League Spartan", sans-serif;
  font-weight: 400;
  font-size: 27px;
  color: var(--muted);
  margin: 56px 0 20px;
}

/* Photo rows */
/* Justified layout: every image in a row shares one height and keeps its
   own natural aspect ratio (matches the source site), rather than being
   stretched into equal-width columns. */

.row {
  display: flex;
  gap: 24px;
  margin: 8px 0 32px;
  justify-content: center;
  height: min(340px, 38vw);
}

.row img {
  width: auto;
  height: 100%;
  max-width: 100%;
  flex: 0 1 auto;
  object-fit: contain;
}

.row:not(.two):not(.three):not(.uneven) {
  height: auto;
}

.row:not(.two):not(.three):not(.uneven) img {
  width: 100%;
  height: auto;
  max-width: 520px;
  margin: 0 auto;
}

.row.three > *:nth-child(2) {
  align-self: flex-start;
}

figure {
  margin: 0;
}

/* Pull-quote with photo */

.quote-figure {
  float: right;
  width: 220px;
  margin: 4px 0 20px 28px;
}

.quote-figure img {
  width: 100%;
  height: auto;
}

.pull-quote {
  overflow: hidden;
}

.pull-quote::after {
  content: "";
  display: table;
  clear: both;
}

/* AAF booklet block */

.booklet {
  float: right;
  width: 260px;
  margin: 4px 0 20px 28px;
  text-align: center;
}

.booklet img {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.booklet .caption {
  margin-bottom: 14px;
}

.btn {
  display: inline-block;
  font-family: "League Spartan", sans-serif;
  font-size: 14px;
  color: #fff;
  background: #545454;
  border-radius: 50px;
  padding: 12px 20px 10px;
  text-decoration: none;
}

.btn:hover {
  background: #333;
}

/* Mosaic grid near the end */

.mosaic {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
  margin: 8px 0 32px;
}

.mosaic .wide {
  grid-column: 1;
  grid-row: 1;
}

.mosaic .tall {
  grid-column: 2;
  grid-row: 1 / span 2;
  height: 100%;
}

.mosaic .tall img {
  height: 100%;
  object-fit: cover;
}

.mosaic .small {
  grid-column: 1;
  display: flex;
  gap: 16px;
}

.mosaic .small img {
  flex: 1;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.mosaic img {
  width: 100%;
  object-fit: cover;
}

.mosaic .wide img {
  aspect-ratio: 8 / 3;
}

/* Sign-off + donate panel */

.signoff {
  margin-top: 8px;
}

.signoff p {
  margin: 0 0 4px;
}

.signoff a {
  text-decoration: underline;
}

.donate-panel {
  background: var(--panel);
  border-radius: 8px;
  padding: 32px 40px;
  margin: 48px 0 100px;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.donate-panel p {
  font-style: italic;
  font-size: 18px;
  margin: 0 0 16px;
}

.donate-panel a.charity {
  text-decoration: underline;
  font-style: normal;
}

.donate-panel .donate-link {
  font-family: "League Spartan", sans-serif;
  font-size: 18px;
  color: #111;
  text-decoration: none;
  font-weight: 500;
}

.donate-panel .donate-link:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 900px) {
  .wrap {
    padding: 0 24px;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero h1 {
    font-size: 40px;
    max-width: 100%;
  }

  main {
    max-width: 100%;
  }

  .row {
    flex-wrap: wrap;
    height: auto;
  }

  .row img {
    width: 100%;
    height: auto;
    max-width: 320px;
    margin: 0 auto;
  }

  .quote-figure,
  .booklet {
    float: none;
    width: 100%;
    margin: 0 0 20px;
  }

  .mosaic {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .mosaic .tall {
    grid-column: 1;
    grid-row: auto;
    height: auto;
  }

  .mosaic .tall img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .donate-panel {
    padding: 28px 24px;
  }
}

/* Lightbox */

.lightbox-trigger {
  cursor: zoom-in;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  color: #fff;
  font-family: "League Spartan", sans-serif;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.lightbox-caption {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ccc;
  font-family: "League Spartan", sans-serif;
  font-size: 14px;
}
