/*-------------------------------------------------------------------------------------
Custom Landing Page Grid & Overlay Stylesheet for Colors Production
-------------------------------------------------------------------------------------*/

/* 1. Fullscreen Overlay Container */
#landing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  z-index: 999999; /* Ensure it is on top of everything */
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), visibility 1.2s;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  box-sizing: border-box;
}

#landing-overlay.fade-away {
  opacity: 0;
  visibility: hidden;
}

/* 2. Responsive CSS Grid Layout */
.landing-grid {
  display: grid;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #000;
  /* Mobile Default Layout: 3x3 Grid */
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0; /* Seamless grid */
}

/* Desktop & Tablet Layout: 3x5 Grid */
@media (min-width: 768px) {
  .landing-grid {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}

/* 3. Grid Cell Styling */
.landing-grid .grid-item {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background-color: #000;
}

/* Image styling with smooth opacity fade */
.landing-grid .img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 0.8s ease-in-out;
  user-select: none;
  pointer-events: none;
}

/* Hidden cell state for fading */
.landing-grid .img-item img.fade-out {
  opacity: 0;
}

/* 4. Center Grid Cell (Logo & Enter Button) */
.landing-grid .center-item {
  background-color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  box-sizing: border-box;
  color: #fff;
  z-index: 10;
  /* Mobile Default Center Position: Row 2, Col 2 */
  grid-area: 2 / 2 / 3 / 3;
}

/* Desktop Center Position: Row 2, Col 3 */
@media (min-width: 768px) {
  .landing-grid .center-item {
    grid-area: 2 / 3 / 3 / 4;
  }
}

/* 5. Mobile Hiding of Excess Grid Cells */
@media (max-width: 767px) {
  /* We only need 9 cells for a 3x3 grid.
     1 to 7 are image items, 8 is center-item, 9 is image-item.
     The 10th and later elements are hidden to keep the grid perfectly 3x3. */
  .landing-grid .img-item:nth-child(n+10) {
    display: none;
  }
}

/* 6. Typography and Logo Branding */
.landing-grid .logo-container {
  margin-bottom: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.landing-grid .logo-signature {
  font-family: 'Alex Brush', cursive;
  font-size: 5rem;
  font-weight: 400;
  color: #fff;
  line-height: 1;
  margin-bottom: -10px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  display: block;
  text-transform: none;
}

@media (max-width: 576px) {
  .landing-grid .logo-signature {
    font-size: 4rem;
  }
}

.landing-grid .logo-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  padding: 0;
  opacity: 0.95;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .landing-grid .logo-title {
    font-size: 0.75rem;
    letter-spacing: 0.25em;
  }
}

/* 7. Enter Button Styling */
.landing-grid .enter-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.75);
  padding: 12px 36px;
  cursor: pointer;
  outline: none;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 576px) {
  .landing-grid .enter-btn {
    font-size: 0.65rem;
    padding: 10px 28px;
  }
}

.landing-grid .enter-btn:hover {
  background-color: #fff;
  color: #000;
  border-color: #fff;
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.landing-grid .enter-btn:active {
  transform: scale(0.97);
}
