/* ==========================================================================
   CodeMist — Bottom Nav (мобильное app-меню, видно на всех страницах/шириных)
   ========================================================================== */

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-bottom-nav);
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: linear-gradient(
    to top,
    rgba(20, 71, 7, 0.18) 0%,
    rgba(20, 71, 7, 0.12) 20%,
    rgba(20, 71, 7, 0.04) 45%,
    rgba(20, 71, 7, 0.01) 70%,
    rgba(20, 71, 7, 0) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--c-border);
}

.bottom-nav__list {
  height: var(--bottom-nav-h);
  max-width: 640px;
  margin-inline: auto;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
}

.bottom-nav__item {
  flex: 1 1 0;
  min-width: 0;
}

.bottom-nav__link {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--c-text-faint);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: color var(--dur-base) var(--ease);
  padding: 6px 2px;
}

.bottom-nav__link svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  transition: filter var(--dur-base) var(--ease);
}

.bottom-nav__link:hover { color: var(--c-text-dim); }

.bottom-nav__link[aria-current="page"],
.bottom-nav__link[aria-expanded="true"] {
  color: var(--c-accent);
}
.bottom-nav__link[aria-current="page"] svg,
.bottom-nav__link[aria-expanded="true"] svg {
  filter: drop-shadow(0 0 6px rgba(var(--c-accent-rgb), .7));
}

.bottom-nav__badge {
  position: absolute;
  top: 2px;
  transform: translateX(10px);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-toxic);
  box-shadow: 0 0 6px rgba(var(--c-toxic-rgb), .8);
}

.bottom-nav__link { position: relative; }

/* ==========================================================================
   Contacts sheet — "заготовка менюшки контактов": bottom-sheet со ссылками,
   открывается по клику на пункт "Контакты" нижнего меню.
   Полностью самостоятельный переиспользуемый блок .contacts-sheet.
   ========================================================================== */

.contacts-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}

.contacts-sheet[data-open="true"] {
  visibility: visible;
  pointer-events: auto;
}

.contacts-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 4, .6);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}

.contacts-sheet[data-open="true"] .contacts-sheet__backdrop { opacity: 1; }

.contacts-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
  background: linear-gradient(180deg, var(--c-panel-2), var(--c-panel));
  border: 1px solid var(--c-border-strong);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .5), var(--glow-sm);
  transform: translateY(24px);
  opacity: 0;
  transition: transform var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
  max-height: 78dvh;
  overflow-y: auto;
}

.contacts-sheet[data-open="true"] .contacts-sheet__panel {
  transform: translateY(0);
  opacity: 1;
}

.contacts-sheet__grip {
  width: 40px; height: 4px;
  border-radius: var(--radius-pill);
  background: var(--c-border-strong);
  margin: 0 auto var(--sp-5);
}

.contacts-sheet__title {
  font-family: var(--f-mono);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-text-dim);
  margin-bottom: var(--sp-4);
}

.contacts-sheet__list { display: flex; flex-direction: column; gap: var(--sp-2); }

.contacts-sheet__link {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  background: rgba(var(--c-accent-rgb), .04);
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), transform var(--dur-fast) var(--ease);
}

.contacts-sheet__link:hover {
  background: rgba(var(--c-accent-rgb), .1);
  border-color: var(--c-border-strong);
  transform: translateX(2px);
}

.contacts-sheet__icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--c-accent-rgb), .1);
  color: var(--c-accent);
}
.contacts-sheet__icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.contacts-sheet__meta { min-width: 0; }
.contacts-sheet__label { font-family: var(--f-mono); font-size: var(--fs-sm); color: var(--c-text); }
.contacts-sheet__value {
  font-size: var(--fs-xs);
  color: var(--c-text-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.contacts-sheet__close {
  position: absolute;
  top: var(--sp-4); right: var(--sp-4);
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: rgba(0,0,0,.2);
  color: var(--c-text-dim);
  display: flex; align-items: center; justify-content: center;
}
