/* ===========================================================================
   Shared MOBILE navigation: top-right hamburger + full-screen "splash" menu.
   Used on index / services / about. Colours follow the current theme (--nav-bg).
   =========================================================================== */

.m-burger { display: none; }

/* Scroll lock: when the menu is open the page behind is frozen in place (position:fixed
   with a negative top = current scrollY), so opening the menu does NOT jump to the top and
   closing returns you to exactly where you were. */
body.m-splash-lock { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }

.m-splash { position: fixed; inset: 0; z-index: 2900; visibility: hidden; }
.m-splash__bg { position: absolute; top: 32px; right: 32px; width: 1px; height: 1px; }
.m-splash__bg::after {
  content: ''; position: absolute; border-radius: 50%; background: var(--nav-bg, #0b1020);
  width: 284vmax; height: 284vmax; top: -142vmax; left: -142vmax;
  transform: scale(0); transform-origin: 50% 50%; will-change: transform;
  transition: transform .38s cubic-bezier(.755,.05,.855,.06);
}
.m-splash.is-open { visibility: visible; }
.m-splash.is-open .m-splash__bg::after { transform: scale(1); }

.m-splash__inner { position: relative; z-index: 5; height: 100%; width: min(84vw, 360px); margin: 0 auto;
  display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 12px; }

/* nav items: divided pressable 3D buttons */
.m-splash__menu { display: flex; flex-direction: column; margin-bottom: 1.5rem; } /* space before the login/portal button */
/* items are <a> on the landing pages and <button> (tab switchers) on the dashboard */
.m-splash__menu a,
.m-splash__menu button {
  display: block; width: 100%; text-align: center; color: #fff; text-decoration: none; text-transform: uppercase;
  letter-spacing: 3px; font-size: clamp(1rem, 5vw, 1.2rem); font-family: inherit; line-height: 1.2;
  padding: .92rem 1rem; margin-bottom: 12px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; position: relative;
  box-shadow: 0 4px 0 rgba(0,0,0,.5), 0 8px 16px rgba(0,0,0,.35);
  transition: translate .1s ease, box-shadow .1s ease, background .2s, color .2s;
}
.m-splash__menu a:active,
.m-splash__menu button:active { translate: 0 4px; box-shadow: 0 1px 0 rgba(0,0,0,.5), 0 3px 8px rgba(0,0,0,.35); background: rgba(255,255,255,.11); }
/* active section: gold frame + very subtle glow (landing uses .is-active, dashboard tabs use .active) */
.m-splash__menu a.is-active,
.m-splash__menu button.is-active,
.m-splash__menu button.active { color: #f7cc50; border-color: #f7cc50; box-shadow: 0 4px 0 rgba(0,0,0,.5), 0 0 4px rgba(247,204,80,.4), 0 0 15px rgba(247,204,80,.2); }

/* login = same look as the login page (.auth-submit) */
.m-splash__login { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; margin: .2rem 0 0;
  background: rgba(247,204,80,.10); border: 1.5px solid #f7cc50; border-radius: 12px; color: #f7cc50;
  font-size: 1.05rem; font-weight: 700; letter-spacing: .4px; text-decoration: none; cursor: pointer; font-family: inherit; }
.m-splash__login:hover { background: rgba(247,204,80,.18); }
.m-splash__logout-form { display: contents; }
/* logout keeps the app's "logout" red palette (matches .logout-btn), not the gold login look */
.m-splash__logout-form .m-splash__login {
  background: rgba(255,0,0,.15); border: 2px solid rgba(255,50,50,.8); color: #ff4444;
}
.m-splash__logout-form .m-splash__login:hover {
  background: rgba(255,0,0,.25); border-color: #ff5555;
  box-shadow: 0 0 8px #ff3333, 0 0 16px rgba(255,51,51,.6);
}

/* logo + language pinned near the bottom of the screen */
.m-splash__foot { position: absolute; left: 0; right: 0; bottom: 3.5vh; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.m-splash__logo { display: block; width: 92px; height: auto; opacity: .9; cursor: pointer; }
/* language toggle: exact look of the hero .lp-hero__lang-toggle pill */
.m-splash__lang { display: inline-flex; align-items: center; gap: 0;
  background: rgba(5,7,20,.55); border: 1px solid rgba(70,243,255,.30); border-radius: 999px; padding: 6px 18px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 16px rgba(0,0,0,.35); }

/* language toggle buttons (self-contained so it also works on the dashboard, which
   does not load the landing stylesheets that normally style .lp-lang-btn) */
.m-splash__lang .lp-lang-btn { background: none; border: 0; padding: 2px 10px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: .95rem; letter-spacing: .5px; color: #9fb2d9; }
.m-splash__lang .lp-lang-btn.active { color: #46f3ff; }
.m-splash__lang .lp-lang-sep { color: rgba(255,255,255,.3); }

/* staggered reveal */
.m-splash__menu a, .m-splash__menu button, .m-splash__login, .m-splash__logo, .m-splash__lang, .m-splash__theme { opacity: 0; transform: translateY(-24px); }
.m-splash.is-open .m-splash__menu a, .m-splash.is-open .m-splash__menu button, .m-splash.is-open .m-splash__login, .m-splash.is-open .m-splash__logo, .m-splash.is-open .m-splash__lang, .m-splash.is-open .m-splash__theme {
  opacity: 1; transform: translateY(0); transition: opacity .22s cubic-bezier(0,.995,.99,1), transform .22s cubic-bezier(0,.995,.99,1); }
.m-splash.is-open .m-splash__theme { transition-delay: .34s; }
.m-splash.is-open .m-splash__menu > :nth-child(1) { transition-delay: .12s; }
.m-splash.is-open .m-splash__menu > :nth-child(2) { transition-delay: .17s; }
.m-splash.is-open .m-splash__menu > :nth-child(3) { transition-delay: .22s; }
.m-splash.is-open .m-splash__menu > :nth-child(4) { transition-delay: .27s; }
.m-splash.is-open .m-splash__menu > :nth-child(5) { transition-delay: .32s; }
.m-splash.is-open .m-splash__login { transition-delay: .30s; }
.m-splash.is-open .m-splash__logo { transition-delay: .36s; }
.m-splash.is-open .m-splash__lang { transition-delay: .40s; }

/* Up to 1193px the site uses the mobile navbar (splash menu), matching the point where
   the old theme.css hamburger used to appear — so tablets get the full mobile nav too. */
@media (max-width: 1193px) {
  /* only the splash hamburger on mobile - hide the old navbar one */
  .navbar .hamburger { display: none !important; }
  .m-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    position: fixed; top: 30px; right: 12px; z-index: 3000;
    width: 48px; height: 48px; padding: 12px; border: 0; border-radius: 50%;
    background: transparent; cursor: pointer;
  }
  .m-burger span { display: block; height: 3px; width: 100%; border-radius: 3px; background: #fff; transition: transform .3s ease, opacity .2s ease; }
  .m-burger.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .m-burger.is-open span:nth-child(2) { opacity: 0; }
  .m-burger.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

  /* Logo on the LEFT, as a REAL clickable box.
     Bug it fixes: the logo was absolutely positioned, so the wrapping <a> collapsed
     to 0x0 (no hit area) and on index it even rendered off-screen; the logo itself
     also had pointer-events:none. Result: tapping the logo did nothing.
     Fix: the <a> becomes the sized/positioned box (navbar is position:fixed), the logo
     fills it as a visual-only child, and taps bubble up to the <a> -> navigate home. */
  .navbar { justify-content: flex-start !important; }
  .navbar > .logo-link {
    position: absolute; left: 12px; top: 0; bottom: 0; margin: 0 !important;
    display: flex; align-items: center;
    width: 220px; max-width: 52%; height: auto;
    z-index: 7; pointer-events: auto !important; cursor: pointer;
  }
  .navbar > .logo-link .logo-container-mobile {
    position: static !important; left: auto !important; top: auto !important; right: auto !important;
    transform: none !important; width: 100%; height: 48px; max-width: 100%; margin: 0 !important;
    justify-content: flex-start !important;
    pointer-events: none !important;   /* visual only; the <a> above receives the tap */
  }
}

/* Footer: on phones the 4 columns (flex nowrap) cram together — stack them one per row. */
@media (max-width: 760px) {
  .footer-container {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 22px;
    max-width: 90%;
  }
  .footer-section,
  .footer-section:first-child { margin-left: 0; padding: 0; }
}
