/* ============================================================
   Syntra Media — main.css
   Масштаб: 1rem = 100px макета при ширине окна 1559px.
   Все размеры из макета (px) = значение/100 в rem.
   Палитра: navy #112438, blue #007BFF, ochre #C17E4D.
   Чёрный цвет НЕ используется нигде.
   ============================================================ */

:root {
  --navy: #112438;
  --blue: #007BFF;
  --ochre: #C17E4D;
  --grey-1: #868786;
  --grey-2: #9C9C9C;
  --line: #B1B2B2;
  --white: #FFFFFF;
  --font: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --header-h: .76rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: calc(100vw / 15.59);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: .16rem;
  color: var(--navy);
  background: var(--white);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); border: 0; background: none; cursor: pointer; color: inherit; }
input { font-family: var(--font); }

/* ================= ХЕДЕР ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  display: flex;
  align-items: center;
}

.logo {
  position: absolute;
  left: .354rem;
  top: 50%;
  transform: translateY(-50%);
  display: block;
}
.logo img { height: .572rem; width: auto; }

.nav { position: absolute; top: 0; left: 0; height: 100%; width: 100%; pointer-events: none; }
.nav-link {
  pointer-events: auto;
  position: absolute;
  top: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: .12rem;
  font-size: .22rem;
  color: var(--navy);
  white-space: nowrap;
}
.nav-link[data-nav="cases"]    { left: 4.07rem; }
.nav-link[data-nav="services"] { left: 5.52rem; }
.nav-link[data-nav="about"]    { left: 7.07rem; }
.nav-link[data-nav="contacts"] { left: 8.225rem; }

.nav-link .chev { width: .15rem; height: .09rem; flex: none; margin-top: .02rem; }
.nav-link .chev path { stroke: var(--navy); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.nav-link > span { position: relative; display: inline-block; }
.nav-link > span::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -.08rem;
  height: 2px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover > span::after,
.nav-link.is-active > span::after { transform: scaleX(1); }
.nav-link.is-active { font-weight: 700; }

.header-right { position: absolute; right: 0; top: 0; height: 100%; pointer-events: none; }
.header-phone {
  pointer-events: auto;
  position: absolute;
  left: -4.19rem; /* 1140.4 от левого края = -(1559-1140.4) справа */
  top: 0; height: 100%;
  display: inline-flex; align-items: center;
  font-size: .22rem;
  white-space: nowrap;
}
.lang {
  pointer-events: auto;
  position: absolute;
  left: -1.963rem; /* x=1362.7 */
  top: 0; height: 100%;
  display: inline-flex; align-items: center; gap: .1rem;
  font-size: .22rem;
}
.lang .chev { width: .15rem; height: .09rem; }
.lang .chev path { stroke: var(--navy); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.tg-btn {
  pointer-events: auto;
  position: absolute;
  left: -.99rem; /* x=1460 */
  top: .064rem;
  width: .648rem;
  height: .615rem;
  background: var(--navy);
  border-radius: .18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tg-btn:hover { transform: translateY(-2px); box-shadow: 0 .06rem .16rem rgba(17,36,56,.28); }
.tg-btn svg { width: .36rem; height: .36rem; }

.burger { display: none; }

/* ================= ОВЕРЛЕЙ «УСЛУГИ» (макет p5) ================= */
.services-overlay {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: var(--white);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(.2rem);
  transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
  overflow-y: auto;
}
.services-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .28s ease, transform .28s ease;
}

.so-inner { position: relative; min-height: 6.5rem; }

.so-close {
  position: absolute;
  top: .48rem;
  right: .56rem;
  width: .32rem;
  height: .32rem;
  transition: transform .25s ease;
}
.so-close::before, .so-close::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: .4rem; height: 2px;
  background: var(--navy);
}
.so-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.so-close::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.so-close:hover { transform: rotate(90deg); }

/* координаты p5 минус header 76 */
.so-col { position: absolute; }
.so-col-1 { left: 1.106rem; top: .493rem; }
.so-col-2 { left: 5.11rem;  top: .50rem;  }
.so-col-3 { left: 9.256rem; top: .50rem;  }

.so-group { display: block; }
.so-group + .so-group { margin-top: 0; }
/* вертикальные отступы по макету: Дизайн top 321 при Брендинг 125.3 →
   между группами (последний подпункт col1 274.3+23 → 321) — задаём margin отдельно */
