/* ==========================================================================
   PAGE 02: MAIN MENU STYLES
   Main menu stylesheet engineered for fluid responsiveness within a fixed
   or scaling game container wrapper using container query units (cqw / cqh).
   ========================================================================== */

/* ==========================================================================
   SECTION 1: DESIGN TOKENS & ROOT VARIABLES (:root)
   Centralized color palette, border highlights, and thematic text tokens.
   ========================================================================== */

:root {
  --bg-wood-dark: #1a0f0a;
  --bg-wood-mid: #2c1a12;
  --border-gold: #c89d38;
  --border-gold-light: #f3d078;
  --text-gold: #e2b755;
  --text-gold-dim: #a88238;
  --text-gold-subtle: #8c6a28;
  --text-dark: #1a0f0a;
}

/* ==========================================================================
   SECTION 2: CONTAINER & LAYOUT ARCHITECTURE (.menu-container, .menu-content)
   Primary layout structures establishing viewport-relative bounds and entry.
   ========================================================================== */

/* 
 * Outer menu viewport container.
 * Uses 4cqh padding top/bottom and 5cqw padding left/right (4% and 5% of container height/width)
 * to maintain consistent relative spacing inside the game wrapper layout.
 */
.menu-container {
  /* Layout / Display */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;

  /* Sizing & Box Model */
  width: 100%;
  height: 100%;
  padding: 4cqh 5cqw;
  box-sizing: border-box;

  /* Typography */
  text-align: center;
}

/* 
 * Centered content wrapper.
 * Constrained to a max-width of 72cqw (72% of container width) for balanced horizontal scaling.
 */
.menu-content {
  /* Layout / Display */
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Sizing & Box Model */
  width: 100%;
  max-width: 72cqw;

  /* Micro-Interactions */
  animation: menuFadeIn 0.4s ease-out forwards;
}

/* ==========================================================================
   SECTION 3: HEADER & TYPOGRAPHY (.menu-header, etc.)
   Title banner, game branding text, and relative typography scaling.
   ========================================================================== */

/* Header section container holding main title and subtitle text stack */
.menu-header {
  /* Layout / Display */
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Sizing & Box Model */
  margin-bottom: 4cqh;
}

