/* ==========================================================================
   Страница «Фирма»
   Figma: sPziMpKKGID82N0WMopEja / фрейм "фирма" (44:316) 1920×7823
   Дополняет css/style.css — токены, шапка, футер и аккордеон берутся оттуда.
   ========================================================================== */

/* ---------- Hero ---------- */
.fhero {
  position: relative;
  min-height: 1032px;
  display: flex;
  background: var(--bg);
}
.fhero__copy {
  width: 50.625%; /* 972/1920 */
  flex: none;
  padding: 120px var(--shell) 60px;
  /* на экранах шире 1920 текст прижимается к краю контейнера */
  padding-left: max(var(--shell), calc((100vw - 1920px) / 2 + var(--shell)));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}
.fhero__title {
  margin-top: 18px;
  max-width: 792px;
  font-size: clamp(34px, 3.646vw, 70px); /* 70px на 1920 */
  line-height: 1.28;
  font-weight: 600;
}
.fhero__title .accent { color: var(--blue); }
.fhero__lead {
  max-width: 774px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--grey-27);
}
.fhero__media { flex: 1 1 auto; min-width: 0; }
.fhero__media img {
  width: 100%;
  height: 100%;
  min-height: 1032px;
  object-fit: cover;
}

/* ---------- Крупный тезис по центру ---------- */
.statement {
  padding: 85px 0;
}
.statement p {
  max-width: 1409px; /* 899 на iPad, 341 на iPhone */
  margin-inline: auto;
  text-align: center;
  font-size: clamp(24px, 2.344vw, 45px);
  line-height: 1.28;
  font-weight: 600;
  color: var(--ink);
  white-space: pre-wrap; /* в макете двойные пробелы значимы */
}
.statement .accent { color: var(--blue); }

/* ==========================================================================
   Общая двухколонная секция: заголовок слева, контент справа
   Слева 722px, справа 870px из 1760 — как в макете.
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 41% 49.4%; /* 722 / 870 */
  justify-content: space-between;
  align-items: start;
  gap: 40px;
}
.split__head .section-title { margin-top: 18px; }
.split__head .section-title .accent { color: var(--blue); }

/* ---------- Наша экспертиза: список услуг ---------- */
.expertise { padding: 100px 0; }

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.exp-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: 12px;
  background: var(--bg);
  transition: background .2s ease, color .2s ease;
}
.exp-item__num {
  font-family: Roboto, Inter, sans-serif;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 500;
  color: rgba(0, 0, 0, .66);
  flex: none;
}
.exp-item__title {
  flex: 1 1 auto;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 500;
  color: #000;
}
/* бейдж со стрелкой красный на всех строках, включая активную */
.exp-item__go {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.exp-item__go .icon-arrow { width: 21.778px; height: 21.778px; }

/* активная / наведённая строка — тёмная */
.exp-item:hover,
.exp-item.is-active {
  background: var(--ink-soft);
}
.exp-item:hover .exp-item__title,
.exp-item.is-active .exp-item__title { color: var(--white); }
.exp-item:hover .exp-item__num,
.exp-item.is-active .exp-item__num { color: rgba(255, 255, 255, .66); }

/* ---------- Почему выбирают нас ---------- */
.why-us { padding: 100px 0; }
.why-us__grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 49.4% 49.4%; /* 870 / 870 */
  justify-content: space-between;
  align-items: start;
  gap: 40px;
}
.why-us__photo { border-radius: 16px; overflow: hidden; }
.why-us__photo img {
  width: 100%;
  height: 799px;
  object-fit: cover;
}

/* Колонку размечает сплошная красная линия с точками-маркерами 24px.
   Линия — псевдоэлемент, её высота растёт по скроллу (см. блок «рисование»). */
.points {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0 30px;
}
.points::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: calc(var(--draw, 1) * 100%);
  background: var(--red);
}
.point {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.point::before {
  content: "";
  position: absolute;
  left: -42px;   /* -30 padding -12 радиус: центр точки на линии */
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red);
}
.point__title {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink-soft);
}
.point p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--grey-27);
}

/* Рисование красных линий по скроллу (JS добавляет .is-drawable).
   Без JS / reduced-motion — линии и точки видны целиком (--draw = 1). */
.points.is-drawable::before,
.timeline.is-drawable::before { height: calc(var(--draw, 0) * 100%); }
/* точки-маркеры проявляются, когда «перо» доходит до них */
.points.is-drawable .point::before {
  transform: scale(.34);
  opacity: 0;
  transition: transform .45s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity .45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.points.is-drawable .point.lit::before {
  transform: scale(1);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .points.is-drawable::before,
  .timeline.is-drawable::before { height: 100%; }
  .points.is-drawable .point::before { transform: none; opacity: 1; transition: none; }
}

/* ---------- Как мы работаем с ККФ ---------- */
.flow { padding: 100px 0; }

/* Красная «таблетка» — якорь этапа */
.flow__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 500;
  background: var(--red);
  color: var(--white);
  white-space: nowrap;
}

/* Шаги: без номеров и точек — только пунктирная линия слева.
   Пунктир — псевдоэлемент, его высота растёт по скроллу. */
