/*
Theme Name: GridGames
File: global.css
Theme URI: https://gridgames.co.nz
Author: GridGames
Author URI: https://gridgames.co.nz
Description: Custom WordPress theme for GridGames
Version: 1.0.0
Text Domain: gridgames

Property of JWM Entertainment Limited. All rights reserved.
*/

/* =========================================================
   Base / Reset
   ========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  height: auto;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: block;
  flex-direction: column;
  background: #050816;
  color: rgba(255, 255, 255, 0.9);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* If your theme has a wrapper like #page, use it as the flex column too */
#page {
  flex: 1;
  display: block;
}

/* Make the main content expand to push footer down */
main,
#content,
.site-content {
  flex: 1;
}

/* Footer sticks to bottom when content is short */
.gg-footer {
  margin-top: auto;
}

.gg-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.gg-main {
  padding: 32px 0;
}

/* =========================================================
   Fonts
   ========================================================= */
@font-face {
  font-family: "Orbitron";
  src: url("../fonts/Orbitron/Orbitron-VariableFont.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter/Inter-VariableFont.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   Theme tokens
   ========================================================= */
:root {
  --gg-bg: #050816;
  --gg-bg-2: #070b1f;
  --gg-text: rgba(255, 255, 255, 0.9);
  --gg-dim: rgba(255, 255, 255, 0.7);

  --gg-header-h: 68px;
  --gg-nav-gap: 12px;

  --gg-neon-cyan: #27f4ff;
  --gg-neon-pink: #ff2bd6;
  --gg-neon-orange: #ff9a3c;

  --gg-border: rgba(255, 255, 255, 0.12);

  --gg-fire: #ff7a18;
  --gg-fire-soft: rgba(255, 122, 24, 0.25);
  --gg-fire-glow: rgba(255, 122, 24, 0.45);
  --gg-fire-bg: rgba(255, 122, 24, 0.08);

  --gg-font-ui:
    "Orbitron", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --gg-font-body:
    "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* =========================================================
   Typography
   ========================================================= */
h1,
h2,
h3,
.gg-title,
.gg-heading {
  font-family: var(--gg-font-ui);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body {
  font-family: var(--gg-font-body);
  line-height: 1.6;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

/* Skip to content link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100000;
  font-family: var(--gg-font-body);
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--gg-fire);
  outline-offset: 2px;
}

/* Screen reader only text */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
  white-space: nowrap;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* =========================================================
   Header (Neon) — Desktop is DEFAULT behaviour
   - Logo: fixed
   - CTA: fixed
   - Nav: ONLY flexible/shrinkable area
   ========================================================= */
.gg-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 50;
  font-family: var(--gg-font-ui);

  background:
    radial-gradient(
      1000px 240px at 92% -40px,
      rgba(255, 122, 24, 0.18),
      transparent 58%
    ),
    radial-gradient(
      1200px 220px at 50% -60px,
      rgba(39, 244, 255, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 220px at 85% -40px,
      rgba(255, 43, 214, 0.14),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(7, 11, 31, 0.92), rgba(5, 8, 22, 0.92));

  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.gg-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.045),
    rgba(255, 255, 255, 0) 14%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0) 86%,
    rgba(255, 255, 255, 0.03)
  );
  opacity: 0.22;
  mix-blend-mode: screen;
}

/* Header grid (DESKTOP DEFAULT): auto / 1fr / auto
   - keeps logo + CTA fixed
   - nav gets all remaining space */
.gg-header__grid {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 32px;
  display: grid;
  align-items: center;
  column-gap: 18px;

  grid-template-columns: auto 1fr auto;
  grid-template-areas: "logo nav cta";
}

/* Ensure grid items can shrink properly (critical for nav compression) */
.gg-logo,
.gg-nav,
.gg-header__cta {
  min-width: 0;
}

/* ---------- Brand / Logo ---------- */
.gg-logo {
  grid-area: logo;
  display: flex;
  align-items: center;
  justify-self: start;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.gg-logo .custom-logo-link {
  display: block;
  line-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto;
}

.gg-logo .custom-logo {
  height: 70px;
  width: auto;
  display: block;
  flex: 0 0 auto;
  flex-shrink: 0;
}

.gg-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

/* Optional: if you keep a slogan, it stays stable on desktop.
   (No extra desktop breakpoint behaviours.) */
.gg-slogan {
  font-family: var(--gg-font-ui);
  text-transform: uppercase;
  color: var(--gg-neon-orange);

  /* Shrink immediately, but don't truncate too early */
  font-size: clamp(10px, 0.9vw, 16px);
  max-width: clamp(200px, 32vw, 520px);
  letter-spacing: clamp(0.035em, 0.05vw, 0.055em);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  text-shadow:
    0 0 10px rgba(39, 244, 255, 0.22),
    0 0 16px rgba(255, 122, 24, 0.18);
}

/* Wide desktop: slogan not needed */
@media (max-width: 1700px) {
  .gg-slogan {
    display: none;
  }
}

/* ---------- Nav (center) ---------- */
.gg-nav {
  grid-area: nav;
  justify-self: center;
  display: flex;
  align-items: center;

  /* nav is the only region expected to compress */
  min-width: 0;
}

.gg-menu {
  font-family: var(--gg-font-ui);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  min-width: 0;
  flex-wrap: nowrap;
}

.gg-menu > li {
  position: relative;
  margin: 0;
  padding: 0;
}

.gg-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;

  /* AUTO scale down on smaller desktops */
  font-size: clamp(14px, 0.9vw, 18px);
  padding: clamp(8px, 0.7vw, 10px) clamp(12px, 1.2vw, 20px);

  border-radius: 12px;
  text-decoration: none;
  color: var(--gg-dim);
  font-weight: 750;
  flex-wrap: nowrap; /* NEVER wrap */
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;

  transition:
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.gg-menu a:hover,
.gg-menu a:focus-visible {
  color: #fff;
  background: var(--gg-fire-bg);
  box-shadow:
    0 0 0 1px var(--gg-fire-soft),
    0 0 10px var(--gg-fire-glow);
  transform: translateY(-1px);
}

.gg-menu a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gg-fire), transparent);

  opacity: 0;
  transform: translateY(2px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.gg-menu a:hover::after,
.gg-menu a:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.gg-menu a:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--gg-fire),
    0 0 12px var(--gg-fire-glow);
}

