/* ==========================================================================
   Advent Aid
   Palette, type and the recurring red "sash" device are taken from the
   original 2014-era site; layout is rebuilt so it works at every width.
   ========================================================================== */

@font-face {
  font-family: "Kelly Slab";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/kelly-slab-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Kelly Slab";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/kelly-slab-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --red: #d3310c;
  --red-deep: #b02a0b;
  --cream: #f1f4ed;
  --ink: #161515;
  --grey: #5f6360;
  --hairline: #dcdcd6;
  --wrap: 980px;
  --gutter: 20px;
  --sans-serif-fallback: Georgia, "Times New Roman", serif;
}

/* --- base ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Kelly Slab", var(--sans-serif-fallback);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--red-deep);
}

h1,
h2,
h3 {
  font-weight: 400;
  margin: 0;
  line-height: 1.25;
}

p {
  margin: 0 0 1.15em;
}

p:last-child {
  margin-bottom: 0;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* --- masthead ------------------------------------------------------------ */

.site-header {
  background: #fff;
  padding-top: 30px;
}

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: block;
  text-decoration: none;
  line-height: 1;
  flex: 0 0 auto;
}

.brand span {
  display: block;
  width: fit-content;
  font-size: 38px;
  letter-spacing: 0.01em;
  color: #fff;
  padding: 3px 13px 6px;
}

.brand .brand-a {
  background: var(--ink);
}

.brand .brand-b {
  background: var(--red);
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 26px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav a {
  color: var(--grey);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--red);
}

.nav a[aria-current="page"] {
  color: var(--red);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px 4px;
  margin-top: 10px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -8px;
}

.nav-toggle-bars::after {
  top: 8px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- the red sash -------------------------------------------------------- */

.sash {
  display: inline-block;
  position: relative;
  background: var(--red);
  color: #fff;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  padding: 9px 26px 12px;
}

.sash--sentence {
  text-transform: none;
  letter-spacing: 0.01em;
}

/* small folded tail at the bottom-left corner */
.sash::after,
.btn-sash::after {
  content: "";
  position: absolute;
  left: -8px;
  bottom: -8px;
  width: 8px;
  height: 8px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  max-width: var(--wrap);
  margin: 26px auto 0;
  background: var(--ink);
  overflow: hidden;
}

.hero-slides {
  position: relative;
  aspect-ratio: 16 / 9;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

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

.hero-caption {
  position: absolute;
  right: 0;
  bottom: 62px;
  z-index: 3;
  pointer-events: none;
  background: var(--red);
  color: #fff;
  font-size: 22px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  padding: 13px 28px 15px;
  max-width: 78%;
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  pointer-events: none;
}

.hero-count {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-arrows {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.hero-arrows button,
.lightbox button {
  background: rgba(22, 21, 21, 0.72);
  color: #fff;
  border: 0;
  width: 40px;
  height: 40px;
  font-size: 18px;
  font-family: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}

.hero-arrows button:hover {
  background: var(--red);
}

.hero-zoom {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: none;
  border: 0;
  cursor: zoom-in;
  padding: 0;
}

.hero-zoom span {
  position: absolute;
  left: 20px;
  bottom: 60px;
  background: rgba(22, 21, 21, 0.72);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hero-zoom:hover span,
.hero-zoom:focus-visible span {
  opacity: 1;
}

/* --- generic page intro -------------------------------------------------- */

.page-intro {
  background: var(--cream);
  padding: 48px 0 46px;
}

.cream-section {
  background: var(--cream);
  padding: 44px 0 64px;
}

/* --- home body ----------------------------------------------------------- */

.home-body {
  background: var(--cream);
  padding: 54px 0 66px;
}

.home-grid {
  display: grid;
  grid-template-columns: 378px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.home-lede .sash {
  margin-bottom: 0;
  font-size: 23px;
}

.panel-dark {
  background: var(--ink);
  color: #fff;
  padding: 28px 26px 12px;
  font-size: 13.5px;
  line-height: 1.75;
}

.panel-dark p {
  margin-bottom: 18px;
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  padding-top: 14px;
}

.trio-item {
  text-align: left;
}

.trio-icon {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
  margin: 0 auto 26px;
}

.trio-icon img {
  width: 52px;
  height: auto;
}

.btn-sash {
  position: relative;
  display: block;
  text-align: center;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 10px 10px 11px;
  transition: background 0.15s ease;
}

.btn-sash:hover,
.btn-sash:focus-visible {
  background: var(--red-deep);
  color: #fff;
}

.trio-item p {
  margin-top: 28px;
  font-size: 13.5px;
  line-height: 1.6;
}

/* --- about --------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}

.about-left {
  padding-top: 112px;
}

.about-left .sash {
  margin-bottom: 32px;
}

.about-right {
  display: flex;
  flex-direction: column;
}

.about-figure {
  margin: 0 0 34px auto;
  max-width: 392px;
}

.about-outro {
  text-align: center;
  margin: 56px auto 0;
  max-width: 620px;
  font-size: 14px;
}

/* --- find a food bank ---------------------------------------------------- */

.banks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 40px;
  margin-top: 40px;
}

.bank-figure {
  margin: 0;
  align-self: start;
}

.bank-figure img {
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
}

.bank-item .num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--ink);
  color: #fff;
  font-size: 24px;
  margin-bottom: 18px;
}

.bank-item h2 {
  font-size: 17px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.bank-item p {
  font-size: 14px;
  line-height: 1.65;
}

.bank-item .bank-link {
  display: inline-block;
  margin-top: 2px;
  font-size: 13px;
  word-break: break-word;
}

/* --- get involved -------------------------------------------------------- */

.steps {
  padding-bottom: 40px;
}

.step {
  position: relative;
  margin: 0;
}

.step + .step {
  margin-top: 30px;
}

.step img {
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: cover;
}

.step figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--red);
  color: #fff;
  font-size: 26px;
  line-height: 1.25;
  padding: 14px 26px 16px;
}

/* --- gallery ------------------------------------------------------------- */

.gallery {
  background: var(--cream);
  padding: 44px 0 60px;
}

.thumbs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 34px 0 4px;
  scroll-snap-type: x proximity;
}

.thumbs button {
  flex: 0 0 auto;
  width: 120px;
  height: 76px;
  padding: 0;
  border: 0;
  background: var(--ink);
  cursor: pointer;
  overflow: hidden;
  scroll-snap-align: start;
  opacity: 0.72;
  transition: opacity 0.15s ease, outline-color 0.15s ease;
  outline: 3px solid transparent;
  outline-offset: -3px;
}

.thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbs button:hover {
  opacity: 1;
}

.thumbs button[aria-current="true"] {
  opacity: 1;
  outline-color: var(--red);
}

.gallery-stage {
  position: relative;
  margin-top: 24px;
  background: var(--ink);
}

.gallery-stage img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
}

