/*
 * =============================================================
 * ZERO EIGHT · LANDING — SKELETON CSS
 * =============================================================
 * Файл: /landing/css/skeleton.css
 * Назначение: общие переменные, сброс, типографика, layout,
 *             компоненты переиспользуемые на всех страницах.
 *
 * Что НЕЛЬЗЯ класть сюда:
 *   — стили конкретной секции (hero, pricing и т.д.)
 *   — page-specific overrides
 *   → всё это идёт в <style> внутри .dynamic блока страницы
 *
 * Оглавление:
 *   1. CSS-переменные (цвета, шрифты)
 *   2. Сброс
 *   3. Базовые элементы
 *   4. Типографика (классы .t-*)
 *   5. Layout (.container)
 *   6. Кнопки (.btn, .btn-fill, .btn-outline)
 *   7. Навигация (.nav)
 *   8. Language dropdown (.lang-drop)
 *   9. Модальное окно (.modal-overlay, .modal)
 *  10. Форма регистрации (.form, .form__*)
 *  11. Футер (.footer)
 *  12. Юридические страницы (.legal)
 *  13. Утилиты (.u-line)
 *  14. Адаптив — общие брейкпоинты
 *  15. Анимации
 * =============================================================
 */


/* =============================================================
   1. CSS-ПЕРЕМЕННЫЕ
   ============================================================= */
:root {
  /* Цвета */
  --color-bg:      #F7F4EF;   /* кремовый фон — на 2% бледнее WatchHouse */
  --color-black:   #0F0E0C;   /* почти чёрный — основной текст */
  --color-mid:     rgba(15, 14, 12, .55);  /* приглушённый текст */
  --color-faint:   rgba(15, 14, 12, .18);  /* очень тихий текст */
  --color-border:  #0F0E0C;               /* цвет рамок */

  /* Границы */
  --border:        1px solid #0F0E0C;
  --border-faint:  1px solid rgba(15, 14, 12, .16);

  /* Шрифты */
  --font-serif:    'Domine', Georgia, serif;
  --font-sans:     'Inter', -apple-system, sans-serif;

  /* Отступы контейнера */
  --container-max: 1160px;
  --container-pad: 40px;

  /* Скорости переходов */
  --transition-fast: .15s ease;
  --transition-base: .20s ease;
}


/* =============================================================
   2. СБРОС
   ============================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Предотвращает прыжок при появлении скроллбара */
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-black);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
img { max-width: 100%; display: block; }
input, textarea { font: inherit; }


/* =============================================================
   3. БАЗОВЫЕ ЭЛЕМЕНТЫ
   ============================================================= */

/* Горизонтальный разделитель */
.hr {
  border: none;
  border-top: var(--border);
}

.hr--faint {
  border-top: var(--border-faint);
}


/* =============================================================
   4. ТИПОГРАФИКА
   Используй эти классы в HTML вместо прямых font-size
   ============================================================= */

/* Дисплейный заголовок — hero H1 */
.t-display {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(42px, 7vw, 92px);
  line-height: .91;
  letter-spacing: -3px;
}

/* Секционный заголовок — H2 */
.t-heading {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(24px, 3.5vw, 42px);
  line-height: 1.05;
  letter-spacing: -1.2px;
}

/* Подзаголовок карточки — H3 */
.t-sub {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.2;
  letter-spacing: -0.4px;
}

/* Основной текст */
.t-body {
  font-size: 15px;
  line-height: 1.72;
  letter-spacing: -0.2px;
}

/* Мелкий текст */
.t-small {
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: -0.1px;
}

/* Лейбл / бейдж (ALL CAPS) */
.t-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  opacity: .36;
}

/* Приглушённый цвет текста */
.t-mid { color: var(--color-mid); }


/* =============================================================
   5. LAYOUT
   ============================================================= */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}


/* =============================================================
   6. КНОПКИ
   Примеры:
     <button class="btn btn-fill">Start free</button>
     <a class="btn btn-outline" href="#how">See how it works</a>
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.2px;
  white-space: nowrap;
  border: var(--border);
  background: transparent;
  color: var(--color-black);
  transition: all var(--transition-base);
  /* Убираем синюю рамку focus у Safari */
  -webkit-appearance: none;
}

