/* =========================================================
   Tukee — общие стили (главная + about + страницы документов)
   Брейкпоинты:  десктоп >1024px · планшет 641–1024px · мобилка ≤640px
   ========================================================= */

:root {
  --font: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --white: #ffffff;
  --text-80: rgba(255, 255, 255, 0.8);
  --text-60: rgba(255, 255, 255, 0.6);
  --text-50: rgba(255, 255, 255, 0.5);
  --text-40: rgba(255, 255, 255, 0.4);

  /* Бренд Tukee — тёплый оранжево-красный (снят с дизайна) */
  --brand: #ef6a45;
  --brand-strong: #e5402c;
  --hover: #FF552F;

  /* Тёмный фон */
  --bg-base: #0B0B0B;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Главная — всегда ровно на высоту экрана, без скролла (десктоп/планшет/мобилка).
   dvh учитывает адресную строку мобильных браузеров. */
body.page-home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Фон по умолчанию — сплошной тёмный (#0B0B0B). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-base);
}

/* Картинку bg.jpg показываем ТОЛЬКО на главной. */
.page-home::before {
  background: var(--bg-base) url("assets/bg.jpg") center / cover no-repeat;
}

a {
  color: inherit;
}

img {
  display: block;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================
   ЛОГО-ТЕКСТ (плейсхолдер вензеля «Tukee»)
   Сам перекрашивается под тёмные/светлые страницы.
   Заменишь на assets/logo.svg из Figma — см. README.
   ========================================================= */
.wordmark {
  font-family: var(--font);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--white);
  user-select: none;
}

/* =========================================================
   ХЕДЕР
   ========================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 40px;
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header__logo {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--white);
  transition: color 0.2s ease;
}

.header__logo svg {
  height: 26px;
  width: auto;
  display: block;
}

.header__logo:hover {
  color: var(--hover);
}

.header__link {
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--white);
  transition: opacity 0.2s ease;
}

.header__link:hover {
  color: var(--hover);
}

.header__link--left {
  justify-self: start;
}

.header__link--right {
  justify-self: end;
  text-align: right;
}

/* =========================================================
   ГЛАВНЫЙ ЭКРАН (hero)
   ========================================================= */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 104px 20px 40px;
}

.hero__icon {
  width: 220px;
  height: 220px;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s backwards,
             breathe 5s ease-in-out 1s infinite;
}

.hero__title {
  margin: 28px 0 0;
  font-size: 48px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s backwards;
}

.hero__subtitle {
  margin: 20px 0 0;
  max-width: 44ch;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-50);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s backwards;
}

.btn-download {
  margin-top: 36px;
  display: inline-block;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  color: #000;
  background: var(--white);
  border: none;
  border-radius: 20px;
  padding: 16px 48px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s backwards;
}

.btn-download:hover {
  background: var(--hover);
  color: #fff;
}

/* =========================================================
   БЕЙДЖИ App Store / Google Play
   ========================================================= */
.store-badges {
  display: flex;
  gap: 12px;
  margin-top: 48px;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.45s backwards;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Готовые SVG-кнопки (фон + рамка + лого внутри файла). */
.badge--svg {
  border-radius: 13px;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.badge--svg img {
  height: 54px;
  width: auto;
}

.badge--svg:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   ФУТЕР
   ========================================================= */
.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px 40px;
}

.footer__link {
  text-decoration: none;
  color: var(--white);
  transition: opacity 0.2s ease;
}

.footer__link:hover {
  color: var(--hover);
}

.footer__social {
  display: flex;
  gap: 22px;
  justify-self: start;
  font-size: 16px;
  font-weight: 500;
}

.footer__docs {
  display: flex;
  gap: 22px;
  justify-self: end;
  font-size: 16px;
  font-weight: 500;
}

.footer__copy {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-50);
}

/* видно только на мобилке */
.footer__mobile-actions {
  display: none;
}

/* =========================================================
   СТРАНИЦА ABOUT US («What you can do with Tukee»)
   ========================================================= */
.about {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 128px 40px 64px;
}

.about__head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

.about__title {
  margin: 0;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.about__subtitle {
  margin: 18px auto 0;
  max-width: 60ch;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-50);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about__features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature {
  padding: 20px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.feature:hover {
  background: rgba(255, 255, 255, 0.10);
}

/* Активная карточка: обводка FF552F + заливка FF552F 10% (ховер не сбрасывает) */
.feature--active,
.feature--active:hover {
  background: rgba(255, 85, 47, 0.10);
  border-color: #FF552F;
}

.feature__title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--white);
}

.feature__text {
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-50);
}

/* Макет телефона (плейсхолдер под скриншот приложения) */
.about__phone {
  position: sticky;
  top: 120px;
  justify-self: center;
  width: 300px;
  aspect-ratio: 300 / 620;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Скрин — рендер устройства с собственной рамкой на прозрачном фоне */
.about__phone-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.55));
}

.about__phone-placeholder {
  font-size: 14px;
  color: var(--text-40);
  text-align: center;
  padding: 0 24px;
}

/* =========================================================
   СТРАНИЦЫ ДОКУМЕНТОВ
   ========================================================= */
.doc {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 40px 60px;
}

