/*
  Публичная страница Taplink MNU — в фирменном стиле mnu.kz:
  чёрная «шапка» с белым логотипом, белые карточки, красные акценты #D62E1F,
  строгие прямые углы, шрифты Aeroport (заголовки) и Mulish (текст).
  Цвета приходят переменными из настроек оформления (src/theme.js).
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Mulish', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.4;
  color: var(--text);
  background-color: var(--bg2);
  background-image: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 360px);
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(44px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
}

/* ---------- шапка ---------- */
.profile {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo img {
  display: block;
  height: 64px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

/* Подложка для белого логотипа на светлом фоне — как чёрная шапка mnu.kz */
.logo--plate {
  padding: 16px 22px;
  background: var(--logo-plate);
  border-radius: var(--radius);
}

.title {
  margin: 26px 0 0;
  font-family: 'Aeroport', 'Mulish', system-ui, sans-serif;
  font-size: clamp(1.6rem, 6.4vw, 2.05rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.divider {
  width: 40px;
  height: 3px;
  margin: 18px auto;
  background: var(--divider);
}

.desc {
  max-width: 440px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- кнопки ---------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 11px 16px 11px 12px;
  color: var(--btn-text);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Красная полоса слева при наведении — акцент, как на карточках mnu.kz */
.btn::before {
  content: '';
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  background: var(--primary);
  border-radius: var(--radius) 0 0 var(--radius);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover .btn__arrow {
  color: var(--primary);
  opacity: 1;
  transform: translate(2px, -2px);
}

.btn:active {
  transform: translateY(0) scale(0.995);
}

.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.btn--noicon {
  padding-left: 20px;
}

.btn__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--icon-fg);
  background: var(--icon-bg);
  border-radius: max(2px, calc(var(--radius) - 5px));
}

.btn__icon svg {
  width: 22px;
  height: 22px;
}

.btn__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.btn__title {
  font-size: 1.02rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.btn__desc {
  font-size: 0.86rem;
  color: var(--btn-desc);
  overflow-wrap: anywhere;
}

.btn__arrow {
  flex: none;
  display: grid;
  opacity: 0.45;
  transition: transform 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn__arrow svg {
  width: 18px;
  height: 18px;
}

/* Выделенная кнопка — как основная кнопка mnu.kz: красная, при наведении #AE1E11 */
.btn--hl {
  color: var(--hl-text);
  background: var(--hl-bg);
  border-color: transparent;
}

.btn--hl::before {
  display: none;
}

.btn--hl:hover {
  background: var(--hl-hover);
}

.btn--hl .btn__icon {
  color: var(--hl-text);
  background: rgba(255, 255, 255, 0.16);
}

.btn--hl .btn__desc {
  color: var(--hl-desc);
}

.btn--hl:hover .btn__arrow {
  color: inherit;
}

.btn--broken {
  opacity: 0.7;
  border: 2px dashed var(--primary);
  cursor: not-allowed;
}

.empty {
  text-align: center;
  color: var(--muted);
}

.footer {
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.preview-badge {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background: #0f0f0f;
  border-bottom: 2px solid var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

@media (min-width: 768px) {
  .page {
    padding-top: 80px;
  }

  .logo img {
    height: 76px;
    max-width: 280px;
  }

  .btn {
    min-height: 74px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn__arrow,
  .btn::before {
    transition: none;
  }

  .btn:hover,
  .btn:hover .btn__arrow {
    transform: none;
  }
}
