.mobile-nav-toggle{
  display:none;
  position:relative;
  min-width:46px;
  min-height:46px;
  width:46px;
  height:46px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.03);
  color:var(--text);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
  padding:0;
  overflow:hidden;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  transform:translateZ(0);
  backface-visibility:hidden;
  will-change:transform, opacity;
  transition:
    transform .25s var(--ease),
    background .25s var(--ease),
    border-color .25s var(--ease),
    box-shadow .25s var(--ease),
    opacity .25s var(--ease);
}

.mobile-nav-toggle::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:linear-gradient(120deg, transparent 14%, rgba(255,255,255,.10), transparent 86%);
  transform:translateX(-120%);
  transition:transform .9s var(--ease);
  pointer-events:none;
}

.mobile-nav-toggle:hover::before{
  transform:translateX(120%);
}

.mobile-nav-toggle:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,.14);
  box-shadow:0 12px 28px rgba(0,0,0,.18);
}

.mobile-nav-toggle:active{
  transform:scale(.97);
}

.mobile-nav-toggle:focus-visible{
  outline:none;
  border-color:rgba(201,178,143,.46);
  box-shadow:
    0 0 0 4px rgba(201,178,143,.14),
    0 12px 28px rgba(0,0,0,.18);
}

.mobile-nav-toggle span{
  display:block;
  width:18px;
  height:1.5px;
  border-radius:999px;
  background:var(--text);
  margin:0 auto;
  transform-origin:center;
  transition:
    transform .30s var(--ease),
    opacity .22s ease,
    width .22s ease,
    background .22s ease;
}

/* final current trigger */
#mobileNavToggle,
.desktop-menu-toggle{
  display:inline-flex;
}

/* stronger open state */
body.mobile-menu-open .site-header,
html[data-mobile-menu="open"] .site-header{
  background:rgba(8,8,8,.90);
  border-bottom-color:rgba(255,255,255,.08);
  box-shadow:0 14px 36px rgba(0,0,0,.28);
}

body.mobile-menu-open #mobileNavToggle,
body.mobile-menu-open .desktop-menu-toggle,
body.mobile-menu-open .mobile-nav-toggle,
html[data-mobile-menu="open"] #mobileNavToggle,
html[data-mobile-menu="open"] .desktop-menu-toggle,
html[data-mobile-menu="open"] .mobile-nav-toggle{
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.16);
  box-shadow:0 16px 34px rgba(0,0,0,.26);
}

/* animate current trigger into X */
body.mobile-menu-open #mobileNavToggle span:nth-child(1),
body.mobile-menu-open .desktop-menu-toggle span:nth-child(1),
body.mobile-menu-open .mobile-nav-toggle span:nth-child(1),
html[data-mobile-menu="open"] #mobileNavToggle span:nth-child(1),
html[data-mobile-menu="open"] .desktop-menu-toggle span:nth-child(1),
html[data-mobile-menu="open"] .mobile-nav-toggle span:nth-child(1){
  transform:translateY(5.5px) rotate(45deg);
}

body.mobile-menu-open #mobileNavToggle span:nth-child(2),
body.mobile-menu-open .desktop-menu-toggle span:nth-child(2),
body.mobile-menu-open .mobile-nav-toggle span:nth-child(2),
html[data-mobile-menu="open"] #mobileNavToggle span:nth-child(2),
html[data-mobile-menu="open"] .desktop-menu-toggle span:nth-child(2),
html[data-mobile-menu="open"] .mobile-nav-toggle span:nth-child(2){
  opacity:0;
  transform:scaleX(.35);
}

body.mobile-menu-open #mobileNavToggle span:nth-child(3),
body.mobile-menu-open .desktop-menu-toggle span:nth-child(3),
body.mobile-menu-open .mobile-nav-toggle span:nth-child(3),
html[data-mobile-menu="open"] #mobileNavToggle span:nth-child(3),
html[data-mobile-menu="open"] .desktop-menu-toggle span:nth-child(3),
html[data-mobile-menu="open"] .mobile-nav-toggle span:nth-child(3){
  transform:translateY(-5.5px) rotate(-45deg);
}

