/* Стили главной поверх Constra (css/style.css). Шрифты — временные, до брифа на дизайн. */

/* Палитра сайта (та же палитра проставлена в css/style.css темы) */
:root {
  --bg: #FAFAF8;        /* тёплый off-white — фон */
  --bg-alt: #F4F4F2;    /* светлый серо-бежевый — фон секций */
  --ink: #1A1A1A;       /* основной текст */
  --muted: #595959;     /* второстепенный текст */
  --accent: #2C5F4F;    /* тёмный изумрудный — CTA, активные элементы */
  --accent-dark: #234C3F;
  --bronze: #D4A574;    /* приглушённая бронза — второстепенные акценты */
  --warn: #8B4513;      /* тёмный терракотовый — предупреждения */
  --line: #E4E2DC;
  --header-h: 76px;
}

html {
  scroll-behavior: smooth;
}

section[id],
main[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

section {
  padding: 90px 0;
}

@media (max-width: 767px) {
  section {
    padding: 60px 0;
  }
}

/* Плейсхолдеры [ ] — данные, которые ещё нужно подставить (см. CONTENT-PLAN.md). */
mark.ph {
  background: rgba(139, 69, 19, .08);
  color: var(--warn);
  padding: 0 .2em;
  border-radius: 3px;
  outline: 1px dashed rgba(139, 69, 19, .5);
}

.dark-bg mark.ph,
.hero mark.ph,
.footer mark.ph {
  background: rgba(212, 165, 116, .18);
  color: var(--bronze);
  outline-color: rgba(212, 165, 116, .6);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--bg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.micro-bar {
  background: var(--ink);
  color: rgba(250, 250, 248, .75);
  font-size: 13px;
  line-height: 32px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header .navbar {
  min-height: var(--header-h);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 20px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.brand-footer {
  margin-bottom: 20px;
}

.brand-footer .brand-name {
  color: #fff;
}

.brand-footer .brand-sub {
  color: #999;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-phone,
.header-msg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.header-phone i,
.header-msg i {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--ink);
  transition: background .2s, color .2s;
}

.header-phone:hover i,
.header-msg:hover i {
  background: var(--accent);
  color: #fff;
}

.header-msg i {
  font-size: 17px;
}

.btn-cta {
  padding: 10px 18px;
  font-size: 13px;
}

.site-header .navbar-toggler {
  border: 0;
  padding: 6px;
}

.site-header ul.navbar-nav>li>.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: none;
  white-space: nowrap;
  color: var(--ink) !important;
  padding: 8px 10px !important;
}

.brand {
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 10px;
}

.brand-name,
.brand-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  flex: 0 0 auto;
}

.site-header .navbar-nav>li {
  padding: 0;
  margin: 0;
}

/* Номер телефона текстом — только на широких экранах, иначе иконка. */
.phone-text {
  display: none;
}

@media (min-width: 1200px) {
  .site-header .brand {
    flex: 0 0 auto;
  }
}

@media (max-width: 575px) {
  .site-header .brand-name {
    white-space: normal;
    font-size: 15px;
    line-height: 1.15;
  }

  .site-header .brand-sub {
    display: none;
  }
}

@media (min-width: 1400px) {
  .site-header .container {
    max-width: 1320px;
  }

  .phone-text {
    display: inline;
  }
}

.site-header .nav-link:hover {
  color: var(--accent) !important;
}

@media (max-width: 1199px) {
  .site-header .navbar-collapse {
    border-top: 1px solid var(--line);
    margin: 0 -15px;
    padding: 8px 15px 16px;
  }

  .site-header ul.navbar-nav>li>.nav-link {
    padding: 12px 0 !important;
    font-size: 16px;
  }

  .brand {
    flex-basis: 0;
  }
}

@media (max-width: 575px) {
  :root {
    --header-h: 64px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-sub {
    font-size: 10px;
  }

  .header-actions {
    gap: 6px;
  }

  .btn-cta {
    padding: 9px 12px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(82vh, 760px);
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--ink) url(../images/slider-main/bg1.jpg) center / cover no-repeat;
  /* TODO: горизонтальное фото команды */
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26, 26, 26, .88) 0%, rgba(26, 26, 26, .55) 70%, rgba(26, 26, 26, .35) 100%);
}

@media (max-width: 767px) {
  .hero {
    background-image: url(../images/slider-main/bg1.jpg);
    min-height: min(88vh, 760px);
  }

  /* TODO: вертикальное фото */
  .hero::before {
    background: rgba(26, 26, 26, .72);
  }
}

.hero .container {
  position: relative;
  width: 100%;
}

.hero-title {
  color: #fff;
  font-size: 48px;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(250, 250, 248, .88);
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-actions .btn {
  padding: 15px 26px;
}

.btn-outline-light {
  border: 2px solid #fff;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 15px;
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 30px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* ---------- Цифры ---------- */
.facts-area {
  padding: 70px 0;
  background: var(--ink);
}

/* на тёмном фоне акцент — бронза: изумрудный там не читается */
.facts-area .ts-facts-icon i,
.ts-facts .ts-facts-content .ts-facts-title {
  color: var(--bronze);
}

.ts-facts-unit {
  font-size: .55em;
}

.ts-facts .ts-facts-content .ts-facts-num {
  font-size: 40px;
  margin: 18px 0 10px;
}

.ts-facts .ts-facts-content .ts-facts-title {
  font-size: 15px;
  line-height: 1.4;
}

@media (max-width: 575px) {
  .ts-facts .ts-facts-content .ts-facts-num {
    font-size: 30px;
  }

  .ts-facts .ts-facts-content .ts-facts-title {
    font-size: 13px;
  }
}

/* ---------- О нас ---------- */
.two-views {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.two-views-item {
  background: var(--bg-alt);
  border-top: 3px solid var(--bronze);
  padding: 28px 24px;
}

.two-views-name {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}

.two-views-role {
  display: block;
  color: var(--accent);
  font-weight: 700;
  margin: 4px 0 12px;
}

.two-views-item p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 575px) {
  .two-views {
    grid-template-columns: 1fr;
  }
}

/* ---------- Почему мы / Услуги ---------- */
.feature-card,
.service-card {
  background: #fff;
  height: calc(100% - 30px);
  margin-bottom: 30px;
  padding: 32px 28px;
  border: 1px solid var(--line);
  transition: box-shadow .2s, transform .2s;
}

.feature-card:hover,
.service-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

.feature-icon,
.service-icon {
  font-size: 30px;
  color: var(--accent);
  margin-bottom: 18px;
}

.feature-card h4,
.service-card h4 {
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 12px;
}

.feature-card p,
.service-card p {
  margin: 0;
}

.service-card {
  display: flex;
  flex-direction: column;
}

.service-card p {
  flex-grow: 1;
}

.service-link {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  align-self: flex-start;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.service-link:hover {
  color: var(--ink);
}

/* ---------- Как мы работаем ---------- */
.process-switch {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 4px;
  margin-bottom: 50px;
}

.process-switch button {
  border: 0;
  background: none;
  border-radius: 40px;
  padding: 10px 26px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.process-switch button:focus {
  outline: none;
}

.process-switch button:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}

.process-switch button.active {
  background: var(--accent);
  color: #fff;
}

.timeline {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-auto-flow: column;       /* сколько шагов, столько колонок (5 или 6) */
  grid-auto-columns: 1fr;
  gap: 24px;
}

.timeline li {
  counter-increment: step;
  position: relative;
  padding-top: 64px;
}

.timeline li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 18px;
  z-index: 1;
}

.timeline li::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 46px;
  right: -24px;
  height: 2px;
  background: var(--line);
}

.timeline li:last-child::after {
  display: none;
}

.timeline h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

.timeline h4 span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.timeline p {
  font-size: 14px;
  margin: 0;
}

.process-note {
  max-width: 760px;
  margin: 50px auto 0;
  text-align: center;
  font-size: 17px;
  color: var(--ink);
}

@media (max-width: 991px) {
  .timeline {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 0;
  }

  .timeline li {
    padding: 0 0 28px 66px;
  }

  .timeline li::after {
    top: 46px;
    bottom: 0;
    left: 22px;
    right: auto;
    width: 2px;
    height: auto;
  }
}

/* ---------- Команда ---------- */
.person-card {
  display: flex;
  gap: 24px;
  margin-bottom: 30px;
}

.person-photo {
  flex: 0 0 220px;
  height: 280px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* фото Александры в полный рост — приближаем к лицу */
.person-photo {
  overflow: hidden;
}

.person-photo img.person-photo--alexandra {
  transform: scale(1.7);
  transform-origin: 58% 18%;
}

.person-body h4 {
  font-size: 24px;
  margin-bottom: 4px;
}

.person-role {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
}

@media (max-width: 767px) {
  .person-card {
    flex-direction: column;
  }

  .person-photo {
    flex-basis: auto;
    height: 320px;
  }
}

/* ---------- Кейсы ---------- */
.case-card {
  background: #fff;
  height: calc(100% - 30px);
  margin-bottom: 30px;
  border: 1px solid var(--line);
}

.case-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.case-body {
  padding: 24px;
}

.case-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.case-body h4 {
  font-size: 19px;
}

.case-body p {
  font-size: 14px;
  margin-bottom: 8px;
}

/* ---------- Отзывы ---------- */
.reviews .quote-item .quote-text {
  background: none;
}

.review-avatar {
  float: left;
  width: 60px;
  height: 60px;
  margin-right: 16px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--bronze);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.reviews-note {
  margin-top: 60px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Блог ---------- */
.latest-post-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* ---------- С кем не работаем ---------- */
.not-for {
  padding: 70px 0;
}

.not-for h3 {
  font-size: 26px;
  margin-bottom: 14px;
}

.not-for .col-lg-9 {
  border-left: 4px solid var(--bronze);
  padding-left: 28px;
}

.not-for p {
  font-size: 17px;
  margin: 0;
}

/* ---------- Telegram-канал ---------- */
.tg-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--accent);
  padding: 36px 40px;
}

.tg-box h3 {
  margin: 0 0 4px;
  color: #fff;
}

.tg-box p {
  margin: 0;
  color: #fff;
  font-weight: 600;
}

.tg-box .btn {
  background: var(--bronze);
  color: var(--ink);
}

.tg-box .btn:hover {
  background: #fff;
  color: var(--ink);
}

@media (max-width: 575px) {
  .tg-box {
    padding: 28px 20px;
  }

  .tg-box .btn {
    width: 100%;
  }
}

/* ---------- Финальный CTA ---------- */
.final-cta {
  margin-top: 90px;
}

.final-cta h2 {
  font-size: 34px;
  max-width: 800px;
  margin: 0 auto 18px;
}

.final-cta p {
  max-width: 720px;
  margin: 0 auto 30px;
  color: rgba(250, 250, 248, .75);
  font-size: 17px;
}

@media (max-width: 767px) {
  .final-cta {
    margin-top: 60px;
  }

  .final-cta h2 {
    font-size: 26px;
  }
}

/* ---------- Контакты ---------- */
.contact-card {
  text-align: center;
  padding: 30px 20px;
  height: calc(100% - 30px);
  margin-bottom: 30px;
  border: 1px solid var(--line);
}

.contact-card>i {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 14px;
}

.contact-card h4 {
  font-size: 18px;
}

.contact-card p {
  margin-bottom: 6px;
}

.contact-card a {
  color: var(--ink);
  font-weight: 600;
}

.contact-card a:hover {
  color: var(--accent);
}

.contact-social a {
  font-size: 20px;
  margin: 0 6px;
}

.requisites {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
}

/* на тёмном фоне акцент — бронза */
.footer .widget-title {
  border-left-color: var(--bronze);
}

.footer-contacts {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.footer-contacts li {
  margin-bottom: 8px;
}

.footer a {
  color: #ccc;
}

.footer a:hover {
  color: var(--bronze);
}

.footer-legal {
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 250, 248, .1);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.footer-disclaimer {
  font-size: 12px;
  line-height: 1.6;
  color: #777;
  margin: 16px 0 0;
  max-width: 900px;
}

/* ---------- Попап формы amoCRM (js/site.js) ---------- */
.amo-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  /* выше кнопки мессенджеров amoCRM */
  background: rgba(0, 0, 0, .6);
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 16px 30px;
}

.amo-popup[hidden] {
  display: none;
}

.amo-popup-dialog {
  position: relative;
  width: 100%;
  max-width: 872px;
  margin: auto;
}

.amo-popup-frame {
  display: block;
  width: 100%;
  height: 600px;
  border: 0;
  background: transparent;
}

.amo-popup-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 28px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.amo-popup-close:hover {
  background: var(--bg-alt);
}

/* Ссылка на политику под формой */
.amo-popup-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(250, 250, 248, .85);
}

.amo-popup-note a {
  color: #fff;
  text-decoration: underline;
}

/* Узкие экраны: страница формы amoCRM на весь экран, крестик в углу */
.amo-popup--page {
  padding: 0;
  display: block;
}

.amo-popup--page .amo-popup-dialog {
  max-width: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.amo-popup--page .amo-popup-frame {
  flex: 1 1 auto;
  height: auto;
}

.amo-popup--page .amo-popup-note {
  margin: 0;
  padding: 10px 16px;
  background: var(--ink);
}

.amo-popup--page .amo-popup-close {
  top: 12px;
  right: 12px;
}

body.amo-popup-open {
  overflow: hidden;
}

/* Кнопка мессенджеров amoCRM и её приветствие не должны перекрывать форму */
body.amo-popup-open>[class*="amo-"]:not(.amo-popup) {
  display: none !important;
}

.timeline[hidden] {
  display: none;
}

/* Кнопка мессенджеров amoCRM в углу — чуть меньше */
.amo-button-holder {
  transform: scale(.8);
  transform-origin: right bottom;
}

/* ---------- Страница политики (privacy.html) ---------- */
.policy {
  padding: 60px 0 80px;
}

.policy-body {
  max-width: 820px;
  margin: 0 auto;
  color: var(--ink);
}

.policy-body h1 {
  font-size: 32px;
  line-height: 1.25;
  margin-bottom: 30px;
}

.policy-body h2 {
  font-size: 20px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
  margin: 36px 0 14px;
}

.policy-body ul {
  padding-left: 22px;
  margin-bottom: 16px;
}

.policy-body li {
  margin-bottom: 6px;
}

.policy-body a {
  color: var(--accent);
}

.policy-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
}

.policy-details dt {
  font-weight: 600;
}

.policy-details dd {
  margin: 0;
}

.policy-dates {
  margin-top: 40px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 575px) {
  .policy-body h1 {
    font-size: 24px;
  }

  .policy-details {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .policy-details dd {
    margin-bottom: 10px;
  }
}
