/* =========================================================
   ТОКЕНЫ
   ========================================================= */
:root {
  --red: #B3121F;          /* основной */
  --red-deep: #7A0B14;     /* тени, ховеры */
  --red-tint: #FBE9EB;     /* фоновые плашки */
  --white: #FFFFFF;
  --ink: #1B1418;          /* текст */
  --ink-soft: #6D5F64;     /* вторичный текст */
  --line: #E8D9DB;

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .6s;
}

/* =========================================================
   БАЗА
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.1; letter-spacing: -.01em; }

.container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--red); color: var(--white); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* прогресс прокрутки */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 90; }
.progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width .1s linear; }

/* =========================================================
   КНОПКИ
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; font: 600 15px/1 var(--font-body);
  border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: transform .2s var(--ease-out), background .2s, color .2s, border-color .2s;
}
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn--primary:hover { background: var(--red-deep); border-color: var(--red-deep); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--light { background: var(--white); color: var(--red); border-color: var(--white); }
.btn--light:hover { background: var(--red-tint); }

/* =========================================================
   ШАПКА
   ========================================================= */
.header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: 0 6px 24px -12px rgba(122,11,20,.25); }
.header__inner { display: flex; align-items: center; gap: 28px; height: 76px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.logo__mark { width: 26px; height: 26px; background: var(--red); clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%); }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 26px; font-weight: 500; font-size: 15px; }
.nav__list a { position: relative; padding: 6px 0; }
.nav__list a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease-out);
}
.nav__list a:hover::after, .nav__list a.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; }
.nav__toggle span { display: block; height: 2px; background: var(--ink); transition: transform .3s, opacity .3s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.header__phone { font-weight: 600; white-space: nowrap; }
.header__phone:hover { color: var(--red); }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 0; overflow: hidden; }
.hero::before {
  /* красный клин — фирменный элемент страницы */
  content: ""; position: absolute; top: 0; right: 0; width: 46%; height: 100%;
  background: var(--red);
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  transform: translateX(100%);
  animation: wipeIn 1s var(--ease-out) forwards;
  z-index: 0;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 80px); align-items: end; }

.breadcrumbs ol { display: flex; gap: 10px; font-size: 14px; color: var(--ink-soft); margin-bottom: 28px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 10px; color: var(--line); }
.breadcrumbs a:hover { color: var(--red); }

.hero__title { font-size: clamp(38px, 5.6vw, 76px); font-weight: 900; line-height: .98; margin-bottom: 28px; }
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span {
  display: block; transform: translateY(110%);
  animation: riseIn .9s var(--ease-out) forwards;
}
.reveal-line:nth-child(2) > span { animation-delay: .12s; color: var(--red); }

.hero__lead { font-size: 19px; color: var(--ink-soft); max-width: 54ch; opacity: 0; animation: fadeUp .8s var(--ease-out) .35s forwards; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 44px; opacity: 0; animation: fadeUp .8s var(--ease-out) .5s forwards; }

.hero__facts { display: flex; gap: clamp(24px, 4vw, 56px); margin: 0 0 56px; padding-top: 24px; border-top: 2px solid var(--ink); opacity: 0; animation: fadeUp .8s var(--ease-out) .65s forwards; }
.hero__facts dt { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--red); }
.hero__facts dd { margin: 4px 0 0; font-size: 14px; color: var(--ink-soft); }

.hero__media { margin: 0; align-self: stretch; }
.hero__media img {
  width: 100%; height: 100%; min-height: 420px; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 30px 60px -30px rgba(27,20,24,.5);
  opacity: 0; transform: translateY(30px);
  animation: fadeUp .9s var(--ease-out) .45s forwards;
}

/* бегущая строка */
.ticker { background: var(--ink); color: var(--white); overflow: hidden; padding: 14px 0; font-family: var(--font-display); font-weight: 500; font-size: 14px; }
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker__track span { padding: 0 32px; white-space: nowrap; position: relative; }
.ticker__track span::after { content: ""; position: absolute; right: -4px; top: 50%; width: 8px; height: 8px; background: var(--red); transform: translateY(-50%) rotate(45deg); }

/* =========================================================
   СЕКЦИИ
   ========================================================= */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--red { background: var(--red); color: var(--white); }
.section--red .section__title { color: var(--white); }
.section__head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section__title { font-size: clamp(28px, 3.6vw, 46px); font-weight: 700; margin-bottom: 18px; }
.section__lead { font-size: 18px; opacity: .9; }

/* scroll-reveal (одноразовый) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* --- о компании --- */
.about__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 72px); }
.about__head { grid-column: 1 / -1; }
.about__text p:first-child::first-letter { font-family: var(--font-display); font-weight: 900; font-size: 3.2em; float: left; line-height: .8; margin: 6px 12px 0 0; color: var(--red); }
.about__points { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; align-content: start; }
.about__points li { padding-left: 18px; border-left: 3px solid var(--red); }
.about__points h3 { font-size: 17px; margin-bottom: 8px; }
.about__points p { font-size: 15px; color: var(--ink-soft); margin: 0; }