/* Заливка — тёмная */
.btn-fill {
  background: var(--color-black);
  color: var(--color-bg);
}
.btn-fill:hover { opacity: .76; }

/* Контурная — прозрачная */
.btn-outline:hover {
  background: var(--color-black);
  color: var(--color-bg);
}

/* Маленькая кнопка (для nav, pricing) */
.btn--sm {
  height: 36px;
  padding: 0 18px;
  font-size: 13px;
}

/* Большая кнопка (для CTA) */
.btn--lg {
  height: 52px;
  padding: 0 36px;
  font-size: 15px;
}

/* Кнопка во всю ширину */
.btn--full {
  width: 100%;
  height: 44px;
  font-size: 13px;
}


/* =============================================================
   7. НАВИГАЦИЯ
   ============================================================= */
.nav {
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 200;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.nav__logo {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.8px;
  flex-shrink: 0;
}

/* Центральные ссылки — скрываются на мобайле */
.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__link {
  font-size: 14px;
  opacity: .48;
  transition: opacity var(--transition-fast);
}
.nav__link:hover { opacity: 1; }

/* Правая группа: дропдаун языка + CTA */
.nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}


/* =============================================================
   8. LANGUAGE DROPDOWN
   Компактный дропдаун с флагами.
   Открывается кликом на .lang-current, закрывается кликом вне.
   ============================================================= */
.lang-drop {
  position: relative;
}

/* Кнопка — текущий язык */
.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.1px;
  border: var(--border-faint);
  background: transparent;
  color: var(--color-black);
  cursor: pointer;
  border-radius: 4px;
  opacity: .7;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.lang-current:hover { opacity: 1; border-color: var(--color-black); }
.lang-current .flag   { font-size: 15px; line-height: 1; }
.lang-current .arrow  { font-size: 10px; opacity: .5; transition: transform .2s; }

/* Открытое состояние */
.lang-drop.open .lang-current {
  opacity: 1;
  background: var(--color-black);
  color: var(--color-bg);
  border-color: var(--color-black);
}
.lang-drop.open .lang-current .arrow { transform: rotate(180deg); }

/* Выпадающий список */
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--color-bg);
  border: var(--border);
  z-index: 300;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}
.lang-drop.open .lang-menu { display: block; }

/* Пункт в списке */
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: var(--border-faint);
  color: var(--color-black);
  transition: background var(--transition-fast);
}
.lang-option:last-child { border-bottom: none; }
.lang-option:hover  { background: rgba(15, 14, 12, .05); }
.lang-option.active { font-weight: 600; }
.lang-option .flag  { font-size: 16px; line-height: 1; }


/* =============================================================
   9. МОДАЛЬНОЕ ОКНО
   Открывается через JS: openModal('growth')
   Закрывается: closeModal() / клик на оверлей / Escape
   ============================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 12, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all .22s ease;
  padding: 20px;
}
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-bg);
  border: var(--border);
  width: 100%;
  max-width: 500px;
  padding: 40px;
  transform: translateY(16px);
  transition: transform .22s ease;
  position: relative;
  /* Внутренний скролл если контент не помещается */
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.is-open .modal { transform: translateY(0); }

/* Кнопка закрытия × */
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 300;
  opacity: .3;
  transition: opacity var(--transition-fast);
}
.modal__close:hover { opacity: .8; }

/* Бейдж плана (Growth · £39/mo) */
.modal__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: var(--border);
  margin-bottom: 18px;
}

/* Заголовок и подзаголовок */
.modal__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.modal__sub {
  font-size: 14px;
  color: var(--color-mid);
  margin-bottom: 24px;
  line-height: 1.6;
}


/* =============================================================
   10. ФОРМА РЕГИСТРАЦИИ
   ============================================================= */
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Строка из двух полей */
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Лейбл поля */
.form__label {
  font-size: 12px;
  font-weight: 600;
  opacity: .52;
}
.form__label span {
  font-weight: 400;
  opacity: .55;
  margin-left: 3px;
}

/* Поле ввода */
.form__input {
  height: 44px;
  padding: 0 12px;
  border: var(--border);
  background: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-black);
  letter-spacing: -0.2px;
  outline: none;
  transition: box-shadow var(--transition-fast);
  width: 100%;
}
.form__input:focus {
  box-shadow: 0 0 0 2px rgba(15, 14, 12, .10);
}
.form__input::placeholder { opacity: .30; }

