/* Пегас — автосервис в Перми. Стандарт категории, исполненный до конца. */

@font-face {
  font-family: 'Onest';
  src: url('../fonts/Onest-cyrillic.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: 'Onest';
  src: url('../fonts/Onest-latin.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+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/GolosText-cyrillic.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: 'Golos Text';
  src: url('../fonts/GolosText-latin.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+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  --ink: #0E1620;
  --ink-2: #4A5468;
  --ink-3: #6B7688;
  --line: #DEE3EB;
  --page: #F2F4F8;
  --card: #FFFFFF;
  --plate: #0B1B3A;
  --blue: #1550C8;
  --blue-ink: #0E3B99;
  --blue-soft: #E6EDFB;
  --amber: #EFA126;
  --sky: #9FBCF0;

  --wrap: 1180px;
  --gut: clamp(16px, 4.2vw, 40px);
  --r: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(14, 22, 32, .05), 0 6px 16px -8px rgba(14, 22, 32, .16);
  --shadow-2: 0 2px 4px rgba(14, 22, 32, .06), 0 18px 40px -18px rgba(14, 22, 32, .28);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.6 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: 'Onest', 'Golos Text', system-ui, sans-serif; letter-spacing: -0.022em; margin: 0; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(34px, 5.6vw, 62px); line-height: 1.04; letter-spacing: -0.032em; }
h2 { font-weight: 800; font-size: clamp(27px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -0.028em; }
h3 { font-weight: 700; font-size: 20px; line-height: 1.25; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

::selection { background: var(--blue); color: #fff; }
:root { accent-color: var(--blue); caret-color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.sec--dark :focus-visible, .hero :focus-visible, .cta :focus-visible, .foot :focus-visible { outline-color: #fff; }

@supports (scrollbar-color: auto) {
  html { scrollbar-color: #B9C2D2 var(--page); scrollbar-width: thin; }
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--page); }
::-webkit-scrollbar-thumb { background: #C3CBD9; border: 3px solid var(--page); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #A6B1C4; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--blue); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top .2s var(--ease);
}
.skip:focus-visible { top: 12px; }

/* иконки */
.ico {
  width: 30px; height: 30px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.ico--sm { width: 19px; height: 19px; stroke-width: 1.9; }
.rate__s { width: 1em; height: 1em; fill: var(--amber); stroke: none; }

/* кнопки */
.btn {
  --btn-bg: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--btn-bg); color: #fff; text-decoration: none;
  font-family: 'Onest', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -0.012em;
  padding: 14px 22px; border-radius: 12px; border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 8px 20px -10px rgba(21, 80, 200, .8);
  transition: background-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { --btn-bg: var(--blue-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 12px 26px -10px rgba(21, 80, 200, .95); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 12px -8px rgba(21, 80, 200, .9); }
.btn--sm { padding: 11px 17px; font-size: 15px; border-radius: 11px; }
.btn--lg { padding: 17px 30px; font-size: 18px; border-radius: 13px; }
.btn--wide { min-width: min(340px, 100%); }
.btn--ghost {
  background: transparent; color: inherit; border-color: currentColor; box-shadow: none;
  opacity: .92;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .1); opacity: 1; box-shadow: none; }
.sec--dark .btn--ghost:hover, .hero .btn--ghost:hover { background: rgba(255, 255, 255, .12); }

.link { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(21, 80, 200, .35); transition: text-decoration-color .16s var(--ease); }
.link:hover { text-decoration-color: currentColor; }
.link--big { font-size: 26px; font-family: 'Onest', sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.sec--dark .link { color: #fff; text-decoration-color: rgba(255, 255, 255, .4); }

/* шапка */
.head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 27, 58, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.head__in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; }
/* Знак «Пегаса» — синий по чёрному контуру, поэтому на тёмных плитах он живёт
   на светлой плашке: иначе силуэт тонет в цвете фона. */
.brand__mark { width: auto; height: 38px; display: block; padding: 5px 7px; border-radius: 10px; background: #fff; box-shadow: var(--shadow-1); }
.brand__text { display: grid; line-height: 1.1; }
.brand__text b { font-family: 'Onest', sans-serif; font-weight: 800; font-size: 21px; letter-spacing: 0.01em; text-transform: uppercase; }
.brand__text i { font-style: normal; font-size: 12.5px; color: var(--sky); letter-spacing: .01em; }
.head__nav { display: flex; gap: 24px; margin-inline-start: auto; font-size: 15.5px; }
.head__nav a { text-decoration: none; color: rgba(255, 255, 255, .82); padding: 6px 0; border-bottom: 2px solid transparent; transition: color .16s var(--ease), border-color .16s var(--ease); }
.head__nav a:hover { color: #fff; border-bottom-color: var(--sky); }
.head__act { display: flex; align-items: center; gap: 16px; }
.tel { font-family: 'Onest', sans-serif; font-weight: 700; font-size: 16px; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tel:hover { color: var(--sky); }

@media (max-width: 1000px) { .head__nav { display: none; } .head__act { margin-inline-start: auto; } }
@media (max-width: 640px) { .head__act .btn { display: none; } .head__in { min-height: 60px; } }

/* первый экран */
.hero { position: relative; color: #fff; background: var(--plate); isolation: isolate; overflow: hidden; }
.hero__pic { position: absolute; inset: 0; z-index: -2; }
.hero__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(104deg, rgba(9, 20, 43, .96) 0%, rgba(9, 20, 43, .9) 36%, rgba(9, 20, 43, .5) 68%, rgba(9, 20, 43, .32) 100%),
    linear-gradient(180deg, rgba(9, 20, 43, .5) 0%, rgba(9, 20, 43, 0) 34%, rgba(9, 20, 43, .78) 100%);
}
.hero__in { padding-block: clamp(52px, 8vw, 104px) clamp(30px, 4vw, 44px); }
.hero h1 { max-width: 15ch; }
.hero__lead { margin-top: 20px; max-width: 46ch; font-size: clamp(17px, 1.5vw, 19.5px); color: rgba(255, 255, 255, .84); }
.hero__act { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  margin-top: clamp(44px, 6vw, 72px);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-lg); overflow: hidden;
}
.facts__i { background: rgba(9, 20, 43, .58); padding: 20px 22px; backdrop-filter: blur(6px); }
.facts dt { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--sky); }
.facts dd { margin: 7px 0 0; font-family: 'Onest', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -0.018em; display: grid; gap: 2px; }
.facts__sub { font-family: 'Golos Text', sans-serif; font-weight: 400; font-size: 14px; color: rgba(255, 255, 255, .68); letter-spacing: 0; }
.rate { display: inline-flex; align-items: center; gap: 6px; }
.rate b { font-size: 22px; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; }
  .hero__act .btn { flex: 1 1 240px; }
  .hero__pic img { object-position: 62% 38%; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(9, 20, 43, .82) 0%, rgba(9, 20, 43, .58) 34%, rgba(9, 20, 43, .74) 68%, rgba(9, 20, 43, .94) 100%);
  }
}

/* секции */
.sec { padding-block: clamp(56px, 8vw, 104px); }
.sec--rev { background: #fff; border-block: 1px solid var(--line); }
.sec--dark { background: var(--plate); color: #fff; }
.sec__head { max-width: 58ch; margin-bottom: clamp(28px, 4vw, 48px); }
.sec__head p { margin-top: 14px; color: var(--ink-2); font-size: 18px; }
.sec--dark .sec__head p { color: rgba(255, 255, 255, .78); }
.sec__head--rev { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; justify-content: space-between; max-width: none; }

/* услуги */
.svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.svc__i {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px 28px; box-shadow: var(--shadow-1);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.svc__i:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #C9D5EC; }
.svc__i .ico { color: var(--blue); background: var(--blue-soft); width: 46px; height: 46px; padding: 8px; border-radius: 12px; }
.svc__i h3 { margin-top: 18px; }
.svc__i p { margin-top: 9px; color: var(--ink-2); font-size: 16px; }

@media (max-width: 900px) { .svc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .svc { grid-template-columns: 1fr; } }

/* почему */
.sec--why { background: #fff; border-block: 1px solid var(--line); }
.why { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.why__lead { margin-top: 14px; color: var(--ink-2); font-size: 18px; }
.why__list { margin-top: 26px; display: grid; gap: 16px; }
.why__list li { padding-left: 34px; position: relative; color: var(--ink-2); font-size: 16.5px; }
.why__list b { color: var(--ink); font-weight: 600; }
.why__list li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 21px; height: 21px;
  border-radius: 50%; background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231550C8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.why__fig { margin: 0; position: sticky; top: 96px; }
.why__fig img { border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.why__fig figcaption, .cont__fig figcaption { margin-top: 12px; font-size: 14.5px; color: var(--ink-3); }
.cont__fig figcaption { color: rgba(255, 255, 255, .66); }

@media (max-width: 860px) { .why { grid-template-columns: 1fr; } .why__fig { position: static; order: -1; } }

/* кузовной */
.kuzov { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 60px); align-items: center; }
.kuzov p { margin-top: 16px; color: rgba(255, 255, 255, .8); font-size: 18px; max-width: 46ch; }
.tags { display: flex; flex-wrap: wrap; gap: 9px; margin-block: 26px 30px; }
.tags li { border: 1px solid rgba(255, 255, 255, .26); border-radius: 999px; padding: 8px 15px; font-size: 15px; color: rgba(255, 255, 255, .92); }
.kuzov__pics { display: grid; gap: 14px; margin: 0; }
.kuzov__pics figcaption { font-size: 14px; color: var(--sky); }
.kuzov__pics img { border-radius: var(--r); width: 100%; object-fit: cover; }
.kuzov__pics picture:first-child img { aspect-ratio: 16 / 9; }
.kuzov__pics picture:last-child img { aspect-ratio: 3 / 1; object-position: 50% 62%; }

@media (max-width: 860px) { .kuzov { grid-template-columns: 1fr; } }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.steps__i { position: relative; padding-top: 26px; border-top: 2px solid var(--line); }
.steps__i::after { content: ''; position: absolute; top: -2px; left: 0; width: 46px; height: 2px; background: var(--blue); }
.steps__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; background: var(--blue-soft); color: var(--blue-ink);
  font-family: 'Onest', sans-serif; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums;
}
.steps__i h3 { margin-top: 16px; }
.steps__i p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }

@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; gap: 16px; } }

/* отзывы */
.score { display: grid; gap: 4px; justify-items: start; }
.score__v { display: inline-flex; align-items: center; gap: 8px; font-family: 'Onest', sans-serif; font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.score__v .rate__s { width: 28px; height: 28px; }
.score__t { color: var(--ink-3); font-size: 15px; font-variant-numeric: tabular-nums; }
.score .link { font-size: 15.5px; margin-top: 4px; }

.revs { columns: 3; column-gap: 18px; }
.rev {
  break-inside: avoid; margin-bottom: 18px;
  background: var(--page); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 24px 20px;
}
.rev p { color: var(--ink); font-size: 16.5px; line-height: 1.55; }
.rev footer { margin-top: 16px; display: flex; align-items: baseline; gap: 10px; }
.rev footer b { font-family: 'Onest', sans-serif; font-weight: 700; font-size: 15.5px; }
.rev footer span { font-size: 13px; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }

@media (max-width: 980px) { .revs { columns: 2; } }
@media (max-width: 620px) { .revs { columns: 1; } }

/* призыв */
.cta { background: linear-gradient(135deg, var(--blue-ink) 0%, var(--blue) 100%); color: #fff; }
.cta__in { padding-block: clamp(52px, 7vw, 88px); text-align: center; display: grid; justify-items: center; }
.cta p { margin-top: 16px; max-width: 52ch; font-size: 18.5px; color: rgba(255, 255, 255, .9); }
.cta .btn { margin-top: 32px; background: #fff; color: var(--blue-ink); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .7); }
.cta .btn:hover { background: #EAF0FE; }

/* контакты */
.cont { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.cont__list { margin-top: 28px; display: grid; gap: 20px; }
.cont__list dt { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--sky); }
.cont__list dd { margin: 6px 0 0; font-family: 'Onest', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; display: grid; gap: 2px; }
.cont__act { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.cont__note { margin-top: 16px; font-size: 15px; color: var(--sky); }
.cont__fig { margin: 0; }
.cont__fig img { border-radius: var(--r-lg); }
.map { position: relative; overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 4 / 3; background: var(--plate); border: 1px solid rgba(255, 255, 255, .12); }
.map__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 900px) { .map { aspect-ratio: 3 / 2; } }

@media (max-width: 860px) { .cont { grid-template-columns: 1fr; } }

/* подвал */
.foot { background: #071229; color: rgba(255, 255, 255, .66); font-size: 14.5px; }
.foot__in { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-block: 26px; }
.foot__b { color: #fff; font-family: 'Onest', sans-serif; font-weight: 700; }
.foot span:last-child { margin-inline-start: auto; }
/* Плашка о демоверсии: янтарь как в звезде рейтинга — единственный акцент
   вне синего, поэтому читается как пометка, а не как часть сайта. */
.demo { margin: 0; padding: 14px 0 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .58); }
.demo b { display: inline-block; margin-inline-end: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(239, 161, 38, .16); color: var(--amber); font-family: 'Onest', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 640px) { .foot span:last-child { margin-inline-start: 0; } }

/* мобильная панель */
.bar {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
  display: none; gap: 10px; padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom));
  background: var(--plate);
  border-top: 1px solid rgba(255, 255, 255, .12);
  transform: translateY(110%); transition: transform .32s var(--ease);
}
.bar[data-shown] { transform: none; }
/* Полоса того же цвета под панелью: на мобильных браузерах фиксированный
   элемент стоит по нижней границе layout-viewport, и когда адресная строка
   уезжает, под ним остаётся щель, сквозь которую видно страницу. */
.bar::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 100vh; background: var(--plate); }
.bar .btn { flex: 1 1 auto; }
.bar__tel { color: #fff; flex: 0 1 auto; }
@media (max-width: 640px) {
  .bar { display: flex; }
  /* Резиновый отскок оставляем — он нужен для обновления свайпом сверху.
     Чтобы в отскоке не мелькал светлый фон, тёмный цвет задаём на html:
     холст берёт фон именно оттуда, а body остаётся светлым. */
  html { background: var(--plate); }
  /* фиксированная панель не должна закрывать последнюю строку подвала */
  .foot { padding-block-end: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* один авторский момент: секция поднимается при входе, карточки идут следом */
@media (prefers-reduced-motion: no-preference) {
  [data-rise] { opacity: .001; transform: translateY(24px); }
  [data-rise][data-in] { opacity: 1; transform: none; transition: opacity .72s var(--ease), transform .72s var(--ease); }
  [data-rise][data-in] .tags li { animation: rise .6s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
  .svc__i:nth-child(1), .steps__i:nth-child(1), .rev:nth-child(1), .tags li:nth-child(1) { --i: 0; }
  .svc__i:nth-child(2), .steps__i:nth-child(2), .rev:nth-child(2), .tags li:nth-child(2) { --i: 1; }
  .svc__i:nth-child(3), .steps__i:nth-child(3), .rev:nth-child(3), .tags li:nth-child(3) { --i: 2; }
  .svc__i:nth-child(4), .steps__i:nth-child(4), .rev:nth-child(4), .tags li:nth-child(4) { --i: 3; }
  .svc__i:nth-child(5), .rev:nth-child(5), .tags li:nth-child(5) { --i: 4; }
  .svc__i:nth-child(6), .rev:nth-child(6) { --i: 5; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.bar[hidden] { display: none; }