.gg-menu .current-menu-item > a,
.gg-menu .current_page_item > a {
  color: #fff;
  background: var(--gg-fire-bg);
  box-shadow:
    0 0 0 1px var(--gg-fire-soft),
    0 0 12px var(--gg-fire-glow);
}

/* ---------- Dropdown (desktop hover) ---------- */
.gg-menu .sub-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 230px;

  display: flex;
  flex-direction: column;
  gap: 8px;

  list-style: none;
  margin: 0;
  padding: 10px;

  background:
    radial-gradient(
      700px 180px at 50% 0,
      rgba(39, 244, 255, 0.1),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(16, 24, 43, 0.98), rgba(8, 12, 26, 0.98));

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.gg-menu .sub-menu a {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.2;
  transform: none;
}

.gg-menu .sub-menu a::after {
  display: none;
}

.gg-menu > li:hover > .sub-menu,
.gg-menu > li:focus-within > .sub-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* bridge zone for moving mouse into submenu */
.gg-menu > li.menu-item-has-children {
  position: relative;
}
.gg-menu > li.menu-item-has-children::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
  background: transparent;
}

/* ---------- CTA (right) ---------- */
.gg-header__cta {
  grid-area: cta;
  justify-self: end;
  display: flex;
  align-items: center;
  padding-right: 40px;
  flex: 0 0 auto;
}

/* Desktop/mobile CTA visibility:
   Desktop: show right CTA, hide dropdown CTA */
.gg-cta--desktop {
  display: flex;
}
.gg-cta--mobile {
  display: none;
}

/* =========================================================
   SVG CTA swap (Book Now)
   ========================================================= */
.gg-cta-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 0;
  /* Allow the contents (SVG) to shrink */
  min-width: 30px;
}

.gg-cta-svg__wrap {
  position: relative;
  display: inline-block;
}

