/* ================== DRAWER ================== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 3000;

  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.drawer.is-preparing,
.drawer.is-open {
  pointer-events: none;
}

.drawer.is-preparing .drawer__backdrop,
.drawer.is-open .drawer__backdrop,
.drawer.is-preparing .drawer__panel,
.drawer.is-open .drawer__panel {
  pointer-events: auto;
}

.drawer__backdrop {
  position: absolute;
  inset: 0;

  background: transparent;

  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  opacity: 0;
  transition: opacity 0.22s ease;
  will-change: opacity;
  touch-action: none;
}

.drawer.is-open .drawer__backdrop {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) * -1);

  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;

  padding:
    calc(env(safe-area-inset-top) + 18px)
    18px
    calc(128px + env(safe-area-inset-bottom));

  background:
    linear-gradient(
      180deg,
      rgba(24, 24, 30, 0.78) 0%,
      rgba(16, 16, 21, 0.72) 48%,
      rgba(10, 10, 13, 0.80) 100%
    );

  backdrop-filter: saturate(165%) blur(11px);
  -webkit-backdrop-filter: saturate(165%) blur(11px);

  border-top: 0;
  box-shadow: none;

  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;

  opacity: 0;
  transform: translate3d(-100%, 0, 0);

  transition:
    transform 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;

  will-change: transform, opacity;
}

.drawer__panel::before,
.drawer__panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}

.drawer__panel::before {
  top: 0;
  height: calc(env(safe-area-inset-top) + 190px);
  background:
    linear-gradient(
      180deg,
      rgba(5, 5, 5, 0.98) 0%,
      rgba(6, 6, 8, 0.86) calc(env(safe-area-inset-top) + 18px),
      rgba(9, 9, 12, 0.52) calc(env(safe-area-inset-top) + 72px),
      rgba(12, 12, 16, 0.18) calc(env(safe-area-inset-top) + 136px),
      rgba(12, 12, 16, 0) 100%
    );
}

.drawer__panel::after {
  bottom: 0;
  height: max(250px, calc(env(safe-area-inset-bottom) + 220px));
  background:
    linear-gradient(
      180deg,
      rgba(12, 12, 16, 0) 0%,
      rgba(12, 12, 16, 0.14) 38%,
      rgba(7, 7, 10, 0.66) 78%,
      rgba(5, 5, 5, 0.98) 100%
    );
}

.drawer__panel > * {
  position: relative;
  z-index: 2;
}

.drawer.is-open .drawer__panel {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

body.drawer-open {
  --hdr-p: 0;
  background: #0b0b0d;
}

body.drawer-tint .page {
  filter: brightness(0.22) saturate(0.76);
}

body.drawer-tint::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: max(170px, calc(env(safe-area-inset-bottom) + 140px));
  z-index: 2995;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(10, 10, 13, 0) 0%,
      rgba(10, 10, 13, 0.26) 34%,
      rgba(6, 6, 8, 0.78) 78%,
      rgba(5, 5, 5, 0.98) 100%
    );
}

@media (max-width: 899px) {
  body.drawer-open #menuBtn {
    position: fixed;
    top: var(--drawer-menu-top, calc(env(safe-area-inset-top) + 26px));
    left: var(--drawer-menu-left, 18px);
    z-index: 3300;
    margin: 0;
    transform: none;
  }
}

.drawer__top {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 128px;
  margin-bottom: 12px;
}

.drawer__logo {
  width: min(300px, 72vw);
  max-height: 128px;
  object-fit: contain;
  object-position: center;
  opacity: 0.94;
  filter:
    drop-shadow(0 18px 30px rgba(0,0,0,0.34))
    drop-shadow(0 0 20px rgba(201,162,77,0.10));
}

.drawer__nav {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.drawer__link {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 68px;
  padding: 0 22px;

  border-radius: 26px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.055) 0%,
      rgba(255,255,255,0.020) 42%,
      rgba(0,0,0,0.045) 100%
    ),
    rgba(20, 20, 24, 0.70);

  border: 1px solid rgba(255,255,255,0.085);

  color: rgba(255,255,255,0.94);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.055),
    inset 0 -1px 0 rgba(0,0,0,0.16),
    0 12px 24px rgba(0,0,0,0.18);

  transition:
    transform 0.18s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.drawer__link:active {
  transform: scale(0.985);
  color: #fff;
  border-color: rgba(201, 162, 77, 0.24);
}

.drawer__phone {
  position: relative;
  z-index: 2;

  width: 100%;
  min-height: 66px;
  margin-top: 16px;
  padding: 0 22px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  border-radius: 24px;
  border: 1px solid rgba(255, 225, 145, 0.38);

  background:
    linear-gradient(
      180deg,
      rgba(236, 193, 83, 0.98) 0%,
      rgba(205, 158, 52, 0.98) 100%
    );

  color: rgba(12, 10, 6, 0.94);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -1px 0 rgba(0,0,0,0.12),
    0 18px 34px rgba(0,0,0,0.28),
    0 0 34px rgba(201,162,77,0.14);

  -webkit-tap-highlight-color: transparent;
  cursor: pointer;

  transition:
    transform 0.18s ease,
    filter 0.22s ease,
    box-shadow 0.22s ease;
}

.drawer__phone svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.drawer__phone:active {
  transform: scale(0.985);
  filter: brightness(1.04);
}

.drawer__panel > .drawer__top,
.drawer__panel > .drawer__nav,
.drawer__panel > .drawer__link,
.drawer__panel > .drawer__phone {
  position: relative;
  z-index: 2;
}

/* Hide the fixed container itself after its panel finishes sliding out.
   Transparent children alone leave the container available to Safari's
   toolbar background sampling, even when the drawer is closed. */
html.is-ios .drawer {
  visibility: hidden;
  transition: visibility 0s linear 0.46s;
}

html.is-ios .drawer.is-open {
  visibility: visible;
  transition-delay: 0s;
}