.timeline {
  position: relative;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0 30px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: calc(var(--draw, 1) * 100%);
  background: repeating-linear-gradient(to bottom, var(--red) 0 6px, transparent 6px 12px);
}
.tl-step { display: flex; flex-direction: column; gap: 16px; }
.tl-step__label {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #5b5b5b;
}
.tl-step__title {
  margin-top: 12px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink-soft);
}
.tl-step p {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--grey-27);
}

/* Сноска «Важно!» */
.callout {
  margin-top: 40px;
  padding: 16px;
  border: 1px solid rgba(204, 39, 39, .27);
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.callout__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--red);
  white-space: nowrap;
}
.callout__title img { width: 24px; height: 24px; flex: none; }
.callout p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--grey-27);
}

/* ---------- Уведомления, которые мы оспариваем ---------- */
.notices { padding: 100px 0; }
.notices__grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 x 425 + 3 x 20 = 1760 */
  gap: 20px;
}
.notice {
  position: relative;
  overflow: hidden;
  min-height: 266px;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* карточка-ссылка на подробное описание в «Инструментарии» */
  color: inherit;
  text-decoration: none;
}
/* стрелка-подсказка, что карточка кликабельна */
.notice__go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: gap .2s ease;
}
.notice__go svg { width: 14px; height: 14px; }
.notice:hover .notice__go { gap: 12px; }
.notice__title {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink-soft);
}
.notice p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--grey-27);
}
.notice__ref { font-size: 14px; line-height: 1.65; }
/* крупный номер-водяной знак в правом нижнем углу */
.notice__num {
  position: absolute;
  right: 16px;
  bottom: 4px;
  z-index: 0;
  font-size: 80px;
  line-height: 1.28;
  font-weight: 600;
  color: rgba(255, 255, 255, .72);
  pointer-events: none;
}
/* текст поверх водяного знака */
.notice > :not(.notice__num) { position: relative; z-index: 1; }

.notice--red    { background: #fae8e8; }
.notice--red    .notice__ref { color: var(--red); }
.notice--blue   { background: #e4eef8; }
.notice--blue   .notice__ref { color: #3254eb; }
.notice--yellow { background: #faf4e0; }
.notice--yellow .notice__ref { color: #d0930f; }
.notice--green  { background: #e2f2e8; }
.notice--green  .notice__ref { color: #008e50; }

/* ---------- FAQ ---------- */
.fquestions { padding: 0 0 100px; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1199px) {
  .fhero { min-height: 766px; }
  .fhero__copy { width: 63.4%; padding: 110px var(--shell) 60px; }
  .fhero__media img { min-height: 0; height: 100%; }
  .fhero__title { font-size: 40px; }

  .split,
  .why-us__grid { grid-template-columns: 1fr; gap: 32px; }
  /* в макете iPad фото стоит ПОД списком пунктов */
  .why-us__photo { order: 2; }
  .points { order: 1; }
  .why-us__photo img { height: 517px; }
  .statement p { max-width: 899px; }
  .notices__grid { grid-template-columns: repeat(2, 1fr); }
  .statement { padding: 60px 0; }
  .expertise, .why-us, .flow, .notices { padding: 60px 0; }
  .exp-item__go{
    width: 40px;
    height: 40px;
  }
  .exp-item__go .icon-arrow{
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 640px) {
  /* текст вертикально по центру героя (не прижат к верху) — правка «опустить текст» */
  .fhero { display: flex; flex-direction: column; justify-content: center; position: relative; min-height: 640px; }
  .fhero__media { position: absolute; inset: 56px 0 0; z-index: 0; }
  .fhero__media img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
  .fhero::after {
    content: "";
    position: absolute;
    inset: 56px 0 0;
    z-index: 1;
    background: rgba(0, 0, 0, .58);
  }
  .fhero__copy {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 48px var(--shell);
    gap: 20px;
  }
  .fhero__title { font-size: 30px; color: var(--white); }
  .fhero__title .accent { color: var(--blue-soft); }
  .fhero__lead { font-size: 14px; color: var(--white); }
  .fhero .eyebrow { color: #c0c0c0; }

  .statement { padding: 40px 0; }
  .statement p { font-size: 20px; max-width: 341px; }
  .points { padding: 0 24px; }
  .point::before { left: -36px; width: 24px; height: 24px; }
  .why-us__photo img { height: 301px; }
  .flow__label { padding: 8px 16px; }
  .expertise, .why-us, .flow, .notices { padding: 40px 0; }
  .fquestions { padding-bottom: 40px; }

  .notices__grid { grid-template-columns: 1fr; }
  .why-us__photo img { height: 280px; }
  .points { gap: 20px; }
  .point__title { font-size: 16px; }
  .point p, .tl-step p, .notice p { font-size: 14px; }

  .timeline { padding: 0 16px; gap: 24px; }
  .tl-step__title { font-size: 18px; }
  .flow__label { font-size: 16px; white-space: normal; text-align: center; }
  .notice { min-height: 0; padding-bottom: 60px; }
  .notice__num { font-size: 56px; }
  .notice__title { font-size: 18px; }
  .callout p { font-size: 14px; }

  .exp-item { padding: 12px; gap: 12px; }
  .exp-item__title { font-size: 16px; }
  .exp-item__go { width: 32px; height: 32px; }
}