.so-col-1 .so-group + .so-group { margin-top: .238rem; }
.so-col-2 .so-group + .so-group { margin-top: .241rem; }
.so-col-3 .so-group + .so-group { margin-top: .468rem; }

.so-title {
  display: flex;
  width: max-content;
  align-items: center;
  gap: .14rem;
  font-size: .258rem;
  line-height: .3rem;
  font-weight: 700;
  color: var(--navy);
  transition: color .25s ease, transform .25s ease;
}
.so-title .arrow {
  width: .26rem; height: .2rem;
  opacity: 0;
  transform: translateX(-.06rem);
  transition: opacity .25s ease, transform .25s ease;
}
.so-title .arrow path { stroke: var(--blue); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.so-group:hover .so-title { color: var(--blue); transform: translateX(.04rem); }
.so-group:hover .so-title .arrow { opacity: 1; transform: translateX(0); }

.so-list { list-style: none; margin-top: .269rem; } /* 182.2 - 125.3 - 30 (строка заголовка) */
.so-list li { line-height: .23rem; }
.so-list a {
  font-size: .206rem;
  color: var(--grey-1);
  display: inline-block;
  transition: color .22s ease, transform .22s ease;
}
.so-col-2 .so-list a { color: var(--grey-2); }
.so-list a:hover { color: var(--blue); transform: translateX(.03rem); }

/* пилюля Услуги|Подробнее */
.so-pill {
  position: absolute;
  left: 6.361rem;
  top: 5.171rem; /* 593.1-76 */
  height: .589rem;
  display: block;
}
.so-pill .seg-light {
  position: relative;
  display: flex;
  align-items: center;
  width: 2.616rem;
  height: .589rem;
  border: 1px solid var(--navy);
  border-radius: .295rem;
  background: var(--white);
  font-size: .245rem;
  font-weight: 700;
  color: var(--navy);
  padding-left: .318rem;
}
.so-pill .seg-dark {
  position: absolute;
  left: 1.31rem;
  top: 0;
  width: 1.605rem;
  height: .589rem;
  border-radius: .295rem;
  background: var(--navy);
  color: var(--white);
  font-size: .196rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.so-pill .seg-dark:hover { transform: translateY(-2px); box-shadow: 0 .06rem .16rem rgba(17,36,56,.3); }

/* ================= ФУТЕР (единый на всех страницах) ================= */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: .49rem .56rem .3rem;
}
.footer-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.footer-logo img { width: 2.965rem; height: auto; }
.footer-cols {
  margin-left: auto;
  display: flex;
  gap: 1.1rem;
}
.f-col h4 { font-size: .18rem; font-weight: 700; margin-bottom: .18rem; }
.f-col ul { list-style: none; }
.f-col li { margin-bottom: .11rem; }
.f-col a, .f-col span {
  font-size: .16rem;
  color: rgba(255,255,255,.72);
  transition: color .22s ease;
}
.f-col a:hover { color: var(--blue); }
.footer-bottom {
  margin-top: .42rem;
  padding-top: .22rem;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .12rem;
}
.footer-bottom span, .footer-bottom a { font-size: .14rem; color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--blue); }

/* ================= МОДАЛКА КЕЙСА ================= */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17,36,56,.86);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.case-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease;
}
.cm-box {
  position: relative;
  width: 12.4rem;
  max-width: 92vw;
  background: var(--white);
  border-radius: .16rem;
  overflow: hidden;
  transform: scale(.96);
  transition: transform .3s ease;
}
.case-modal.is-open .cm-box { transform: scale(1); }

.cm-close {
  position: absolute;
  top: .18rem;
  right: .18rem;
  width: .44rem;
  height: .44rem;
  z-index: 5;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 .02rem .1rem rgba(17,36,56,.2);
  transition: transform .25s ease;
}
.cm-close::before, .cm-close::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: .2rem; height: 2px;
  background: var(--navy);
}
.cm-close::before { transform: translate(-50%,-50%) rotate(45deg); }
.cm-close::after  { transform: translate(-50%,-50%) rotate(-45deg); }
.cm-close:hover { transform: rotate(90deg); }

.cm-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy);
}
.cm-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cm-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .24rem;
  color: var(--white);
  text-align: center;
  padding: .4rem;
}
.cm-placeholder .ph-circle {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .26rem;
  color: var(--white);
  padding: .2rem;
}
.cm-placeholder h3 { font-size: .4rem; font-weight: 700; }
.cm-placeholder p { font-size: .19rem; opacity: .8; }
.cm-placeholder .ph-btn {
  margin-top: .1rem;
  display: inline-flex;
  align-items: center;
  height: .47rem;
  padding: 0 .3rem;
  border-radius: .235rem;
  background: var(--white);
  color: var(--navy);
  font-size: .18rem;
  transition: transform .25s ease;
}
.cm-placeholder .ph-btn:hover { transform: translateY(-2px); }

