/* Post-event presentation: the association is primary and the anniversary is its first completed project. */
.hero .hero-grid {
  grid-template-columns: minmax(0, .88fr) minmax(380px, 1.12fr);
  justify-content: stretch;
  min-height: 570px;
  gap: clamp(36px, 6vw, 80px);
}

.hero .lead {
  max-width: 720px;
}

.hero-intro-photo {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(239, 215, 158, .65);
  border-radius: 24px;
  background: #153f30;
  box-shadow: 0 28px 65px rgba(0, 0, 0, .30);
}

.hero-intro-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projects-section {
  background: #fff;
}

.projects-heading {
  max-width: 820px;
  margin-bottom: 30px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-left: 7px solid var(--gold);
  border-radius: 20px;
  background: var(--cream);
  box-shadow: 0 16px 40px rgba(23, 75, 53, .10);
}

.project-status {
  display: block;
  margin-bottom: 10px;
  color: var(--forest);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0 0 12px;
  color: var(--forest);
  font: 600 clamp(1.8rem, 4vw, 3.1rem)/1.08 Georgia, serif;
}

.project-card p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.project-link::after {
  content: "⌄";
  display: inline-block;
  font-size: 1.25em;
  line-height: .8;
  transform: translateY(-2px);
  transition: transform .25s ease;
}

.project-link[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(180deg);
}

.project-link:hover,
.project-link:focus-visible {
  background: var(--forest2);
  outline: 3px solid rgba(211, 178, 100, .45);
  outline-offset: 3px;
}

.event-completed {
  color: #fff;
  font: 600 clamp(1.13rem, 2vw, 1.55rem)/1.55 Georgia, serif;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .34);
}

#event[hidden] {
  display: none !important;
}

#event.is-open {
  animation: project-details-open .38s ease-out both;
}

@keyframes project-details-open {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #event.is-open { animation: none; }
  .project-link::after { transition: none; }
}

.event-project-visual-card {
  padding: 0;
  overflow: hidden;
}

.event-project-visual-card .hero-visual {
  width: 100%;
  height: 100%;
  min-height: 650px;
  align-self: stretch;
}

.event-project-visual-card .hero-photo {
  min-height: 650px;
  height: 100%;
  border-radius: 19px;
  box-shadow: none;
}

.event-project-visual-card .hero-event-title {
  top: 20px;
  right: 4%;
  left: 4%;
  width: auto;
  max-width: none;
  white-space: normal;
  text-align: center;
  font-size: clamp(1.45rem, 2.45vw, 2.45rem);
  line-height: 1.03;
}

.event-project-visual-card .hero-anniversary-link {
  top: clamp(78px, 12%, 88px);
  bottom: auto;
}

.event-project-visual-card .hero-memorial {
  top: clamp(78px, 12%, 88px);
}

.event-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 30px 0 40px;
}

.event-gallery a {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: 14px;
  background: #e9e4da;
  box-shadow: 0 10px 28px rgba(23, 75, 53, .13);
  transition: transform .2s, box-shadow .2s;
}

.event-gallery a:hover,
.event-gallery a:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(23, 75, 53, .23);
  outline: 3px solid rgba(211, 178, 100, .58);
  outline-offset: 3px;
}

.event-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-panel .event-gallery {
  margin: 34px 0 20px;
}

.why-adam-photo {
  width: min(100%, 560px);
  margin: 30px auto 18px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(10, 36, 25, .28);
}

.why-adam-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (max-width: 520px) {
  .why-adam-photo {
    width: 100%;
  }
}

header nav {
  gap: clamp(8px, 1vw, 16px);
  font-size: clamp(.74rem, .78vw, .84rem);
  white-space: nowrap;
}

.photo-gallery-section {
  background: linear-gradient(135deg, #f5f0e4 0%, #fffdf8 72%);
}

.photo-gallery-intro {
  max-width: 720px;
  margin: -8px 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

.photo-gallery-album {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 42%) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(22px, 4vw, 48px);
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 7px solid var(--gold);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(23, 75, 53, .12);
  transition: transform .2s ease, box-shadow .2s ease;
}

.photo-gallery-album:hover,
.photo-gallery-album:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(23, 75, 53, .2);
  outline: 3px solid rgba(195, 161, 94, .48);
  outline-offset: 4px;
}

.photo-gallery-album img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.photo-gallery-album-copy {
  display: grid;
  gap: 12px;
  padding: 26px 0;
}

