/* Mobile hamburger menu — nav-links are Tailwind "hidden md:flex" (hidden below 768px)
   with no mobile replacement before this file existed. Single-icon swap (JS sets
   textContent to "menu"/"close") instead of two overlapping spans — avoids any
   chance of both glyphs rendering at once. font-variation-settings is set here
   explicitly because not every page defines a global .material-symbols-outlined
   reset, and this button must render correctly on all of them. */
#mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
  flex: none;
}
#mobile-menu-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .18);
}
#mobile-menu-toggle .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  font-size: 22px;
  line-height: 1;
  display: block;
}

#mobile-nav-panel {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 49;
  background: rgba(8, 8, 10, .97);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  display: flex;
  flex-direction: column;
  padding: 6px 20px 4px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: max-height .32s cubic-bezier(.25, .46, .45, .94), opacity .28s ease, transform .32s cubic-bezier(.25, .46, .45, .94);
}
#mobile-nav-panel.open {
  max-height: 560px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#mobile-nav-panel a.mnp-link {
  display: block;
  padding: 15px 4px;
  color: rgba(255, 255, 255, .68);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: color .2s ease;
}
#mobile-nav-panel a.mnp-link:hover {
  color: #fff;
}
#mobile-nav-panel a.mnp-link.active {
  color: #c084fc;
}

#mobile-nav-panel .mnp-lang-row {
  display: flex;
  gap: 8px;
  padding: 14px 0 4px;
}
#mobile-nav-panel .mnp-lang-btn {
  flex: 1;
  padding: 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .6);
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
#mobile-nav-panel .mnp-lang-btn.active {
  color: #fff;
  background: rgba(183, 109, 255, .18);
  border-color: rgba(183, 109, 255, .45);
}

#mobile-nav-panel a.mnp-discord-btn {
  display: block;
  margin: 12px 0 16px;
  padding: 13px;
  text-align: center;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #b76dff 0%, #7c3aed 100%);
  color: #fff !important;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
}

@media (max-width: 767px) {
  #mobile-menu-toggle {
    display: inline-flex;
  }
  /* Top bar is too narrow for hamburger + lang pill + Discord button on phones —
     both controls move into the panel instead (mnp-lang-row / mnp-discord-btn). */
  #lang-wrapper,
  #main-nav a[href*="discord.com"].btn-3d {
    display: none !important;
  }
  /* Hero video previously used min-h-[100vh], filling the whole screen edge to
     edge on phones ("like a non-fullscreen YouTube video" per user feedback) —
     scale it down to a normal hero-banner height on mobile instead. */
  #hero-section {
    min-height: 58vh !important;
  }
}

/* Mobile home layout v3 — compact header, floating menu and desktop-like page rhythm. */
#mobile-menu-icon {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  font-size: 0 !important;
  transition: background .2s ease;
}
#mobile-menu-icon::before,
#mobile-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: top .25s ease, transform .25s ease;
}
#mobile-menu-icon::before { top: -6px; }
#mobile-menu-icon::after { top: 6px; }
#mobile-menu-toggle.open #mobile-menu-icon { background: transparent; }
#mobile-menu-toggle.open #mobile-menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}
#mobile-menu-toggle.open #mobile-menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

