/* Страница «Контакты»: связи между узлами. Читаемый исходник, без сборки.
   Идея: контакты агентства соединены тонкими нитями, нити тянутся к посетителю (тёплая точка «Вы»), при соединении тёплая и мятная мысли встречаются посередине.
   Шапка, меню, подвал и кнопки: общий css/site-chrome.css, окно формы: css/site-form.css (классы site-*, слой site). Здесь тема страницы (переменные --site-* и
   мятные акценты каркаса: кнопки-капсулы, цвета меню, подвала и формы) и её экраны (ct-*), всё в слое page (порядок слоёв объявлен в site-chrome.css). */
@layer page {

body.ct {
  --site-bg: #07090c;          /* глубокая ночь */
  --site-dim: rgba(242, 244, 245, 0.66);
  --site-line: rgba(140, 242, 192, 0.2);
  --site-accent: #c6ffe3;      /* рамка фокуса */
  --site-accent-ink: #07090c;
  --site-signal: #8cf2c0;
  --site-wrap: 78rem;
  --bg-2: #0d1318;
  --sig: #8cf2c0;              /* мятный сигнал: уже соединено, «мы» */
  --sig-hi: #c6ffe3;
  --sig-lo: #4fc99a;
  --warm: #ffb347;             /* тёплая точка: посетитель */
  --ink: #07090c;
  --err: #ff9b8a;
}
html { scroll-behavior: smooth; }

/* ---------- каркас в теме страницы ---------- */
.site-head::before { background: linear-gradient(to bottom, rgba(7, 9, 12, 0.94) 55%, rgba(7, 9, 12, 0)); }
.site-head.is-scrolled::before { background: rgba(7, 9, 12, 0.9); }
.site-head__tag { position: relative; z-index: 2; }
.site-head__tag li:first-child { color: var(--sig-hi); }
.site-menu { background: rgba(7, 9, 12, 0.985); }
.site-menu__n { color: var(--sig); }
.site-menu__list a:hover { color: var(--sig-hi); }
.site-menu__list a[aria-current="page"] { color: var(--sig); }
.site-footer__col ul a:hover, .site-footer__col > p > a:hover { color: var(--sig-hi); }
.site-footer__col .site-footer__h { color: var(--sig); }
.site-top { margin-inline-start: auto; }
.site-top:hover { border-color: var(--sig); }

/* кнопки: капсулы, главная с мятным переливом вместо блика */
.site-btn {
  min-height: 3.1rem; padding: 0 1.9rem; border: 1.5px solid transparent; border-radius: 3rem; background: none;
  transition: transform 0.25s, background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.site-btn:hover { border-color: transparent; }
.ct .site-btn--main { color: var(--ink); border-color: transparent; background: linear-gradient(180deg, var(--sig-hi), var(--sig) 60%, var(--sig-lo)); box-shadow: 0 0 0 0 rgba(140, 242, 192, 0.4); }
.ct .site-btn--main:hover { box-shadow: 0 0 0 6px rgba(140, 242, 192, 0.14), 0 0 30px rgba(140, 242, 192, 0.3); }
.site-btn--main::after { content: none; }
.site-btn--ghost { border-color: rgba(140, 242, 192, 0.5); }
.site-btn--ghost:hover { border-color: var(--sig-hi); background: rgba(140, 242, 192, 0.08); }

/* окно формы */
.site-dialog { border-radius: 0.5rem; background: var(--bg-2); }
.site-dialog::backdrop { background: rgba(8, 5, 2, 0.78); }
.site-dialog__title { color: var(--sig-hi); }
.site-input { border-radius: 0.25rem; background: rgba(140, 242, 192, 0.05); }
.site-input:focus { border-color: var(--sig); }
.site-input[aria-invalid="true"] { border-color: var(--err); }
.site-form__consent input { accent-color: var(--sig); }
.site-form__status[data-state="error"] { color: var(--err); }
.site-form__status[data-state="ok"] { color: var(--sig-hi); }
.site-form .site-btn { justify-self: start; }

/* ---------- хлебные крошки ---------- */
.crumbs { margin: 0 0 0.8rem; font-size: 0.85rem; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; margin: 0; padding: 0; list-style: none; color: var(--site-dim); }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: rgba(242, 244, 245, 0.35); }
.crumbs a { text-decoration: none; color: var(--site-dim); }
.crumbs a:hover { color: var(--sig-hi); text-decoration: underline; text-underline-offset: 0.2em; }
.crumbs [aria-current="page"] { color: var(--site-fg); }

/* ---------- первый экран ---------- */
.ct-hero {
  position: relative; isolation: isolate; overflow: hidden;
  /* высота по содержимому, но не выше экрана: на высоких и почти квадратных окнах под схемой не остаётся пустого поля */
  min-height: min(100vh, 46rem); min-height: min(100svh, 46rem);
  padding: calc(var(--site-head-h) + 1.6rem) var(--site-gutter) 1.4rem;
  display: grid; gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "intro" "stage";
  align-content: start;
}
/* точечная сетка на фоне, гаснет к краям */
.ct-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(140, 242, 192, 0.16) 1px, transparent 1.4px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 68% 55%, #000 8%, transparent 70%); mask-image: radial-gradient(ellipse at 68% 55%, #000 8%, transparent 70%);
}
.ct-intro { grid-area: intro; align-self: center; }
.ct-eyebrow { margin: 0 0 0.9rem; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--sig); }
.ct-h1 {
  margin: 0; font-family: var(--site-font-head); font-weight: 400; text-transform: uppercase; line-height: 0.96;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  background: linear-gradient(180deg, #fff 8%, var(--sig-hi) 45%, var(--sig));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ct-sub { margin: 1.1rem 0 0; max-width: 34rem; font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.4; color: var(--site-dim); }
.ct-sub strong { display: block; margin-top: 0.5rem; color: var(--site-fg); font-weight: 600; }
.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; margin-top: 1.6rem; }
.ct-hours { margin: 0; font-size: 0.9rem; color: var(--site-dim); }
.ct-rise { opacity: 0; transform: translateY(1.2rem); animation: ct-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; animation-delay: calc(var(--i, 0) * 0.11s + 0.1s); }
@keyframes ct-rise { to { opacity: 1; transform: none; } }

/* ---------- сцена: узлы связи ---------- */
.ct-stage { grid-area: stage; position: relative; min-height: 36rem; touch-action: pan-y; cursor: default; }
.ct-net { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.ct-nodes { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.ct-node { position: absolute; left: var(--dx); top: var(--dy); width: 0; height: 0; }
.ct-bead {
  position: absolute; left: -1.8rem; top: -1.8rem; width: 3.6rem; height: 3.6rem; display: grid; place-items: center;
  border-radius: 50%; background: #0a0f14; border: 1.5px solid rgba(140, 242, 192, 0.5);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, background-color 0.3s, box-shadow 0.35s;
}
.ct-ico { width: 1.5rem; height: 1.5rem; fill: none; stroke: var(--sig); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s; }
.ct-tag {
  position: absolute; left: 50%; top: 2.2rem; width: 12.5rem; transform: translateX(-50%); z-index: 2;
  display: grid; justify-items: center; gap: 0.1rem; padding: 0.35rem 0.5rem; text-align: center; border: 1px solid transparent; border-radius: 0.7rem;
  transition: background-color 0.3s, border-color 0.3s;
}
.ct-lab { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sig); }
.ct-val { font-size: 1.02rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.ct-val:hover { color: var(--sig-hi); text-decoration: underline; text-underline-offset: 0.2em; }
.ct-note { font-size: 0.8rem; line-height: 1.35; color: var(--site-dim); }
/* с работающим скриптом подсказка раскрывается, когда узел соединён с посетителем */
.ct-js .ct-note { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.4s, opacity 0.3s; }
.ct-js .ct-node.is-linked .ct-note, .ct-js .ct-node.is-selected .ct-note { max-height: 9rem; opacity: 1; }
.ct-node.is-linked .ct-bead, .ct-node.is-selected .ct-bead {
  transform: scale(1.12); border-color: var(--sig-hi); background: #0f221b;
  box-shadow: 0 0 0 7px rgba(140, 242, 192, 0.08), 0 0 34px rgba(140, 242, 192, 0.35);
}
.ct-node.is-linked .ct-ico, .ct-node.is-selected .ct-ico { stroke: var(--sig-hi); }
.ct-node.is-linked, .ct-node.is-selected { z-index: 3; }
.ct-node.is-linked .ct-tag, .ct-node.is-selected .ct-tag { background: rgba(7, 9, 12, 0.96); border-color: var(--site-line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ct-js .ct-node { cursor: pointer; }
.ct-you-hint { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; text-align: center; font-size: 0.78rem; color: var(--site-dim); pointer-events: none; }
.ct-you-hint__touch { display: none; }
@media (hover: none), (pointer: coarse) { .ct-you-hint__fine { display: none; } .ct-you-hint__touch { display: inline; } }
.ct-stage:not(.is-live) .ct-you-hint { display: none; }

/* ---------- экраны после первого ---------- */
.ct-sec { content-visibility: auto; contain-intrinsic-size: auto 700px; padding: clamp(2.5rem, 6vw, 4.5rem) var(--site-gutter); border-top: 1px solid var(--site-line); }
.ct-h2 { margin: 0 0 1rem; font-family: var(--site-font-head); font-weight: 400; text-transform: uppercase; line-height: 1; font-size: clamp(2rem, 4.6vw, 3.6rem); color: var(--sig-hi); }
.ct-lead { margin: 0 0 2rem; max-width: 46rem; color: var(--site-dim); font-size: clamp(1rem, 1.6vw, 1.2rem); }
.ct-js .ct-reveal:not(.is-in) { opacity: 0; transform: translateY(1.6rem); }
.ct-reveal { transition: opacity 0.7s, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 0.1s); }
.ct-sec__act { margin-top: 2.4rem; }

/* реквизиты */
.ct-req { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
.ct-dl { margin: 0; max-width: 44rem; border-top: 1px solid var(--site-line); }
.ct-dl__row { display: grid; gap: 0.15rem 1.5rem; grid-template-columns: minmax(0, 1fr); padding: 0.85rem 0; border-bottom: 1px solid var(--site-line); }
.ct-dl dt { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sig); }
.ct-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ct-dl dd a { text-decoration: none; }
.ct-dl dd a:hover { color: var(--sig-hi); text-decoration: underline; text-underline-offset: 0.2em; }
.ct-dl a { display: inline-block; padding-block: 0.35rem; margin-block: -0.35rem; }
.ct-dl .ct-dl__map { margin-left: 0.8rem; font-weight: 400; font-size: 0.88rem; color: var(--site-dim); }
.ct .ct-copy {
  display: inline-flex; align-items: center; margin-left: 0.7rem; padding: 0.4rem 0.8rem; border: 1px solid var(--site-line); border-radius: 2rem; background: transparent; cursor: pointer;
  font-size: 0.74rem; line-height: 1.4; font-weight: 400; color: var(--site-dim); vertical-align: 0.1em; transition: border-color 0.2s, color 0.2s;
}
.ct .ct-copy:hover { border-color: var(--sig); color: var(--sig-hi); }
.ct .ct-copy.is-done { border-color: var(--sig); color: var(--sig); }
.ct-req__art { justify-self: center; width: min(100%, 22rem); }
.ct-req__art svg { display: block; width: 100%; height: auto; overflow: visible; }
.ct-art__thread { stroke-dasharray: 7 9; animation: ct-flow 2.4s linear infinite; }
.ct-art__thread--b { animation-duration: 3.6s; animation-direction: reverse; }
.ct-art__ring { transform-box: fill-box; transform-origin: center; animation: ct-ping 2.4s ease-out infinite; }
@keyframes ct-flow { to { stroke-dashoffset: -32; } }
@keyframes ct-ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(3.4); opacity: 0; } }

/* шаги */
.ct-steps { position: relative; display: grid; gap: 2rem; margin: 2.4rem 0 0; padding: 0; list-style: none; grid-template-columns: minmax(0, 1fr); }
.ct-step { position: relative; padding-left: 4.2rem; }
.ct-step::before { content: ""; position: absolute; left: 1.35rem; top: 2.9rem; bottom: -2rem; width: 1px; background: linear-gradient(var(--sig), rgba(140, 242, 192, 0.15)); }
.ct-step:last-child::before { display: none; }
.ct-step__n {
  position: absolute; left: 0; top: 0; width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border-radius: 50%;
  background: #0a0f14; border: 1.5px solid var(--sig); color: var(--sig-hi); font-family: var(--site-font-head); font-size: 1.2rem;
}
.ct-step:first-child .ct-step__n { border-color: var(--warm); color: var(--warm); }
.ct-step h3 { margin: 0.15rem 0 0.35rem; font-size: 1.15rem; font-weight: 600; }
.ct-step p { margin: 0; max-width: 24rem; color: var(--site-dim); font-size: 0.98rem; }

/* ---------- широкий экран ---------- */
@media (min-width: 62em) {
  .ct-hero {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    grid-template-areas: "intro stage";
    align-items: center;
  }
  .ct-stage { min-height: 38rem; }
}
@media (min-width: 50em) {
  .ct-dl__row { grid-template-columns: 11rem minmax(0, 1fr); align-items: baseline; }
  .ct-req { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); }
  .ct-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
  .ct-step { padding: 4.2rem 0 0; }
  .ct-step::before { left: 2.9rem; right: -2.4rem; top: 1.35rem; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, var(--sig), rgba(140, 242, 192, 0.15)); }
}
@media (max-width: 40em) {
  .ct-actions .site-btn { flex: 1 1 100%; }
  /* телефон: узлы выстроены вертикально, нить вьётся от одного к другому */
  .ct-stage { min-height: calc(var(--n) * 6.4rem + 2.4rem); }
  .ct-node { left: var(--mx); top: var(--my); }
  .ct-tag { top: -1.35rem; left: 2.6rem; width: min(13.5rem, 56vw); transform: none; justify-items: start; text-align: left; }
  .ct-node:nth-child(even) .ct-tag { left: auto; right: 2.6rem; justify-items: end; text-align: right; }
  .ct-you-hint { position: static; margin-top: 0.5rem; }
  /* раскрытая подсказка закрывает соседей: остальные подписи приглушаем, чтобы они не торчали из-под карточки */
  .ct-nodes:has(.is-selected, .is-linked) .ct-node:not(.is-selected):not(.is-linked) .ct-tag { opacity: 0.08; transition: opacity 0.3s; }
  .ct-stage { padding-bottom: 1.6rem; }
  .ct-you-hint { position: absolute; bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ct-rise { opacity: 1; transform: none; animation: none; }
  .ct-art__thread, .ct-art__ring { animation: none; }
  .ct-bead, .ct-tag, .ct-note { transition: none; }
  .ct-reveal { transition: none; }
}
}

/* Ссылки на политику и cookie в подвале: вне слоя, как в site-chrome.css (иначе их перебивает общий css/consent.css без слоёв). */
.ct .site-footer .site-legal__link:hover { color: var(--sig-hi); }