/* ---------- OVERLAY ---------- */

.mobile-menu-overlay{
  position:fixed;
  inset:0;
  z-index:170;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable both-edges;
  background:
    radial-gradient(circle at 50% 0%, rgba(201,178,143,.14), transparent 28%),
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.03), transparent 24%),
    linear-gradient(180deg, rgba(8,8,8,.975), rgba(9,9,9,.992));
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  transform:translateZ(0);
  backface-visibility:hidden;
  will-change:opacity, visibility;
  transition:
    opacity .38s var(--ease),
    visibility .38s var(--ease),
    backdrop-filter .38s var(--ease),
    -webkit-backdrop-filter .38s var(--ease);
}

.mobile-menu-overlay::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(rgba(255,255,255,.010), rgba(255,255,255,.010)),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.008) 0px,
      rgba(255,255,255,.008) 1px,
      transparent 1px,
      transparent 3px
    );
  opacity:.10;
  mix-blend-mode:soft-light;
}

.mobile-menu-overlay::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.035), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.02) 0%, transparent 22%);
  opacity:.55;
}

body.mobile-menu-open,
html[data-mobile-menu="open"] body{
  overflow:hidden;
}

body.mobile-menu-open .mobile-menu-overlay,
html[data-mobile-menu="open"] .mobile-menu-overlay{
  opacity:1;
  pointer-events:auto;
  visibility:visible;
}

/* ---------- PANEL ---------- */

