/* menum1114: premium phone menu (Algirdas 19:36 "Improve menu on mobile visually").
   Linked with media="(max-width:880px)" on every page with the new header; desktop renders exactly as before.
   Existing links and labels only. Motion is transform/opacity and off under prefers-reduced-motion. */
@media (max-width:880px){
  /* full-bleed sheet under the header (no side gap, covers to the bottom) */
  :root .nav.is-open .nav-links{
    position:fixed;top:var(--nav);left:0;right:0;bottom:0;width:auto;height:calc(100dvh - var(--nav));max-height:none;
    display:flex;flex-direction:column;align-items:stretch;gap:0;margin:0;
    padding:18px 22px calc(28px + env(safe-area-inset-bottom,0px));
    overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    background:
      radial-gradient(120% 55% at 100% 0%,rgba(165,232,253,.18) 0%,rgba(165,232,253,0) 60%),
      radial-gradient(90% 45% at 0% 100%,rgba(13,74,87,.85) 0%,rgba(13,74,87,0) 70%),
      linear-gradient(180deg,var(--deepest) 0%,#082a32 100%);
    border:0;border-top:1px solid rgba(165,232,253,.14);
  }
  /* body scroll lock while open; the sticky page CTA steps aside */
  html:has(.nav.is-open){overflow:hidden}
  html:has(.nav.is-open) .mob-cta{visibility:hidden}
  html:has(.nav.is-open) body::before{visibility:hidden}

  /* hamburger turns into a close (x) while open */
  :root .nav.is-open .nav-toggle{position:relative}
  :root .nav.is-open .nav-toggle svg{opacity:0}
  :root .nav.is-open .nav-toggle::before,:root .nav.is-open .nav-toggle::after{
    content:"";position:absolute;left:50%;top:50%;width:22px;height:2px;margin:-1px 0 0 -11px;border-radius:2px;background:currentColor}
  :root .nav.is-open .nav-toggle::before{transform:rotate(45deg)}
  :root .nav.is-open .nav-toggle::after{transform:rotate(-45deg)}

  /* NO/EN segmented control */
  :root .nav.is-open .nav-links .lang-m{
    align-self:flex-start;display:inline-flex;gap:4px;padding:4px;margin:0 0 14px;
    background:rgba(255,255,255,.06);border:1px solid rgba(165,232,253,.22);border-radius:999px;overflow:visible}
  :root .nav.is-open .nav-links .lang-m a{
    min-width:64px;min-height:44px;padding:0 18px;border:0;border-radius:999px;
    display:inline-flex;align-items:center;justify-content:center;
    font-size:15px;font-weight:600;letter-spacing:.04em;color:rgba(255,255,255,.78);background:transparent}
  :root .nav.is-open .nav-links .lang-m a[aria-current=true]{background:var(--sea);color:var(--deepest);box-shadow:0 6px 18px rgba(165,232,253,.28)}

  /* main links: large rows, thin dividers, chevron */
  :root .nav.is-open .nav-links > a:not(.only-m){
    position:relative;display:flex;align-items:center;justify-content:space-between;
    min-height:58px;padding:0 6px;margin:0;border-radius:0;
    font-size:22px;font-weight:500;letter-spacing:-.01em;color:#fff;background:transparent;
    border-bottom:1px solid rgba(165,232,253,.12)}
  :root .nav.is-open .nav-links > a:not(.only-m)::after{
    content:"";flex:none;width:9px;height:9px;margin-left:16px;
    border-top:2px solid rgba(165,232,253,.55);border-right:2px solid rgba(165,232,253,.55);transform:rotate(45deg)}

  /* secondary group: Er du et merke? / FAQ / Om oss */
  :root .nav.is-open .nav-links > :is(a[href*="brands.spokesworkshop.com"],a[href$="#faq"],a[href*="om-oss"],a[href$="/en/about"],a[href="about.html"]){
    min-height:48px;font-size:16px;font-weight:500;color:rgba(255,255,255,.74);border-bottom-color:rgba(165,232,253,.08)}
  :root .nav.is-open .nav-links > :is(a[href*="brands.spokesworkshop.com"],a[href$="#faq"],a[href*="om-oss"],a[href$="/en/about"],a[href="about.html"])::after{width:7px;height:7px;border-width:1.5px 1.5px 0 0}
  :root .nav.is-open .nav-links > :is(a[href*="brands.spokesworkshop.com"],a[href$="#faq"],a[href*="om-oss"],a[href$="/en/about"],a[href="about.html"]):not(:is(a[href*="brands.spokesworkshop.com"],a[href$="#faq"],a[href*="om-oss"],a[href$="/en/about"],a[href="about.html"]) + *){margin-top:18px}

  /* current page */
  :root .nav.is-open .nav-links > a[aria-current=page]{color:var(--sea);background:linear-gradient(90deg,rgba(165,232,253,.12),rgba(165,232,253,0))}
  :root .nav.is-open .nav-links > a[aria-current=page]::before{content:"";position:absolute;left:-22px;top:14px;bottom:14px;width:3px;border-radius:0 3px 3px 0;background:var(--sea)}
  :root .nav.is-open .nav-links > a[aria-current=page]::after{border-color:var(--sea)}

  /* Logg inn: secondary outlined button above the primary CTA */
  :root .nav.is-open .nav-links > a.only-m:not(.btn){
    display:flex;align-items:center;justify-content:center;min-height:52px;margin:28px 0 0;padding:0 20px;
    border:1.5px solid rgba(165,232,253,.5);border-radius:999px;background:rgba(255,255,255,.03);
    color:#fff;font-size:16px;font-weight:600}
  /* primary CTA: dark text on light cyan (AA+) */
  :root .nav.is-open .nav-links > a.only-m.btn{
    display:flex;align-items:center;justify-content:center;width:100%;min-height:54px;margin:12px 0 0;padding:0 20px;
    border-radius:999px;border:0;background:var(--sea);color:var(--deepest);font-size:16.5px;font-weight:600;
    box-shadow:0 10px 30px rgba(165,232,253,.25)}
  :root .nav.is-open .nav-links > a.only-m.btn:hover{color:var(--deepest)}

  /* staggered fade/slide-in on open */
  @media (prefers-reduced-motion:no-preference){
    :root .nav.is-open .nav-links{animation:mm-sheet .28s cubic-bezier(.16,1,.3,1) both}
    :root .nav.is-open .nav-links > *{animation:mm-in .42s cubic-bezier(.16,1,.3,1) both}
    :root .nav.is-open .nav-links > :nth-child(2){animation-delay:.03s}
    :root .nav.is-open .nav-links > :nth-child(3){animation-delay:.06s}
    :root .nav.is-open .nav-links > :nth-child(4){animation-delay:.09s}
    :root .nav.is-open .nav-links > :nth-child(5){animation-delay:.12s}
    :root .nav.is-open .nav-links > :nth-child(6){animation-delay:.15s}
    :root .nav.is-open .nav-links > :nth-child(7){animation-delay:.18s}
    :root .nav.is-open .nav-links > :nth-child(8){animation-delay:.21s}
    :root .nav.is-open .nav-links > :nth-child(9){animation-delay:.24s}
    :root .nav.is-open .nav-links > :nth-child(10){animation-delay:.27s}
    :root .nav.is-open .nav-links > :nth-child(n+11){animation-delay:.3s}
    @keyframes mm-sheet{from{opacity:0}to{opacity:1}}
    @keyframes mm-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
  }
}
