@font-face {
  font-family: Onest;
  src: url("assets/onest-ru.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --navy: #14293d;
  --navy-2: #1d3a55;
  --navy-line: #4f6f8d;
  --blue: #1f6aa5;
  --blue-soft: #e4edf5;
  --ink: #162636;
  --muted: #55697b;
  --page: #f3f6f9;
  --card: #fff;
  --line: #d3dde6;
  --accent: #f29b38;
  --accent-hover: #ffb05a;
  --wa: #1fa463;
  --r: 8px;
  --font: Onest, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
:is(a, button, [tabindex]):focus-visible { outline: 3px solid #e07b00; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.icon { width: 22px; height: 22px; flex: none; fill: currentColor; }
.skip { position: fixed; z-index: 50; top: 8px; left: 8px; padding: 10px 14px; background: #fff; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Header */
.top { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; }
.top-in { min-height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.brand-logo { width: 40px; height: 40px; flex: none; border-radius: 10px; }
.brand b, .brand small { display: block; }
.brand b { font-size: 17px; line-height: 1.15; }
.brand small { margin-top: 3px; font-size: 12px; color: #a9c0d4; }
.nav { display: flex; gap: 24px; font-size: 15px; color: #cfdce8; }
.nav a { padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; border-color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions > * { flex-shrink: 0; }
.top-phone { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--navy-line); border-radius: 6px; background: var(--navy-2); white-space: nowrap; }
.top-phone .icon { width: 19px; height: 19px; color: var(--accent); }
.phone-label { display: grid; gap: 2px; line-height: 1.2; }
.phone-label small { font-size: 13px; font-weight: 500; }
.top-phone small { color: #b7cbdc; }

/* Messenger buttons: MAX and WhatsApp share one calm style */
.msg { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 16px; border: 1px solid #b9c8d5; border-radius: 6px; background: #fff; color: var(--navy); font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; transition: border-color .15s, background .15s; }
.msg img, .msg .icon { width: 20px; height: 20px; flex: none; }
.msg-wa .icon { color: var(--wa); }
a.msg:hover { border-color: var(--blue); background: var(--blue-soft); }
button.msg:disabled { cursor: not-allowed; }
.msg-sm { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.msg-sm img, .msg-sm .icon { width: 18px; height: 18px; }
.hero .msg, .contact .msg, .top .msg { border-color: var(--navy-line); background: var(--navy-2); color: #fff; }
.hero .msg-wa .icon, .contact .msg-wa .icon, .top .msg-wa .icon { color: #3fd07f; }
.hero a.msg:hover, .contact a.msg:hover, .top a.msg:hover { background: #26496a; border-color: #7b9bb8; }
.msg-top { min-height: 44px; padding: 6px 12px; font-size: 14px; }

/* Buttons */
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 10px 20px; border-radius: 6px; font-weight: 700; font-size: 15px; line-height: 1.2; transition: background .15s; }
.btn .icon { width: 20px; height: 20px; }
.btn-call { background: var(--accent); color: #1a2633; }
.btn-call:hover { background: var(--accent-hover); }

/* Hero */
.hero { background: var(--navy); color: #fff; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 48px 56px; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin: 0 0 14px; color: #b7cbdc; font-size: 14px; }
.eyebrow .icon { width: 18px; height: 18px; color: var(--accent); }
h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.04; font-weight: 800; }
.lead { margin: 18px 0 22px; max-width: 540px; color: #dbe6ef; font-size: 18px; }
.hook { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 24px; padding: 0; list-style: none; max-width: 560px; border: 1px solid #3f6283; border-radius: var(--r); background: #3f6283; overflow: hidden; }
.hook li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: #1a3650; }
.hook li > span { color: #a9c0d4; font-size: .8125rem; }
.hook b { margin-top: auto; font-size: 20px; white-space: nowrap; }
.hook li:first-child b { color: var(--accent); }
.hero-media img { width: 100%; aspect-ratio: 4 / 3.3; object-fit: cover; object-position: center top; border-radius: 12px; }

@media (860px < width <= 1100px) {
  .hook-detail { display: block; }
}

/* Blocks */
.block { padding-block: 64px; }
.block-alt { background: #e6edf3; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; }
.call-price { margin: 0; padding: 8px 14px; border-radius: 6px; background: #fff4e6; color: var(--navy); font-size: 15px; }
.call-price b { margin-left: 6px; font-size: 18px; white-space: nowrap; }

/* Services with prices */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.svc { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.svc-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--blue-soft); }
.svc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 20px 20px; }
.svc-head { position: relative; display: flex; align-items: flex-end; gap: 12px; margin-top: -22px; }
.svc-icon { width: 44px; height: 44px; padding: 9px; border-radius: 8px; background: #fff; color: var(--blue); box-shadow: 0 4px 12px #14293d26; }
.svc h3 { font-size: 19px; line-height: 1.2; padding-bottom: 1px; }
.svc-body > p { margin: 12px 0; color: var(--muted); font-size: 15px; }
.svc-prices { margin: 0 0 16px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.svc-prices li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.svc-prices li > span { overflow-wrap: anywhere; }
.svc-prices b { white-space: nowrap; color: var(--navy); font-variant-numeric: tabular-nums; }
.svc-cta { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.svc-cta .msg { min-width: 0; padding-inline: 8px; text-align: center; white-space: normal; }

@supports (grid-template-rows: subgrid) {
  @media (width > 600px) {
    .svc-grid { row-gap: 0; margin-bottom: -16px; }
    .svc { display: grid; grid-row: span var(--svc-tracks); grid-template-rows: subgrid; margin-bottom: 16px; }
    .svc-photo { grid-row: 1; }
    .svc-body { display: grid; grid-row: 2 / -1; grid-template-rows: subgrid; }
    .svc-head { grid-row: 1; }
    .svc-body > p { grid-row: 2; }
    .svc-prices { display: grid; grid-row: 3 / -2; grid-template-rows: subgrid; }
    .svc-cta { grid-row: -2 / -1; }
  }
}

/* Turnkey */
.turnkey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.turnkey-media img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 12px; }
.turnkey-text > p { margin: 14px 0 18px; color: var(--muted); font-size: 17px; }
.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border-left: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: rotate(-45deg); }
.turnkey .cta { margin-top: 22px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 6px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: 17px; }
.steps h3 { font-size: 18px; line-height: 1.25; }
.steps p { grid-column: 2; align-self: start; margin: 0; color: var(--muted); font-size: 15px; }

/* Contact */
.contact { padding-block: 52px; background: var(--navy); color: #fff; }
.contact-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.contact p { display: flex; align-items: flex-start; gap: 7px; max-width: 520px; margin: 10px 0 0; color: #b7cbdc; }
.contact p .icon { margin-top: 2px; color: var(--accent); width: 19px; height: 19px; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.contact-phone { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(24px, 3vw, 32px); font-weight: 800; white-space: nowrap; }
.contact-phone .icon { width: 28px; height: 28px; color: var(--accent); }
.contact-phone:hover { color: var(--accent-hover); }

/* Footer */
.foot { padding: 22px 0; background: #0e1e2d; color: #a9bccd; font-size: 14px; }
.foot-in { display: grid; gap: 8px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 36px; color: #e2ecf4; }
.foot nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Legal pages */
.legal { max-width: 760px; padding-block: 36px 60px; }
.legal h1 { font-size: clamp(28px, 6vw, 38px); }
.legal h2 { margin-top: 26px; font-size: 21px; }
.legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; }

.dock { display: none; }

@media (max-width: 1080px) {
  .nav { display: none; }
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 72px; scroll-padding-bottom: 80px; }
  .wrap { width: calc(100% - 32px); }
  .top-in { min-height: 60px; gap: 10px; }
  .brand-logo { width: 34px; height: 34px; border-radius: 9px; }
  .brand b { font-size: 15px; }
  .top-phone { padding: 6px 9px; gap: 6px; font-size: 15px; }
  .top-phone .icon { width: 17px; height: 17px; }
  .top-wa { display: none; }
  .msg-top { width: 44px; padding: 0; }
  .msg-top span { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-block: 28px 36px; }
  .lead { font-size: 16px; margin: 14px 0 18px; }
  .hook b { font-size: 17px; }
  .hook li { padding: 10px 12px; }
  .hero-media img { aspect-ratio: 4 / 3; }
  .block { padding-block: 44px; }
  .turnkey { grid-template-columns: 1fr; gap: 28px; }
  .turnkey-media { order: 2; }
  .steps { grid-template-columns: 1fr; }
  .contact { padding-block: 40px; }
  .foot { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .dock { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px #14293d1a; }
  .dock-call { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; border-radius: 6px; background: var(--blue); color: #fff; font-weight: 700; font-size: 15px; }
  .dock .icon, .dock img { width: 19px; height: 19px; }
  .msg-dock { min-height: 48px; padding: 6px 8px; gap: 6px; font-size: 15px; }
}

@media (max-width: 600px) {
  .brand small { display: none; }
  .brand b { font-size: 14px; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-body { padding: 0 16px 16px; }
  .hook { grid-template-columns: 1fr 1fr; }
  .hook li:first-child { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; }
  .hook li:first-child b { margin-top: 0; }
  .cta > * { flex: 1 1 auto; }
  .cta .btn-call { flex-basis: 100%; }
  .call-price { width: 100%; display: flex; justify-content: space-between; }
}

@media (max-width: 440px) {
  .top-actions .msg-top { display: none; }
}

@media (max-width: 370px) {
  .wrap { width: calc(100% - 24px); }
  .brand { gap: 7px; }
  .brand-logo { width: 30px; height: 30px; }
  .brand b { font-size: 13px; }
  .top-phone { font-size: 13px; padding-inline: 7px; }
  .top-phone .icon { display: none; }
  .hook li:not(:first-child) .hook-detail { display: block; }
  .hook b { font-size: 16px; }
  .svc-prices li { font-size: 14px; }
  .msg-dock, .dock-call { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .msg { transition: none; }
}

/* MAX leads, WhatsApp follows (v9) */
.msg-max { border-color: #8f86f5; background: #f3f2ff; }
a.msg-max:hover { border-color: #5b4dff; background: #e9e6ff; }
.hero .msg-max, .contact .msg-max, .top .msg-max { border-color: #8f86f5; background: #2b3b78; }
.msg-wa { font-weight: 600; }
.msg-lg.msg-max { padding-inline: 22px; }
.msg-lg.msg-wa { padding-inline: 14px; }
.svc-cta { grid-template-columns: 3fr 2fr; }
.svc-cta .msg-max { font-size: 15px; }
.svc-cta .msg-wa { font-size: 13px; }
.msg-icon { width: 44px; padding: 0; }
.msg-icon span { display: none; }
.dock { grid-template-columns: 1fr 1.25fr 0.8fr !important; }
@media (max-width: 600px) {
  .cta > .msg-max { flex: 3 1 0; }
  .cta > .msg-wa { flex: 2 1 0; }
}
@media (max-width: 370px) {
  .dock .msg-wa span { display: none; }
  .dock { grid-template-columns: 1fr 1.3fr 0.6fr !important; }
}
@media (max-width: 860px) { .contact-actions .cta, .contact-actions { width: 100%; } }
@media (max-width: 600px) { .cta > .msg { min-width: 0; padding-inline: 10px; } }

/* Card icon overlaps the photo as before; the title sits lower, clear of the photo edge (v13) */
.svc-head { margin-top: -22px; align-items: flex-end; }
.svc h3 { margin-bottom: -14px; }
.svc-body > p { margin-top: 26px; }

/* MAX uses the same plain background and border as WhatsApp (v12) */
.msg-max { border-color: #b9c8d5; background: #fff; }
a.msg-max:hover { border-color: var(--blue); background: var(--blue-soft); }
.hero .msg-max, .contact .msg-max, .top .msg-max { border-color: var(--navy-line); background: var(--navy-2); }

/* Larger card icons balanced with the title (v14) */
.svc-icon { width: 56px; height: 56px; padding: 12px; border-radius: 10px; }
.svc-head { margin-top: -24px; gap: 14px; }
.svc h3 { margin-bottom: -3px; font-size: 20px; }
.svc-body > p { margin-top: 15px; }
