/* ---------- Fonts (self-hosted Fira Sans, SIL OFL 1.1) ---------- */
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/fira-sans-cyrillic-400.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/fira-sans-latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/fira-sans-cyrillic-500.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/fira-sans-latin-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/fira-sans-cyrillic-600.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/fira-sans-latin-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/fira-sans-cyrillic-700.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/fira-sans-latin-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --primary: #1F6F7A;          /* brand, from the client */
  --primary-hover: #19606A;
  --footer: #16545C;           /* footer, from the client */
  --tint: #E8F0F1;             /* fact cards, icon tiles */
  --ink: #23272B;              /* headings */
  --text: #4B5157;             /* body copy */
  --muted: #6B7279;
  --bg: #FFFFFF;
  --bg-alt: #F5F5F3;
  --header-bg: rgba(247, 247, 245, 0.94);
  --border: #E2E5E7;
  --on-dark: #FFFFFF;
  --on-dark-muted: rgba(255, 255, 255, 0.78);
  --error: #B42318;

  --radius: 8px;
  --radius-sm: 6px;
  --container: 1200px;
  --gutter: 24px;
  --header-h: 72px;
  --section-y: clamp(64px, 9vw, 112px);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: var(--primary); }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(800px + var(--gutter) * 2); }
.icon { flex: none; }

.skip { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 16px; background: var(--primary); color: #fff; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--sm { min-height: 42px; padding: 0 20px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--light { background: #fff; color: var(--primary); }
.btn--light:hover { background: var(--tint); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--muted); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--border); }
.header__inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.header__logo img { height: 34px; width: auto; }
.header__nav { margin: 0 auto; }
.header__nav ul { display: flex; gap: 36px; }
.header__nav a, .mobile-menu__links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.header__nav a:hover { color: var(--primary); }
.header__actions { display: flex; align-items: center; gap: 24px; }
.header__burger { display: none; margin-left: auto; padding: 8px; background: none; border: 0; color: var(--ink); cursor: pointer; }
.header__burger .icon:last-child { display: none; }
.header__burger[aria-expanded="true"] .icon:first-child { display: none; }
.header__burger[aria-expanded="true"] .icon:last-child { display: block; }

.lang { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.lang__item { padding: 6px 10px; border-radius: 4px; font-size: 13px; font-weight: 600; line-height: 1; color: var(--muted); text-decoration: none; }
.lang__item:hover { color: var(--ink); }
.lang__item.is-active { background: var(--ink); color: #fff; }

.mobile-menu { border-top: 1px solid var(--border); background: var(--bg-alt); }
.mobile-menu .container { display: flex; flex-direction: column; gap: 24px; padding-top: 24px; padding-bottom: 32px; }
.mobile-menu__links { display: flex; flex-direction: column; }
.mobile-menu__links a { display: block; padding: 12px 0; font-size: 18px; }
.lang--mobile { align-self: flex-start; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--primary);
  color: var(--on-dark);
}
/* Oversized, faint logo pattern behind the content — echoes the mockup. */
.hero::before {
  content: ''; position: absolute; inset: -20% -10% -20% 35%;
  background: url('../img/icon-white.svg') center / contain no-repeat;
  opacity: .05; pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 48px; padding-top: clamp(64px, 10vw, 140px); padding-bottom: clamp(64px, 10vw, 140px); }
.hero h1 { color: #fff; font-size: clamp(36px, 5vw, 60px); font-weight: 600; letter-spacing: -0.01em; }
.hero__lead { margin: 24px 0 32px; max-width: 620px; font-size: clamp(17px, 1.6vw, 20px); color: var(--on-dark-muted); }
.hero__mark { justify-self: center; width: min(340px, 100%); height: auto; }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--primary); color: var(--on-dark-muted); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--contact { padding-top: 0; }
.eyebrow { margin-bottom: 12px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.eyebrow--muted { color: var(--ink); }
.section--dark .eyebrow { color: var(--on-dark-muted); }
.section__title { font-size: clamp(30px, 3.4vw, 40px); margin-bottom: 40px; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 96px); align-items: center; }
.about__text p + p { margin-top: 20px; }
.about__text .section__title { margin-bottom: 24px; }
.facts { display: grid; gap: 16px; }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 24px 28px; background: var(--tint); border-radius: var(--radius); }
.fact strong { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; line-height: 1.2; color: var(--primary); }
.fact span { font-size: 15px; color: var(--muted); }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  padding: 32px; background: #fff;
  border: 1px solid var(--border); border-top: 3px solid var(--primary); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card__icon, .benefit__icon { flex: none; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: var(--radius-sm); }
.card__icon { background: var(--tint); color: var(--primary); }
.card h3 { margin: 24px 0 16px; font-size: 21px; }
.card p { font-size: 16px; }
.card__tags { margin-top: auto !important; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px !important; color: var(--primary); }
.card > p:not(.card__tags) { margin-bottom: 24px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.step { position: relative; }
.step__num {
  position: relative; z-index: 1;
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1.5px solid #fff; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
}
/* Connector line between the numbered circles. */
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 22px; left: 56px; right: -20px;
  height: 1px; background: rgba(255, 255, 255, .35);
}
.step h3 { margin: 20px 0 12px; font-size: 20px; }
.step p { font-size: 15px; }

