/* общие стили всех страниц pro.xolodok.pro: токены, сброс, кнопки, заглушки, шапка из матового стекла, подвал,
   страницы документов и 404. главная дописывает своё в landing.css, анкета в anketa/anketa.css.
   шрифт один на всех сайтах ХОЛОД’ОК: Onest, как на xolodok.pro. тема светлая, «холодный воздух» (DESIGN.md) */

:root {
  --ink-900: #141B20;   /* основной текст: холодный графит */
  --ink-700: #2F3A41;   /* мелкий текст поверх фото */
  --ink-600: #4E5A62;   /* вторичный текст на тумане: 6 к 1 */
  --ink-400: #8A959C;   /* только иконки и неактивное */
  --line: rgba(20, 27, 32, .1);
  --fill: #EEF2F4;      /* подложки строк в анкете: холодный серый, в тон туману */
  --fill-hover: #E4EAEE;
  --white: #FFFFFF;
  --skeleton: #E8ECEF;
  --skeleton-glow: #F8FAFB;
  --ice-500: #5FD0EE;
  --ice-600: #45C4E6;
  --ice-100: #E3F6FC;
  --ice-700: #0A7EA4;
  --heat: #FF7A00;

  /* туман: фон всей ленты, светлее сверху и снизу */
  --mist-0: #F1F4F6;
  --mist: #E5EAEE;
  --mist-2: #D9E0E6;
  /* матовое стекло: островки в тумане */
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(246, 248, 250, .78);
  --glass-line: rgba(255, 255, 255, .8);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 24px 48px -28px rgba(30, 45, 60, .28);

  --r-28: 28px;
  --r-24: 24px;
  --r-16: 16px;
  --r-12: 12px;
  --r-pill: 999px;
  --shadow-card: 0 8px 20px rgba(117, 115, 111, .2);
  --shadow-runner: 0 1px 3px rgba(0, 0, 0, .12);

  --font: Onest, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --header-h: 72px;
  --pad: 40px;          /* поля страницы: на компьютере 40, на телефоне 16 */
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink-900);
  font: 400 16px/22px var(--font);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