/* Main title display font with continuous shining metallic gold gradient */
.menu-title {
  /* Sizing & Box Model */
  margin: 0;

  /* Typography */
  font-family: 'Cinzel', 'MedievalSharp', Georgia, serif;
  font-size: 9.75cqw;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: transparent;

  /* Visuals & Borders */
  background: linear-gradient(
    90deg,
    #c89d38 0%,
    #f3d078 25%,
    #fff3c4 50%,
    #e2b755 75%,
    #c89d38 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0.5cqh 1.2cqh rgba(0, 0, 0, 0.85)) drop-shadow(0 0 1cqw rgba(200, 157, 56, 0.35));

  /* Micro-Interactions */
  animation: titleGoldShine 3.5s linear infinite;
}

/* ==========================================================================
   SECTION 4: NAVIGATION & INTERACTIVE BUTTONS (.menu-actions, .btn-menu, etc.)
   Main menu interactive action triggers, button hierarchy, and feedback states.
   ========================================================================== */

/* Navigation stack layout wrapper */
.menu-actions {
  /* Layout / Display */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5cqh;

  /* Sizing & Box Model */
  width: 100%;
}

/* Shared base styling for all menu navigation buttons */
.btn-menu {
  /* Layout / Display */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Sizing & Box Model */
  width: 70%;
  box-sizing: border-box;

  /* Typography */
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;

  /* Visuals & Borders */
  border-radius: 1.35cqw;

  /* Micro-Interactions */
  cursor: pointer;
  outline: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shared hover reset to keep button text strictly dark without text glow */
.btn-menu:hover,
.btn-menu:hover .btn-text {
  color: var(--text-dark);
  text-shadow: none;
}

/* Primary call-to-action button (PLAY) with golden gradient fill */
.btn-menu.btn-primary {
  /* Sizing & Box Model */
  padding: 1.75cqh 3.5cqw;

  /* Typography */
  font-size: 4.6cqw;
  font-weight: 800;
  color: var(--text-dark);

  /* Visuals & Borders */
  background: linear-gradient(135deg, var(--border-gold) 0%, var(--border-gold-light) 1%);
  border: 0.22cqw solid var(--border-gold-light);
  box-shadow: 0 0.5cqh 1.8cqh rgba(0, 0, 0, 0.4), 0 0 1cqw rgba(243, 208, 120, 0.25);
}

/* Hover feedback state: Elevates primary button and adds glowing gold border edges */
.btn-menu.btn-primary:hover {
  /* Typography */
  color: var(--text-dark);
  text-shadow: none;

  /* Visuals & Borders */
  border-color: #fff0b3;
  box-shadow:
    0 0 0.9cqw rgba(243, 208, 120, 0.85),
    0 0 2cqw rgba(200, 157, 56, 0.55),
    inset 0 0 0.6cqw rgba(255, 243, 196, 0.7);

  /* Micro-Interactions */
  transform: translateY(-0.15cqh);
}

/* Active press feedback state: Compresses primary button to simulate tactile click */
.btn-menu.btn-primary:active {
  /* Visuals & Borders */
  filter: brightness(0.95);

  /* Micro-Interactions */
  transform: scale(0.96) translateY(0);
}

/* Secondary navigation buttons (LOADOUT, WIKI, SETTINGS) */
.btn-menu.btn-secondary {
  /* Sizing & Box Model */
  padding: 1.25cqh 3.5cqw;

  /* Typography */
  font-size: 3.1cqw;
  font-weight: 600;
  color: var(--text-dark);

  /* Visuals & Borders */
  background: linear-gradient(135deg, var(--border-gold) 0%, var(--border-gold-light) 200%);
  border: 0.22cqw solid var(--border-gold);
  backdrop-filter: blur(0.9cqw);
}

/* Hover feedback state: Highlights secondary button with elevation and glowing gold edges */
.btn-menu.btn-secondary:hover {
  /* Typography */
  color: var(--text-dark);
  text-shadow: none;

  /* Visuals & Borders */
  border-color: #fff0b3;
  box-shadow:
    0 0 0.9cqw rgba(243, 208, 120, 0.85),
    0 0 2cqw rgba(200, 157, 56, 0.55),
    inset 0 0 0.6cqw rgba(255, 243, 196, 0.7);

  /* Micro-Interactions */
  transform: translateY(-0.15cqh);
}

/* Active press feedback state: Darkens background tint and scales down button for click response */
.btn-menu.btn-secondary:active {
  /* Visuals & Borders */
  background-color: rgba(200, 157, 56, 0.2);

  /* Micro-Interactions */
  transform: scale(0.96) translateY(0);
}

/* Tutorial button (#btn-tutorial / .btn-menu.btn-tutorial) */
#btn-tutorial,
.btn-menu.btn-tutorial {
  /* Sizing & Box Model */
  padding: 1.25cqh 3.5cqw;

  /* Typography */
  font-family: 'Cinzel', 'MedievalSharp', Georgia, serif;
  font-size: 3.1cqw;
  font-weight: 700;
  color: var(--text-gold-light, #f3d078);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);

  /* Visuals & Borders */
  background: linear-gradient(180deg, #a81c1c 0%, #6b0f0f 100%);
  border: 1px solid var(--border-gold, #c89d38);
  box-shadow: 0 0.4cqh 1.4cqh rgba(0, 0, 0, 0.45);
}

/* Hover feedback state: Brightens crimson gradient and retains gold typography */
#btn-tutorial:hover,
#btn-tutorial:hover .btn-text,
.btn-menu.btn-tutorial:hover,
.btn-menu.btn-tutorial:hover .btn-text {
  /* Typography */
  color: var(--text-gold-light, #f3d078);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

#btn-tutorial:hover,
.btn-menu.btn-tutorial:hover {
  /* Visuals & Borders */
  background: linear-gradient(180deg, #c92424 0%, #851414 100%);
  border-color: var(--border-gold-light, #f3d078);
  box-shadow:
    0 0 0.9cqw rgba(243, 208, 120, 0.65),
    0 0 1.8cqw rgba(201, 36, 36, 0.5),
    inset 0 0 0.5cqw rgba(255, 243, 196, 0.35);

  /* Micro-Interactions */
  transform: translateY(-0.15cqh);
}

/* Active press feedback state: Deepens crimson fill and scales down slightly */
#btn-tutorial:active,
.btn-menu.btn-tutorial:active {
  /* Typography */
  color: var(--text-gold, #e2b755);

  /* Visuals & Borders */
  background: #540b0b;
  border-color: var(--border-gold, #c89d38);

  /* Micro-Interactions */
  transform: scale(0.96) translateY(0);
}

/* ==========================================================================
   SECTION 5: FOOTER & METADATA (.menu-footer, .version-tag)
   Footer element displaying game build versioning and metadata.
   ========================================================================== */

/* Footer container wrapper */
.menu-footer {
  /* Sizing & Box Model */
  margin-top: 4cqh;
}

/* Monospaced version string styling */
.version-tag {
  /* Typography */
  font-family: monospace, SFMono-Regular, Consolas;
  font-size: 3.85cqw;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-gold-subtle);
}

/* ==========================================================================
   SECTION 6: UTILITY CLASSES & ANIMATIONS (.menu-container.hidden, keyframes)
   Helper visibility overrides and keyframe animation definitions.
   ========================================================================== */

/* State utility class to hide the main menu wrapper */
.menu-container.hidden {
  /* Layout / Display */
  display: none !important;
}

/* Keyframe animation for smooth initial main menu fade-in and subtle upward slide */
@keyframes menuFadeIn {
  from {
    /* Visuals & Borders */
    opacity: 0;

    /* Micro-Interactions */
    transform: translateY(1.25cqh) scale(0.98);
  }
  to {
    /* Visuals & Borders */
    opacity: 1;

    /* Micro-Interactions */
    transform: translateY(0) scale(1);
  }
}

/* Keyframe animation for continuous metallic gold sheen across the main title */
@keyframes titleGoldShine {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}