.mobile-menu-panel{
  width:min(
    var(--max),
    calc(100% - 22px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
  );
  max-width:100%;
  min-height:calc((var(--vh, 1vh) * 100) - var(--nav-h));
  margin:0 auto;
  padding:
    calc(var(--nav-h) + 14px + env(safe-area-inset-top, 0px))
    0
    calc(28px + env(safe-area-inset-bottom, 0px));
  display:grid;
  align-content:start;
  gap:12px;
  overflow-x:hidden;
  transform:translate3d(0, 16px, 0) scale(.992);
  opacity:0;
  backface-visibility:hidden;
  will-change:transform, opacity;
  transition:
    transform .42s var(--ease),
    opacity .32s var(--ease);
}

.mobile-menu-panel::before{
  content:"";
  width:56px;
  height:4px;
  border-radius:999px;
  margin:0 auto 6px;
  background:linear-gradient(90deg, rgba(255,255,255,.14), rgba(201,178,143,.42), rgba(255,255,255,.14));
  opacity:.78;
  box-shadow:0 0 18px rgba(201,178,143,.14);
}

body.mobile-menu-open .mobile-menu-panel,
html[data-mobile-menu="open"] .mobile-menu-panel{
  transform:translate3d(0, 0, 0) scale(1);
  opacity:1;
}

/* staggered entrance */
.mobile-menu-panel > *{
  opacity:0;
  transform:translateY(14px);
  transition:
    transform .48s var(--ease),
    opacity .34s var(--ease);
}

body.mobile-menu-open .mobile-menu-panel > *,
html[data-mobile-menu="open"] .mobile-menu-panel > *{
  opacity:1;
  transform:translateY(0);
}

body.mobile-menu-open .mobile-menu-panel > *:nth-child(1),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(1){ transition-delay:.03s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(2),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(2){ transition-delay:.06s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(3),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(3){ transition-delay:.09s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(4),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(4){ transition-delay:.12s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(5),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(5){ transition-delay:.15s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(6),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(6){ transition-delay:.18s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(7),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(7){ transition-delay:.21s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(8),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(8){ transition-delay:.24s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(9),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(9){ transition-delay:.27s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(10),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(10){ transition-delay:.30s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(11),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(11){ transition-delay:.33s; }
body.mobile-menu-open .mobile-menu-panel > *:nth-child(12),
html[data-mobile-menu="open"] .mobile-menu-panel > *:nth-child(12){ transition-delay:.36s; }

.mobile-menu-link,
.mobile-menu-button{
  min-height:58px;
  width:100%;
  max-width:100%;
  border-radius:18px;
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.028)),
    radial-gradient(circle at top right, rgba(201,178,143,.10), transparent 40%);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  padding:0 18px;
  font-size:1rem;
  line-height:1.2;
  text-align:left;
  box-shadow:0 12px 30px rgba(0,0,0,.16);
  transition:
    transform .25s var(--ease),
    border-color .25s var(--ease),
    background .25s var(--ease),
    box-shadow .25s var(--ease),
    color .25s var(--ease),
    opacity .25s var(--ease);
  position:relative;
  overflow:hidden;
  overflow-wrap:anywhere;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.mobile-menu-link::before,
.mobile-menu-button::before{
  content:"";
  position:absolute;
  inset:-1px;
  opacity:.9;
  background:linear-gradient(120deg, transparent 16%, rgba(255,255,255,.11), transparent 84%);
  transform:translateX(-120%);
  transition:
    transform .9s var(--ease),
    opacity .25s ease;
  pointer-events:none;
}

.mobile-menu-link:hover::before,
.mobile-menu-button:hover::before{
  transform:translateX(120%);
}

.mobile-menu-link:hover,
.mobile-menu-button:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.036)),
    radial-gradient(circle at top right, rgba(201,178,143,.12), transparent 42%);
  box-shadow:0 18px 36px rgba(0,0,0,.22);
}

.mobile-menu-link:active,
.mobile-menu-button:active{
  transform:scale(.985);
}

.mobile-menu-link:focus-visible,
.mobile-menu-button:focus-visible{
  outline:none;
  border-color:rgba(201,178,143,.46);
  box-shadow:
    0 0 0 4px rgba(201,178,143,.14),
    0 18px 36px rgba(0,0,0,.22);
}

.mobile-menu-link::after{
  content:"→";
  margin-left:auto;
  flex:0 0 auto;
  color:var(--soft);
  transition:
    transform .25s var(--ease),
    color .25s ease;
}

.mobile-menu-link:hover::after{
  transform:translateX(3px);
  color:var(--text);
}

.mobile-menu-button{
  cursor:pointer;
}

.mobile-menu-button::after{
  content:"✦";
  margin-left:auto;
  flex:0 0 auto;
  color:var(--soft);
  font-size:.92rem;
  transition:
    transform .25s var(--ease),
    color .25s ease,
    opacity .25s ease;
}

.mobile-menu-button:hover::after{
  transform:scale(1.08);
  color:var(--text);
}

/* active state for section links */
.mobile-menu-link.is-active{
  border-color:rgba(201,178,143,.34);
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.036)),
    radial-gradient(circle at top right, rgba(201,178,143,.16), transparent 44%);
  box-shadow:
    0 18px 42px rgba(0,0,0,.24),
    inset 0 0 0 1px rgba(201,178,143,.08);
}

.mobile-menu-link.is-active::after{
  color:var(--accent);
  transform:translateX(2px);
}

.mobile-menu-link.is-active::before{
  opacity:.55;
  transform:translateX(0);
}

/* ---------- FLOATING MOBILE CINEMATIC BUTTON ---------- */

@keyframes mobileCinematicFabPulse{
  0%{
    transform:translate3d(0,0,0) scale(1);
    box-shadow:
      0 18px 38px rgba(0,0,0,.24),
      inset 0 1px 0 rgba(255,255,255,.03);
  }
  50%{
    transform:translate3d(0,-2px,0) scale(1.025);
    box-shadow:
      0 24px 54px rgba(0,0,0,.30),
      0 0 0 8px rgba(201,178,143,.08),
      inset 0 1px 0 rgba(255,255,255,.04);
  }
  100%{
    transform:translate3d(0,0,0) scale(1);
    box-shadow:
      0 18px 38px rgba(0,0,0,.24),
      inset 0 1px 0 rgba(255,255,255,.03);
  }
}

.mobile-cinematic-fab{
  display:none;
  position:fixed;
  right:max(14px, calc(env(safe-area-inset-right, 0px) + 14px));
  bottom:max(72px, calc(env(safe-area-inset-bottom, 0px) + 72px));
  left:auto;
  z-index:160;
  min-height:48px;
  padding:0 18px;
  border-radius:999px;
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03)),
    radial-gradient(circle at top right, rgba(201,178,143,.12), transparent 42%);
  color:var(--text);
  font-family:"Inter", sans-serif;
  font-size:.92rem;
  line-height:1;
  white-space:nowrap;
  box-shadow:
    0 18px 38px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.03);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  transform:translateZ(0);
  backface-visibility:hidden;
  will-change:transform, opacity;
  transition:
    transform .34s var(--ease),
    opacity .28s var(--ease),
    background .25s var(--ease),
    border-color .25s var(--ease),
    box-shadow .25s var(--ease),
    color .25s var(--ease),
    filter .25s var(--ease);
}

.mobile-cinematic-fab::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:linear-gradient(120deg, transparent 16%, rgba(255,255,255,.11), transparent 84%);
  transform:translateX(-120%);
  transition:transform .9s var(--ease);
  pointer-events:none;
}

.mobile-cinematic-fab::after{
  content:"✦";
  margin-left:10px;
  font-size:.86rem;
  color:var(--soft);
  transition:
    transform .25s var(--ease),
    color .25s ease,
    opacity .25s ease;
}

.mobile-cinematic-fab:hover::before{
  transform:translateX(120%);
}

.mobile-cinematic-fab:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.15);
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.038)),
    radial-gradient(circle at top right, rgba(201,178,143,.14), transparent 44%);
  box-shadow:
    0 22px 44px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.035);
}