.doc__title {
  margin: 0 0 24px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
}

.doc__body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-80);
}

.doc__meta {
  margin: -8px 0 32px;
  font-size: 15px;
  opacity: 0.6;
}

.doc__body p {
  margin: 0 0 16px;
}

.doc__body h2 {
  margin: 40px 0 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.doc__body h3 {
  margin: 28px 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.doc__body ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.doc__body li {
  margin: 0 0 8px;
}

.doc__body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Страницы документов (privacy / terms) — тёмная тема, как и весь сайт. */

/* =========================================================
   ПОПАП «Скачать» (десктоп/планшет)
   ========================================================= */
.popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.popup.is-open {
  display: flex;
}

.popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade 0.25s ease;
}

.popup__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: pop 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}

.popup__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(470px, calc(100vw - 40px));
  padding: 40px;
  background: var(--white);
  border-radius: 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.popup__card .wordmark {
  color: #0f0f0f;
  font-size: 28px;
}

.popup__logo {
  height: 30px;
  width: auto;
}

.popup__qr {
  width: 228px;
  height: 228px;
  margin: 24px 0;
}

.popup__hint {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 500;
  color: #0f0f0f;
}

.store-badges--popup {
  margin-top: 0;
  gap: 8px;
  animation: none;
}

.popup__close {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.popup__close img {
  width: 20px;
  height: 20px;
}

.popup__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* =========================================================
   АНИМАЦИИ
   ========================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* =========================================================
   ПЛАНШЕТ  (641–1024px)
   ========================================================= */
@media (max-width: 1024px) {
  .hero__icon { width: 196px; height: 196px; }
  .hero__title { font-size: 42px; max-width: 14ch; white-space: normal; }
  .hero__subtitle { font-size: 16px; }

  .about__title { font-size: 38px; }
  .about__grid { gap: 32px; }
  .about__phone { width: 260px; }
}

/* =========================================================
   МОБИЛКА  (≤640px)
   ========================================================= */
@media (max-width: 640px) {
  /* Хедер — только логотип по центру */
  .header {
    grid-template-columns: 1fr;
    padding: 18px 20px;
  }

  .header__logo { grid-column: 1; }
  .header__link { display: none; }

  /* Hero */
  .hero { padding: 96px 20px 32px; }
  .hero__icon { width: 232px; height: 232px; }
  .hero__title { font-size: 34px; max-width: 14ch; }
  .hero__subtitle { font-size: 15px; max-width: 90%; }
  .btn-download { padding: 18px 72px; }

  /* Бейджи на странице скрыты (на мобилке Download уводит в стор) */
  .hero .store-badges { display: none; }

  /* About — одна колонка, телефон сверху */
  .about { padding: 104px 20px 48px; }
  .about__title { font-size: 30px; }
  .about__subtitle { font-size: 15px; }
  .about__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .about__phone {
    position: relative;
    top: 0;
    order: -1;
    width: 240px;
  }

  /* Футер — колонка по центру */
  .footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    padding: 16px 20px 20px;
    text-align: center;
  }

  .footer__social,
  .footer__docs {
    justify-self: center;
    gap: 24px;
  }

  /* Порядок строк на мобилке:
     1) About Us · Contact Us  2) Privacy · Terms  3) Instagram · TikTok  4) © copy */
  .footer__mobile-actions {
    display: flex;
    gap: 24px;
    order: 1;
  }
  .footer__docs   { order: 2; }
  .footer__social { order: 3; }
  .footer__copy   { order: 4; font-size: 13px; }

  /* Документы */
  .doc { padding: 100px 20px 48px; }
  .doc__title { font-size: 26px; }
}

/* =========================================================
   ВЫСОТНЫЕ БРЕЙКПОИНТЫ — главная всегда влезает в экран без скролла.
   Ужимаем вертикаль (иконку и отступы), размер заголовка не трогаем
   на десктопе (остаётся 48px по спеку). Идут после ширинных, поэтому
   при совпадении перекрывают их.
   ========================================================= */
@media (max-height: 880px) {
  .hero { padding-top: 88px; }
  .hero__icon { width: 184px; height: 184px; }
  .hero__title { margin-top: 20px; }
  .hero__subtitle { margin-top: 14px; }
  .btn-download { margin-top: 28px; }
  .store-badges { margin-top: 30px; }
}

@media (max-height: 760px) {
  .hero { padding-top: 76px; padding-bottom: 20px; }
  .hero__icon { width: 128px; height: 128px; }
  .hero__title { margin-top: 16px; }
  .hero__subtitle { margin-top: 10px; }
  .btn-download { margin-top: 22px; }
  .store-badges { margin-top: 16px; }
  .footer { gap: 9px; padding-top: 14px; padding-bottom: 16px; }
}

@media (max-height: 640px) {
  .hero { padding-top: 64px; padding-bottom: 12px; }
  .hero__icon { width: 96px; height: 96px; }
  .hero__title { font-size: 32px; margin-top: 10px; }
  .hero__subtitle { margin-top: 7px; }
  .btn-download { margin-top: 16px; }
  .store-badges { margin-top: 12px; }
  .footer { gap: 7px; padding-top: 10px; padding-bottom: 12px; }
}

/* Уважение к настройке «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
