@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-cyrillic.woff2') format('woff2');
  font-style: normal;
  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('assets/fonts/inter-latin.woff2') format('woff2');
  font-style: normal;
  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 {
  --orange: #e3702c;
  --accent-text: #0099FF;
  --ink: #060607;
  --surface: #f7f7f7;
  font-family: 'Inter', Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; font-size: 16px; line-height: 24px; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1150px, calc(100% - 54px)); margin-inline: auto; }
h1, h2, h3, p { margin-top: 0; }
h2 { margin-bottom: 0; font-size: 40px; font-weight: 500; line-height: 48px; letter-spacing: 0; }
.mobile-label { display: none; }

.site-header { position: absolute; inset: 0 0 auto; z-index: 30; height: 64px; color: var(--ink); background: transparent; }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; flex: 0 0 auto; width: 200px; min-height: 44px; color: var(--ink); }
.logo-image { display: block; width: 100%; height: auto; }
.main-menu { display: flex; align-items: center; gap: 50px; font-size: 16px; font-weight: 500; line-height: 24px; }
.main-menu a { transition: color .2s ease; }
.main-menu a:hover { color: var(--accent-text); }
.menu-toggle { display: none; }

.home-page .site-header:not(.is-scrolled):not(.menu-open) { color: #fff; }
.home-page .site-header:not(.is-scrolled):not(.menu-open) .logo { color: #fff; }
.hero { position: relative; isolation: isolate; height: 100vh; height: 100svh; min-height: 700px; padding: 120px 0; overflow: hidden; color: #fff; }
.hero-grid { height: 100%; display: flex; align-items: center; }
.hero-copy { position: relative; z-index: 2; width: 550px; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { margin-bottom: 20px; color: #fff; font-size: 72px; font-weight: 700; line-height: 72px; letter-spacing: 0; }
.hero p { width: 495px; margin: 0; font-size: 18px; line-height: 27px; }
.hero-image { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent 28%), linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.36) 55%, rgba(0,0,0,.12)); pointer-events: none; }
.hero .button-row { position: absolute; bottom: -64px; margin-top: 0; }
.hero .button { color: #000; background: #fff; transition: background-color .2s ease; }
.hero .button:hover { background: #e8e8e8; }
.hero .button:focus-visible, .home-page .site-header a:focus-visible, .home-page .menu-toggle:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 5px; }
.button-row { position: absolute; bottom: 0; display: flex; gap: 15px; }
.button { min-height: 47px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; color: #fff; background: #060607; font: inherit; font-size: 16px; line-height: 24px; }
.lucide-icon { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.advantages { height: 627px; padding: 120px 0; }
.advantages h2 { margin-bottom: 50px; }
.advantages-grid { display: grid; grid-template-columns: repeat(3, 350px); gap: 50px; }
.advantage-card { height: 289px; margin: 0; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 16px; background: var(--surface); }
.advantage-number { color: var(--accent-text); font-size: 54px; font-weight: 500; line-height: 64.8px; }
.advantage-card p { width: 290px; margin: 0; font-size: 22px; line-height: 33px; }
.advantage-card p::first-line { font-weight: 700; }

.about { height: 836px; padding: 120px 0; }
.about-grid { display: grid; grid-template-columns: 350px 750px; gap: 50px; }
.about-items { display: grid; grid-template-columns: repeat(2, 350px); column-gap: 50px; row-gap: 50px; }
.about-items h3 { margin-bottom: 15px; color: var(--accent-text); font-size: 18px; font-weight: 700; line-height: 27px; }
.about-items p { margin: 0; font-size: 16px; line-height: 24px; }

.branches { height: 1108px; padding: 125px 0 121px; background: #fafafa; }
.branches h2 { margin-bottom: 92px; line-height: 40px; }
.branch-grid { display: grid; grid-template-columns: repeat(3, 350px); gap: 50px; }
.branch-card { height: 730px; padding: 24px; display: flex; flex-direction: column; border-radius: 16px; background: #fff; box-shadow: 0 5px 13px rgba(0,0,0,.12); }
.branch-card > img { width: 302px; height: 302px; border-radius: 6px; object-fit: cover; }
.branch-card h3 { margin: 15px 0 25px; font-size: 24px; font-weight: 600; line-height: 36px; }
.branch-copy { margin-bottom: 15px; font-size: 16px; line-height: 24px; }
.branch-copy strong { color: var(--accent-text); }
.branch-actions { display: flex; gap: 15px; margin-top: auto; }
.button.mini { width: calc(50% - 7.5px); min-height: 42px; padding: 9px 10px; font-size: 13px; line-height: 24px; }
.details { height: 44px; margin-top: 25px; display: flex; align-items: center; justify-content: flex-end; font-size: 13px; line-height: 24px; }
.details .lucide-icon { width: 18px; height: 18px; margin-left: 8px; }

.contacts { height: 812px; padding: 120px 0; }
.contacts-top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 50px; }
.contacts-top h2 { margin-bottom: 20px; }
.contacts-top p { margin: 0; font-size: 18px; line-height: 27px; }
.contacts address { width: 550px; padding-top: 30px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-size: 16px; line-height: 24px; font-style: normal; text-align: right; }
.contact-map { position: relative; height: 400px; display: block; overflow: hidden; background: #e8f2e0; }
.yandex-map-canvas { position: absolute; inset: 0; z-index: 1; }
.yandex-map.has-error .yandex-map-canvas { display: none; }
.yandex-map-popup { width: 240px; padding: 14px 16px; display: grid; gap: 7px; color: var(--ink); background: #fff; font-family: 'Inter', Helvetica, Arial, sans-serif; }
.yandex-map-popup strong { font-size: 15px; line-height: 20px; }
.yandex-map-popup span { font-size: 13px; line-height: 18px; }
.yandex-map-popup a { color: var(--accent-text); font-size: 13px; font-weight: 600; line-height: 18px; }
.map-external-link { position: absolute; right: 12px; bottom: 12px; z-index: 3; padding: 7px 11px; border-radius: 6px; color: #fff; background: rgba(6, 6, 7, .88); font-size: 12px; line-height: 18px; box-shadow: 0 2px 7px rgba(0, 0, 0, .22); }
.map-external-link:hover { background: var(--orange); }
.yandex-map:not(.is-ready)::after { content: 'Загрузка карты…'; position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 6px 10px; border-radius: 5px; background: rgba(255, 255, 255, .9); font-size: 12px; }
.yandex-map.has-error::after { content: 'Карта недоступна'; }

.cta { height: 396px; margin-top: 112px; padding: 80px 0; border-top: 1px solid #bbb; text-align: center; }
.cta h2 { width: 750px; margin: 0 auto 63px; font-size: 36px; font-weight: 400; line-height: 43.2px; }

@media (max-width: 1200px) and (min-width: 768px) {
  .container { width: calc(100% - 54px); }
  .advantages-grid, .branch-grid { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .advantage-card, .branch-card { width: 100%; }
  .advantage-card p { width: auto; }
  .about-grid { grid-template-columns: 30% 1fr; }
  .about-items { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  body { line-height: normal; }
  .container { width: calc(100% - 54px); }
  h2 { font-size: 32px; line-height: 38.4px; }
  .desktop-label { display: none; }
  .mobile-label { display: inline; }

  .site-header { position: fixed; z-index: 100; height: 60px; color: #fff; transition: color .2s ease, background-color .2s ease; }
  .site-header.is-scrolled, .site-header.menu-open { color: var(--ink); background: #fff; }
  .header-inner { width: 100%; height: 60px; padding: 0 15px; position: relative; z-index: 2; }
  .logo { position: relative; z-index: 2; color: inherit; transition: color .2s ease; }
  .site-header.is-scrolled .logo, .site-header.menu-open .logo { color: var(--ink); }
  .menu-toggle { position: relative; z-index: 2; width: 40px; height: 40px; padding: 0; display: block; border: 0; color: inherit; background: transparent; cursor: pointer; }
  .menu-toggle span { position: absolute; left: 5px; width: 30px; height: 2px; display: block; background: currentColor; transform-origin: center; transition: top .2s ease, transform .2s ease, opacity .15s ease; }
  .menu-toggle span:nth-child(1) { top: 11px; }
  .menu-toggle span:nth-child(2) { top: 19px; }
  .menu-toggle span:nth-child(3) { top: 27px; }
  .menu-toggle[aria-expanded='true'] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded='true'] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }
  .main-menu { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100dvh; padding: 73px 15px 0; display: none; flex-direction: column; align-items: stretch; gap: 0; overflow-y: auto; color: var(--ink); background: #fff; font-size: 16px; font-weight: 500; line-height: 24px; }
  .main-menu.is-open { display: flex; }
  .main-menu a { min-height: 49px; padding: 12.5px 0; display: block; }

  .home-page .site-header:not(.is-scrolled):not(.menu-open) { color: var(--ink); background: #fff; }
  .home-page .site-header:not(.is-scrolled):not(.menu-open) .logo { color: var(--ink); }
  .hero { height: auto; min-height: 100vh; min-height: 100svh; padding: 60px 0 0; display: flex; flex-direction: column; color: var(--ink); background: #fff; }
  .hero .container { width: 100%; }
  .hero-grid { width: 100%; height: auto; flex: 1; display: flex; flex-direction: column; }
  .hero-image { position: static; order: -1; flex: none; width: 100%; height: auto; }
  .hero::after { display: none; }
  .hero-copy { width: calc(100% - 54px); height: auto; flex: 1; margin-inline: auto; padding: clamp(24px, 4svh, 40px) 0 max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: flex-start; }
  .hero h1 { color: var(--accent-text); font-size: clamp(32px, 9vw, 48px); line-height: 1.1; margin-bottom: 20px; }
  .hero p { width: 100%; margin: 0; font-size: 18px; line-height: 27px; }
  .hero .button-row { position: static; margin-top: auto; padding-top: 28px; gap: 12px; }
  .button-row { position: static; width: 100%; display: flex; flex-direction: column; gap: 19px; }
  .button-row .button { width: 100%; min-height: 47px; padding: 12px 36px; color: #000; background: #fff; border-radius: 8px; }
  .hero .button { color: #0d47a1; background: #bbdefb; }
  .hero .button:hover { background: #90caf9; }

  .advantages { height: 1030px; padding: 80px 0 81px; }
  .advantages h2 { margin-bottom: 50px; }
  .advantages-grid { display: flex; flex-direction: column; gap: 31px; }
  .advantage-card { width: 100%; height: 229px; padding: 30px; border-radius: 16px; }
  .advantage-card:nth-child(3) { height: 262px; }
  .advantage-number { font-size: 32px; line-height: 38.4px; }
  .advantage-card p { width: 100%; font-size: 22px; line-height: 33px; }

  .about { height: 1341px; padding: 80px 0; }
  .about-grid { display: block; }
  .about-grid > h2 { margin-bottom: 30px; }
  .about-items { display: flex; flex-direction: column; gap: 30px; }
  .about-items article { margin: 0; }
  .about-items article:nth-child(3) { margin-top: 30px; }
  .about-items h3 { margin-bottom: 15px; font-size: 18px; line-height: 27px; }
  .about-items p { font-size: 16px; line-height: 24px; }

  .branches { height: 2580px; padding: 125px 0 120px; }
  .branches h2 { margin-bottom: 92px; font-size: 40px; line-height: 40px; }
  .branch-grid { display: flex; flex-direction: column; gap: 50px; }
  .branch-card { width: 100%; height: 743px; padding: 20px; border-radius: 16px; }
  .branch-card:nth-child(2) { height: 716px; }
  .branch-card:nth-child(3) { height: 644px; }
  .branch-card > img { width: 100%; height: 320px; object-fit: cover; }
  .branch-card h3 { margin: 15px 0 25px; font-size: 24px; line-height: 36px; }
  .branch-copy { margin-bottom: 15px; font-size: 16px; line-height: 24px; }
  .branch-actions { gap: 15px; }
  .button.mini { min-height: 44px; font-size: 13px; }
  .details { height: 44px; margin-top: 25px; font-size: 13px; }

  .contacts { height: 853px; padding: 70px 0 120px; }
  .contacts-top { display: block; margin-bottom: 50px; }
  .contacts-top h2 { margin-bottom: 20px; }
  .contacts-top p { margin-bottom: 35px; font-size: 18px; line-height: 27px; }
  .contacts address { width: 100%; padding: 0; align-items: flex-start; gap: 10px; font-size: 16px; line-height: 24px; text-align: left; }
  .contact-map { width: 100%; height: 350px; margin: 0; }

  .cta { height: 428px; margin-top: 80px; padding: 90px 0 79px; }
  .cta h2 { width: 100%; margin: 0 auto 20px; font-size: 32px; line-height: 38.4px; }
  .cta .button { min-height: 47px; }
  .desktop-only { display: none; }
}