.mobile-cinematic-fab:hover::after{
  transform:scale(1.08);
  color:var(--text);
}

.mobile-cinematic-fab:active{
  transform:scale(.98);
}

.mobile-cinematic-fab:focus-visible{
  outline:none;
  border-color:rgba(201,178,143,.46);
  box-shadow:
    0 0 0 4px rgba(201,178,143,.14),
    0 22px 44px rgba(0,0,0,.28);
}

.mobile-cinematic-fab[data-active="true"]{
  border-color:rgba(201,178,143,.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04)),
    radial-gradient(circle at top right, rgba(201,178,143,.18), transparent 46%);
  box-shadow:
    0 22px 48px rgba(0,0,0,.30),
    inset 0 0 0 1px rgba(201,178,143,.08);
}

.mobile-cinematic-fab[data-active="true"]::after{
  color:var(--accent);
}

.mobile-cinematic-fab.is-hidden{
  opacity:0;
  pointer-events:none;
  transform:translate3d(0, 14px, 0) scale(.96);
}

.mobile-cinematic-fab.is-near-footer{
  opacity:.72;
  filter:saturate(.94);
  box-shadow:
    0 14px 30px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.025);
}

.mobile-cinematic-fab.is-near-footer[data-active="true"]{
  opacity:.84;
}

.mobile-cinematic-fab.is-pulsing{
  animation:mobileCinematicFabPulse .56s var(--ease);
}

body.mobile-menu-open .mobile-cinematic-fab,
html[data-mobile-menu="open"] .mobile-cinematic-fab{
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
}

/* ---------- LANGUAGE ---------- */

.mobile-lang-switch{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 4px 0;
  justify-content:flex-start;
  flex-wrap:wrap;
}

.mobile-lang-switch a{
  color:var(--muted);
  transition:color .25s ease, opacity .25s ease;
}

.mobile-lang-switch a:hover{
  color:var(--text);
}