@keyframes kh-mobile-video-reveal {
  from { opacity: 0; filter: brightness(.25); }
  to { opacity: 1; filter: brightness(1); }
}
@keyframes kh-mobile-bottom-fade {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  #main-nav > div {
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 8px !important;
  }
  #main-nav > div > a[href="/"] {
    gap: 7px !important;
    min-width: 0;
  }
  #main-nav > div > a[href="/"] img {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain;
  }
  #main-nav > div > a[href="/"] span {
    font-size: 16px !important;
    white-space: nowrap;
  }
  #main-nav > div > div:last-child {
    gap: 8px !important;
    flex: none;
  }
  #lang-wrapper { display: none !important; }
  #main-nav a[href*="discord.com"].btn-3d {
    display: inline-flex !important;
    order: 1;
    height: 38px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    font-size: 0 !important;
    line-height: 1 !important;
    white-space: nowrap;
  }
  #main-nav a[href*="discord.com"].btn-3d::before {
    content: "Discord";
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 800;
  }
  #mobile-menu-toggle {
    order: 2;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, .06) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 28px rgba(0,0,0,.24) !important;
  }

  #mobile-nav-panel {
    top: 68px;
    left: auto;
    right: 10px;
    width: min(300px, calc(100vw - 20px));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: rgba(11, 11, 15, .92);
    box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07);
    transform: translateY(-10px) scale(.97);
    transform-origin: top right;
  }
  #mobile-nav-panel.open {
    max-height: 360px;
    transform: translateY(0) scale(1);
  }
  #mobile-nav-panel a.mnp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 10px 8px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    background: rgba(255,255,255,.035);
    font-size: 10px;
    text-align: center;
  }
  #mobile-nav-panel a.mnp-link.active {
    color: #fff;
    border-color: rgba(183,109,255,.28);
    background: rgba(183,109,255,.12);
  }
  #mobile-nav-panel .mnp-lang-row {
    grid-column: 1 / -1;
    padding: 3px 0 0;
  }
  #mobile-nav-panel .mnp-lang-btn {
    padding: 9px;
    font-size: 10px;
  }
  #mobile-nav-panel a.mnp-discord-btn { display: none !important; }

  #hero-section {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    background: #050505 !important;
  }
  #hero-section .logo-video-container video {
    object-fit: contain !important;
    background: #050505;
    animation: kh-mobile-video-reveal 1.15s cubic-bezier(.22,.61,.36,1) both;
  }
  #hero-section::after {
    content: "";
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 0%, rgba(5,5,5,.35) 48%, #050505 100%);
    animation: kh-mobile-bottom-fade .9s ease .35s both;
  }

  img[src="/new3_v2.webp"] {
    min-height: clamp(365px, 108vw, 455px) !important;
    max-height: 455px;
    object-fit: cover !important;
    object-position: center !important;
  }
  img[src="/new3_v2.webp"] + div {
    justify-content: flex-end !important;
    padding: 80px 14px 38px !important;
  }
  img[src="/new3_v2.webp"] + div h3 {
    margin: 0 0 7px !important;
    font-size: clamp(.7rem, 3vw, .84rem) !important;
  }
  img[src="/new3_v2.webp"] + div p {
    max-width: 340px !important;
    font-size: clamp(.64rem, 2.55vw, .76rem) !important;
    line-height: 1.45 !important;
  }
  img[src="/new3_v2.webp"] + div a[data-i18n="community_discord_btn"] {
    margin-top: 13px !important;
    padding: 9px 18px !important;
    font-size: .7rem !important;
  }

  main > section:last-of-type {
    padding-top: 36px !important;
    padding-bottom: 42px !important;
  }
  main > section:last-of-type > div {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  main > section:last-of-type .text-center {
    margin-bottom: 28px !important;
  }
  main > section:last-of-type .text-center h2 {
    font-size: clamp(20px, 6.4vw, 28px) !important;
    line-height: 1.08 !important;
  }
  main > section:last-of-type .text-center .h-1 {
    width: 44px !important;
    height: 3px !important;
    margin-top: 13px !important;
  }
  main > section:last-of-type .grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  main > section:last-of-type .founder-card {
    min-width: 0;
    aspect-ratio: 4 / 5 !important;
    border-radius: 12px !important;
  }
  main > section:last-of-type .founder-meta,
  main > section:last-of-type .founder-card:hover .founder-meta {
    padding: 10px 8px !important;
    transform: none !important;
  }
  main > section:last-of-type .founder-name-row {
    align-items: center !important;
    gap: 3px !important;
  }
  main > section:last-of-type .founder-name-row h3 {
    min-width: 0;
    font-size: clamp(11px, 3.5vw, 15px) !important;
    line-height: 1 !important;
  }
  main > section:last-of-type .founder-bio { display: none !important; }
  main > section:last-of-type .founder-arrow {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    font-size: 14px !important;
  }

  footer { padding-top: 28px !important; padding-bottom: 28px !important; }
  footer > div { padding-left: 16px !important; padding-right: 16px !important; gap: 18px !important; }
}

@media (max-width: 359px) {
  #main-nav > div > a[href="/"] span { font-size: 14px !important; }
  #main-nav a[href*="discord.com"].btn-3d { padding: 0 11px !important; }
  #main-nav a[href*="discord.com"].btn-3d::before { font-size: 11px; }
  main > section:last-of-type .grid { gap: 6px !important; }
}

