/* INTOR GROUP — mobile navigation patch, 26.09.2026 */

:root {
  --intor-mobile-bar-height: 72px;
  --intor-drawer-top: 88px;
  --intor-drawer-bottom: 0px;
}

/* The drawer exists in the DOM on every viewport, but must never enter the
   desktop document flow. The mobile media query explicitly enables it. */
.intor-mobile-drawer {
  display: none;
}

/* The original fixed nav lives inside a backdrop-filtered sticky header.
   Safari treats that header as a containing block and clips the menu. */
@media (max-width: 1080px) {
  .site-header .nav.open {
    display: none !important;
  }

  .intor-mobile-drawer {
    position: fixed;
    inset: var(--intor-drawer-top) 0 var(--intor-drawer-bottom);
    z-index: 79;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    background:
      linear-gradient(rgba(216, 182, 135, .07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(216, 182, 135, .07) 1px, transparent 1px),
      #15110d;
    background-size: 72px 72px;
    color: #f5efe5;
    transform: translateY(-14px);
    transition:
      opacity .24s ease,
      transform .34s cubic-bezier(.2, .65, .25, 1),
      visibility 0s linear .34s;
    overscroll-behavior: contain;
  }

  .intor-mobile-drawer.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .intor-mobile-drawer__nav {
    overflow-y: auto;
    padding: clamp(24px, 6vh, 56px) clamp(22px, 6vw, 64px) 28px;
    -webkit-overflow-scrolling: touch;
  }

  .intor-mobile-drawer__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(216, 182, 135, .24);
    color: #f5efe5;
    font-size: clamp(1.15rem, 4.6vw, 1.65rem);
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(-8px);
    transition: color .2s ease, opacity .25s ease, transform .32s ease;
  }

  .intor-mobile-drawer.is-open .intor-mobile-drawer__link {
    opacity: 1;
    transform: translateY(0);
  }

  .intor-mobile-drawer.is-open .intor-mobile-drawer__link:nth-child(2) { transition-delay: .035s; }
  .intor-mobile-drawer.is-open .intor-mobile-drawer__link:nth-child(3) { transition-delay: .07s; }
  .intor-mobile-drawer.is-open .intor-mobile-drawer__link:nth-child(4) { transition-delay: .105s; }
  .intor-mobile-drawer.is-open .intor-mobile-drawer__link:nth-child(5) { transition-delay: .14s; }

  .intor-mobile-drawer__link::after {
    content: '\2197';
    flex: none;
    margin-left: 24px;
    color: #d8b687;
    font-size: .9em;
    opacity: .7;
  }

  .intor-mobile-drawer__link:hover,
  .intor-mobile-drawer__link:focus-visible,
  .intor-mobile-drawer__link.is-active,
  .intor-mobile-drawer__link[aria-current="page"] {
    color: #d8b687;
  }

  .intor-mobile-drawer__link.is-active::before,
  .intor-mobile-drawer__link[aria-current="page"]::before {
    content: '';
    position: absolute;
    left: -14px;
    width: 4px;
    height: 28px;
    border-radius: 99px;
    background: #d8b687;
    box-shadow: 0 0 20px rgba(216, 182, 135, .45);
  }

  .intor-mobile-drawer__footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px clamp(22px, 6vw, 64px) 20px;
    border-top: 1px solid rgba(216, 182, 135, .28);
    background: rgba(10, 8, 6, .7);
  }

  .intor-mobile-drawer__contact {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid rgba(216, 182, 135, .42);
    border-radius: 999px;
    color: #eadfca;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .035em;
  }

  .intor-mobile-drawer__contact:active {
    background: rgba(216, 182, 135, .18);
    transform: scale(.98);
  }

  /* Active and pressed states for persistent bottom navigation. */
  .mobile-bar a,
  .mobile-bar button {
    position: relative;
    transition: color .18s ease, background .18s ease, transform .12s ease;
  }

  .mobile-bar a::before,
  .mobile-bar button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 30px;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: #d8b687;
    opacity: 0;
    transform: translateX(-50%) scaleX(.35);
    transition: opacity .18s ease, transform .22s ease;
  }

  .mobile-bar a.is-active,
  .mobile-bar a[aria-current="page"],
  .mobile-bar button.is-active {
    color: #fff4e1;
    background: rgba(216, 182, 135, .14);
  }

  .mobile-bar a.is-active::before,
  .mobile-bar a[aria-current="page"]::before,
  .mobile-bar button.is-active::before {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }

  .mobile-bar a:active,
  .mobile-bar button:active,
  .mobile-bar .is-pressed {
    transform: scale(.94);
    background: rgba(216, 182, 135, .22);
  }

  .mobile-bar .mobile-call {
    background: linear-gradient(135deg, #e9cb9c, #b9925e);
    color: #15110d;
  }
}

@media (max-width: 760px) {
  :root {
    --intor-drawer-top: 68px;
    --intor-drawer-bottom: calc(var(--intor-mobile-bar-height) + env(safe-area-inset-bottom));
  }

  .intor-mobile-drawer__nav {
    padding-top: clamp(18px, 4vh, 34px);
  }
}

@media (max-width: 380px) {
  .intor-mobile-drawer__link {
    min-height: 54px;
    font-size: 1.08rem;
  }

  .intor-mobile-drawer__footer {
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .intor-mobile-drawer__contact {
    font-size: .7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intor-mobile-drawer,
  .intor-mobile-drawer__link,
  .mobile-bar a,
  .mobile-bar button {
    transition: none !important;
  }
}
