/* Палитра заказчика: серый, белый и светло-серый между ними.
   Фон каждого экрана — один сплошной цвет. Других цветов нет. */

/* =====================================================================
   ТИПОГРАФИКА, КНОПКИ, ССЫЛКИ — шпаргалка (код в конце файла, блок «агент 5»)

   ТОКЕНЫ (:root)
   --fs-display-xxl|xl|l|m|s   засечный Cormorant: ≈72–192 / 56–144 / 44–96 / 34–60 / 26–40 px (fluid)
   --fs-lead, --fs-body, --fs-small, --fs-label   текстовые размеры Onest (label ≈ 11–12 px, для капса)
   --lh-display (1.02), --lh-tight (1.12), --lh-body (1.55)
   --ls-display (-.02em), --ls-label (.18em)
   --ease  единая кривая «бумаги» cubic-bezier(.22,1,.36,1);  --dur-1|2|3 = 500|800|1100 мс;  --stagger = 75 мс

   УТИЛИТЫ
   .t-display (+ .t-display--xxl|xl|l|m|s, .t-italic)   крупный засечный заголовок, balance, лигатуры, кернинг
   .t-label          подпись: капс, трекинг, мелкий размер, табличные цифры
   .t-sheet          номер листа «л. 06 / 06» (label + nowrap + моноширинные цифры)
   .t-num            лигатурные цифры одной ширины (телефоны, цены, номера)
   .t-lead, .t-body, .t-small   абзацы (pretty, висячая пунктуация, переносы)
   .t-balance, .t-pretty, .t-nowrap, .sr-only
   .t-mask > .t-mask__in   строка «под маской»: внутренний блок двигайте translateY(105%) -> 0;
                           маска уже учитывает выносные элементы Cormorant (не режет «у», «р», скобки)

   КНОПКИ И ССЫЛКИ
   .btn(.btn--solid|--line, .btn--sm)  заливка выезжает слева направо, цвет текста меняется в такт
   .link / .link--rest   подчёркивание «рисуется» слева направо (rest: подчёркнуто всегда, на hover перерисовывается)
   .arrow (svg из двух <path pathLength="1">)  рисуется при показе и на hover родителя .arrow-host / .btn / a

   ХУКИ ДЛЯ ВСЕХ АГЕНТОВ (реализует fx.js, только мышь/трекпад)
   data-cursor="Открыть"   подпись у курсора-кольца;   data-magnetic   элемент слегка тянется к курсору
   --fx-under: <цвет>      на hover-состоянии элемента: «какого цвета область под курсором» (см. css/fx.css)
   ===================================================================== */
/* Шрифты (лицензия OFL, файлы в assets/fonts/): Onest для текста, Cormorant для крупных заголовков */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../assets/fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../assets/fonts/onest-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../assets/fonts/onest-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 300; font-display: swap; src: url("../assets/fonts/cormorant-cyrillic-300-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 300; font-display: swap; src: url("../assets/fonts/cormorant-latin-300-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/cormorant-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/cormorant-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/cormorant-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/cormorant-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/cormorant-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/cormorant-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url("../assets/fonts/cormorant-cyrillic-400-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url("../assets/fonts/cormorant-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500; font-display: swap; src: url("../assets/fonts/cormorant-cyrillic-500-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 500; font-display: swap; src: url("../assets/fonts/cormorant-latin-500-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --gray: #545a5d;
  --white: #ffffff;
  --mist: #d5d9db;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Cormorant", "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--white);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.lb-open { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--gray);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--white); color: var(--gray); border: 2px solid var(--gray);
}
.skip:focus { top: 12px; }

/* ---------- Цветовые темы ---------- */
.bg-gray { --bg: var(--gray);  --fg: var(--white); --line: var(--mist); background: var(--bg); color: var(--fg); }
.bg-white { --bg: var(--white); --fg: var(--gray);  --line: var(--mist); background: var(--bg); color: var(--fg); }
.bg-mist { --bg: var(--mist);  --fg: var(--gray);  --line: var(--gray); background: var(--bg); color: var(--fg); }

/* ---------- Экраны ---------- */
.screen {
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + clamp(36px, 8vh, 96px)) var(--gutter) clamp(56px, 10vh, 120px);
  display: flex; align-items: center;
}
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; }

.sec-head {
  font-size: 1.0625rem; font-weight: 500; letter-spacing: .02em;
  margin-bottom: clamp(24px, 5vw, 56px);
}
.sec-head .num { font-variant-numeric: tabular-nums; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  border: 1.5px solid var(--fg); border-radius: 0;
  font-size: 1rem; font-weight: 500; letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { background: transparent; color: var(--fg); }
.btn--line { background: transparent; color: var(--fg); }
.btn--line:hover { background: var(--fg); color: var(--bg); }

/* ---------- Появление блоков ---------- */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rv, .js .rv.in { opacity: 1; transform: none; transition: none; }
  .site-header, .btn, .nav, .burger span { transition: none; }
}

/* =====================================================================
   АГЕНТ 5. Типографическая система, кнопки, ссылки.
   Всё ниже добавлено поверх существующего: выше ничего не удалено.
   ===================================================================== */