/* Мелкая подсказка под формой */
.form__note {
  font-size: 12px;
  opacity: .35;
  line-height: 1.5;
}

/* Экран успеха после отправки */
.form__success {
  display: none;
  text-align: center;
  padding: 24px 0 8px;
}
.form__success-icon {
  font-size: 36px;
  margin-bottom: 16px;
}
.form__success-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
  line-height: 1.1;
}
.form__success-text {
  font-size: 14px;
  color: var(--color-mid);
  line-height: 1.7;
  max-width: 340px;
  margin: 0 auto;
}
.form__success-note {
  font-size: 12px;
  opacity: .38;
  margin-top: 20px;
}


/* =============================================================
   11. ФУТЕР
   ============================================================= */
.footer {
  padding: 28px 0;
  border-top: var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.8px;
}

.footer__love {
  font-size: 11px;
  opacity: .35;
}

.footer__links {
  display: flex;
  gap: 20px;
}

.footer__link {
  font-size: 13px;
  opacity: .34;
  transition: opacity var(--transition-fast);
}
.footer__link:hover { opacity: .8; }


/* =============================================================
   12. ЮРИДИЧЕСКИЕ СТРАНИЦЫ (Privacy / Terms)
   Скрыты по умолчанию. Показываются через JS: showLegal('privacy')
   ============================================================= */
.legal {
  padding: 72px 0 96px;
  min-height: 60vh;
  display: none;
}
.legal.active { display: block; }

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: .45;
  cursor: pointer;
  margin-bottom: 48px;
  transition: opacity var(--transition-fast);
}
.legal__back:hover { opacity: .85; }

.legal__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -1.2px;
  line-height: 1;
  margin-bottom: 8px;
}

.legal__date {
  font-size: 13px;
  opacity: .38;
  margin-bottom: 48px;
}

.legal__section {
  margin-bottom: 36px;
  max-width: 720px;
}

.legal__section h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}

.legal__section p {
  font-size: 15px;
  line-height: 1.72;
  opacity: .72;
  margin-bottom: 10px;
}
.legal__section p:last-child { margin-bottom: 0; }


/* =============================================================
   13. УТИЛИТЫ
   ============================================================= */

/* Подчёркивание в editorial стиле */
.u-line {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(15, 14, 12, .32);
}

/* "Made with love" — маленькая подпись */
.made-love {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
  opacity: .38;
}
.made-love::before {
  content: '·';
  margin-right: 4px;
}


/* =============================================================
   14. АДАПТИВ — ОБЩИЕ ПРАВИЛА
   Брейкпоинты:
     900px — планшет (iPad, маленький ноутбук)
     600px — телефон
   ============================================================= */

/* Планшет */
@media (max-width: 900px) {
  :root {
    --container-pad: 24px;
  }

  /* Скрываем центральные ссылки навигации */
  .nav__links { display: none; }

  /* Форма — одна колонка */
  .form__row { grid-template-columns: 1fr; }
}

/* Телефон */
@media (max-width: 600px) {
  :root {
    --container-pad: 20px;
  }

  .t-display {
    font-size: 38px;
    letter-spacing: -1.5px;
  }

  /* Кнопка — полная ширина на мобайле */
  .hero .btn-fill {
    width: 100%;
    justify-content: center;
  }
}


/* =============================================================
   15. АНИМАЦИИ
   Используются для hero-секции при загрузке страницы
   ============================================================= */
@keyframes ze-fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Применяются к конкретным элементам в hero через data-animate */
[data-animate="fade-up"] {
  opacity: 0;
  animation: ze-fadeUp .5s ease forwards;
}
[data-animate="fade-up"]:nth-child(1) { animation-delay: .00s; }
[data-animate="fade-up"]:nth-child(2) { animation-delay: .07s; }
[data-animate="fade-up"]:nth-child(3) { animation-delay: .13s; }
[data-animate="fade-up"]:nth-child(4) { animation-delay: .18s; }
[data-animate="fade-up"]:nth-child(5) { animation-delay: .22s; }