p, li { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { margin: 0; font: inherit; color: inherit; letter-spacing: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
svg { display: block; flex: none; }
img { display: block; }
sup { font-size: .55em; line-height: 0; vertical-align: .75em; margin-left: .06em; }
mark { background: none; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ice-700); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.nowrap { white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; }

/* картинки не утаскиваются на рабочий стол и не сохраняются долгим нажатием (меню ещё глушит pro.js) */
img, [data-protect] { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* толщина иконок: в спрайте обводка 1.75 в сетке 24, для 20 px нужно 2.1, для 16 px 2.6, для 28 px 1.5 */
.i20 { width: 20px; height: 20px; --icon-stroke: 2.1; }
.i16 { width: 16px; height: 16px; --icon-stroke: 2.6; }
.i24 { width: 24px; height: 24px; }
.i28 { width: 28px; height: 28px; --icon-stroke: 1.5; }

/* заглушка загрузки как у Яндекс Go: плашка, по которой бежит светлый блик */
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.skel, .ph.is-loading {
  background: linear-gradient(90deg, var(--skeleton) 40%, var(--skeleton-glow) 50%, var(--skeleton) 60%) var(--skeleton);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .skel, .ph.is-loading, .btn[aria-busy="true"] { animation: none; }
}

/* матовое стекло: островки в тумане. где браузер не умеет размывать, просто светлая плашка */
.glass {
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); }
}

/* кнопки: лёд с тёмным текстом, как «Вызвать инженера» на xolodok.pro */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 28px;
  border-radius: var(--r-16);
  background: var(--ice-500); color: var(--ink-900);
  font-weight: 500; font-size: 17px; line-height: 22px; white-space: nowrap;
  transition: background-color .15s, transform .15s var(--ease-out);
}
.btn:active { transform: scale(.985); }
.btn--l { height: 60px; padding: 0 36px; font-size: 18px; line-height: 24px; }
.btn--s { height: 44px; padding: 0 20px; border-radius: var(--r-pill); font-size: 15px; line-height: 20px; }
.btn--soft { background: var(--fill); color: var(--ink-900); }
.btn--wide { width: 100%; }
.btn[disabled] { cursor: default; }
/* кнопка ждёт (обратный отсчёт до нового звонка): серая, чтобы было видно, что пока не нажимается */
.btn[disabled]:not([aria-busy="true"]) { background: var(--fill); color: var(--ink-600); }
/* пока ждём сервер, кнопка становится заглушкой с бликом и не нажимается */
.btn[aria-busy="true"] {
  color: var(--ink-600);
  background: linear-gradient(90deg, var(--skeleton) 40%, var(--skeleton-glow) 50%, var(--skeleton) 60%) var(--skeleton);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.link {
  color: var(--ink-900); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: rgba(20, 27, 32, .3);
}

/* шапка: липкая полоса из матового стекла */
.header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
  padding: 0 var(--pad);
  color: var(--ink-900);
  transition: background-color .3s, box-shadow .3s;
}
/* стекло у шапки всегда, кроме главной над фото: там оно появляется при прокрутке (landing.css и pro.js) */
.header {
  background: rgba(241, 244, 246, .82);
  box-shadow: 0 1px 0 var(--line);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header { background: rgba(241, 244, 246, .62); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); }
}
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; border-radius: 8px; }
.brand__mark { width: 28px; height: 28px; color: var(--ice-700); }
.brand__word { font-weight: 700; font-size: 24px; line-height: 28px; letter-spacing: -0.02em; white-space: nowrap; }
.brand__sub { margin: 4px 0 0 4px; color: var(--ink-600); font-size: 13px; line-height: 16px; white-space: nowrap; }
.header__end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
/* «Закрыть» и «Назад» в шапке анкеты */
.login {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 12px;
  border-radius: var(--r-12);
  color: var(--ink-600);
  font-size: 15px; line-height: 20px; white-space: nowrap;
  transition: background-color .15s, color .15s;
}

/* подвал: на тумане, сверху призыв с кнопкой, ниже ссылки и реквизиты */
.footer { padding: 96px var(--pad) calc(40px + env(safe-area-inset-bottom)); }
.footer__cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap;
  padding-bottom: 48px; border-bottom: 1px solid var(--line);
}
.footer__title { font-weight: 600; font-size: clamp(30px, 3vw, 48px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.footer__bottom {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand links" "legal links";
  gap: 12px 48px; align-items: start; padding-top: 32px;
}
.footer__bottom:first-child { padding-top: 0; }
.footer__bottom > .brand { grid-area: brand; }
.footer__bottom .brand__word { font-size: 20px; line-height: 24px; }
.footer__bottom .brand__mark { width: 24px; height: 24px; }
.footer__links { grid-area: links; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 28px; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-600); font-size: 15px; line-height: 20px; transition: color .15s; }
.footer__legal { grid-area: legal; color: var(--ink-600); font-size: 13px; line-height: 18px; }
.footer__legal p + p { margin-top: 4px; }

/* липкая кнопка анкеты внизу, только на телефоне */
.stickybar { display: none; }

/* страницы документов: согласие, политика, инструкция. белый лист в тумане, текст не шире 720 */
.island {
  margin: 16px 16px 0;
  padding: 56px;
  background: var(--white);
  border-radius: var(--r-28);
}
.doc { max-width: 720px; margin: 0 auto; }
.doc__h1 { font-weight: 600; font-size: 48px; line-height: 52px; letter-spacing: -0.03em; text-wrap: balance; }
.doc__lead { margin-top: 16px; color: var(--ink-600); font-size: 20px; line-height: 28px; }
.doc h2 { margin-top: 40px; font-weight: 600; font-size: 24px; line-height: 30px; letter-spacing: -0.015em; scroll-margin-top: 104px; }
.doc p, .doc li { font-size: 17px; line-height: 26px; }
.doc p { margin-top: 12px; }
.doc ol, .doc ul { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.doc ol { counter-reset: n; }
.doc ol > li { position: relative; padding-left: 40px; counter-increment: n; }
.doc ol > li::before {
  content: counter(n);
  position: absolute; left: 0; top: -1px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ice-100); font-weight: 600; font-size: 14px; line-height: 18px;
}
.doc ul > li { position: relative; padding-left: 20px; }
.doc ul > li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--ice-500); }
.doc .placeholder { color: var(--ink-600); }
.doc__version { margin-top: 32px; color: var(--ink-600); font-size: 15px; line-height: 20px; }
.doc__box { margin-top: 24px; padding: 20px 24px; border-radius: var(--r-16); background: var(--fill); }
.doc__box p:first-child { margin-top: 0; }
.doc__cta { margin-top: 32px; }
/* короткая страница: подвал прижат к низу окна */
body.doc-page { min-height: 100svh; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--mist-0), var(--mist) 40%); }
body.doc-page > main { flex: 1; padding-bottom: 16px; }
body.doc-page .footer { padding-top: 48px; }

