/* СКАН52 — развитие исходного дизайна владельца «в духе Apple».
   Системный шрифт (SF Pro на устройствах Apple, Inter на остальных), белый и #f5f5f7,
   крупные полужирные заголовки, скруглённые карточки, цветные фото, фирменный оранжевый акцент,
   плавные появления и прокрутка. Светлая тема по умолчанию, тёмная — по переключателю. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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 {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --card-alt: #f5f5f7;
  --control: #e8e8ed;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: #d2d2d7;
  --line-soft: rgba(0, 0, 0, 0.08);
  --accent: #ff6b00;
  --accent-text: #b84a00;
  --on-accent: #111111;
  --btn: #1d1d1f;
  --on-btn: #ffffff;
  --ok: #248a3d;
  --err: #d70015;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --shadow: 0 20px 44px -12px rgba(0, 0, 0, 0.14);

  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-hero: clamp(40px, 1.4rem + 5.2vw, 88px);
  --fs-h2: clamp(32px, 1.2rem + 3.4vw, 60px);
  --fs-h3: clamp(21px, 1rem + 0.7vw, 28px);
  --fs-lead: clamp(19px, 0.95rem + 0.6vw, 24px);

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 44px);
  --r-xl: 30px;
  --r-lg: 24px;
  --r: 16px;
  --r-sm: 12px;
  --nav-h: 56px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.28, 0.11, 0.32, 1);

  color-scheme: light;
  interpolate-size: allow-keywords;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #111113;
  --card: #1d1d1f;
  --card-alt: #161617;
  --control: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --line: #424245;
  --line-soft: rgba(255, 255, 255, 0.1);
  --accent: #ff7a1a;
  --accent-text: #ff8f40;
  --btn: #f5f5f7;
  --on-btn: #1d1d1f;
  --ok: #30d158;
  --err: #ff453a;
  --nav-bg: rgba(22, 22, 23, 0.78);
  --shadow: 0 20px 44px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

@view-transition { navigation: auto; }

/* ---------- база ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html.theme-anim body, html.theme-anim body * {
  transition: background-color 0.35s var(--ease-soft), color 0.35s var(--ease-soft), border-color 0.35s var(--ease-soft) !important;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; letter-spacing: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; color: var(--text); }
p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 600; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 980px;
  background: var(--btn);
  color: var(--on-btn);
  font-weight: 500;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(80px, 11vw, 150px); background: var(--bg); }
.section--alt { background: var(--bg-alt); }
.section--black { background: #000; color: #f5f5f7; color-scheme: dark; }

.head { margin-bottom: clamp(40px, 5vw, 64px); }
.head--center { text-align: center; }
.head--center .lead { margin-inline: auto; }
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.06;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.lead {
  margin-top: 16px;
  max-width: 36ch;
  font-size: var(--fs-lead);
  line-height: 1.33;
  font-weight: 450;
  letter-spacing: -0.016em;
  color: var(--text-2);
  text-wrap: pretty;
}
.head--center .h2 { margin-inline: auto; max-width: 20ch; }
.section--black .h2 { color: #f5f5f7; }
.section--black .lead { color: #a1a1a6; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- кнопки и ссылки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 26px;
  border-radius: 980px;
  border: 1px solid transparent;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease-soft), color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft), transform 0.3s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--btn); color: var(--on-btn); }
.btn--primary:hover, .btn--light:hover { background: var(--accent); color: var(--on-accent); }
.btn--light { background: #fff; color: #1d1d1f; }
.btn--ghost { border-color: currentColor; }
.btn--ghost:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--lg { height: 56px; padding: 0 32px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

.more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 17px;
  font-weight: 450;
  color: var(--accent-text);
}
.more svg { width: 15px; height: 15px; margin-top: 1px; transition: transform 0.3s var(--ease); }
.more:hover { text-decoration: underline; text-underline-offset: 3px; }
.more:hover svg, .tile:hover .more svg { transform: translateX(3px); }
.more--light { color: #fff; }

/* ---------- шапка ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-soft);
}
.nav.is-scrolled { border-color: var(--line-soft); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { flex: none; display: block; }
.logo img { width: 112px; height: auto; }
:root[data-theme="dark"] .logo img { filter: invert(1) brightness(1.2); }
.nav__links { display: flex; gap: 30px; margin-inline: auto; }
.nav__links a {
  font-size: 14px;
  color: var(--text);
  opacity: 0.8;
  white-space: nowrap;
  transition: opacity 0.2s, color 0.2s;
}
.nav__links a:hover, .nav__links a[aria-current] { opacity: 1; color: var(--accent-text); }
.nav__phone { font-size: 14px; font-weight: 500; }
.nav .btn { height: 32px; padding: 0 16px; font-size: 13px; }
.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text);
  opacity: 0.8;
  transition: background-color 0.2s, opacity 0.2s;
}
.icon-btn:hover { opacity: 1; background: var(--control); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.nav__call { display: none; }

.burger { display: none; position: relative; width: 40px; height: 40px; }
.burger span {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  padding: 12px var(--gutter) 32px;
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-soft), visibility 0s 0.35s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease-soft), visibility 0s; }
.mobile-menu nav a {
  display: block;
  padding: 14px 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line-soft);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.mobile-menu.is-open nav a { opacity: 1; transform: none; }
.mobile-menu__foot { margin-top: auto; padding-top: 32px; display: grid; gap: 14px; }
.mobile-menu__phone { font-size: 21px; font-weight: 600; }
.mobile-menu .theme-toggle { justify-self: start; color: var(--accent-text); font-size: 17px; }
.theme-toggle__label::after { content: "Тёмная тема"; }
:root[data-theme="dark"] .theme-toggle__label::after { content: "Светлая тема"; }
body.menu-open { overflow: hidden; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: min(92svh, 900px);
  min-height: 600px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #1d1d1f;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0 0 -12% 0; z-index: -2; transform: translate3d(0, var(--hy, 0px), 0); will-change: transform; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  animation: hero-zoom 2.4s var(--ease) both;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.34) 42%, rgba(0, 0, 0, 0.72) 100%);
}
.hero__content {
  padding-bottom: clamp(64px, 11vh, 120px);
  text-align: center;
  opacity: var(--ho, 1);
  transform: translate3d(0, var(--hc, 0px), 0);
}
.hero h1 {
  color: #fff;
  font-size: var(--fs-hero);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 14ch;
  margin-inline: auto;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}
.hero__lead {
  margin: 20px auto 0;
  max-width: 34ch;
  font-size: var(--fs-lead);
  line-height: 1.33;
  font-weight: 450;
  color: rgba(255, 255, 255, 0.88);
  text-wrap: balance;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; margin-top: 36px; }
.hero__content > * { animation: rise 1.1s var(--ease) both; }
.hero__content > :nth-child(2) { animation-delay: 0.12s; }
.hero__content > :nth-child(3) { animation-delay: 0.22s; }

/* ---------- ключевые факты ---------- */