@media (prefers-reduced-motion: reduce) {
  #hero-section .logo-video-container video,
  #hero-section::after { animation: none !important; }
  #mobile-nav-panel { transition: none !important; }
}

/* Mobile home layout v5 — cached hero preparation and top-to-bottom cascade. */
.kh-cascade-enabled .kh-cascade-section {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  -webkit-clip-path: inset(0 0 100% 0);
  transform: translateY(-12px);
  transition:
    clip-path 1.35s cubic-bezier(.22,.61,.36,1),
    -webkit-clip-path 1.35s cubic-bezier(.22,.61,.36,1),
    opacity 1.15s ease,
    transform 1.35s cubic-bezier(.22,.61,.36,1);
  will-change: clip-path, opacity, transform;
}
.kh-cascade-enabled .kh-cascade-section.kh-cascade-visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  -webkit-clip-path: inset(0 0 0 0);
  transform: translateY(0);
}

@keyframes kh-hero-ready-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 767px) {
  #hero-section .logo-video-container video {
    opacity: 0;
    filter: none !important;
    animation: none !important;
  }
  #hero-section.kh-hero-media-ready .logo-video-container video {
    opacity: 1;
    animation: kh-hero-ready-reveal .65s ease both !important;
  }
  #hero-section::after {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kh-cascade-enabled .kh-cascade-section,
  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible {
    opacity: 1 !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    transform: none !important;
    transition: none !important;
  }
  #hero-section .logo-video-container video,
  #hero-section.kh-hero-media-ready .logo-video-container video {
    opacity: 1 !important;
    animation: none !important;
  }
}

/* Mobile home layout v9 — fast black crossfade, no sliding mask. */
@media (max-width: 767px) {
  #hero-section::before {
    content: "";
    position: absolute;
    z-index: 8;
    inset: 0;
    pointer-events: none;
    background: #050505;
    opacity: 1;
    visibility: visible;
    transition: opacity .55s ease-out, visibility 0s linear .55s;
  }
  #hero-section.kh-hero-media-ready::before {
    opacity: 0;
    visibility: hidden;
  }

  .kh-cascade-enabled .kh-cascade-section,
  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible {
    position: relative;
    opacity: 1 !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    transform: none !important;
    transition: none !important;
    overflow: hidden !important;
    will-change: auto !important;
  }

  .kh-cascade-enabled .kh-cascade-section::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 90 !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    pointer-events: none !important;
    background: #050505 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: opacity .65s ease-out, visibility 0s linear .65s !important;
    will-change: opacity;
  }

  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible::after {
    opacity: 0 !important;
    visibility: hidden !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hero-section::before,
  .kh-cascade-enabled .kh-cascade-section::after {
    display: none !important;
  }
}

/* Mobile home layout v4 — iOS icon correction, true video colour and staged reveals. */
#mobile-menu-toggle #mobile-menu-icon {
  width: 18px !important;
  min-width: 18px !important;
  height: 2px !important;
  min-height: 2px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: currentColor !important;
  box-shadow: none !important;
  padding: 0 !important;
}
#mobile-menu-toggle.open #mobile-menu-icon {
  background: transparent !important;
}
#mobile-menu-toggle #mobile-menu-icon::before,
#mobile-menu-toggle #mobile-menu-icon::after {
  width: 18px !important;
  height: 2px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: currentColor !important;
  box-shadow: none !important;
}

#logo-video-intro {
  opacity: 1;
  transition: opacity .9s ease;
}
#logo-video-intro.kh-video-intro-done {
  opacity: 0;
}

.kh-reveal-enabled .kh-dark-reveal {
  isolation: isolate;
}
.kh-reveal-enabled .kh-dark-reveal::after {
  content: "";
  position: absolute;
  z-index: 80;
  inset: 0;
  pointer-events: none;
  background: #050505;
  opacity: 1;
  visibility: visible;
  transition: opacity 3s cubic-bezier(.22,.61,.36,1), visibility 0s linear 3s;
}
.kh-reveal-enabled .kh-dark-reveal.kh-revealed::after {
  opacity: 0;
  visibility: hidden;
}