.gg-cta-svg__img {
  display: block;

  /* Allow it to shrink smoothly on tighter desktops */
  height: clamp(52px, 4.2vw, 70px);
  width: auto;

  /* IMPORTANT: allow shrinking */
  flex-shrink: 1;

  transition:
    opacity 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.gg-cta-svg__img--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.gg-cta-svg:hover .gg-cta-svg__img--hover,
.gg-cta-svg:focus-visible .gg-cta-svg__img--hover {
  opacity: 1;
}

.gg-cta-svg:hover .gg-cta-svg__img--default,
.gg-cta-svg:focus-visible .gg-cta-svg__img--default {
  opacity: 0;
}

.gg-cta-svg:hover .gg-cta-svg__wrap,
.gg-cta-svg:focus-visible .gg-cta-svg__wrap {
  filter: drop-shadow(0 0 10px rgba(39, 244, 255, 0.35))
    drop-shadow(0 0 14px rgba(255, 43, 214, 0.25))
    drop-shadow(0 0 18px rgba(255, 154, 60, 0.2));
  transform: translateY(-1px);
}

.gg-cta-svg:focus-visible {
  outline: 2px solid rgba(39, 244, 255, 0.55);
  outline-offset: 6px;
  border-radius: 14px;
}

@media (min-width: 1301px) {
  .gg-nav-toggle {
    display: none;
  }

  .gg-menu,
  .gg-menu > li,
  .gg-menu a {
    white-space: nowrap;
  }

  .gg-menu a {
    word-break: normal;
    overflow-wrap: normal;
  }
}

.gg-nav-toggle__bar {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  margin: 0;
  background: rgba(255, 255, 255, 0.95);
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}
/* -------------------------
   Compact Window breakpoint
   ------------------------- */
@media (max-width: 1300px) and (min-width: 901px) {
  .gg-header__grid {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "logo toggle cta"
      "nav  nav    nav";
    gap: 12px 16px;
    padding: 12px 16px;
  }

  /* Show hamburger centered */
  .gg-nav-toggle {
    display: inline-flex;
    grid-area: toggle;
    justify-self: center;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    width: 64px;
    height: 64px;

    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;

    cursor: pointer;
    transition:
      border-color 160ms ease,
      box-shadow 160ms ease,
      background 160ms ease;
  }

  .gg-nav-toggle__bar {
    width: 36px;
    height: 3px;
  }

  /* KEEP Book Now visible in header (do not swap to mobile CTA) */
  .gg-cta--desktop {
    display: flex;
  }
  .gg-cta--mobile {
    display: none;
  }

  /* Dropdown nav panel (same behaviour as mobile panel) */
  .gg-nav {
    grid-area: nav;
    grid-column: 1 / -1;

    display: none; /* hidden until .is-open */
    flex-direction: column;
    align-items: stretch;
    justify-self: stretch;
    width: 100%;
    gap: 12px;

    margin-bottom: var(--gg-nav-gap);

    height: calc(100vh - var(--gg-header-h) - var(--gg-nav-gap));
    max-height: calc(100vh - var(--gg-header-h) - var(--gg-nav-gap));

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding: 14px 12px 18px;

    background:
      radial-gradient(
        900px 240px at 50% 0,
        rgba(39, 244, 255, 0.14),
        transparent 55%
      ),
      linear-gradient(180deg, rgba(7, 11, 31, 0.96), rgba(5, 8, 22, 0.96));

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
  }

  .gg-nav.is-open {
    display: flex;
    padding-top: 24px;
  }

  /* Hamburger -> X */
  .gg-nav-toggle[aria-expanded="true"] .gg-nav-toggle__bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .gg-nav-toggle[aria-expanded="true"] .gg-nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }
  .gg-nav-toggle[aria-expanded="true"] .gg-nav-toggle__bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .gg-nav-toggle[aria-expanded="true"] {
    border-color: #fff;
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.25),
      0 0 16px rgba(255, 122, 24, 0.45);
    background: rgba(255, 122, 24, 0.06);
  }

  .gg-nav-toggle[aria-expanded="true"] .gg-nav-toggle__bar {
    box-shadow:
      0 0 8px rgba(255, 122, 24, 0.55),
      0 0 16px rgba(255, 122, 24, 0.25);
  }

  /* Stack menu items vertically */
  .gg-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .gg-menu a {
    width: 100%;
    display: flex; /* REQUIRED for centering */
    align-items: center; /* vertical center */
    justify-content: center; /* horizontal center */
    background: rgba(255, 255, 255, 0.03);
    /* Big, finger-friendly targets */
    min-height: 72px; /* 👈 finger-safe */
    padding: 22px 26px;

    /* Dynamic text sizing */
    font-size: clamp(22px, 2vw, 28px);
    letter-spacing: 0.08em;

    text-align: center;
    border-radius: 18px;
  }

  .gg-menu a::after {
    display: none;
  }

  /* Compact: show Book Now at bottom of dropdown */
  .gg-nav.is-open .gg-nav-cta.gg-cta--mobile {
    display: flex;
    justify-content: center;
    margin-top: auto; /* pushes it to the bottom */
    padding: 28px 0 16px;
    display: flex;
    justify-content: center;
  }

  .gg-nav.is-open .gg-cta--mobile .gg-cta-svg__img {
    height: 78px;
    width: auto;
  }

  .gg-nav.is-open .gg-cta--mobile .gg-cta-svg {
    padding: 8px 0;
  }

  /* Submenus closed by default (mobile behaviour) */
  .gg-menu .sub-menu {
    position: static;

    /* closed state */
    display: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;

    box-shadow: none;
    margin-top: 6px;
    border-radius: 14px;

    list-style: none;
    padding: 10px;
    gap: 8px;
    flex-direction: column;

    background:
      radial-gradient(
        900px 240px at 50% 0,
        rgba(39, 244, 255, 0.14),
        transparent 55%
      ),
      linear-gradient(180deg, rgba(7, 11, 31, 0.96), rgba(5, 8, 22, 0.96));

    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .gg-menu li.is-sub-open > .sub-menu {
    display: flex;
  }

  .gg-menu .sub-menu a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 14px 18px;
    text-align: center;
  }
}

