/* menu-overlay.css — SINGLE SOURCE OF TRUTH for all menu overlay styles.
   All pages link to this file. Homepage (index.html) is the gold standard.
   DO NOT add page-specific menu overlay styles inline — edit THIS file. */

/* ===== NAV OVERLAY (fullscreen menu — matches Toby's Divi/Motion.page design) ===== */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #ffefc6;
  padding-top: 70px;
  overflow: hidden;
}
.nav-overlay.active {
  display: flex;
}

/* Outer rounded card (Toby's row_2 / hero-main-ctn) */
.menu-content {
  position: relative;
  background-color: #f1cfca;
  border-radius: 5em;
  height: 85vh;
  width: 96%;
  max-width: 1440px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Nav text container (Toby's row_7 / tv-outer-ctn) */
.menu-nav {
  position: relative;
  z-index: 10;
  max-width: 70%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4em;
}

.nav-overlay a {
  font-family: 'eurostile-extended', 'Orbitron', sans-serif;
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 200ms ease;
  text-shadow: 0.05em 0.05em 0em #ffefc6;
  line-height: 1.05;
  white-space: nowrap;
}
.nav-overlay a:hover {
  opacity: 0.75;
}

/* Individual menu item colors & sizes — NAMED CLASSES (position-independent) */
.nav-overlay a.menu-home {
  color: #257b7a;
  font-size: clamp(50px, 10vw, 140px);
}
.nav-overlay a.menu-browser {
  color: #a32215;
  font-size: clamp(36px, 6vw, 82px);
  padding-top: 0;
  line-height: 0.8em;
}
.nav-overlay a.menu-collections {
  color: #b8860b;
  font-size: clamp(36px, 6vw, 82px);
  padding-top: 0;
  line-height: 0.8em;
}
.nav-overlay a.menu-account {
  color: #1f621f;
  font-size: clamp(28px, 5vw, 62px);
  padding-top: 0;
}
.nav-overlay a.menu-cart {
  color: #cb3d14;
  font-size: clamp(36px, 7vw, 72px);
  padding-top: 0;
}
.nav-overlay a.menu-faqs {
  color: #064064;
  font-size: clamp(60px, 11vw, 156px);
  padding-top: 0;
}
.nav-overlay a.menu-submit {
  color: #a32215;
  font-size: clamp(20px, 3.3vw, 46px);
  padding-top: 0;
}

/* ===== REVEAL LAYERS (4 color layers that animate on open) ===== */
.reveal-layer {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0%;
  z-index: 1;
  border-radius: 5em;
  overflow: hidden;
}
.reveal-yellow    { background-color: #e7aa04; z-index: 2; }
.reveal-green     { background-color: #1f621f; z-index: 3; opacity: 0; }
.reveal-bluegreen { background-color: #257b7a; z-index: 4; }
.reveal-pink      { background-color: #f1cfca; background-image: url('assets/grain.png'); background-blend-mode: overlay; background-repeat: repeat; z-index: 5; opacity: 0; }

/* ===== REVEAL KEYFRAMES ===== */
@keyframes revealYellow {
  from { height: 0%; }
  to   { height: 100%; }
}
@keyframes revealGreen {
  from { opacity: 0; height: 0%; }
  to   { opacity: 1; height: 100%; }
}
@keyframes revealBlueGreen {
  from { height: 0%; }
  to   { height: 100%; }
}
@keyframes revealPink {
  from { opacity: 0; height: 0%; }
  to   { opacity: 1; height: 100%; }
}

.nav-overlay.active .reveal-yellow    { animation: revealYellow    0.6s cubic-bezier(0.76, 0, 0.24, 1) forwards; }
.nav-overlay.active .reveal-green     { animation: revealGreen     1.1s cubic-bezier(0.76, 0, 0.24, 1) forwards; }
.nav-overlay.active .reveal-bluegreen { animation: revealBlueGreen 1.5s cubic-bezier(0.76, 0, 0.24, 1) forwards; }
.nav-overlay.active .reveal-pink      { animation: revealPink      1.5s cubic-bezier(0.76, 0, 0.24, 1) forwards; }

/* ===== MENU ITEM REVEAL ANIMATION ===== */
@keyframes menuItemReveal {
  from { opacity: 0; transform: translateY(75%); }
  to   { opacity: 1; transform: translateY(0); }
}
.menu-nav a {
  opacity: 0;
  transform: translateY(75%);
}
.nav-overlay.active .menu-nav a {
  animation: menuItemReveal 1s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
/* Stagger: 80ms each, starting at 1.5s (after reveal layers finish) */
.nav-overlay.active .menu-nav a:nth-child(1) { animation-delay: 1.50s; }
.nav-overlay.active .menu-nav a:nth-child(2) { animation-delay: 1.58s; }
.nav-overlay.active .menu-nav a:nth-child(3) { animation-delay: 1.66s; }
.nav-overlay.active .menu-nav a:nth-child(4) { animation-delay: 1.74s; }
.nav-overlay.active .menu-nav a:nth-child(5) { animation-delay: 1.82s; }
.nav-overlay.active .menu-nav a:nth-child(6) { animation-delay: 1.90s; }
.nav-overlay.active .menu-nav a:nth-child(7) { animation-delay: 1.98s; }

/* ===== RESPONSIVE — landscape phones (short viewports) ===== */
@media (max-height: 500px) {
  .menu-content { height: 95vh; }
  .menu-nav { overflow-y: auto; max-height: calc(95vh - 40px); gap: 0.2em; }
  .nav-overlay a.menu-home { font-size: clamp(28px, 6vw, 60px); }
  .nav-overlay a.menu-faqs { font-size: clamp(34px, 7vw, 70px); }
}

/* ===== RESPONSIVE — narrow screens ===== */
@media (max-width: 600px) {
  .nav-overlay a.menu-home { font-size: 38px; }
  .nav-overlay a.menu-browser { font-size: 26px; }
  .nav-overlay a.menu-collections { font-size: 26px; }
  .nav-overlay a.menu-account { font-size: 22px; }
  .nav-overlay a.menu-cart { font-size: 28px; }
  .nav-overlay a.menu-faqs { font-size: 44px; }
  .nav-overlay a.menu-submit { font-size: 16px; }
  .menu-nav { max-width: 90%; }
}