@keyframes kh-mobile-video-reveal-v4 {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 767px) {
  .grain-overlay {
    opacity: .35;
  }

  #hero-section .logo-video-container video {
    filter: none !important;
    animation: kh-mobile-video-reveal-v4 3s cubic-bezier(.22,.61,.36,1) both !important;
  }
  #hero-section::after {
    height: 26%;
    background: linear-gradient(to bottom, transparent 0%, rgba(5,5,5,.12) 58%, #050505 100%);
    animation-duration: 3s;
  }

  img[src="/new3_v2.webp"] {
    width: 100% !important;
    height: clamp(330px, 92vw, 365px) !important;
    min-height: 0 !important;
    max-height: 365px !important;
    object-fit: contain !important;
    object-position: center top !important;
    background: #050505;
  }
  img[src="/new3_v2.webp"] + div {
    padding: 0 14px 24px !important;
  }

  #main-nav.kh-dark-reveal::after {
    position: absolute;
    border-radius: 0;
  }
  main > section:last-of-type.kh-dark-reveal,
  footer.kh-dark-reveal {
    position: relative;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kh-reveal-enabled .kh-dark-reveal::after {
    display: none !important;
  }
  #hero-section .logo-video-container video {
    animation: none !important;
  }
}

/* v5 must be last: the earlier v4 video fade is intentionally disabled. */
@media (max-width: 767px) {
  #hero-section .logo-video-container {
    background: #050505 url("/hero-poster-v1.webp") center / contain no-repeat;
  }
  #hero-section:not(.kh-hero-media-ready) .logo-video-container video {
    opacity: 0 !important;
    animation: none !important;
  }
  #hero-section.kh-hero-media-ready .logo-video-container video {
    opacity: 1 !important;
    filter: none !important;
    animation: kh-hero-ready-reveal .65s ease both !important;
  }
  #hero-section::after {
    display: none !important;
  }
}

/* Mobile home layout v6 — native iOS media URLs and a compact fixed hero. */
@media (max-width: 767px) {
  #hero-section {
    width: 100% !important;
    height: 56.25vw !important;
    min-height: 0 !important;
    max-height: 360px !important;
    aspect-ratio: 16 / 9 !important;
  }
  #hero-section .logo-video-container video {
    opacity: 0 !important;
    animation: none !important;
    transition: opacity .45s ease !important;
  }
  #hero-section.kh-hero-media-ready .logo-video-container video {
    opacity: 1 !important;
    animation: none !important;
  }
  #hero-section.kh-hero-media-ready #logo-video-intro.kh-video-intro-done {
    opacity: 0 !important;
  }
}