.cm-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: .52rem;
  height: .52rem;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  box-shadow: 0 .02rem .08rem rgba(17,36,56,.25);
  z-index: 4;
  transition: transform .2s ease, opacity .2s ease;
}
.cm-nav:hover { transform: translateY(-50%) scale(1.08); }
.cm-nav.prev { left: .2rem; }
.cm-nav.next { right: .2rem; }
.cm-nav::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: .14rem; height: .14rem;
  border-right: 2.4px solid var(--navy);
  border-bottom: 2.4px solid var(--navy);
}
.cm-nav.prev::before { transform: translate(-30%,-50%) rotate(135deg); }
.cm-nav.next::before { transform: translate(-70%,-50%) rotate(-45deg); }
.cm-nav[hidden] { display: none; }

.cm-counter {
  position: absolute;
  bottom: .16rem;
  right: .24rem;
  z-index: 4;
  font-size: .15rem;
  color: rgba(255,255,255,.85);
  background: rgba(17,36,56,.55);
  border-radius: .2rem;
  padding: .05rem .14rem;
}

/* ================= ОБЩИЕ АНИМАЦИИ ================= */
.reveal {
  opacity: 0;
  transform: translateY(.24rem);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ================= INDEX: HERO ================= */
.hero {
  position: relative;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  min-height: 5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: #05070d url('../img/hero-bg-v3.webp') center / cover no-repeat;
  animation: heroZoom 20s ease-in-out infinite alternate;
}
/* логотип — отдельным слоем поверх фона (максимальная резкость из своего файла) */
.hero-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .6rem;
  pointer-events: none;
}
.hero-logo img {
  width: min(62%, 10.5rem);
  height: auto;
}
@keyframes heroZoom {
  from { transform: scale(1) translateX(0); }
  to   { transform: scale(1.05) translateX(-.6%); }
}

/* ================= INDEX: МАНИФЕСТ ================= */
.manifesto {
  position: relative;
  background: var(--blue);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  color: var(--white);
}
.manifesto-inner { position: relative; height: 100%; }
.manifesto h1 {
  position: absolute;
  left: 2.495rem;
  top: 1.29rem; /* 205.1-76 */
  font-size: .646rem;
  font-weight: 400;
  line-height: .721rem;
  white-space: nowrap;
}
.manifesto p {
  position: absolute;
  left: 2.538rem;
  top: 3.288rem; /* 404.8-76 */
  font-size: .22rem;
  line-height: .246rem;
  max-width: 10.6rem;
}
.manifesto { height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 6.45rem; }

.btn-cases {
  position: absolute;
  left: 6.758rem;
  top: 5.082rem; /* 584.2-76 */
  width: 2.108rem;
  height: .471rem;
  background: var(--white);
  border-radius: .236rem;
  display: flex;
  align-items: center;
  color: var(--navy);
  font-size: .18rem;
  padding-left: .201rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn-cases:hover { transform: translateY(-2px); box-shadow: 0 .08rem .2rem rgba(17,36,56,.25); }
.btn-cases .play {
  position: absolute;
  right: .108rem;
  top: 50%;
  transform: translateY(-50%);
  width: .32rem;
  height: .32rem;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease;
}
.btn-cases:hover .play { transform: translateY(-50%) scale(1.1); }
.btn-cases .play svg { width: .155rem; height: .175rem; margin-left: .02rem; }

/* ================= INDEX: КЕЙСЫ ================= */
.cases {
  position: relative;
  width: 100%;
  aspect-ratio: 1559 / 647;
  overflow: hidden;
  background: var(--white);
}
.cases .shapes-wrap { position: relative; width: 100%; height: 100%; }
.shape {
  position: absolute;
  animation: breathe 8s ease-in-out infinite;
}
.shape svg { width: 100%; height: 100%; display: block; }
.shape svg path, .shape svg circle { fill: var(--navy); transition: fill .35s ease; }

@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-.06rem); }
}