.facts { padding-block: clamp(56px, 7vw, 88px); border-bottom: 1px solid var(--line-soft); }
.facts__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; text-align: center; }
.fact svg { width: 34px; height: 34px; margin: 0 auto 16px; color: var(--accent); }
.fact strong { display: block; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
.fact span { display: block; margin-top: 6px; color: var(--text-2); font-size: 15px; }

/* ---------- решения (плитки) ---------- */

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--card);
  overflow: hidden;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.tile__body { padding: clamp(28px, 3.4vw, 44px) clamp(28px, 3.4vw, 44px) 0; }
.tile h3 { font-size: var(--fs-h3); line-height: 1.14; letter-spacing: -0.02em; }
.tile p { margin-top: 10px; color: var(--text-2); max-width: 38ch; }
.tile__more { margin-top: 16px; }
.tile__more::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tile__media {
  position: relative;
  margin-top: 28px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--card-alt);
}
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile:hover .tile__media img { transform: scale(1.05); }
.tile__media--object { background: linear-gradient(180deg, #92877d, #cdc5bd); }
.tile__media--object img { object-fit: contain; }
.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  padding: 5px 11px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 500;
}
.tile:has(.tile__more:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.tile__more:focus-visible { outline: none; }

/* ---------- как мы работаем ---------- */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
/* задержка появления — по колонке, чтобы ряд выплывал волной слева направо */
.steps .step:nth-child(4n + 2) { --i: 1; }
.steps .step:nth-child(4n + 3) { --i: 2; }
.steps .step:nth-child(4n + 4) { --i: 3; }
.step {
  display: flex;
  flex-direction: column;
  padding: 32px 28px 34px;
  border-radius: var(--r-xl);
  background: var(--card-alt);
}
.step > svg { width: 38px; height: 38px; color: var(--accent); }
.step__n { padding-top: 44px; font-size: 14px; font-weight: 600; color: var(--text-3); }
.step h3 { margin-top: 6px; font-size: 22px; line-height: 1.18; letter-spacing: -0.02em; }
.step p { margin-top: 10px; color: var(--text-2); font-size: 16px; }
.step--cta { background: var(--btn); color: var(--on-btn); }
.step--cta h3 { color: var(--on-btn); }
.step--cta .more { color: var(--accent); margin-top: auto; padding-top: 16px; }

/* круглые кнопки (галерея) */
.round-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--control);
  color: var(--text);
  transition: background-color 0.3s, opacity 0.3s, transform 0.3s var(--ease);
}
.round-btn:hover:not([disabled]) { background: var(--line); }
.round-btn:active:not([disabled]) { transform: scale(0.92); }
.round-btn[disabled] { opacity: 0.35; cursor: default; }
.round-btn svg { width: 18px; height: 18px; }