/* Mobile home layout v7 — automatic soft feather reveal instead of a hard clip. */
@media (max-width: 767px) {
  .kh-cascade-enabled .kh-cascade-section,
  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible {
    position: relative;
    opacity: 1 !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    transform: none !important;
    transition: none !important;
    overflow: hidden;
  }

  .kh-cascade-enabled .kh-cascade-section::after {
    content: "";
    position: absolute;
    z-index: 90;
    left: 0;
    right: 0;
    top: -25%;
    height: 125%;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      rgba(5, 5, 5, 0) 0%,
      rgba(5, 5, 5, .12) 5%,
      rgba(5, 5, 5, .45) 11%,
      rgba(5, 5, 5, .82) 16%,
      #050505 20%,
      #050505 100%
    );
    transform: translate3d(0, 0, 0);
    transition: transform 2.35s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
  }

  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible::after {
    transform: translate3d(0, 100%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .kh-cascade-enabled .kh-cascade-section::after {
    display: none !important;
  }
}

/* Mobile home layout v8 — one fast, continuous feather mask. */
@media (max-width: 767px) {
  /* Disable the older scroll-controlled reveal so dragging the page no longer
     starts a second animation. */
  html.kh-cascade-enabled .animate-on-scroll,
  html.kh-cascade-enabled .animate-on-scroll.visible,
  html.kh-cascade-enabled .animate-scale-on-scroll,
  html.kh-cascade-enabled .animate-scale-on-scroll.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .kh-cascade-enabled .kh-cascade-section,
  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible {
    opacity: 1 !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    transform: none !important;
    overflow: visible !important;
    -webkit-mask-image: linear-gradient(
      to bottom,
      #000 0%,
      #000 40%,
      rgba(0, 0, 0, .86) 42%,
      rgba(0, 0, 0, .55) 45%,
      rgba(0, 0, 0, .2) 47%,
      transparent 49%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to bottom,
      #000 0%,
      #000 40%,
      rgba(0, 0, 0, .86) 42%,
      rgba(0, 0, 0, .55) 45%,
      rgba(0, 0, 0, .2) 47%,
      transparent 49%,
      transparent 100%
    );
    -webkit-mask-size: 100% 250%;
    mask-size: 100% 250%;
    -webkit-mask-position: 0 100%;
    mask-position: 0 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition:
      -webkit-mask-position 1.15s cubic-bezier(.22,.61,.36,1),
      mask-position 1.15s cubic-bezier(.22,.61,.36,1) !important;
    will-change: -webkit-mask-position, mask-position;
  }

  .kh-cascade-enabled .kh-cascade-section::after {
    display: none !important;
  }

  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible {
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
  }

  /* Smaller About Server typography; image proportions remain unchanged. */
  img[src="/new3_v2.webp"] + div h3 {
    font-size: clamp(.6rem, 2.6vw, .7rem) !important;
    letter-spacing: .12em !important;
  }
  img[src="/new3_v2.webp"] + div p {
    max-width: 310px !important;
    font-size: clamp(.54rem, 2.25vw, .64rem) !important;
    line-height: 1.36 !important;
  }
  img[src="/new3_v2.webp"] + div a[data-i18n="community_discord_btn"] {
    padding: 8px 15px !important;
    font-size: .62rem !important;
  }

  /* Compact footer copy and links. */
  footer .text-lg {
    font-size: .82rem !important;
  }
  footer p {
    font-size: 7px !important;
    letter-spacing: .12em !important;
  }
  footer > div > div:last-child {
    column-gap: 17px !important;
    row-gap: 9px !important;
    font-size: 7px !important;
    letter-spacing: .1em !important;
  }

  /* Neutral white selection in the mobile navigation. */
  #mobile-nav-panel a.mnp-link,
  #mobile-nav-panel a.mnp-link:hover,
  #mobile-nav-panel a.mnp-link:active,
  #mobile-nav-panel a.mnp-link.active {
    color: #fff !important;
  }
  #mobile-nav-panel a.mnp-link.active,
  #mobile-nav-panel a.mnp-link:active {
    border-color: rgba(255, 255, 255, .25) !important;
    background: rgba(255, 255, 255, .12) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.1) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kh-cascade-enabled .kh-cascade-section,
  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible {
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
}

/* v9 final override: opacity crossfade wins over every legacy mask rule above. */
@media (max-width: 767px) {
  .kh-cascade-enabled .kh-cascade-section,
  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible {
    position: relative;
    opacity: 1 !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    transform: none !important;
    transition: none !important;
    overflow: hidden !important;
    will-change: auto !important;
  }
  .kh-cascade-enabled .kh-cascade-section::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 90 !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    pointer-events: none !important;
    background: #050505 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: opacity .65s ease-out, visibility 0s linear .65s !important;
    will-change: opacity;
  }
  .kh-cascade-enabled .kh-cascade-section.kh-cascade-visible::after {
    opacity: 0 !important;
    visibility: hidden !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kh-cascade-enabled .kh-cascade-section::after {
    display: none !important;
  }
}

/* v10 absolute final: seamless hero-to-page blend. */
@media (max-width: 767px) {
  #hero-section::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    z-index: 6 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: -1px !important;
    width: auto !important;
    height: 34% !important;
    pointer-events: none !important;
    opacity: 1 !important;
    background: linear-gradient(to bottom, rgba(5,5,5,0) 0%, rgba(5,5,5,.08) 24%, rgba(5,5,5,.34) 52%, rgba(5,5,5,.78) 79%, #050505 100%) !important;
    animation: none !important;
    transform: none !important;
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
  }
  #hero-section + div {
    z-index: 9 !important;
    background: linear-gradient(to bottom, rgba(5,5,5,0) 0%, rgba(5,5,5,.55) 48%, #050505 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }
}