/* Why us */
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.benefit { display: flex; gap: 20px; padding: 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.benefit__icon { background: var(--primary); color: #fff; }
.benefit h3 { font-size: 20px; margin-bottom: 8px; }
.benefit p { font-size: 15px; }

/* Contact */
.contact {
  display: grid; grid-template-columns: 5fr 7fr; column-gap: clamp(40px, 6vw, 80px);
  grid-template-areas: "intro form" "next form";
  grid-template-rows: auto 1fr;
}
.contact__intro { grid-area: intro; }
.contact__next { grid-area: next; }
.contact__form { grid-area: form; }
.contact__intro .section__title { max-width: 440px; }
.next { display: grid; gap: 24px; counter-reset: next; }
.next li { position: relative; padding-left: 52px; counter-increment: next; }
.next li::before {
  content: counter(next); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
}
.next strong { display: block; color: var(--ink); font-weight: 600; }
.next span { font-size: 15px; }

.form, .form-success { padding: clamp(24px, 3vw, 36px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.req { color: var(--primary); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid #CDD2D6; border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input::placeholder, .field textarea::placeholder { color: #8A9096; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 111, 122, .15); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--error); }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 24px; font-size: 14px; cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); }
.consent.is-invalid { color: var(--error); }
.form__error { margin-bottom: 16px; padding: 12px 14px; font-size: 14px; color: var(--error); background: #FEF3F2; border-radius: var(--radius-sm); }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-success { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 420px; text-align: center; }
.form-success:focus { outline: none; }
.form-success__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 50%; background: var(--tint); color: var(--primary); }
.form-success h3 { font-size: 24px; }
.form-success p { max-width: 380px; }

/* ---------- Footer ---------- */
.footer { background: var(--footer); color: var(--on-dark-muted); font-size: 15px; }
.footer a { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 32px; align-items: center; padding: 48px 0 40px; }
.footer__logo img { height: 34px; width: auto; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.footer__nav a { text-decoration: none; color: var(--on-dark-muted); }
.footer__nav a:hover { color: #fff; }
.footer__contacts { display: grid; gap: 10px; justify-self: end; }
.footer__contacts li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contacts .icon { margin-top: 4px; opacity: .8; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0 32px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 14px; }
.footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.lang--footer { background: transparent; border-color: rgba(255, 255, 255, .25); }
.lang--footer .lang__item { color: var(--on-dark-muted); }
.lang--footer .lang__item.is-active { background: #fff; color: var(--footer); }

/* ---------- Cookie banner ---------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; display: flex; justify-content: center; pointer-events: none; }
.cookie__inner {
  pointer-events: auto;
  display: flex; align-items: center; gap: 24px; max-width: 960px; width: 100%;
  padding: 20px 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14); font-size: 14px;
}
.cookie__actions { display: flex; gap: 12px; flex: none; }

/* ---------- Legal page ---------- */
.legal { padding: 56px 0 var(--section-y); min-height: 60vh; }
.legal h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 24px 0 32px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; }
.legal p, .legal li { margin-bottom: 12px; }
.legal ul { list-style: disc; padding-left: 24px; }
.legal__back { font-weight: 500; text-decoration: none; }
.placeholder-note { padding: 24px; background: var(--tint); border-radius: var(--radius); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .header__nav ul { gap: 24px; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .step:nth-child(2)::after { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .header__nav, .header__actions { display: none; }
  .header__burger { display: block; }
  .header__logo img { height: 30px; }

  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__mark { order: -1; justify-self: start; width: 120px; }
  .hero::before { inset: -10% -40% 20% 20%; }

  .about { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; max-width: 640px; }

  /* Vertical timeline, as in the mobile mockup. */
  .steps { grid-template-columns: 1fr; row-gap: 28px; }
  .step { display: grid; grid-template-columns: 44px 1fr; column-gap: 20px; }
  .step__num { grid-row: 1 / span 2; }
  .step h3 { margin: 8px 0 6px; }
  .step:not(:last-child)::after, .step:nth-child(2)::after { display: block; top: 52px; bottom: -24px; left: 22px; right: auto; width: 1px; height: auto; }

  .contact { grid-template-columns: 1fr; grid-template-areas: "intro" "form" "next"; grid-template-rows: none; }
  .contact__next { margin-top: 48px; }

  .footer__top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer__nav { justify-content: center; }
  .footer__contacts { justify-self: center; }
  .footer__contacts li { justify-content: center; text-align: left; max-width: 340px; }
  .footer__bottom { flex-direction: column-reverse; text-align: center; }
  .footer__legal { flex-direction: column; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .benefits { grid-template-columns: 1fr; }
  .benefit, .card { padding: 24px; }
  .form__grid { grid-template-columns: 1fr; }
  .btn--light, .contact .btn--primary { width: 100%; }
  .cookie { left: 8px; right: 8px; bottom: 8px; }
  .cookie__inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 16px; }
  .cookie__actions .btn { flex: 1; }
}
