/*-------------------------------------------------------------------------------------
Custom Landing Page Grid & Overlay Stylesheet for Akhilesh Rupaji Chronicle
-------------------------------------------------------------------------------------*/

/* 1. Fullscreen Overlay Container */
#landing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  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;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* 2. Responsive CSS Grid Layout */
.landing-grid {
  display: grid;
  margin: 0;
  padding: 0;
  background-color: #000;
  gap: 0; /* Seamless grid */
  flex-shrink: 0; /* Ensure grid never shrinks below calculated dimensions */
}

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

/* Image styling - Exact 1:1 fit */
.landing-grid .img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  user-select: none;
  pointer-events: none;
}

/* 4. Center Grid Cell (Logo & Enter Button) */
.landing-grid .center-item {
  background-color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 15px;
  box-sizing: border-box;
  color: #000000;
  z-index: 10;
  gap: 22px;
}

/* 5. Typography and Logo Branding */
.landing-grid .logo-container {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.landing-grid .logo-img {
  width: 140px;
  max-width: 85%;
  height: auto;
  display: block;
}

.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;
}

.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;
}

/* 6. 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: #000000;
  background-color: white;
  border: 1px solid #ffffff;
  padding: 12px 36px;
  cursor: pointer;
  outline: none;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  margin: 0;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}

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

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

/* 7. Responsive Styles for Tablet and Small Screens */
@media (max-width: 768px) {
  .landing-grid .center-item {
    padding: 12px 8px;
    gap: 14px;
    justify-content: center;
    align-items: center;
  }
  .landing-grid .logo-container {
    margin: 0;
  }
  .landing-grid .logo-img {
    width: 110px;
    max-width: 80%;
  }
  .landing-grid .logo-signature {
    font-size: 4rem;
  }
  .landing-grid .logo-title {
    font-size: 0.8rem;
    letter-spacing: 0.28em;
  }
  .landing-grid .enter-btn {
    font-size: 0.68rem;
    letter-spacing: 0.25em;
    padding: 8px 22px;
    margin: 0;
  }
}

@media (max-width: 576px) {
  .landing-grid .center-item {
    padding: 6px 4px;
    gap: 10px;
    justify-content: center;
    align-items: center;
  }
  .landing-grid .logo-container {
    margin: 0;
  }
  .landing-grid .logo-img {
    width: 88px;
    max-width: 75%;
  }
  .landing-grid .logo-signature {
    font-size: 3.2rem;
  }
  .landing-grid .logo-title {
    font-size: 0.7rem;
    letter-spacing: 0.22em;
  }
  .landing-grid .enter-btn {
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    padding: 6px 16px;
    margin: 0;
  }
}

@media (max-width: 380px) {
  .landing-grid .center-item {
    padding: 4px 2px;
    gap: 8px;
  }
  .landing-grid .logo-img {
    width: 76px;
    max-width: 72%;
  }
  .landing-grid .enter-btn {
    font-size: 0.52rem;
    letter-spacing: 0.18em;
    padding: 5px 12px;
    margin: 0;
  }
}
