/* Локальные шрифты. Файлы в /fonts, внешних запросов нет. */

/* JetBrains Mono — cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/jetbrains-mono-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* JetBrains Mono — cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/jetbrains-mono-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* JetBrains Mono — latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.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;
}

/* JetBrains Mono — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.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;
}

/* Manrope — cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(fonts/manrope-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* Manrope — cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Manrope — latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(fonts/manrope-latin-ext.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;
}

/* Manrope — latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(fonts/manrope-latin.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;
}

.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

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

:root {
  --f-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  --step--1: clamp(.78rem, .75rem + .15vw, .86rem);
  --step-0:  clamp(.95rem, .9rem + .2vw, 1.02rem);
  --step-1:  clamp(1.1rem, 1rem + .4vw, 1.3rem);
  --step-2:  clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --step-3:  clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);
  --step-4:  clamp(2.6rem, 1.4rem + 5vw, 5.6rem);
}

/* ---------------- ПАЛИТРА «ГЛУБОКАЯ СИНЬ» ---------------- */
.site {
  --bg:#ffffff;
  --surf:#f0f3f7;
  --card:#ffffff;
  --ink:#0f1e33;
  --muted:#5a6779;
  --accent:#2d72ba;
  --accent-lt:#5b9ee0;
  --line:#dbe2ea;
  --deep:#0f1e33;
  --on-deep:#e8eef6;
  --deep-dim:#8fa3bd;
  --signal:#2d72ba;
  --on-signal:#ffffff;
  --radius: 3px;
}
/* Тёмный контекст переопределяет те же токены — компоненты внутри
   подбирают контрастную пару сами. Это и есть починка «экспресс-аудита». */
.ctx-deep {
  --bg: var(--deep);
  --surf: var(--deep);
  --card: #ffffff0f;
  --ink: var(--on-deep);
  --muted: var(--deep-dim);
  --accent: var(--accent-lt);
  --line: #ffffff2b;
  --signal: var(--accent-lt);
  --on-signal: var(--deep);
  background: var(--deep);
  color: var(--ink);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #ffffff;
  color: #0f1e33;
  font-family: var(--f-display);
  -webkit-font-smoothing: antialiased;
}

/* ============================ МАКЕТ САЙТА ============================ */

.site { background: var(--bg); color: var(--ink); font-size: var(--step-0); line-height: 1.6; }
.wrap { max-width: 66rem; margin: 0 auto; padding-inline: clamp(1.1rem, 4vw, 3rem); }

.sec { padding-block: clamp(3rem, 7vw, 6rem); background: var(--bg); }
.sec--surf { background: var(--surf); }

.sec__head { max-width: 46ch; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.sec__eyebrow {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .85rem;
}
.sec__title {
  font-size: var(--step-2); font-weight: 700; letter-spacing: -.02em;
  line-height: 1.15; margin: 0 0 .8rem; text-wrap: balance; color: var(--ink);
}
.sec__lead { color: var(--muted); margin: 0; font-size: var(--step-0); }

.nav {
  display: flex; align-items: center; gap: 1.5rem; padding-block: 1.05rem;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: .5rem; margin-right: auto; }
.logo__mark { display: block; flex-shrink: 0; }
.logo__word { font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; color: var(--accent); }
.nav__links { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: var(--step--1); font-weight: 500; }
.nav__links a:hover { color: var(--accent); }
.nav__mail { font-size: var(--step--1); color: var(--accent); text-decoration: none; font-weight: 600; }
.nav__mail:hover { text-decoration: underline; }
.nav__lang {
  font-family: var(--f-mono); font-size: .72rem; color: var(--muted);
  border: 1px solid var(--line); padding: .25rem .45rem; border-radius: var(--radius);
  text-decoration: none; transition: color .18s, border-color .18s;
}
a.nav__lang:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 800px) { .nav__links, .nav__mail { display: none; } }

.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(4rem, 10vw, 8.5rem); }
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  filter: url(#ct-duotone);
}
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, #0f1e33f5 0%, #0f1e33e6 48%, #0f1e33a6 100%);
}
.hero h1 {
  font-size: var(--step-4); line-height: .96; font-weight: 800; letter-spacing: -.035em;
  margin: 0 0 1.4rem; text-transform: uppercase; color: var(--ink); text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lead { font-size: var(--step-1); color: var(--muted); max-width: 34ch; margin: 0 0 2.2rem; line-height: 1.45; }
.hero__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.4rem; }
.tag {
  font-size: var(--step--1); padding: .42rem .8rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--muted); background: var(--card);
}
.hero__cta { display: flex; gap: .75rem; flex-wrap: wrap; }

