/* SMM Ahsan public logged-out mobile menu lantern (2026-11-12).
   Reuses the admin lantern look on #menu only, when logged out and at max-width 900px.
   Desktop layout and the logged-in mobile menu are left unchanged. */

/* Wrapper preserves the existing .menu flex column on every layout. */
#menu > .nav-lantern-stack{
  display:flex;
  flex-direction:column;
  gap:2px;
  flex:1;
  min-width:0;
  min-height:0;
  box-sizing:border-box;
}
/* Hidden everywhere except the logged-out mobile drawer. */
#menu .lantern-rail{display:none}

@media (max-width:900px){
  #menu > .nav-lantern-stack{
    position:relative;
    padding-left:26px;
    min-height:100%;
  }
  #menu .lantern-rail{
    display:block;
    position:absolute;
    left:0;
    top:4px;
    bottom:4px;
    width:26px;
    pointer-events:none;
    z-index:2;
    overflow:visible;
  }
  #menu .lantern-wire{
    position:absolute;
    left:12px;
    top:0;
    bottom:0;
    width:2px;
    margin-left:-1px;
    border-radius:1px;
    background:linear-gradient(180deg,#6a4a22 0%,#c4a574 18%,#8a6a3a 50%,#d4b07a 82%,#5a4018 100%);
    box-shadow:0 0 3px rgba(255,190,90,.35),1px 0 0 rgba(0,0,0,.35);
  }
  #menu .lantern-rig{
    position:absolute;
    left:0;
    top:0;
    width:26px;
    height:58px;
    margin-top:-29px;
    will-change:transform;
    z-index:3;
  }
  #menu .lantern-swing{
    position:absolute;
    left:0;
    top:0;
    width:26px;
    height:58px;
    transform-origin:13px 2px;
    will-change:transform;
  }
  #menu .lantern-svg{
    display:block;
    width:26px;
    height:58px;
    overflow:visible;
    filter:drop-shadow(0 2px 3px rgba(0,0,0,.45));
  }
  #menu .lantern-light{
    position:absolute;
    left:50%;
    top:30px;
    width:140px;
    height:140px;
    margin:-70px 0 0 -70px;
    border-radius:50%;
    pointer-events:none;
    z-index:-1;
    background:radial-gradient(circle,rgba(255,200,80,.55) 0%,rgba(234,88,12,.28) 28%,rgba(194,65,12,.1) 52%,transparent 72%);
    animation:pm-lantern-pulse 2.4s ease-in-out infinite alternate;
  }
  #menu .lantern-embers{
    position:absolute;
    left:0;
    top:0;
    width:26px;
    height:58px;
    pointer-events:none;
    overflow:visible;
  }
  #menu .lantern-ember{
    position:absolute;
    left:13px;
    top:28px;
    width:3px;
    height:3px;
    margin:-1.5px;
    border-radius:50%;
    background:#ffce6a;
    box-shadow:0 0 6px 2px rgba(255,150,40,.85);
    opacity:0;
    will-change:transform,opacity;
  }

  /* Dark warm panel (same family as the site footer) so the orange lantern reads clearly. */
  #menu.menu{
    background:linear-gradient(180deg,#2c1810 0%,#1a0e0a 100%)!important;
    overflow-x:hidden;
    overflow-y:auto;
    max-width:min(280px,85vw);
    box-sizing:border-box;
    padding:70px 14px 24px 12px;
  }
  #menu.menu.open{
    box-shadow:-8px 0 30px rgba(0,0,0,.45);
  }
  #menu a{
    color:#c4b8ae!important;
    background:transparent!important;
    box-shadow:none!important;
    text-shadow:none;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  #menu a:hover{
    color:#f3ece6!important;
    background:rgba(234,88,12,.12)!important;
    transform:none;
  }
  #menu a.on{
    background:rgba(234,88,12,.14)!important;
    color:#fff!important;
    text-shadow:0 0 6px rgba(255,180,60,.95),0 0 16px rgba(234,88,12,.6),0 0 28px rgba(194,65,12,.35);
    box-shadow:none!important;
  }
  /* Sign up stays a brand-orange button unless it is the current page (then the lantern lights it). */
  #menu a.cta:not(.on){
    background:var(--p,#ea580c)!important;
    color:#fff!important;
    text-shadow:none;
    margin-top:6px;
    text-align:center;
  }
  #menu a:focus-visible{
    outline:3px solid #fff;
    outline-offset:2px;
  }
}

@media (max-width:465px){
  #menu > .nav-lantern-stack{padding-left:22px}
  #menu .lantern-rail,
  #menu .lantern-rig,
  #menu .lantern-swing{width:22px}
  #menu .lantern-svg{width:22px;height:50px}
  #menu .lantern-rig,
  #menu .lantern-swing{height:50px}
  #menu .lantern-rig{margin-top:-25px}
  #menu .lantern-swing{transform-origin:11px 2px}
  #menu .lantern-wire{left:11px}
  #menu .lantern-light{
    width:88px;
    height:88px;
    margin:-44px 0 0 -44px;
    top:26px;
  }
  #menu a{padding-left:12px;padding-right:10px;font-size:15px}
}

@keyframes pm-lantern-pulse{
  from{opacity:.82;transform:scale(.96)}
  to{opacity:1;transform:scale(1.04)}
}

@media (prefers-reduced-motion:reduce){
  #menu .lantern-light{animation:none!important;opacity:.9;transform:none}
  #menu .lantern-embers{display:none}
  #menu .lantern-swing,
  #menu .lantern-rig{transition:none!important;will-change:auto}
  #menu a:hover{transform:none!important}
}

/* 2026-11-12 lan2: drag handle + motion even when reduced-motion is on. */
@media (max-width:900px){
  #menu .lantern-rig,
  #menu .lantern-swing{
    pointer-events:auto;
    touch-action:none;
    -webkit-user-select:none;
    user-select:none;
  }
  #menu .lantern-rig{
    z-index:6;
    width:44px;
    left:-11px;
    cursor:grab;
  }
  #menu .lantern-rig.is-dragging{cursor:grabbing}
  #menu .lantern-svg,
  #menu .lantern-light,
  #menu .lantern-embers{
    pointer-events:none;
    touch-action:none;
  }
}
@media (prefers-reduced-motion:reduce){
  /* Drag and snap must still work; only the idle CSS pulse stays off. */
  #menu .lantern-swing,
  #menu .lantern-rig{transition:none;will-change:transform}
}