.photo-gallery-album-copy strong {
  color: var(--forest);
  font: 600 clamp(1.85rem, 3.4vw, 3rem)/1.08 Georgia, serif;
}

.photo-gallery-album-copy span {
  color: #47695a;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.photo-gallery-arrow {
  padding-right: clamp(24px, 4vw, 50px);
  color: var(--gold);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1;
}

.event-gallery-more {
  margin: 24px 0 38px;
  text-align: center;
}

.event-gallery-more a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 20px;
  border: 1px solid rgba(239, 215, 158, .65);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-weight: 800;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.event-gallery-more a:hover,
.event-gallery-more a:focus-visible {
  transform: translateY(-2px);
  background: rgba(239, 215, 158, .18);
  outline: 3px solid rgba(239, 215, 158, .48);
  outline-offset: 3px;
}

body.event-lightbox-open {
  overflow: hidden;
}

.event-lightbox[hidden] {
  display: none;
}

.event-lightbox {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(54px, 92px) minmax(0, 1fr) minmax(54px, 92px);
  align-items: center;
  gap: 14px;
  padding: clamp(58px, 7vw, 88px) clamp(12px, 3vw, 44px) clamp(24px, 4vw, 48px);
  background: rgba(5, 17, 12, .96);
  color: #fff;
}

.event-lightbox-figure {
  min-width: 0;
  margin: 0;
  text-align: center;
}

.event-lightbox-image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  margin: auto;
  border-radius: 12px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .6);
  object-fit: contain;
}

.event-lightbox-caption {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 15px;
  color: rgba(255, 255, 255, .88);
  font-size: .94rem;
}

.event-lightbox-counter {
  flex: 0 0 auto;
  color: #efd79e;
  font-weight: 800;
}

.event-lightbox-button {
  display: grid;
  place-items: center;
  width: clamp(48px, 5vw, 68px);
  height: clamp(48px, 5vw, 68px);
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  color: #fff;
  background: rgba(23, 75, 53, .78);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.event-lightbox-button:hover,
.event-lightbox-button:focus-visible {
  transform: scale(1.06);
  background: var(--gold);
  outline: 3px solid rgba(255, 255, 255, .7);
  outline-offset: 3px;
}

.event-lightbox-prev {
  justify-self: end;
}

.event-lightbox-next {
  justify-self: start;
}

.event-lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 48px;
  height: 48px;
  font-size: 2rem;
}

@media (max-width: 1180px) {
  header nav {
    display: none;
    position: absolute;
    top: 82px;
    left: 17px;
    right: 17px;
    padding: 22px;
    border-radius: 15px;
    background: var(--forest);
    flex-direction: column;
    white-space: normal;
  }

  header nav.open {
    display: flex;
  }

  header .mobile {
    display: block;
  }
}

@media (max-width: 700px) {
  .photo-gallery-album {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .photo-gallery-album img {
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .photo-gallery-album-copy {
    padding: 24px 24px 8px;
  }

  .photo-gallery-arrow {
    padding: 0 24px 24px;
    font-size: 3rem;
  }

  .event-lightbox {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 6px;
    padding: 70px 7px 24px;
  }

  .event-lightbox-button {
    width: 46px;
    height: 46px;
  }

  .event-lightbox-image {
    max-height: calc(100vh - 190px);
  }

  .event-lightbox-caption {
    display: grid;
    gap: 4px;
    padding: 0 3px;
    font-size: .8rem;
  }
}

@media (max-width: 980px) {
  .event-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-project-visual-card .hero-event-title { max-width: none; }
}

@media (max-width: 960px) {
  .hero .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 34px;
    padding-bottom: 54px;
  }

  .hero-intro-photo {
    order: 2;
    width: min(100%, 760px);
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .hero .hero-grid {
    min-height: 0;
    gap: 28px;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-link {
    justify-self: start;
  }

  .event-project-visual-card .hero-visual,
  .event-project-visual-card .hero-photo {
    min-height: 560px;
  }

  .event-project-visual-card .hero-event-title {
    top: 18px;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .event-gallery {
    grid-template-columns: 1fr;
  }
}

/* Keep the longer translated project titles clear of the raised overlays. */
@media (min-width: 761px) {
  html[lang="uk"] .event-project-visual-card .hero-event-title,
  html[lang="ja"] .event-project-visual-card .hero-event-title {
    font-size: clamp(1.15rem, 1.65vw, 1.65rem);
  }
}