/* 404: карточка 480 по центру */
.island.nf { max-width: 480px; margin: 48px auto 64px; padding: 32px; }
.nf__title { font-weight: 600; font-size: 32px; line-height: 38px; letter-spacing: -0.015em; }
.nf__text { margin: 8px 0 24px; color: var(--ink-600); font-size: 17px; line-height: 24px; }

/* наведение только мышью: на тачскрине оно залипает */
@media (hover: hover) {
  .btn:not([aria-busy="true"]):not([disabled]):hover { background: var(--ice-600); }
  .btn--soft:not([aria-busy="true"]):hover { background: var(--fill-hover); }
  .login:hover { color: var(--ink-900); background: rgba(20, 27, 32, .06); }
  .footer__links a:hover { color: var(--ink-900); }
  .link:hover { text-decoration-color: currentColor; }
}

/* телефон: шапка 56, поля 16 */
@media (max-width: 600px) {
  :root { --header-h: 56px; --pad: 16px; }
  .brand { gap: 6px; }
  .brand__mark { width: 22px; height: 22px; }
  .brand__word { font-size: 18px; line-height: 22px; letter-spacing: -0.01em; }
  .brand__sub { display: none; }
  .header .btn--s { height: 40px; padding: 0 16px; font-size: 15px; }
  .footer { padding-top: 64px; }
  .footer__cta { padding-bottom: 32px; }
  .footer__cta .btn { width: 100%; }
  .footer__bottom { grid-template-columns: 1fr; grid-template-areas: "brand" "links" "legal"; gap: 16px; }
  .footer__links { flex-direction: column; justify-content: flex-start; }
  body.doc-page { background: var(--white); }
  .island { margin: 0; padding: 32px 16px 40px; border-radius: 0; }
  .doc__h1 { font-size: 32px; line-height: 36px; }
  .doc__lead { font-size: 17px; line-height: 24px; }
  .doc h2 { margin-top: 32px; font-size: 20px; line-height: 26px; scroll-margin-top: 72px; }
  .doc__cta { display: flex; }
  .island.nf { margin: 0; padding: 40px 16px; }
  .nf__title { font-size: 24px; line-height: 30px; }
  .stickybar {
    display: block;
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(241, 244, 246, .9);
    box-shadow: 0 -1px 0 var(--line);
    transform: translateY(100%); visibility: hidden;
    transition: transform .25s var(--ease-out), visibility 0s .25s;
  }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .stickybar { background: rgba(241, 244, 246, .7); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); }
  }
  .stickybar.is-shown { transform: none; visibility: visible; transition: transform .25s var(--ease-out), visibility 0s; }
  .stickybar .btn { width: 100%; }
  .header .btn { transition: opacity .2s var(--ease-out); }
  .sticky-on .header .btn { opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stickybar, .stickybar.is-shown { transition: none; }
}
