.home-page .hero {
  background-image: none;
}
.home-page .hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #dce8dc;
}
.home-page .hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.home-page .hero-slide.is-active {
  opacity: 1;
}
.home-page .hero-overlay {
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.95),
      rgba(255, 255, 255, 0.87) 40%,
      rgba(255, 255, 255, 0.48) 75%,
      rgba(255, 255, 255, 0.55)
    ),
    linear-gradient(0deg, rgba(255, 255, 255, 0.68), transparent 60%);
}
.site-experience .route-grid.route-grid-real {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 48px;
  align-items: center;
}
.gallery-main {
  background: #f5f9fc;
  padding-bottom: 60px;
}
.gallery-intro {
  padding: 64px 0 50px;
  background: linear-gradient(120deg, #edf7ff, #fff 65%);
}
.gallery-kicker {
  margin: 0 0 16px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #006dd2;
}
.gallery-intro h1 {
  max-width: 850px;
  margin: 0 0 20px;
  color: #061f3f;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.08;
}
.gallery-intro h1 span {
  color: #006dd2;
}
.gallery-intro p:not(.gallery-kicker) {
  max-width: 62ch;
  margin: 0 0 24px;
  font-size: 1rem;
  line-height: 1.8;
  color: #46617b;
}
.gallery-section {
  padding-top: 44px;
  scroll-margin-top: 100px;
}
.gallery-hint {
  color: #46617b;
  margin: 16px 0 24px;
  font-size: 0.85rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.gallery-photo {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #dce7ef;
  text-decoration: none;
  color: #163b57;
  box-shadow: 0 5px 18px #08284108;
}
.gallery-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 10%;
}
.gallery-photo span {
  display: block;
  padding: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.6;
}
.gallery-video {
  display: block;
  width: 100%;
  max-height: 650px;
  margin-top: 24px;
  border-radius: 16px;
  background: #061f3f;
}
.gallery-dialog {
  position: fixed;
  inset: 0;
  width: min(1200px, 96vw);
  max-width: 96vw;
  max-height: 94dvh;
  padding: 54px 60px 20px;
  border: 1px solid #476177;
  border-radius: 16px;
  background: #071d30;
  color: #fff;
  overflow: auto;
}
.gallery-dialog::backdrop {
  background: #001121e8;
}
.gallery-dialog figure {
  margin: 0;
}
.gallery-dialog figure img {
  display: block;
  width: 100%;
  height: min(70dvh, 900px);
  object-fit: contain;
}
.gallery-dialog figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
}
.gallery-dialog button {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 1px solid #8094a6;
  border-radius: 50%;
  background: #15344f;
  color: white;
  font-size: 1.7rem;
  cursor: pointer;
}
.gallery-close {
  top: 8px;
  right: 12px;
}
.gallery-prev {
  left: 8px;
  top: 45%;
}
.gallery-next {
  right: 8px;
  top: 45%;
}
html.gallery-open {
  overflow: hidden;
}
@media (max-width: 1023px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .desktop-nav {
    gap: 12px;
  }
}
@media (max-width: 767px) {
  /* Lift the photo slightly; extend its height to keep the bottom covered. */
  .home-page .hero-slide {
    top: -32px;
    bottom: auto;
    height: calc(100% + 32px);
    object-position: center 15%;
  }
  .home-page .hero-overlay {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76)),
      linear-gradient(0deg, #ffffffc7, transparent);
  }
  .home-page .hero-grid {
    padding-bottom: 80px;
  }
  .site-experience .route-grid.route-grid-real {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .gallery-intro {
    padding: 38px 0;
  }
  .gallery-grid {
    gap: 12px;
  }
  .gallery-photo span {
    padding: 12px;
    font-size: 0.7rem;
  }
  .gallery-dialog {
    padding: 54px 44px 18px;
  }
}
@media (max-width: 420px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-page .hero-slide {
    transition: none;
  }
}