/* ---------- производство (чёрная секция) ---------- */

.showcase {
  max-width: 1000px;
  margin: clamp(48px, 6vw, 72px) auto 0;
  overflow: hidden;
  transform: scale(var(--s, 1));
  border-radius: calc(var(--r-xl) + var(--sr, 0px));
  will-change: transform;
}
.showcase img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(48px, 6vw, 80px); }
.stat strong { display: block; font-size: clamp(36px, 1.6rem + 2vw, 56px); font-weight: 650; letter-spacing: -0.035em; line-height: 1; color: #f5f5f7; }
.stat strong small { font-size: 0.45em; font-weight: 600; letter-spacing: -0.01em; color: var(--accent); margin-left: 4px; }
.stat span { display: block; margin-top: 12px; font-size: 15px; color: #a1a1a6; max-width: 22ch; }

/* ---------- почему мы ---------- */

.section--alt .partner, .section--alt .feature { background: var(--card); }
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature {
  padding: 34px 32px 36px;
  border-radius: var(--r-lg);
  background: var(--card-alt);
  transition: transform 0.6s var(--ease), background-color 0.3s;
}
.feature:hover { transform: translateY(-4px); }
.feature svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 28px; }
.feature h3 { font-size: 21px; line-height: 1.2; letter-spacing: -0.018em; }
.feature p { margin-top: 10px; color: var(--text-2); font-size: 16px; }

/* ---------- работы ---------- */

.works { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.work { grid-column: span 4; }
.work--wide { grid-column: span 7; }
.work--side { grid-column: span 5; }
.work__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card);
  cursor: zoom-in;
}
.work--wide .work__media, .work--side .work__media { aspect-ratio: auto; height: clamp(300px, 36vw, 470px); }
.work__media picture { display: block; width: 100%; height: 100%; }
.work__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.work__media:hover img { transform: scale(1.05); }
.work__media--object img { object-fit: contain; padding: 20px; }
.work figcaption { margin-top: 12px; padding-inline: 4px; font-size: 15px; color: var(--text-2); }

/* ---------- партнёры ---------- */