/* --- услуги --- */
.services__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: rgba(255,255,255,.25); }
.service {
  background: var(--red); padding: 32px; position: relative; overflow: hidden;
  transition: background .3s;
}
.service::before {
  content: ""; position: absolute; inset: 0; background: var(--white);
  transform: translateY(100%); transition: transform .45s var(--ease-out); z-index: 0;
}
.service:hover::before { transform: translateY(0); }
.service > * { position: relative; z-index: 1; transition: color .3s; }
.service:hover > * { color: var(--ink); }
.service__title { font-size: 22px; margin-bottom: 14px; }
.service__title a::after { content: ""; display: block; width: 40px; height: 2px; background: currentColor; margin-top: 12px; transition: width .4s var(--ease-out); }
.service:hover .service__title a::after { width: 100%; background: var(--red); }
.service p { opacity: .92; font-size: 15px; }
.service__price { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.service:hover .service__price { color: var(--red); }

/* --- шаги --- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { counter-increment: step; position: relative; padding-top: 28px; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--font-display); font-weight: 900; font-size: 56px; line-height: 1; color: var(--red-tint);
  margin-bottom: 16px; transition: color .4s;
}
.step::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--line); }
.step.is-visible::before { color: var(--red); }
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { font-size: 15px; color: var(--ink-soft); margin: 0; }

/* --- галерея --- */
.gallery { background: var(--red-tint); }
.gallery__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.gallery__item { margin: 0; }
.gallery__item img { aspect-ratio: 4/3; object-fit: cover; width: 100%; border-radius: var(--radius); transition: transform .5s var(--ease-out); }
.gallery__item:hover img { transform: scale(1.02); }
.gallery__item figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }

/* --- FAQ --- */
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.faq__head a { color: var(--red); font-weight: 600; }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__item:first-child { border-top: 1px solid var(--line); }
.accordion__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; }
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary h3 { font-size: 18px; font-weight: 500; font-family: var(--font-body); }
.accordion__item summary::after {
  content: ""; flex: 0 0 14px; width: 14px; height: 14px;
  background: linear-gradient(var(--red), var(--red)) center/100% 2px no-repeat, linear-gradient(var(--red), var(--red)) center/2px 100% no-repeat;
  transition: transform .35s var(--ease-out);
}
.accordion__item[open] summary::after { transform: rotate(135deg); }
.accordion__body { overflow: hidden; }
.accordion__body p { padding-bottom: 22px; color: var(--ink-soft); }

/* --- контакты --- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact__address { font-style: normal; display: grid; gap: 8px; margin-top: 28px; font-size: 17px; }
.contact__address a { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.4); }
.contact__address a:hover { text-decoration-color: var(--white); }

.channels { display: grid; gap: 2px; background: rgba(255,255,255,.25); }
.channel {
  display: grid; gap: 4px; padding: 22px 26px; background: var(--red); position: relative; overflow: hidden;
}
.channel::before {
  content: ""; position: absolute; inset: 0; background: var(--white);
  transform: translateX(-101%); transition: transform .4s var(--ease-out); z-index: 0;
}
.channel:hover::before, .channel:focus-visible::before { transform: translateX(0); }
.channel > * { position: relative; z-index: 1; transition: color .3s; }
.channel:hover > *, .channel:focus-visible > * { color: var(--ink); }
.channel__label { font-size: 13px; opacity: .8; }
.channel__value { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.channel:hover .channel__value { color: var(--red); }
.channel__note { font-size: 14px; opacity: .85; }

/* =========================================================
   ПОДВАЛ
   ========================================================= */
.footer { background: var(--ink); color: var(--white); padding: 64px 0 24px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer__brand p { font-size: 15px; color: rgba(255,255,255,.7); margin-top: 16px; }
.footer h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer__nav li, .footer__contacts a, .footer__contacts p { margin-bottom: 8px; font-size: 15px; color: rgba(255,255,255,.8); display: block; }
.footer__nav a:hover, .footer__contacts a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--red); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 20px; font-size: 13px; color: rgba(255,255,255,.55); }
.footer__bottom p { margin: 0; }

/* =========================================================
   АНИМАЦИИ
   ========================================================= */
@keyframes wipeIn { to { transform: translateX(0); } }
@keyframes riseIn { to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes ticker { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   АДАПТИВ
   ========================================================= */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .hero::before { width: 100%; height: 40%; top: auto; bottom: 0; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); }
  .hero__media img { min-height: 320px; max-height: 480px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .header__cta { display: none; }
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav { order: 3; margin-left: 0; }
  .header__inner { gap: 16px; }
  .header__phone { margin-left: auto; font-size: 14px; }
  .nav__list {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 0;
    transform: translateY(-110%); transition: transform .35s var(--ease-out);
  }
  .nav__list.is-open { transform: translateY(0); }
  .nav__list li a { display: block; padding: 14px var(--gutter); font-size: 17px; }
  .nav__list a::after { display: none; }

  .hero__facts { flex-wrap: wrap; gap: 20px 32px; }
  .about__grid, .about__points, .services__list, .gallery__grid, .faq__grid, .contact__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