.case-circle {
  cursor: pointer;
  border-radius: 50%;
}
.case-circle .case-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  font-weight: 700;
  font-size: var(--label-fs, .34rem);
  line-height: 1.15;
  opacity: 0;
  transition: opacity .35s ease;
  padding: .2rem;
  border-radius: 50%;
  user-select: none;
}
.case-circle:hover svg circle { fill: var(--case-color); }
.case-circle:hover .case-label { opacity: 1; }
.case-circle:focus-visible svg circle { fill: var(--case-color); }
.case-circle:focus-visible .case-label { opacity: 1; }

/* мобильная сетка кейсов (кликабельные круги) */
.cases-mobile { display: none; }

/* ================= МОБИЛЬНАЯ ВЕРСИЯ ================= */
@media (max-width: 899px) {
  html { font-size: 16px; }
  :root { --header-h: 64px; }

  .site-header { padding: 0 20px; justify-content: space-between; }
  .logo { position: static; transform: none; }
  .logo img { height: 40px; }
  .nav, .header-phone, .lang { display: none; }
  .header-right { position: static; display: flex; align-items: center; gap: 14px; pointer-events: auto; }
  .tg-btn { position: static; width: 42px; height: 40px; border-radius: 12px; }
  .tg-btn svg { width: 22px; height: 22px; }

  .burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    align-items: center;
  }
  .burger span {
    display: block;
    width: 26px;
    height: 2.4px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
  }
  .burger.is-open span:nth-child(1) { transform: translateY(8.4px) rotate(45deg); }
  .burger.is-open span:nth-child(2) { opacity: 0; }
  .burger.is-open span:nth-child(3) { transform: translateY(-8.4px) rotate(-45deg); }

  .mobile-menu {
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: var(--navy);
    z-index: 95;
    padding: 36px 24px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
    overflow-y: auto;
  }
  .mobile-menu.is-open {
    opacity: 1; visibility: visible; transform: translateY(0);
    transition: opacity .28s ease, transform .28s ease;
  }
  .mm-link {
    color: var(--white);
    font-size: 28px;
    font-weight: 700;
    padding: 14px 0;
  }
  .mm-sub { list-style: none; padding-left: 8px; }
  .mm-sub a { display: block; color: rgba(255,255,255,.75); font-size: 18px; padding: 8px 0; }
  .mm-contacts { margin-top: auto; padding-top: 28px; }
  .mm-contacts a { display: block; color: var(--white); font-size: 20px; padding: 6px 0; }

  .services-overlay { display: none; }

  /* герой */
  .hero { height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 420px; }
  .hero-bg { background-image: url('../img/hero-bg-mobile-v3.webp'); animation: none; }
  .hero-logo { padding: 0 24px; }
  .hero-logo img { width: min(90%, 420px); max-width: none; }

  /* манифест — статичный поток */
  .manifesto { height: auto; min-height: 0; padding: 72px 24px 64px; }
  .manifesto h1 { position: static; font-size: 34px; line-height: 1.16; white-space: normal; }
  .manifesto p { position: static; margin-top: 28px; font-size: 17px; line-height: 1.45; max-width: none; }
  .btn-cases { position: relative; margin-top: 36px; width: 220px; height: 52px; border-radius: 26px; font-size: 17px; padding-left: 22px; }
  .btn-cases .play { width: 36px; height: 36px; right: 10px; }

  /* кейсы: на мобиле — сетка кликабельных кругов вместо декоративного паттерна */
  .cases { aspect-ratio: auto; height: auto; padding: 40px 20px 48px; }
  .cases .shapes-wrap { display: none; }
  .cases-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .cm-circle {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: background .3s ease, transform .25s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .cm-circle span {
    color: var(--white);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.15;
    padding: 0 14px;
  }
  .cm-circle:active { background: var(--case-color); transform: scale(.97); }
  @media (hover: hover) {
    .cm-circle:hover { background: var(--case-color); }
  }

  /* футер */
  .site-footer { padding: 40px 24px 24px; }
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-logo img { width: 220px; }
  .footer-cols { margin-left: 0; flex-direction: column; gap: 28px; }
  .f-col h4 { font-size: 16px; margin-bottom: 12px; }
  .f-col a, .f-col span { font-size: 15px; }
  .f-col li { margin-bottom: 9px; }
  .footer-bottom { margin-top: 32px; padding-top: 18px; }
  .footer-bottom span, .footer-bottom a { font-size: 12.5px; }

  /* модалка */
  .cm-box { width: 94vw; }
  .cm-stage { aspect-ratio: 4 / 3; }
  .cm-nav { width: 40px; height: 40px; }
}

@media (min-width: 900px) {
  .mobile-menu { display: none; }
}