.btn {
  display: inline-block; font-size: var(--step-0); font-weight: 600;
  padding: .85rem 1.6rem; border-radius: var(--radius);
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn--primary { background: var(--signal); color: var(--on-signal); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(.9rem, 2vw, 1.4rem);
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: .55rem; }
.card h3 { font-size: var(--step-1); font-weight: 650; margin: 0; line-height: 1.25; letter-spacing: -.015em; color: var(--ink); }
.card p { margin: 0; font-size: var(--step--1); color: var(--muted); line-height: 1.6; }
.card__tag {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .15rem;
}

/* ---- ФОТО: дуотон + возврат цвета по наведению ---- */
.shot { position: relative; overflow: hidden; aspect-ratio: 19 / 13; }
.shot img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: url(#ct-duotone);
  transition: filter .45s ease;
}
.card:hover .shot img,
.card:focus-within .shot img { filter: none; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.donut {
  width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) 0 var(--p), var(--line) var(--p) 100%);
}
.donut span {
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--bg); display: grid; place-items: center;
  font-size: 1.35rem; font-weight: 750; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.stat__label { margin: 0; font-size: var(--step--1); color: var(--muted); max-width: 38ch; line-height: 1.5; }
.stat__sub {
  margin: 0; min-height: 2.6em; max-width: 22ch; line-height: 1.35;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
}

.steps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.step {
  display: grid; grid-template-columns: 3.5rem 1fr; gap: 1.2rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line); align-items: start;
}
.step__n { font-family: var(--f-mono); font-size: .8rem; font-weight: 700; color: var(--accent); padding-top: .18rem; }
.step h3 { margin: 0 0 .3rem; font-size: var(--step-1); font-weight: 650; letter-spacing: -.015em; color: var(--ink); }
.step p { margin: 0; color: var(--muted); font-size: var(--step--1); }

.contact-layout {
  display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(18rem, 1.4fr);
  gap: clamp(1.4rem, 3vw, 2.4rem); align-items: stretch;
}
.contact {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 1.4rem;
  align-content: start;
}
.contact > :last-child { grid-column: 1 / -1; }
.contact dt {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .45rem;
}
.contact dd { margin: 0; font-size: var(--step-1); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.contact dd a { color: var(--accent); text-decoration: none; }
.contact dd a:hover { text-decoration: underline; }
.contact-map {
  position: relative; z-index: 0; isolation: isolate; min-height: 20rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--surf);
}
.contact-map iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
@media (max-width: 800px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-map { min-height: 16rem; }
}
@media (max-width: 520px) {
  .contact { grid-template-columns: 1fr; }
  .contact > :last-child { grid-column: auto; }
}

.cta h2 {
  font-size: var(--step-3); font-weight: 750; letter-spacing: -.03em;
  line-height: 1.05; margin: 0 0 1rem; max-width: 18ch; text-wrap: balance;
  color: var(--ink); padding: 0; border: 0;
}
.cta__lead { color: var(--muted); max-width: 42ch; margin: 0 0 1.9rem; }

.foot {
  background: var(--bg); border-top: 1px solid var(--line); padding-block: 2rem;
  font-size: var(--step--1); color: var(--muted);
  display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot .sp { margin-left: auto; }

.to-top {
  position: fixed;
  right: clamp(1.1rem, 4vw, 2rem);
  bottom: clamp(1.1rem, 4vw, 2rem);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.05rem;
  background: var(--deep);
  color: var(--on-deep);
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 10px 28px #0f1e3340;
  opacity: 0;
  visibility: hidden;
  transform: translateY(.35rem);
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background .15s ease;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.to-top:hover { background: var(--accent); }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.to-top svg { display: block; flex-shrink: 0; }

.cookie-notice {
  position: fixed;
  left: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 30;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: min(30rem, calc(100vw - 2rem));
  padding: 1rem 1.1rem;
  background: var(--deep);
  color: var(--on-deep);
  border: 1px solid #ffffff2b;
  border-radius: var(--radius);
  box-shadow: 0 10px 28px #0f1e3350;
  font-size: .85rem;
  line-height: 1.5;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; }
.cookie-notice a { color: var(--accent-lt); text-decoration: underline; }
.cookie-notice button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.cookie-notice button:focus-visible { outline: 2px solid var(--accent-lt); outline-offset: 3px; }

.policy-page { background: var(--surf); }
.policy-page .logo { text-decoration: none; }
.policy-main { padding-block: clamp(3rem, 7vw, 6rem); }
.policy-wrap { max-width: 50rem; }
.policy-header { margin-bottom: 2.5rem; }
.policy-header h1 { max-width: 18ch; margin: 0 0 1rem; font-size: var(--step-3); line-height: 1.05; color: var(--ink); }
.policy-header p { margin: 0; color: var(--muted); }
.policy-document { padding: clamp(1.4rem, 4vw, 3.5rem); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.policy-document h2 { margin: 2.2rem 0 .8rem; font-size: var(--step-1); line-height: 1.25; color: var(--ink); }
.policy-document h2:first-child { margin-top: 0; }
.policy-document h3 { margin: 1.4rem 0 .5rem; font-size: var(--step-0); line-height: 1.35; color: var(--ink); }
.policy-document p { margin: 0 0 1rem; color: var(--muted); }
.policy-document ul { margin: 0 0 1rem; padding-left: 1.3rem; color: var(--muted); }
.policy-document li { margin-bottom: .45rem; padding-left: .2rem; }
.policy-document a { color: var(--accent); }
.policy-back { display: inline-flex; margin-top: 1.5rem; color: var(--accent); font-size: var(--step--1); font-weight: 700; text-decoration: none; }
.policy-back:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .btn:hover { transform: none; }
  .to-top { transform: none; }
}

@media (max-width: 520px) {
  .cookie-notice { right: 1rem; max-width: none; }
}
