/* «Полюс холода» — сайт Кузьмина Виктора.
   Тёмная тема «полярная ночь» (по умолчанию) и светлая «иней». Акцент — северное сияние.
   Разделы — «главы» зимнего неба: каждая своим цветом во всю ширину. */

@font-face {
  font-family: "Onest";
  src: url("../fonts/onest.6dbca0feb238.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Токены ---------- */
:root {
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 2.2vw, 32px);
  --maxw: 1440px;
  --section-gap: clamp(96px, 12vw, 200px);
  --radius: 0;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-mid: 320ms;

  /* размеры: два-три рабочих, остальное — редкость */
  --fs-body: clamp(17px, 0.95rem + 0.25vw, 19px);
  --fs-small: 15px;
  --fs-h3: clamp(20px, 1.1rem + 0.5vw, 26px);
  --fs-section: clamp(36px, 1.2rem + 3.4vw, 64px);
  --fs-display: clamp(48px, 1rem + 7vw, 128px);
  --fs-hero: clamp(36px, 9.2vw, 150px);
}

/* Полярная ночь */
:root, [data-theme="night"] {
  color-scheme: dark;
  --bg: #070b16;
  --ink: #eaf2fb;
  --muted: #a9b8cc;
  --line: #22304a;
  --accent: #45f0a9;
  --on-accent: #04140d;
  --accent-deep: #22c98a;
  --sky: #070b16;
  --sky-ink: #e9fff4;
  --snow: #e2ebf3;
  --snow-ink: #070b16;
  --f-deep: #0d182b;   --on-deep: #eaf2fb;
  --f-ice: #dce8f1;    --on-ice: #0a1322;
  --f-teal: #13b8a9;   --on-teal: #021815;
  --f-aurora: #45f0a9; --on-aurora: #04140d;
  --f-band: #0b1322;   --f-band-2: #111d33;
  --field-ink: #0a1322;
  --paper: #f4f8fb;
  --ink-soft: #0a1322;
  --input: #ffffff;
  --input-ink: #0a1322;
  --focus: #ffd23f;
}

/* Иней */
[data-theme="frost"] {
  color-scheme: light;
  --bg: #eef4f9;
  --ink: #0a1322;
  --muted: #44546a;
  --line: #c4d3e0;
  --accent: #0a8a5f;
  --on-accent: #ffffff;
  --accent-deep: #07714d;
  --sky: #cfe2ee;
  --sky-ink: #0a1322;
  --snow: #0e1a2e;
  --snow-ink: #e9f3fb;
  --f-deep: #dbe7f0;   --on-deep: #0a1322;
  --f-ice: #0e1a2e;    --on-ice: #eaf2fb;
  --f-teal: #9fe7dd;   --on-teal: #06231f;
  --f-aurora: #45f0a9; --on-aurora: #04140d;
  --f-band: #e3edf4;   --f-band-2: #d5e3ed;
  --paper: #ffffff;
  --input: #ffffff;
  --input-ink: #0a1322;
  --focus: #0047ff;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-body)/1.55 var(--font);
  font-feature-settings: "tnum" 0, "kern" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, blockquote, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
button { font: inherit; color: inherit; }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; left: var(--gutter); top: 12px; z-index: 100; width: auto; height: auto; clip: auto;
  padding: 12px 18px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.h-display { font-size: var(--fs-display); font-weight: 800; line-height: 0.95; letter-spacing: -0.035em; }
.h-section { font-size: var(--fs-section); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }

/* ---------- Кнопки: прямоугольные, одна заливка ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 24px;
  border: 0; border-radius: var(--radius);
  background: var(--ink); color: var(--bg);
  font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-mid) var(--ease), color var(--t-mid);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-deep); color: var(--on-accent); }
.btn-ink { background: var(--field-ink, #0a1322); color: #f4f8fb; }
.btn-ghost { background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 0.25em; }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-wide { width: 100%; }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; gap: 0.4em; align-items: center; min-height: 44px; }
.link-arrow::after { content: "→"; transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover::after { transform: translateX(6px); }

/* ---------- Шапка ---------- */
.site-header {
  position: relative; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 20px var(--gutter);
  max-width: var(--maxw); margin-inline: auto;
}
.page-home .site-header { position: absolute; inset: 0 0 auto 0; max-width: none; color: var(--sky-ink); }
.wordmark { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { text-decoration: none; font-weight: 500; padding: 10px 0; }
.site-nav a:hover, .site-nav a[aria-current] { text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.page-home .header-actions .btn:not(.btn-accent) { background: var(--sky-ink); color: var(--sky); }

/* Переключатель темы: солнце ↔ луна */
.theme-toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
}
.theme-toggle:hover .theme-icon { transform: rotate(-18deg); }
.theme-icon { transition: transform 600ms var(--ease); overflow: visible; }
.theme-icon .moon-cut { transform: translate(8px, -8px); transition: transform 600ms var(--ease); }
.theme-icon .sun-core { transform-origin: center; transition: transform 600ms var(--ease); }
.theme-icon .sun-rays { transform-origin: 12px 12px; transition: transform 600ms var(--ease), opacity 400ms; }
/* ночь: показываем луну (тень «надкусывает» круг, лучей нет) */
[data-theme="night"] .theme-icon .moon-cut, :root:not([data-theme]) .theme-icon .moon-cut { transform: translate(0, 0); }
[data-theme="night"] .theme-icon .sun-core { transform: scale(1.55); }
[data-theme="night"] .theme-icon .sun-rays { transform: rotate(-60deg) scale(0.4); opacity: 0; }

/* Разлив новой темы кругом от кнопки (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-reveal 700ms var(--ease) both; }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--tx, 90%) var(--ty, 40px)); }
  to { clip-path: circle(var(--tr, 150vmax) at var(--tx, 90%) var(--ty, 40px)); }
}

/* ---------- Первый экран: «ватерлиния» — ночное небо над снегом ---------- */
.hero { position: relative; min-height: max(640px, 100svh); overflow: hidden; isolation: isolate; }
.hero-sky, .hero-snow { position: absolute; inset-inline: 0; }
.hero-sky { top: 0; height: 50%; background: var(--sky); overflow: hidden; }
.hero-snow { bottom: 0; height: 50%; background: var(--snow); }

/* Сияние: размытые ленты, медленный перелив */
.aurora { position: absolute; inset: -40% -20% 10% -20%; filter: blur(48px); opacity: 0.75; }
.aurora::before, .aurora::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(40% 30% at 30% 70%, #45f0a9 0%, transparent 70%),
    radial-gradient(35% 25% at 62% 58%, #2bd4e0 0%, transparent 70%),
    radial-gradient(30% 22% at 82% 72%, #5b7cff 0%, transparent 70%);
  animation: aurora-drift 18s ease-in-out infinite alternate;
}
.aurora::after { opacity: 0.6; animation-duration: 26s; animation-direction: alternate-reverse; transform: scaleX(-1); }
@keyframes aurora-drift {
  0% { transform: translate3d(-6%, 4%, 0) rotate(-4deg) scaleY(0.9); }
  50% { transform: translate3d(4%, -3%, 0) rotate(3deg) scaleY(1.1); }
  100% { transform: translate3d(8%, 2%, 0) rotate(-2deg) scaleY(0.95); }
}
[data-theme="frost"] .aurora { opacity: 0.42; mix-blend-mode: multiply; }

.hero-type { position: absolute; inset: 0; }
.hero-title {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  font-size: var(--fs-hero); font-weight: 850; line-height: 0.88; letter-spacing: -0.04em; text-transform: uppercase;
  padding-inline: var(--gutter);
  padding-bottom: 0.88em; /* шов проходит по середине второй строки (сдвиг отступом: обрезка остаётся на шве) */
  color: var(--sky-ink);
  clip-path: inset(0 0 50% 0);
}
.hero-title-under { color: var(--snow-ink); clip-path: inset(50% 0 0 0); }
.hero-title .line { display: block; overflow: hidden; padding-block: 0.02em; }
.hero-title .line > span { display: inline-block; }

.hero-foot {
  position: absolute; z-index: 2; left: 0; right: 0; top: calc(50% + 0.5 * var(--fs-hero) + clamp(28px, 4vh, 48px));
  display: grid; justify-items: center; gap: 28px; text-align: center;
  padding: 0 var(--gutter); color: var(--snow-ink);
}
.hero-lead { font-size: clamp(19px, 0.9rem + 0.7vw, 24px); line-height: 1.4; max-width: 40ch; font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-actions .btn-ink { background: var(--snow-ink); color: var(--snow); }

/* ---------- Главы ---------- */
.chapter { position: relative; padding-block: var(--section-gap); }
.lead-small { max-width: 52ch; margin-top: 20px; color: var(--muted); }
.chapter-work { background: var(--f-deep); color: var(--on-deep); padding-bottom: clamp(64px, 8vw, 120px); }
.chapter-work .lead-small { color: inherit; opacity: 0.82; }
.chapter-work > .wrap:last-child { margin-top: 40px; }

/* Примеры работ: вкладки с названиями + один большой пример целиком, стрелки по бокам */
.showcase { margin-top: clamp(32px, 4vw, 56px); display: grid; gap: 16px; }
.show-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.show-tabs[hidden] { display: none; }
.show-tab {
  display: grid; gap: 2px; text-align: left; min-height: 56px; padding: 10px 18px; border: 0; cursor: pointer;
  background: rgb(255 255 255 / 0.06); color: var(--on-deep); font: inherit; font-weight: 800; font-size: 17px;
  transition: background-color var(--t-mid) var(--ease), color var(--t-mid);
}
.show-tab small { font-size: 13px; font-weight: 500; opacity: 0.75; }
.show-tab:hover { background: rgb(255 255 255 / 0.14); }
.show-tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
[data-theme="frost"] .show-tab { background: rgb(10 19 34 / 0.06); }
[data-theme="frost"] .show-tab:hover { background: rgb(10 19 34 / 0.12); }
[data-theme="frost"] .show-tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.show-stage { position: relative; display: grid; gap: 20px; }
.js .showcase.is-ready .work-card { display: none; }
.js .showcase.is-ready .work-card.is-active { display: grid; animation: show-in 450ms var(--ease); }
@keyframes show-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.show-arrow {
  position: absolute; z-index: 2; top: calc(50% - 70px); width: 56px; height: 56px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--on-deep); color: var(--f-deep); font-size: 22px; font-weight: 800; outline: 4px solid var(--f-deep);
  transition: transform var(--t-fast) var(--ease);
}
.show-arrow[hidden] { display: none; }
.show-arrow:hover { transform: scale(1.08); }
.show-prev { left: -20px; }
.show-next { right: -20px; }
.work-card { display: grid; background: var(--folder-bg); color: var(--folder-ink); }
.work-shot { display: block; aspect-ratio: 1440 / 860; overflow: hidden; background: rgb(0 0 0 / 0.12); }
.work-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1.2s var(--ease); }
.work-card:hover .work-shot img { transform: scale(1.02); }
.work-text { display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; align-items: center; padding: 24px 28px 28px; font-size: 18px; }
.work-name { font-size: clamp(22px, 1rem + 0.8vw, 30px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.work-name span { font-size: 0.6em; font-weight: 600; opacity: 0.75; letter-spacing: 0; }
.work-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.work-card .btn-ink { background: var(--folder-ink); color: var(--folder-bg); }
.work-foot { margin-top: 24px; }
.tag-demo { font-size: var(--fs-small); font-weight: 600; }

/* Цвета ниш — их же используют миниатюры */
.folder-dental, .mock-dental { --folder-bg: #f2f8f8; --folder-ink: #06343a; --tab-bg: #08756c; --tab-ink: #ffffff; }
.folder-dryclean, .mock-dryclean { --folder-bg: #d9ecfa; --folder-ink: #0b2a4a; --tab-bg: #ffffff; --tab-ink: #0b2a4a; }
.folder-barber, .mock-barber { --folder-bg: #121110; --folder-ink: #f1e6cf; --tab-bg: #c9a45c; --tab-ink: #121110; }
.folder-salon, .mock-salon { --folder-bg: #f7e1ee; --folder-ink: #3a0d2c; --tab-bg: #e0218a; --tab-ink: #ffffff; }
.folder-autobody, .mock-autobody { --folder-bg: #1a1d22; --folder-ink: #f3f4f6; --tab-bg: #ff6a13; --tab-ink: #160a02; }
.folder-flowers, .mock-flowers { --folder-bg: #fbeee9; --folder-ink: #4a2530; --tab-bg: #f3c4c9; --tab-ink: #4a2530; }
.folder-cafe, .mock-cafe { --folder-bg: #f4eee3; --folder-ink: #2b1d12; --tab-bg: #e0672a; --tab-ink: #ffffff; }
.folder-atelier, .mock-atelier { --folder-bg: #4a0a14; --folder-ink: #f3e9e2; --tab-bg: #c9a35b; --tab-ink: #2a0f14; }
.folder-phonerepair, .mock-phonerepair { --folder-bg: #2337c6; --folder-ink: #ffffff; --tab-bg: #ffd21f; --tab-ink: #0c1640; }
.folder-plain, .mock-plain { --folder-bg: #dce8f1; --folder-ink: #0a1322; --tab-bg: #0a1322; --tab-ink: #ffffff; }

/* Миниатюра сайта, если нет скриншота */
.mock {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; width: 100%; height: 100%;
  padding: 8% 7%; background: var(--folder-bg); color: var(--folder-ink);
  box-shadow: inset 0 28px 0 var(--tab-bg);
}
.mock-name { font-size: clamp(24px, 3.4vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.mock-line { display: block; height: 12px; width: 70%; background: currentColor; opacity: 0.18; }
.mock-line.short { width: 40%; }

/* Преимущества: «образцы» на цветных плитках */
.chapter-features { background: var(--bg); }
.features { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.features-head { grid-column: 1 / 4; align-self: start; display: grid; gap: 20px; }
.features-head p { max-width: 30ch; }
.specimens { grid-column: 4 / 13; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; row-gap: 32px; }
.specimen { display: grid; gap: 10px; align-content: start; }
.specimen-tile { aspect-ratio: 4 / 5; display: grid; place-items: center; --tile: var(--f-ice); background: var(--tile); --obj: var(--accent-deep); }
.specimen-tile svg { width: 62%; }
.specimen:nth-child(2), .specimen:nth-child(6) { grid-column: span 2; }
.specimen:nth-child(2) .specimen-tile, .specimen:nth-child(6) .specimen-tile { aspect-ratio: 8 / 5; }
.specimen:nth-child(2) .specimen-tile svg, .specimen:nth-child(6) .specimen-tile svg { width: 34%; }
.specimen:nth-child(3n+1) .specimen-tile { --tile: var(--f-aurora); --obj: #0a1322; --paper: #f4f8fb; }
.specimen:nth-child(3n+2) .specimen-tile { --tile: #dce8f1; --obj: #0fa57a; --paper: #0a1322; }
.specimen:nth-child(3n) .specimen-tile { --tile: var(--f-teal); --obj: #0a1322; --paper: #f4f8fb; }
.specimen h3 { margin-top: 6px; }
.specimen p { font-size: 16px; color: var(--muted); }

/* Цены: тарифы-ступени */
.chapter-pricing { background: var(--f-ice); color: var(--on-ice); }
.pricing { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 8px; }
.pricing-title { grid-column: 1 / 9; }
.pricing-note { grid-column: 1 / 9; margin-top: 18px; max-width: 60ch; }
.steps-bars { grid-column: 1 / 13; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; margin-top: 48px; }
.bar { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px 28px 92px; overflow: hidden; }
.bar-1 { min-height: 500px; background: var(--f-teal); color: var(--on-teal); --strip: rgb(0 0 0 / 0.16); }
.bar-2 { min-height: 600px; background: var(--f-aurora); color: var(--on-aurora); --strip: rgb(0 0 0 / 0.14); }
.bar-3 { min-height: 700px; background: #0a1322; color: #eaf2fb; --strip: rgb(255 255 255 / 0.12); }
[data-theme="frost"] .bar-3 { background: #0e1a2e; }
.bar-name { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.bar-price { font-size: clamp(40px, 1.6rem + 2vw, 56px); font-weight: 850; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.bar-when { font-weight: 600; }
.launch { white-space: nowrap; }
.bar-summary { font-size: 17px; }
.bar-list { display: grid; gap: 6px; font-size: 17px; margin-top: 4px; }
.bar-list li { padding-left: 1.2em; position: relative; }
.bar-list li::before { content: "—"; position: absolute; left: 0; }
.bar-action {
  position: absolute; inset: auto 0 0 0; height: 64px; display: flex; align-items: center; padding-inline: 28px;
  background: var(--strip); color: inherit; font-weight: 700; text-decoration: none;
  transition: background-color var(--t-mid) var(--ease), padding var(--t-mid) var(--ease);
}
.bar-action::after { content: "→"; margin-left: auto; transition: transform var(--t-fast) var(--ease); }
.bar-action:hover::after { transform: translateX(6px); }
.bar-action:hover { background: rgb(0 0 0 / 0.26); }

/* Этапы: понятная схема — все шаги видны сразу, точки оплаты отмечены */
.chapter-steps { background: var(--bg); }
.steps-intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; }
.steps-intro h2 { grid-column: 1 / 6; }
.steps-intro p { grid-column: 7 / 12; font-size: 19px; }
.timeline { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 56px; counter-reset: tl; }
.tl-step {
  position: relative; display: grid; gap: 10px; align-content: start; padding: 28px 26px 30px;
  background: var(--tl-bg); color: var(--tl-ink); transition: transform var(--t-mid) var(--ease);
}
.tl-step:hover { transform: translateY(-4px); }
.tl-1 { --tl-bg: #08182e; --tl-ink: #eaf2fb; }
.tl-2 { --tl-bg: #0d2a4a; --tl-ink: #eaf2fb; }
.tl-3 { --tl-bg: #164166; --tl-ink: #eaf2fb; }
.tl-4 { --tl-bg: #2f6a8f; --tl-ink: #f4f9fc; }
.tl-5 { --tl-bg: #7fb3cc; --tl-ink: #06192a; }
.tl-6 { --tl-bg: #cfe6f1; --tl-ink: #06192a; }
.tl-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgb(69 240 169 / 0.22); }
.tl-step h3 { font-size: clamp(22px, 1rem + 0.7vw, 28px); font-weight: 800; letter-spacing: -0.015em; }
.tl-step p { font-size: 17px; max-width: 34ch; }
.tl-pay { justify-self: start; margin-top: 6px; padding: 6px 12px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 15px; }

/* Отзывы (появятся, когда в админке будут настоящие) */
.chapter-reviews { background: var(--f-deep); color: var(--on-deep); }
.reviews { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.review p { font-size: clamp(20px, 1rem + 0.6vw, 26px); line-height: 1.4; }
.review footer { margin-top: 16px; font-weight: 700; }

/* FAQ: полоса на вопрос */
.chapter-faq { padding: 0; }
.faq-head { min-height: 40svh; display: flex; align-items: flex-end; background: var(--accent); color: var(--on-accent); padding-block: 40px; }
.faq-head .h-display { font-size: clamp(44px, 7vw, 120px); }
.faq-band { background: var(--f-band); }
.faq-band:nth-child(odd) { background: var(--f-band-2); }
.faq-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; padding-block: 56px; }
.faq-row h3 { grid-column: 1 / 6; font-size: clamp(22px, 1rem + 0.8vw, 30px); font-weight: 800; letter-spacing: -0.015em; }
.faq-row p { grid-column: 7 / 13; font-size: 18px; line-height: 1.55; }

/* Заявка: текст и мессенджеры слева, белая карточка формы справа */
.chapter-cta { background: var(--f-deep); color: var(--on-deep); }
.cta-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: start; }
.cta-text { grid-column: 1 / 6; display: grid; gap: 18px; align-content: start; }
.cta-text p { font-size: 19px; max-width: 40ch; }
.cta-channels { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-light { background: #eaf2fb; color: #0a1322; }
.cta-tile { grid-column: 7 / 13; background: var(--paper); color: #0a1322; padding: clamp(24px, 3.4vw, 44px); display: grid; gap: 18px; align-content: start; }
.cta-tile > p { max-width: 52ch; }
.cta-tile-solo { max-width: 860px; }
[data-theme="frost"] .cta-tile { outline: 2px solid rgb(10 19 34 / 0.08); }

/* Форма */
.lead-form { display: grid; gap: 16px; margin-top: 8px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 16px; }
.optional { font-weight: 400; }
.field input[type="text"], .field input[type="tel"], .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border: 2px solid #c9d6e2; border-radius: var(--radius);
  background: var(--input); color: var(--input-ink); font: inherit; font-size: 17px;
  transition: border-color var(--t-fast);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: #0a1322; box-shadow: 0 0 0 3px var(--focus); }
.field-check { grid-template-columns: 28px 1fr; align-items: start; gap: 12px; }
.field-check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: #0a1322; cursor: pointer; }
.field-check label { font-weight: 500; font-size: 16px; }
.field-check .field-error { grid-column: 1 / -1; }
.field-error { font-weight: 700; font-size: 15px; padding: 6px 10px; background: #fff3f0; color: #9a1b00; }
.form-errors { font-weight: 700; padding: 12px 16px; background: #fff3f0; color: #9a1b00; }
.field-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-form .btn-accent { background: #0a1322; color: #f4f8fb; min-height: 58px; font-size: 18px; }
.lead-form .btn-accent:hover { background: #000; }

/* ---------- Футер: аккуратная сетка ---------- */
.site-footer { background: var(--f-ice); color: var(--on-ice); padding: clamp(56px, 7vw, 96px) 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px 32px; align-items: start; }
.footer-brand { display: grid; gap: 16px; }
.footer-name { font-size: clamp(28px, 1rem + 1.6vw, 40px); font-weight: 850; letter-spacing: -0.03em; line-height: 1; }
.footer-note { max-width: 38ch; }
.footer-contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-contacts .btn-ink { background: #0a1322; color: #f4f8fb; }
[data-theme="frost"] .footer-contacts .btn-ink { background: #eaf2fb; color: #0a1322; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-title { font-weight: 800; margin-bottom: 4px; }
.footer-legal {
  display: grid; grid-template-columns: 1.6fr 1.3fr 1.6fr auto; gap: 8px 32px; align-items: center;
  margin-top: clamp(40px, 5vw, 64px); padding-top: 20px; border-top: 2px solid rgb(10 19 34 / 0.12); font-size: 15px;
}
[data-theme="frost"] .footer-legal { border-top-color: rgb(234 242 251 / 0.16); }
.footer-up { font-weight: 700; white-space: nowrap; }

/* ---------- Cookie: компактная строка поверх страницы, вёрстку не двигает ---------- */
.cookie {
  position: fixed; z-index: 50; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(560px, calc(100% - 24px));
  display: flex; gap: 12px; align-items: center; padding: 10px 10px 10px 16px;
  background: var(--paper); color: #0a1322; font-size: 14px; line-height: 1.35; outline: 2px solid rgb(10 19 34 / 0.12);
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1; }
.cookie .btn-accent { flex: none; min-height: 40px; background: #0a1322; color: #fff; }

/* ---------- Внутренние страницы ---------- */
.page-hero { padding-block: clamp(48px, 8vw, 120px) clamp(40px, 6vw, 80px); background: var(--f-deep); color: var(--on-deep); }
.page-hero .wrap { display: grid; gap: 24px; justify-items: start; }
.page-lead { font-size: clamp(19px, 1rem + 0.5vw, 23px); max-width: 52ch; }
.page-inner .chapter { padding-block: clamp(56px, 8vw, 120px); }

.niche-filter { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-bottom: 40px; font-weight: 600; }
.niche-filter a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.niche-filter a:hover { text-decoration: underline; }
.niche-filter a[aria-current] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 3px; }
[data-theme="frost"] .niche-filter a[aria-current] { color: var(--accent); }

.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 12px; }
.case-card { position: relative; background: var(--f-deep); color: var(--on-deep); --gx: 50%; --gy: 50%; }
.case-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--t-mid);
  background: radial-gradient(420px circle at var(--gx) var(--gy), rgb(69 240 169 / 0.22), transparent 60%);
}
.case-card:hover::before { opacity: 1; }
.case-link { position: relative; display: grid; gap: 10px; padding: 12px 12px 24px; text-decoration: none; }
.case-shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.case-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 900ms var(--ease); }
.case-link:hover .case-shot img { transform: scale(1.04); }
.case-meta { display: flex; gap: 16px; font-size: var(--fs-small); font-weight: 600; padding-inline: 8px; }
.case-meta .tag-demo { color: var(--accent); }
[data-theme="frost"] .case-meta .tag-demo { color: var(--accent); }
.case-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; padding-inline: 8px; }
.case-summary { padding-inline: 8px; color: var(--muted); }
.case-crumbs { font-size: var(--fs-small); }
.case-body { display: grid; gap: 48px; max-width: 900px; }
.case-body h2 { font-size: clamp(28px, 1rem + 1.6vw, 40px); margin-bottom: 14px; }
.case-body ul { padding-left: 1.2em; display: grid; gap: 6px; }
.sources { font-size: 16px; }

.contacts-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.contacts-grid > div:first-child { grid-column: 1 / 6; display: grid; gap: 28px; align-content: start; }
.contacts-grid > .cta-tile, .contacts-grid > .contacts-side { grid-column: 7 / 13; }
.contacts-side { display: grid; gap: 28px; align-content: start; }
.contact-cta { display: grid; gap: 18px; }
.contact-note { max-width: 52ch; }
.channels { display: grid; gap: 8px; }
.channel { display: flex; justify-content: space-between; align-items: center; min-height: 72px; padding: 0 24px; background: var(--f-deep); color: var(--on-deep); text-decoration: none; font-size: 22px; font-weight: 800; transition: background-color var(--t-mid); }
.channel:hover { background: var(--accent); color: var(--on-accent); }
.channel-kind { font-size: var(--fs-small); font-weight: 600; order: 2; }
.map { display: grid; gap: 14px; justify-items: start; padding: 24px; background: var(--f-band-2); min-height: 280px; align-content: center; }
.map iframe { width: 100%; height: 420px; border: 0; }
.map.is-loaded { padding: 0; }

.article { display: grid; gap: 56px; max-width: 860px; }
.article-part { display: grid; gap: 16px; }
.article-part h2 { font-size: clamp(28px, 1rem + 1.6vw, 40px); }
.article-part ul { padding-left: 1.2em; display: grid; gap: 8px; }
.price-lines { display: grid; gap: 8px; margin-top: 32px; }
.price-lines li { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; padding: 22px 24px; background: var(--f-band-2); color: var(--ink); font-size: 20px; }
.chapter-pricing .price-lines li { background: rgb(255 255 255 / 0.5); color: var(--on-ice); }
[data-theme="frost"] .chapter-pricing .price-lines li { background: rgb(255 255 255 / 0.08); }
.price-name { font-weight: 800; }
.price-sum { font-weight: 800; font-variant-numeric: tabular-nums; }
.case-links { display: grid; gap: 12px; margin-top: 24px; }

.doc-body { max-width: 860px; display: grid; gap: 18px; }
.doc-body h1 { font-size: clamp(36px, 1rem + 3.4vw, 64px); margin-bottom: 8px; }
.doc-body h2 { font-size: clamp(22px, 1rem + 0.8vw, 28px); margin-top: 22px; }
.doc-body ul, .doc-body ol { padding-left: 1.3em; display: grid; gap: 8px; }
.doc-version { color: var(--muted); }

/* ---------- Появление при прокрутке (только если работает JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 900ms var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .hero-title .line > span { transform: translateY(105%); animation: line-up 900ms var(--ease) forwards; }
.js .hero-title .line:nth-child(2) > span { animation-delay: 110ms; }
.js .hero-foot { opacity: 0; animation: fade-up 700ms var(--ease) 650ms forwards; }
@keyframes line-up { to { transform: translateY(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .show-prev { left: 8px; }
  .show-next { right: 8px; }
  .site-nav { display: none; }
  .features-head { grid-column: 1 / -1; }
  .specimens { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  .aurora { filter: blur(28px); }
  .aurora::after { display: none; }
  .header-actions .btn:not(.btn-accent) { display: none; }
  .hero { min-height: max(600px, 100svh); }
  .hero-sky { height: 40%; }
  .hero-snow { height: 60%; }
  .hero-title { clip-path: inset(0 0 60% 0); padding-bottom: calc(0.88em + 20svh); }
  .hero-title-under { clip-path: inset(40% 0 0 0); }
  .hero-foot { top: calc(40% + 0.5 * var(--fs-hero) + 24px); justify-items: start; text-align: left; }
  .hero-actions { justify-content: flex-start; }
  .hero-actions .btn { flex: 1 1 auto; }
  .specimens { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; row-gap: 24px; }
  .specimen:nth-child(2), .specimen:nth-child(6) { grid-column: 1 / -1; }
  .specimen:nth-child(2) { order: -1; }
  .specimen h3 { font-size: 17px; }
  .specimen p { font-size: 15px; }
  .pricing-title, .pricing-note { grid-column: 1 / -1; }
  .steps-bars { grid-row: auto; grid-template-columns: 1fr; margin-top: 32px; }
  .bar { min-height: 0; }
  .bar-price { font-size: 44px; }
  .steps-intro h2, .steps-intro p { grid-column: 1 / -1; }
  .timeline { grid-template-columns: 1fr; margin-top: 32px; gap: 8px; }
  .tl-step { padding: 22px 20px; }
  .show-tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .show-tab { flex: none; }
  .work-text { grid-template-columns: 1fr; font-size: 16px; padding: 18px 18px 40px; }
  .cta-text, .cta-tile { grid-column: 1 / -1; }
  .faq-head { min-height: 30svh; }
  .faq-head .h-display { font-size: 13vw; }
  .faq-row { grid-template-columns: 1fr; gap: 12px; padding-block: 32px; }
  .faq-row h3, .faq-row p { grid-column: 1 / -1; }
  .faq-row h3 { font-size: 22px; }
  .faq-row p { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-legal { grid-template-columns: 1fr; }
  .contacts-grid > div:first-child, .contacts-grid > .cta-tile, .contacts-grid > .contacts-side { grid-column: 1 / -1; }
  .price-lines li { grid-template-columns: 1fr; gap: 4px; }
  .cookie { font-size: 13px; }
  .show-arrow { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero-title .line > span { transform: none; }
  .js .hero-foot { opacity: 1; }
  .aurora::before, .aurora::after { animation: none; }
}