:root {
  /* Шкала display (Cormorant), fluid: rem-часть масштабируется вместе с настройками шрифта пользователя */
  --fs-display-xxl: clamp(4.5rem, 2.6rem + 9.4vw, 12rem);
  --fs-display-xl:  clamp(3.5rem, 2rem + 6.4vw, 9rem);
  --fs-display-l:   clamp(2.75rem, 1.7rem + 4.2vw, 6rem);
  --fs-display-m:   clamp(2.125rem, 1.5rem + 2.5vw, 3.75rem);
  --fs-display-s:   clamp(1.625rem, 1.25rem + 1.4vw, 2.5rem);
  /* Текст (Onest) */
  --fs-lead:  clamp(1.25rem, 1.05rem + .85vw, 1.75rem);
  --fs-body:  1.0625rem;
  --fs-small: .9375rem;
  --fs-label: clamp(.6875rem, .66rem + .12vw, .78rem);
  --lh-display: 1.02;
  --lh-tight: 1.12;
  --lh-body: 1.55;
  --ls-display: -.02em;
  --ls-label: .18em;
  /* Движение «бумаги»: одна кривая, спокойные длительности */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur-1: 500ms;
  --dur-2: 800ms;
  --dur-3: 1100ms;
  --stagger: 75ms;
}

/* Оптические поправки на всём сайте */
body {
  font-synthesis: none;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures contextual;
  hanging-punctuation: first last;
}
h1, h2, h3, h4 { text-wrap: balance; }
p, li, blockquote, figcaption { text-wrap: pretty; }
::selection { background: var(--fg, var(--gray)); color: var(--bg, var(--white)); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Типографические утилиты ---------- */
.t-display {
  font-family: var(--font-display); font-weight: 400; font-style: normal;
  font-size: var(--fs-display-l); line-height: var(--lh-display); letter-spacing: var(--ls-display);
  font-variant-numeric: lining-nums;
  text-wrap: balance; hyphens: manual;
}
.t-display--xxl { font-size: var(--fs-display-xxl); letter-spacing: -.03em; line-height: .96; }
.t-display--xl  { font-size: var(--fs-display-xl);  letter-spacing: -.03em; line-height: .98; }
.t-display--l   { font-size: var(--fs-display-l); }
.t-display--m   { font-size: var(--fs-display-m);   line-height: var(--lh-tight); letter-spacing: -.015em; }
.t-display--s   { font-size: var(--fs-display-s);   line-height: var(--lh-tight); letter-spacing: -.01em; }
.t-italic { font-style: italic; }

.t-label {
  font-family: var(--font); font-size: var(--fs-label); font-weight: 500; line-height: 1.3;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "case" 1;
}
.t-sheet {
  font-family: var(--font); font-size: var(--fs-label); font-weight: 500; line-height: 1.3;
  letter-spacing: .12em; white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "case" 1;
}
.t-num { font-variant-numeric: lining-nums proportional-nums; font-feature-settings: "kern" 1; }

.t-lead  { font-size: var(--fs-lead); line-height: 1.38; text-wrap: pretty; hyphens: auto; }
.t-body  { font-size: var(--fs-body); line-height: var(--lh-body); text-wrap: pretty; hyphens: auto; }
.t-small { font-size: var(--fs-small); line-height: 1.45; }
.t-balance { text-wrap: balance; }
.t-pretty  { text-wrap: pretty; }
.t-nowrap  { white-space: nowrap; }

/* Строка под маской: у Cormorant высокие выносные, поэтому маска шире строки сверху и снизу */
.t-mask { display: block; overflow: hidden; padding: .12em 0 .22em; margin: -.12em 0 -.22em; }
.t-mask__in { display: block; }

/* ---------- Кнопки: заливка выезжает слева направо ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: color .25s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  background: var(--btn-fill, var(--fg));
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .25s var(--ease);
}
.btn--solid { --btn-fill: var(--bg); }
.btn--line  { --btn-fill: var(--fg); }
/* заменяют прежние hover-правила: заливку теперь рисует ::before */
.btn--solid:hover { background: var(--fg); color: var(--bg); }
.btn--line:hover  { background: transparent; color: var(--fg); }
.btn:active::before { transform: scaleX(1); transform-origin: 0 50%; transition-duration: .25s; }
.btn--solid:active { color: var(--fg); }
.btn--line:active  { color: var(--bg); }
@media (hover: hover) {
  .btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); transform-origin: 0 50%; }
  .btn--solid:hover, .btn--solid:focus-visible { color: var(--fg); }
  .btn--line:hover,  .btn--line:focus-visible  { color: var(--bg); }
}
/* под курсором: что окажется под кольцом, когда заливка дойдёт (читает fx.js) */
.btn--solid:hover, .btn--solid:focus-visible { --fx-under: var(--bg); }
.btn--line:hover,  .btn--line:focus-visible  { --fx-under: var(--fg); }

.btn--sm { min-height: 44px; padding: 0 20px; font-size: var(--fs-small); gap: 10px; }
.btn .arrow { font-size: 1.05em; }

/* ---------- Стрелка: рисуется (две линии с pathLength=1) ---------- */
.arrow {
  display: inline-block; flex: none; width: 1em; height: 1em; overflow: visible;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: butt; stroke-linejoin: miter;
}
.arrow path { stroke-dasharray: 1 2; stroke-dashoffset: 0; }
@keyframes arrow-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ---------- Текстовые ссылки: подчёркивание рисуется ---------- */
.link {
  position: relative; display: inline-block; text-decoration: none; padding-bottom: .12em;
}
.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .25s var(--ease);
}
.link--rest::after { transform: scaleX(1); }
@keyframes link-redraw {
  0%   { transform: scaleX(1); transform-origin: 100% 50%; }
  45%  { transform: scaleX(0); transform-origin: 100% 50%; }
  46%  { transform: scaleX(0); transform-origin: 0 50%; }
  100% { transform: scaleX(1); transform-origin: 0 50%; }
}
@media (hover: hover) {
  .link:hover::after, .link:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
  .link--rest:hover::after { animation: link-redraw .25s var(--ease); }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .btn::before, .link::after { transition: none; }
  .btn:hover::before, .link--rest:hover::after { animation: none; }
}
