/* ==========================================================================
   Homepage Hero, Curtain & Animations
   ========================================================================== */
.page-curtain {
  background-color: #f4eddc;
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  transition: opacity 0.8s ease-out;
  width: 100%;
  z-index: 990;
}

.page-curtain.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Modifier for the header to be transparent and overlay the hero section */
.header-transparent-overlay {
  background-color: transparent;
  left: 0;
  margin: 0;
  padding-top: 16px;
  position: absolute;
  top: 0;
  transition: background-color 0.4s ease, padding-top 0.4s ease;
  width: 100%;
  z-index: 989;
}

.header-transparent-overlay.scrolled {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background-color: rgba(189, 164, 133, 0.9);
  padding-top: 0;
  position: fixed;
  z-index: 1000;
}

.hero-image-container {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 15rem;
  /* Add space below hero section */
  position: relative;
  width: 100%;
}

.hero-image-container .hero-bg-image {
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  animation-duration: 22s;
  animation-iteration-count: infinite;
  animation-name: crossfade;
  animation-timing-function: ease-in-out;
  height: 100%;
  left: 0;
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  object-fit: cover;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

/* Stagger the animation for each image */
.hero-image-container .hero-bg-image:nth-of-type(1) {
  animation-delay: 0s;
}

.hero-image-container .hero-bg-image:nth-of-type(2) {
  animation-delay: 5s;
}

.hero-image-container .hero-bg-image:nth-of-type(3) {
  animation-delay: 10s;
}

.hero-image-container .hero-bg-image:nth-of-type(4) {
  animation-delay: 15s;
}

.hero-logo-group {
  align-items: center;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 991;
}

.hero-logo-group .hero-logo {
  animation: fadeInLogo 1.5s 0.5s ease-in forwards;
  margin: 0 1.5rem;
  max-height: 55vh;
  max-width: 70vw;
  opacity: 0;
}

.hero-logo-text {
  animation: fadeInLogo 1.5s 1.2s ease-in forwards;
  color: black;
  font-family: 'Montserrat', sans-serif;
  font-size: 5.5rem;
  font-weight: 400;
  opacity: 0;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.hero-logo-text::before {
  background-color: #f0dcc4;
  content: '';
  filter: blur(20px);
  height: 50%;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  z-index: -1;
}

/* ==========================================================================
   Homepage Menu Images
   ========================================================================== */
.menu-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  text-align: center;
  margin-bottom: 1.5rem;
  max-width: 50rem;
  width: 100%;
}

.menu-grid-top {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1.5fr 1fr;
}

.menu-grid-bottom {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1.5fr 1fr;
  margin-bottom: 5rem;
}

.menu-grid-bottom__left-group {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1fr;
}

.menu-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.menu-image-link {
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.menu-image-link img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
  width: 100%;
  height: 100%;
  filter: brightness(0.7);
}

.menu-image-link--tall img {
  aspect-ratio: 4 / 5;
}


.menu-image-link:hover img {
  transform: scale(1.1);
  filter: brightness(0.5);
}

.menu-image-link::before {
  content: none;
}

.menu-image-title {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  position: absolute;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  width: 100%;
}

/* Styles for page curtain on screens smaller than 1150px (63.89rem) */
@media (max-width: 1297px) {
  .hero-logo-group {
    flex-direction: column;
  }

  .hero-logo-group .hero-logo {
    margin: 1rem 0;
  }

  .hero-logo-text {
    font-size: 3rem;
  }
}

/* ==========================================================================
   Homepage Announcements
   ========================================================================== */
section.announcements {
  align-items: center;
  background-blend-mode: overlay;
  background-color: #604a2e;
  background-image: url("/static/woodtexture2.webp");
  background-repeat: repeat;
  border-radius: 1rem;
  color: white;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 2rem;
  margin-bottom: 5rem;
  padding: 2rem;
  position: relative;
}

section.announcements::before {
  background-color: rgba(51, 51, 51, 0.7);
  border-radius: 1rem;
  bottom: 0;
  content: '';
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

section.announcements .section-title {
  margin: 16px 24px;
  text-align: left;
}

.announcement-text-container {
  position: relative;
  text-align: left;
  z-index: 2;
}

.announcement-text {
  line-height: 1.5rem;
  white-space: pre-line;
}

section.announcements .announcement-image {
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.176);
  filter: brightness(1.3);
  max-width: 100%;
  position: relative;
  z-index: 2;
}

@media (max-width: 905px) {
  section.announcements::before {
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  .hero-image-container {
    margin-bottom: 10rem;
  }

  section.announcements {
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  /* Make hero logo and text larger on mobile */
  .hero-logo-text {
    font-size: 4rem;
  }

  /* Move the whole logo group up on mobile */
  .hero-logo-group {
    transform: translateY(-2vh);
  }

  .hero-logo-group .hero-logo {
    max-width: 80vw;
  }
}

/* =====x=====================================================================
   Keyframe Animations
   ========================================================================== */
@keyframes crossfade {
  0% {
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  /* Fade in for 1s */
  20% {
    opacity: 1;
  }

  /* Hold for 3s */
  25% {
    opacity: 0;
  }

  /* Fade out for 1s */
  100% {
    opacity: 0;
  }
}

@keyframes fadeInLogo {
  to {
    opacity: 1;
  }
}