.partners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.partner {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 40px 28px 36px;
  border-radius: var(--r-lg);
  background: var(--card-alt);
  text-align: center;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
a.partner:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.partner__logo { display: grid; place-items: center; height: 72px; margin-bottom: 14px; }
.partner__logo img { max-height: 72px; width: auto; border-radius: 10px; }
.partner__name { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.partner__desc { color: var(--text-2); font-size: 15px; }
.partner__arrow { position: absolute; top: 18px; right: 18px; width: 18px; height: 18px; color: var(--text-3); transition: color 0.3s, transform 0.3s var(--ease); }
a.partner:hover .partner__arrow { color: var(--accent); transform: translate(2px, -2px); }
.nana { display: flex; gap: 8px; }
.nana i { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); animation: nana 1.6s var(--ease-soft) infinite; }
.nana i:nth-child(2) { animation-delay: 0.2s; }
.nana i:nth-child(3) { animation-delay: 0.4s; }

/* ---------- вопросы ---------- */

.faq { max-width: 860px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: block;
  padding: 26px 56px 26px 0;
  font-size: clamp(19px, 1rem + 0.4vw, 22px);
  font-weight: 600;
  letter-spacing: -0.018em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  color: var(--text-2);
  transition: transform 0.45s var(--ease);
}
.faq details[open] summary svg { transform: rotate(45deg); color: var(--accent); }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.45s var(--ease), content-visibility 0.45s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq__answer { padding: 0 56px 28px 0; color: var(--text-2); font-size: 17px; }
.faq__answer a { color: var(--accent-text); }

/* ---------- финальный призыв ---------- */

.cta { text-align: center; }
.cta .lead { margin-inline: auto; max-width: 40ch; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 24px; margin-top: 36px; }

/* ---------- подвал ---------- */

.footer { background: var(--bg-alt); padding: 44px 0 36px; font-size: 12px; line-height: 1.5; color: var(--text-2); }
.footer__cols { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer__brand img { width: 100px; }
:root[data-theme="dark"] .footer__brand img { filter: invert(1) brightness(1.2); }
.footer__brand p { margin-top: 12px; max-width: 30ch; }
.footer h2 { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 10px; letter-spacing: 0; }
.footer__links { display: grid; gap: 8px; }
.footer__links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; }
.footer__bottom a:hover { color: var(--text); text-decoration: underline; }
.footer--compact .footer__bottom { padding-top: 0; }

.mobile-bar { display: none; }

/* ---------- диалог решения и лайтбокс ---------- */

dialog { padding: 0; border: 0; color: inherit; background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(0, 0, 0, 0.42); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
dialog[open] { animation: dialog-in 0.5s var(--ease); }
dialog[open]::backdrop { animation: fade-in 0.4s var(--ease-soft); }
dialog.is-closing { animation: dialog-out 0.3s var(--ease-soft) forwards; }
dialog.is-closing::backdrop { animation: fade-out 0.3s var(--ease-soft) forwards; }

.sheet {
  width: min(1000px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border-radius: var(--r-xl);
  background: var(--card);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
}
.sheet__inner { display: grid; grid-template-columns: 1fr 1.1fr; }
.sheet__text { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; gap: 16px; }
.sheet__text h2 { font-size: clamp(28px, 1.2rem + 1.6vw, 40px); line-height: 1.08; letter-spacing: -0.028em; padding-right: 40px; }
.sheet__text p { color: var(--text-2); }
.sheet__text .btn { margin-top: auto; align-self: flex-start; }
.sheet__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; align-content: start; }
.sheet__gallery button { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--card-alt); cursor: zoom-in; }
.sheet__gallery button:first-child,
.sheet__gallery button:last-child:nth-child(even) { grid-column: span 2; aspect-ratio: 16 / 11; }
.sheet__gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.sheet__gallery button:hover img { transform: scale(1.04); }
.sheet__gallery .is-object { background: linear-gradient(180deg, #92877d, #cdc5bd); }
.sheet__gallery .is-object img { object-fit: contain; }
.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--control);
  color: var(--text);
  transition: background-color 0.2s, transform 0.3s var(--ease);
}
.close-btn:hover { background: var(--line); }
.close-btn:active { transform: scale(0.92); }
.close-btn svg { width: 16px; height: 16px; }

.lightbox { width: 100vw; height: 100dvh; background: rgba(0, 0, 0, 0.94); color: #f5f5f7; }
.lightbox::backdrop { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lightbox__stage { position: relative; width: 100%; height: 100%; display: grid; grid-template-rows: 1fr auto; }
.lightbox__figure { display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 64px var(--gutter) 16px; }
.lightbox__img { max-width: min(1200px, 100%); max-height: calc(100dvh - 160px); border-radius: var(--r); object-fit: contain; transition: opacity 0.3s var(--ease-soft), transform 0.5s var(--ease); }
.lightbox__img.is-leaving { opacity: 0; transform: scale(0.97); }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 16px var(--gutter) 28px; }
.lightbox__caption { font-size: 15px; color: #d2d2d7; text-align: center; min-width: 0; }
.lightbox__count { font-size: 13px; color: #86868b; font-variant-numeric: tabular-nums; }
.lightbox .round-btn { background: #2c2c2e; color: #f5f5f7; }
.lightbox .round-btn:hover:not([disabled]) { background: #3a3a3c; }
.lightbox .close-btn { background: #2c2c2e; color: #f5f5f7; }

/* ---------- страница заявки ---------- */

.contact-page { padding-block: clamp(56px, 8vw, 104px) clamp(80px, 10vw, 140px); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-page h1 {
  font-size: clamp(40px, 1.4rem + 3.6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.contact-list { display: grid; gap: 10px; margin-top: 40px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--r);
  background: var(--card-alt);
  transition: background-color 0.3s, transform 0.5s var(--ease);
}
a.contact-row:hover { transform: translateX(4px); }
.contact-row svg { flex: none; width: 22px; height: 22px; color: var(--accent); }
.contact-row small { display: block; color: var(--text-2); font-size: 13px; }
.contact-row b { display: block; font-weight: 600; font-size: 17px; }
.next-steps { margin-top: 40px; }
.next-steps h2 { font-size: 21px; letter-spacing: -0.018em; margin-bottom: 14px; }
.next-steps ol { display: grid; gap: 10px; counter-reset: step; }
.next-steps li { display: flex; gap: 14px; align-items: baseline; color: var(--text-2); counter-increment: step; }
.next-steps li::before { content: counter(step); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 600; }

.form-card { padding: clamp(24px, 4vw, 48px); border-radius: var(--r-xl); background: var(--card-alt); }
.lead-form { display: grid; gap: 16px; }
.lead-form[hidden], .lead-success[hidden] { display: none; }
.lead-form__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.lead-form__head h2 { font-size: 28px; letter-spacing: -0.024em; }
.lead-form__head p { font-size: 13px; color: var(--text-2); }

.field { position: relative; }
.field input, .field textarea {
  width: 100%;
  height: 56px;
  padding: 24px 16px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--text);
  font: 400 17px/1.3 var(--font);
  letter-spacing: -0.011em;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { height: auto; min-height: 140px; padding-bottom: 30px; resize: vertical; }
.field label {
  position: absolute;
  left: 17px;
  top: 17px;
  color: var(--text-3);
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform 0.3s var(--ease), color 0.2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-10px) scale(0.72); }
.field.has-error input, .field.has-error textarea { border-color: var(--err); }
.field.has-error label { color: var(--err); }
.field__error { display: block; margin-top: 6px; padding-left: 4px; font-size: 13px; color: var(--err); }
.field__error:empty { display: none; }
.field__counter { position: absolute; right: 14px; bottom: 10px; font-size: 12px; color: var(--text-3); pointer-events: none; font-variant-numeric: tabular-nums; }
.field__counter.is-warn { color: var(--accent-text); }

.dropzone { border: 1.5px dashed var(--line); border-radius: var(--r); background: var(--card); transition: border-color 0.3s, background-color 0.3s; }
.dropzone.is-drag, .dropzone:hover { border-color: var(--accent); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone__label { display: flex; align-items: center; gap: 14px; padding: 18px; cursor: pointer; }
.dropzone__label svg { flex: none; width: 26px; height: 26px; color: var(--accent); }
.dropzone__label strong { display: block; font-weight: 600; }
.dropzone__label small { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.files { display: grid; gap: 8px; padding: 0 12px; }
.files:not(:empty) { padding-bottom: 12px; }
.file-chip { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-sm); background: var(--card-alt); }
.file-chip__thumb { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; overflow: hidden; background: var(--control); font-size: 10px; font-weight: 600; color: var(--text-2); }
.file-chip__thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-chip__main { min-width: 0; display: grid; gap: 2px; }
.file-chip__name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-chip__meta { font-size: 12px; color: var(--text-2); }
.file-chip[data-status="done"] .file-chip__meta { color: var(--ok); }
.file-chip[data-status="error"] .file-chip__meta { color: var(--err); }
.file-chip__bar { height: 3px; border-radius: 3px; background: var(--control); overflow: hidden; margin-top: 4px; }
.file-chip__bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 0.3s var(--ease); }
.file-chip[data-status="done"] .file-chip__bar { opacity: 0; transition: opacity 0.6s 0.4s; }
.file-chip__remove { padding: 6px 10px; border-radius: 980px; font-size: 13px; color: var(--accent-text); }
.file-chip__remove:hover { background: var(--control); }

.check { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { width: 22px; height: 22px; border: 1.5px solid var(--line); border-radius: 7px; background: var(--card); display: grid; place-items: center; transition: background-color 0.25s, border-color 0.25s, transform 0.3s var(--ease); }
.check__box svg { width: 14px; height: 14px; color: var(--on-accent); transform: scale(0.4); opacity: 0; transition: transform 0.35s var(--ease), opacity 0.2s; }
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check__box svg { transform: none; opacity: 1; }
.check input:focus-visible + .check__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check.has-error .check__box { border-color: var(--err); }
.check a { color: var(--accent-text); }
.check a:hover { text-decoration: underline; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.guard { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.guard::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); transition: background-color 0.3s; }
.guard[data-state="working"]::before { background: var(--accent); animation: pulse 1s var(--ease-soft) infinite; }
.guard[data-state="done"] { color: var(--ok); }
.guard[data-state="done"]::before { background: var(--ok); }
.guard[data-state="error"] { color: var(--err); }
.guard[data-state="error"]::before { background: var(--err); }
.lead-form__submit { height: 56px; }
.form-status:empty { display: none; }
.form-status { font-size: 14px; }
.form-status[data-kind="error"] { padding: 12px 16px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--err) 10%, transparent); color: var(--err); }

.lead-success { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 24px 0; outline: none; }
.lead-success__mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: var(--on-accent); animation: pop 0.7s var(--ease) both; }
.lead-success__mark svg { width: 34px; height: 34px; }
.lead-success h2 { font-size: 32px; letter-spacing: -0.028em; }
.lead-success p { color: var(--text-2); max-width: 36ch; }
.lead-success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 980px;
  background: var(--btn);
  color: var(--on-btn);
  font-size: 14px;
  translate: -50% 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-soft), translate 0.5s var(--ease);
}
.toast.is-visible { opacity: 1; translate: -50% 0; }
.toast:empty { display: none; }

/* ---------- документы и 404 ---------- */

.doc { padding-block: clamp(56px, 8vw, 96px) 120px; }
.doc__inner { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 1.2rem + 2.6vw, 56px); line-height: 1.06; letter-spacing: -0.032em; }
.doc__meta { margin: 14px 0 44px; color: var(--text-2); }
.doc h2 { font-size: 24px; letter-spacing: -0.02em; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 12px; }
.doc ul { display: grid; gap: 6px; margin-top: 10px; padding-left: 22px; list-style: disc; }
.doc a { color: var(--accent-text); }
.doc a:hover { text-decoration: underline; }
.crumbs { display: flex; gap: 8px; margin-bottom: 20px; font-size: 14px; color: var(--text-2); }
.crumbs a { color: var(--accent-text); }

.not-found { min-height: calc(100svh - var(--nav-h)); display: grid; place-content: center; text-align: center; padding-block: 64px; }
.not-found__code { font-size: clamp(110px, 22vw, 220px); font-weight: 700; line-height: 0.9; letter-spacing: -0.06em; color: var(--accent); }
.not-found h1 { margin-top: 20px; font-size: clamp(28px, 1rem + 2vw, 44px); letter-spacing: -0.028em; }
.not-found p { margin-top: 12px; color: var(--text-2); font-size: 19px; }
.not-found__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }

/* ---------- появление при прокрутке ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(min(var(--i, 0), 5) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@keyframes hero-zoom { from { transform: scale(1.12); } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 28px, 0); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes nana { 0%, 100% { transform: translateY(0); opacity: 0.45; } 40% { transform: translateY(-8px); opacity: 1; } }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }

/* ---------- адаптив ---------- */

@media (max-width: 1060px) {
  .nav__links, .nav__phone, .nav .btn, .nav .theme-toggle { display: none; }
  .nav__call { display: grid; margin-left: auto; }
  .burger { display: block; }
  .nav__inner { gap: 6px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps .step:nth-child(n) { --i: 0; }
  .steps .step:nth-child(even) { --i: 1; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .facts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .tiles { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .works .work, .works .work--wide, .works .work--side { grid-column: span 6; }
  .works .work--wide { grid-column: 1 / -1; }
  .partners { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .sheet__inner { grid-template-columns: 1fr; }
  .sheet__gallery { order: -1; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { height: min(88svh, 760px); min-height: 560px; }
  .hero::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.8) 100%); }
  .hero__actions .btn { width: 100%; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .steps .step:nth-child(n) { --i: 0; }
  .step { display: grid; grid-template-columns: 30px 1fr; column-gap: 18px; padding: 24px 22px; }
  .step > svg { grid-row: 1 / span 3; width: 30px; height: 30px; }
  .step > :not(svg) { grid-column: 2; }
  .step__n { padding-top: 0; }
  .step h3 { font-size: 20px; }
  .step p { font-size: 15px; }
  .bento { grid-template-columns: 1fr; }
  .works .work, .works .work--wide, .works .work--side { grid-column: 1 / -1; }
  .work--wide .work__media, .work--side .work__media { height: auto; aspect-ratio: 4 / 3; }
  .faq__answer { padding-right: 0; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer { padding-bottom: 100px; }
  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line-soft);
    transform: translateY(110%);
    transition: transform 0.5s var(--ease);
  }
  .mobile-bar.is-visible { transform: none; }
  .mobile-bar .btn { height: 44px; }
  .lightbox__bar { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__content { opacity: 1; transform: none; }
  .showcase { transform: none; }
  @view-transition { navigation: none; }
}