.mobile-lang-switch a.active{
  color:var(--text);
  text-shadow:0 0 16px rgba(201,178,143,.16);
}

.mobile-lang-switch span{
  color:var(--soft);
}

/* ---------- REDUCED MOTION ---------- */

body.reduced-motion .mobile-menu-panel,
body.reduced-motion .mobile-menu-panel > *,
body.reduced-motion .mobile-nav-toggle,
body.reduced-motion .mobile-nav-toggle::before,
body.reduced-motion .mobile-menu-link,
body.reduced-motion .mobile-menu-button,
body.reduced-motion .mobile-menu-link::before,
body.reduced-motion .mobile-menu-button::before,
body.reduced-motion .mobile-menu-overlay,
body.reduced-motion .mobile-cinematic-fab,
body.reduced-motion .mobile-cinematic-fab::before,
body.reduced-motion .mobile-cinematic-fab::after{
  transition:none !important;
}

body.reduced-motion .mobile-menu-panel > *{
  opacity:1;
  transform:none;
}

body.reduced-motion .mobile-cinematic-fab.is-pulsing{
  animation:none !important;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width:760px){
  .mobile-nav-toggle{
    display:flex;
  }

  #mobileCinematicToggle{
    display:none !important;
  }

  .mobile-cinematic-fab{
    display:inline-flex;
  }

  /* hide Reduced Motion only on mobile */
  #reducedMotionToggle{
    display:none !important;
    opacity:0 !important;
    pointer-events:none !important;
    visibility:hidden !important;
  }

  .mobile-menu-panel{
    padding-top:calc(var(--nav-h) + 10px + env(safe-area-inset-top, 0px));
  }

  .mobile-menu-link,
  .mobile-menu-button{
    min-height:56px;
    border-radius:16px;
    font-size:.98rem;
  }
}

@media (max-width:640px){
  .mobile-menu-panel{
    width:min(
      var(--max),
      calc(100% - 18px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
    );
    padding-top:calc(var(--nav-h) + 10px + env(safe-area-inset-top, 0px));
    gap:10px;
  }

  .mobile-menu-link,
  .mobile-menu-button{
    min-height:54px;
    padding:0 16px;
    font-size:.96rem;
    border-radius:16px;
  }

  .mobile-cinematic-fab{
    min-height:46px;
    padding:0 16px;
    font-size:.88rem;
    right:max(12px, calc(env(safe-area-inset-right, 0px) + 12px));
    bottom:max(68px, calc(env(safe-area-inset-bottom, 0px) + 68px));
  }

  .mobile-lang-switch{
    padding-top:12px;
  }
}

@media (max-width:420px){
  .mobile-menu-panel{
    padding-top:calc(var(--nav-h) + 6px + env(safe-area-inset-top, 0px));
  }

  .mobile-menu-link,
  .mobile-menu-button{
    min-height:52px;
    border-radius:15px;
  }

  .mobile-cinematic-fab{
    right:max(12px, calc(env(safe-area-inset-right, 0px) + 12px));
    bottom:max(64px, calc(env(safe-area-inset-bottom, 0px) + 64px));
    left:auto;
    min-height:44px;
    padding:0 15px;
    font-size:.84rem;
  }
}

@media (hover:none) and (pointer:coarse){
  .mobile-cinematic-fab:hover{
    transform:none;
    border-color:var(--line);
    background:
      linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03)),
      radial-gradient(circle at top right, rgba(201,178,143,.12), transparent 42%);
    box-shadow:
      0 18px 38px rgba(0,0,0,.24),
      inset 0 1px 0 rgba(255,255,255,.03);
  }

  .mobile-cinematic-fab:hover::before{
    transform:translateX(-120%);
  }

  .mobile-cinematic-fab:active{
    transform:scale(.985);
  }

  .mobile-cinematic-fab.is-hidden{
    transform:translate3d(0, 14px, 0) scale(.96);
  }
    }
