/* ==========================================================================
   База: сброс, шрифты, типографика, сетка, кнопки
   ========================================================================== */

@import url('../fonts/google-fonts.css');

/* Фирменный шрифт заголовков.
   ВНИМАНИЕ: подключён ONY Track Trial Wide Medium — единственный доступный файл.
   Гайд требует начертание Expanded Medium. Заменить файл, когда придёт лицензионный. */
@font-face {
  font-family: 'ONY Track';
  src: url('../fonts/ony-track-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

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

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

/* Широкие экраны. Макет нарисован под 1520×845; шире него сайт растёт целиком, как увеличенный макет:
   все размеры в стилях заданы в rem, а здесь растёт сам rem. 1.0526vw = 16px при ширине 1520,
   1.8935vh = 16px при высоте 845 — берётся меньшее, чтобы первый экран не вырос выше окна.
   Потолок — 24px, увеличение в полтора раза: дальше сайт остаётся по центру.
   До 1520 rem равен 16px, и раскладка совпадает с макетом пиксель в пиксель.
   Новые размеры в стилях писать в rem (px / 16); в px остаются только волосяные линии до 2px
   и условия @media. */
@media (min-width: 1521px) {
  html { font-size: clamp(16px, min(1.0526vw, 1.8935vh), 24px); }
}

/* Lenis управляет скроллом сам — нативный smooth выключаем, когда он активен */
html.lenis { scroll-behavior: auto; }
html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-spruce);
  font-family: var(--f-text);
  font-size: 1rem;
  line-height: 1.2;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--c-mint);
  outline-offset: 0.1875rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Сетка
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  /* Переход по якорю (и меню, и прямая ссылка /#geo) не должен загонять
     заголовок под фиксированную шапку. Штатный механизм браузера. */
  scroll-margin-top: 6.25rem;
}

/* На телефоне поле в 40px съедает слишком много ширины у крупных заголовков */
@media (max-width: 680px) {
  :root { --gutter: 1.25rem; }
}

/* --------------------------------------------------------------------------
   Типографика. Кегли и трекинг — из макета.
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.h1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 8.4vw, 7.5rem);
  line-height: 0.83;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.875rem, 3.95vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.h2--48 { font-size: clamp(1.75rem, 3.16vw, 3rem); line-height: 0.92; }
.h2--44 { font-size: clamp(1.625rem, 2.9vw, 2.75rem);  line-height: 1; }
.h2--40 { font-size: clamp(1.625rem, 2.63vw, 2.5rem); line-height: 1.1; }

.h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.375rem, 2.1vw, 2rem);
  line-height: 1.19;
  letter-spacing: -0.01em;
}

.h4 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.84vw, 1.75rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.37vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-mint);
}

.lead {
  font-size: clamp(1rem, 1.18vw, 1.125rem);
  line-height: 1.2;
}

.body { font-size: 1rem; line-height: 1.2; }

.caption { font-size: 0.875rem; line-height: 1.125rem; }

.numeric {
  font-family: var(--f-numeric);
  font-weight: 400;
  line-height: 0.9;
  color: var(--c-mint);
  font-variant-numeric: tabular-nums;
}

/* Знак рубля — гайд закрепляет за ним отдельный шрифт */
.rub { font-family: var(--f-currency); font-weight: 500; }

/* --------------------------------------------------------------------------
   Кнопки
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2.75rem;
  padding: 0.8125rem 1.375rem;
  border-radius: var(--r-btn);
  font-family: var(--f-text);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.125rem;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}

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

.btn--mint { background: var(--c-mint); color: var(--c-spruce); }
.btn--mint:hover { background: #8df0d4; }

.btn--white { background: var(--c-white); color: var(--c-spruce); height: 3.125rem; }
.btn--white:hover { background: var(--c-lime); }

.btn--spruce { background: var(--c-spruce); color: var(--c-white); padding: 0.375rem 1.25rem; }
.btn--spruce:hover { background: #024653; }

.btn__icon { width: 1rem; height: 1rem; flex: none; }

/* Текстовая ссылка «Подробнее» с подчёркиванием и стрелкой */
.link-more {
  display: inline-flex;
  flex-direction: column;
  gap: 0.375rem;
  width: fit-content;
  color: var(--c-mint);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.2;
}

.link-more__row { display: inline-flex; align-items: center; gap: 0.5rem; }
.link-more__arrow {
  width: 0.8125rem;
  height: 0.8125rem;
  transform: rotate(-135deg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.link-more__rule {
  display: block;
  width: 5.4375rem;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
  transition: width var(--dur-base) var(--ease-out), opacity var(--dur-fast) linear;
}
.link-more:hover .link-more__rule { width: 7.5rem; opacity: 1; }
.link-more:hover .link-more__arrow { transform: rotate(-135deg) translate(0.1875rem, -0.1875rem); }

/* --------------------------------------------------------------------------
   Появление по скроллу. Базовое состояние задаётся здесь, чтобы при
   отключённом JS контент всё равно был виден (класс снимается в app.js).
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.75rem);
  will-change: opacity, transform;
}

/* --------------------------------------------------------------------------
   Уважение к prefers-reduced-motion: движение выключается целиком.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] { opacity: 1; transform: none; }
}