/* -------------------------
   Mobile breakpoint
   ------------------------- */
@media (max-width: 900px) {
  /* Header becomes: logo left, toggle right, dropdown below */
  .gg-header__grid {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "logo toggle"
      "nav nav";
    gap: 12px 16px;
    padding: 12px 16px;
  }

  /* Logo size on mobile */
  .gg-logo .custom-logo {
    height: 50px;
    width: auto;
    flex-shrink: 0;
  }

  /* If you want slogan gone on mobile (still only 2 behaviours total) */
  .gg-slogan {
    display: none !important;
  }

  /* Toggle becomes visible */
  .gg-nav-toggle {
    display: inline-flex;
    grid-area: toggle;
    justify-self: end;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    width: 44px;
    height: 44px;

    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;

    cursor: pointer;
    transition:
      border-color 160ms ease,
      box-shadow 160ms ease,
      background 160ms ease;
  }

  /* Hamburger -> X */
  .gg-nav-toggle[aria-expanded="true"] .gg-nav-toggle__bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .gg-nav-toggle[aria-expanded="true"] .gg-nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }
  .gg-nav-toggle[aria-expanded="true"] .gg-nav-toggle__bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .gg-nav-toggle[aria-expanded="true"] {
    border-color: #fff;
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.25),
      0 0 16px rgba(255, 122, 24, 0.45);
    background: rgba(255, 122, 24, 0.06);
  }

  .gg-nav-toggle[aria-expanded="true"] .gg-nav-toggle__bar {
    box-shadow:
      0 0 8px rgba(255, 122, 24, 0.55),
      0 0 16px rgba(255, 122, 24, 0.25);
  }

  /* CTA visibility swaps on mobile */
  .gg-cta--desktop {
    display: none;
  }
  .gg-cta--mobile {
    display: flex;
  }

  /* Nav panel (dropdown) */
  .gg-nav {
    grid-area: nav;
    grid-column: 1 / -1;

    display: none; /* hidden until .is-open */
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    justify-self: stretch;
    width: 100%;

    margin-bottom: var(--gg-nav-gap);

    height: auto;
    max-height: calc(100dvh - var(--gg-header-h) - var(--gg-nav-gap));
    overflow-y: auto;

    -webkit-overflow-scrolling: touch;

    padding: 14px 12px 18px;

    background:
      radial-gradient(
        900px 240px at 50% 0,
        rgba(39, 244, 255, 0.14),
        transparent 55%
      ),
      linear-gradient(180deg, rgba(7, 11, 31, 0.96), rgba(5, 8, 22, 0.96));

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
  }

  @supports not (height: 100dvh) {
    .gg-nav {
      max-height: calc(100vh - var(--gg-header-h) - var(--gg-nav-gap));
    }
  }

  .gg-nav.is-open {
    display: flex;
    padding-top: 24px;
  }

  .gg-nav.is-open .gg-nav-cta.gg-cta--mobile {
    margin-top: auto;
    padding-bottom: 12px;
    display: flex;
    justify-content: center;
  }

  /* Prefer dynamic viewport units when available */
  @supports (height: 100dvh) {
    .gg-nav {
      height: calc(100dvh - var(--gg-header-h) - var(--gg-nav-gap));
      max-height: calc(100dvh - var(--gg-header-h) - var(--gg-nav-gap));
      min-width: 0; /* allows shrinking inside grid */
      flex: 1 1 auto;
    }
  }

  /* When nav is open, ensure header/nav stack above page content */
  body.gg-nav-open .gg-header {
    z-index: 10000;
  }

  body.gg-nav-open #gg-primary-nav {
    z-index: 10001;
  }

  /* Mobile menu stack */
  .gg-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .gg-menu a {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    min-height: 68px; /* key for touch */
    padding: 18px 20px; /* bigger hit area */
    font-size: clamp(18px, 2.4vw, 22px);
    letter-spacing: 0.08em;

    display: flex; /* REQUIRED for centering */
    align-items: center; /* vertical center */
    justify-content: center; /* horizontal center */

    text-align: center;
    border-radius: 16px;
  }

  .gg-menu a::after {
    display: none;
  }

  .gg-menu .menu-item-has-children.is-sub-open > .sub-menu {
    display: flex !important; /* Overrides the default display: none */
  }

  /* Mobile submenu closed by default */
  .gg-menu .sub-menu {
    position: static;
    display: none;

    opacity: 1;
    transform: none;
    pointer-events: auto;

    box-shadow: none;
    margin-top: 6px;
    border-radius: 14px;

    list-style: none;
    padding: 10px;
    gap: 8px;
    flex-direction: column;

    background:
      radial-gradient(
        900px 240px at 50% 0,
        rgba(39, 244, 255, 0.14),
        transparent 55%
      ),
      linear-gradient(180deg, rgba(7, 11, 31, 0.96), rgba(5, 8, 22, 0.96));

    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .gg-menu li.is-sub-open > .sub-menu {
    display: flex;
  }

  .gg-nav-cta {
    margin-top: 8px;
  }

  /* Mobile CTA size */
  .gg-cta-svg__img {
    height: 62px;
  }

  /* Prevent any accidental horizontal overflow */
  .gg-header__grid,
  .gg-nav,
  .gg-menu,
  .gg-menu > li,
  .gg-menu .sub-menu {
    max-width: 100%;
  }

  /* Critical for flex/grid children that otherwise refuse to shrink */
  .gg-nav,
  .gg-menu,
  .gg-menu > li {
    min-width: 0;
  }

  /* Ensure submenu doesn't extend beyond panel */
  .gg-menu .sub-menu {
    width: 100%;
  }

  .gg-menu .sub-menu a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 14px 18px;
    text-align: center;
  }
}

/* ... existing global.css content ... */

/* =========================================================
   Scroll Locking Fix (CSS-only approach)
   ========================================================= */

/* Prevent horizontal layout shift when scrollbar disappears */
html {
  scrollbar-gutter: stable;
}

/* When menu is open, kill scroll on body but KEEP position */
body.gg-nav-open {
  overflow: hidden !important;
  height: 100% !important; /* Ensure lock works on mobile */
  touch-action: none; /* Helps prevent scroll chaining on iOS */
}

/* Ensure the nav itself can still scroll */
.gg-nav.is-open {
  overscroll-behavior: contain; /* Prevents scroll passing through to body */
  touch-action: auto; /* Restore touch for the menu */
}