.stage-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: none;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

.stage-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  background: rgba(22, 21, 21, 0.75);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border: 0;
  font-family: inherit;
  cursor: zoom-in;
}

/* --- lightbox ------------------------------------------------------------ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 12, 12, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox[open],
.lightbox.is-open {
  display: flex;
}

.lightbox figure {
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  width: auto;
  margin: 0 auto;
}

.lightbox figcaption {
  color: #f2f2f2;
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.04em;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.lightbox-prev {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox button:hover {
  background: var(--red);
}

/* --- footer -------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 40px 0 44px;
  font-size: 13px;
  line-height: 1.65;
}

.footer-grid {
  display: grid;
  grid-template-columns: 173px minmax(0, 1fr) 300px;
  gap: 40px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 29px;
}

.footer-label {
  color: var(--red);
  display: block;
}

.site-footer a {
  color: var(--red);
  text-decoration: underline;
}

.site-footer a:hover {
  color: #ff7a55;
}

.footer-legal {
  color: #9a9a9a;
  font-size: 12px;
}

.footer-email {
  unicode-bidi: bidi-override;
}

/* --- not found ----------------------------------------------------------- */

.notfound {
  background: var(--cream);
  padding: 80px 0 96px;
  text-align: center;
}

.notfound .sash {
  font-size: 30px;
}

.notfound p {
  max-width: 520px;
  margin: 34px auto 26px;
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .nav {
    gap: 18px;
    font-size: 12px;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .home-lede {
    max-width: 480px;
  }

  .trio {
    padding-top: 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .about-left {
    padding-top: 0;
  }

  .about-figure {
    order: -1;
    margin: 0 auto 10px;
    max-width: 320px;
  }

  .banks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 32px;
  }

  .bank-figure {
    grid-column: 1 / -1;
    order: -1;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 32px;
    padding: 0 var(--gutter);
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-top: 18px;
  }

  .masthead {
    align-items: center;
  }

  .brand span {
    font-size: 26px;
    padding: 2px 10px 4px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 60;
    background: #fff;
    border-top: 1px solid var(--hairline);
    box-shadow: 0 10px 24px rgba(22, 21, 21, 0.12);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 14px;
    margin-top: 0;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 13px 2px;
    border-bottom: 1px solid var(--hairline);
    font-size: 14px;
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .site-header .wrap {
    position: relative;
  }

  .hero {
    margin-top: 16px;
  }

  .hero-caption {
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    font-size: 14px;
    padding: 11px 16px 12px;
    letter-spacing: 0.05em;
  }

  .hero-controls {
    top: 0;
    bottom: auto;
    padding: 10px 12px 0;
  }

  .hero-arrows button {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .hero-zoom span {
    display: none;
  }

  .hero-slides {
    aspect-ratio: 4 / 3;
  }

  .sash {
    font-size: 19px;
    padding: 8px 18px 10px;
  }

  .home-body {
    padding: 36px 0 46px;
  }

  .trio {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .trio-icon {
    margin: 0 0 18px;
  }

  .trio-item p {
    margin-top: 18px;
  }

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

  .step figcaption {
    position: static;
    font-size: 19px;
    padding: 12px 16px 14px;
  }

  .step img {
    max-height: none;
  }

  .thumbs button {
    width: 92px;
    height: 58px;
  }

  .gallery-stage img {
    aspect-ratio: 3 / 4;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 16px;
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
