/*
 * Стили варианта «Референс». Файл в public/ подключается из RefChrome как
 * <link rel=stylesheet precedence> — React добавляет его в <head> только на страницах,
 * где отрисован RefChrome. Так CSS и шрифт не попадают на страницы старого дизайна
 * (импорт .css из компонента Turbopack кладёт в CSS всех маршрутов) — ADR 0007.
 *
 * Значения — из эталона docs/reference/artifact-skyline.html (#ver-ref, #rcursor).
 * Всё под [data-site="ref"]. Шрифт Onest и прелоадер — в shared.css (общие со Studio).
 */

/* ===================== токены и база ===================== */
[data-site="ref"] {
  --r-bg: #0a0a0b;
  --r-txt: #f2f1ec;
  --r-dim: #8c8c86;
  --r-line: rgba(255, 255, 255, 0.11);
  --r-acc: var(--acc-ink);
  --r-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --r-ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  /* Единый край контента для всех блоков (шапка, секции, ленты, цифры, финал, подвал):
     на широких экранах — по сетке 1320px, на узких — 24px и safe-area. Симметрично слева и справа. */
  --r-gutter: max(24px, env(safe-area-inset-left, 0px), calc((100vw - 1320px) / 2 + 24px));
  --r-gutter-r: max(24px, env(safe-area-inset-right, 0px), calc((100vw - 1320px) / 2 + 24px));

  background: var(--r-bg);
  color: var(--r-txt);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -0.012em;
  position: relative;
  /* Не hidden: hidden на предке ломает position:sticky (отловлено в эталоне). */
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[data-site="ref"] ::selection {
  background: var(--r-acc);
  color: var(--r-bg);
}
[data-site="ref"] a {
  color: inherit;
  text-decoration: none;
}
[data-site="ref"] button {
  font: inherit;
  cursor: pointer;
}
[data-site="ref"] :focus-visible {
  outline: 2px solid var(--r-acc);
  outline-offset: 3px;
  border-radius: 6px;
}
[data-site="ref"] main {
  position: relative;
  z-index: 2;
  flex: 1;
}
[data-site="ref"] .r-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent calc(50% - 0.5px), var(--r-line) 50%, transparent calc(50% + 0.5px));
  background-size: 25% 100%;
  opacity: 0.5;
}
[data-site="ref"] .r-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===================== курсор (эталон: #rcursor) ===================== */
[data-site="ref"] .r-cursor {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3000;
  pointer-events: none;
  mix-blend-mode: difference;
}
[data-site="ref"][data-cursor="on"] .r-cursor {
  display: block;
}
[data-site="ref"][data-cursor="on"],
[data-site="ref"][data-cursor="on"] a,
[data-site="ref"][data-cursor="on"] button {
  cursor: none;
}
[data-site="ref"] .r-cursor .rc-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}
[data-site="ref"] .r-cursor .rc-ring {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}
[data-site="ref"] .r-cursor.hover .rc-ring {
  width: 66px;
  height: 66px;
  border-color: var(--acc-ink);
}

/* ===================== шапка (эталон: .r-nav) ===================== */
[data-site="ref"] .r-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--r-gutter);
  mix-blend-mode: difference;
  color: #fff;
}
[data-site="ref"] .r-logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: #fff;
}
[data-site="ref"] .r-logo b {
  color: #fff;
}
[data-site="ref"] .r-navr {
  display: flex;
  align-items: center;
  gap: 12px;
}
[data-site="ref"] .r-pill {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.25s, color 0.25s;
  white-space: nowrap;
}
[data-site="ref"] .r-pill:hover {
  background: #fff;
  color: #0a0a0b;
}
[data-site="ref"] .r-menubtn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: none;
  border: 0;
  padding: 8px 0;
}
[data-site="ref"] .r-menubtn .bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
[data-site="ref"] .r-menubtn .bars i {
  width: 20px;
  height: 2px;
  background: #fff;
  display: block;
}

/* ===================== полноэкранное меню (эталон: .r-menu) ===================== */
[data-site="ref"] .r-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--r-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px var(--r-gutter) clamp(28px, 6vw, 80px);
  transform: translateY(-101%);
  transition: transform 0.7s var(--r-ease-io), visibility 0s linear 0.7s;
  visibility: hidden;
  overflow-y: auto;
}
[data-site="ref"] .r-menu.open {
  transform: none;
  visibility: visible;
  transition: transform 0.7s var(--r-ease-io), visibility 0s;
}
[data-site="ref"] .r-menu .mtop {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--r-gutter);
}
[data-site="ref"] .r-menu .mclose {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--r-txt);
  background: none;
  border: 1px solid var(--r-line);
  border-radius: 999px;
  padding: 10px 18px;
}
[data-site="ref"] .r-menu .mnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
[data-site="ref"] .r-menu .mnav a {
  font-size: clamp(38px, 9vw, 104px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--r-txt);
  transition: color 0.3s, padding 0.4s var(--r-ease);
  width: fit-content;
}
[data-site="ref"] .r-menu .mnav a:hover,
[data-site="ref"] .r-menu .mnav a[aria-current="page"] {
  color: var(--r-acc);
  padding-left: 24px;
}
[data-site="ref"] .r-menu .mnav a .mi {
  font-size: 0.28em;
  color: var(--r-dim);
  vertical-align: super;
  margin-left: 8px;
}
[data-site="ref"] .r-menu .mfoot {
  margin-top: clamp(30px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  color: var(--r-dim);
  font-size: 14px;
  align-items: center;
}
[data-site="ref"] .r-menu .mfoot a {
  color: var(--r-dim);
  transition: 0.2s;
}
[data-site="ref"] .r-menu .mfoot a:hover,
[data-site="ref"] .r-menu .mfoot a[aria-current="true"] {
  color: var(--r-acc);
}
[data-site="ref"] .r-locales {
  display: flex;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 13px;
}
[data-site="ref"] .r-foot .r-locales a {
  display: inline;
  padding: 0;
  font-size: 12.5px;
}
[data-site="ref"] .r-foot .r-locales a[aria-current="true"] {
  color: var(--r-acc);
}

/* ===================== hero (эталон: .r-hero / .r-mark) ===================== */
[data-site="ref"] .r-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: 0 var(--r-gutter);
  z-index: 2;
}
[data-site="ref"] .r-glow {
  position: absolute;
  width: min(72vw, 860px);
  aspect-ratio: 1;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--r-acc) 42%, transparent), color-mix(in srgb, var(--r-acc) 16%, transparent) 42%, transparent 70%);
  filter: blur(8px);
  z-index: -1;
  animation: r-glow 9s ease-in-out infinite alternate;
  pointer-events: none;
}
[data-site="ref"] .r-in {
  position: relative;
  z-index: 2;
}
[data-site="ref"] .r-eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--r-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 0;
}
[data-site="ref"] .r-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--r-acc);
  animation: r-pulse 1.6s ease-in-out infinite;
}
[data-site="ref"] .r-mark {
  text-align: center;
  font-weight: 800;
  font-size: clamp(66px, 20vw, 300px);
  line-height: 0.84;
  letter-spacing: -0.045em;
  margin: 16px 0 0;
}
[data-site="ref"] .r-mark .ch {
  display: inline-block;
  animation: r-up 0.85s var(--r-ease) both;
}
[data-site="ref"] .r-mark .o {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--r-txt);
}
[data-site="ref"] .r-mark .ch:nth-child(1) { animation-delay: 0.05s; }
[data-site="ref"] .r-mark .ch:nth-child(2) { animation-delay: 0.11s; }
[data-site="ref"] .r-mark .ch:nth-child(3) { animation-delay: 0.17s; }
[data-site="ref"] .r-mark .ch:nth-child(4) { animation-delay: 0.23s; }
[data-site="ref"] .r-mark .ch:nth-child(5) { animation-delay: 0.29s; }
[data-site="ref"] .r-mark .ch:nth-child(6) { animation-delay: 0.35s; }
[data-site="ref"] .r-mark .ch:nth-child(7) { animation-delay: 0.41s; }
[data-site="ref"] .r-sub {
  text-align: center;
  color: var(--r-dim);
  font-size: clamp(15px, 1.7vw, 19px);
  max-width: 46ch;
  margin: 26px auto 0;
  line-height: 1.5;
}
[data-site="ref"] .r-hcta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
[data-site="ref"] .r-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--r-acc);
  color: #0a0a0b;
  font-weight: 700;
  font-size: 16px;
  padding: 17px 32px;
  border-radius: 999px;
  transition: background 0.25s, transform 0.25s;
  white-space: nowrap;
}
[data-site="ref"] .r-cta:hover {
  background: #fff;
  transform: translateY(-2px);
}
[data-site="ref"] .r-cta.ghost {
  background: transparent;
  color: var(--r-txt);
  border: 1px solid var(--r-line);
}
[data-site="ref"] .r-cta.ghost:hover {
  border-color: var(--r-acc);
  color: var(--r-acc);
}
[data-site="ref"] .r-scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
[data-site="ref"] .r-scroll .ln {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--r-dim), transparent);
  position: relative;
  overflow: hidden;
}
[data-site="ref"] .r-scroll .ln::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--r-acc);
  animation: r-cue 1.9s ease-in-out infinite;
}
@keyframes r-glow { to { transform: translate(-50%, -53%) scale(1.14); } }
@keyframes r-pulse { 50% { opacity: 0.25; } }
@keyframes r-up { from { opacity: 0; transform: translateY(42%); } to { opacity: 1; transform: none; } }
@keyframes r-cue { 0% { top: -40%; } 60%, 100% { top: 100%; } }

/* ===================== бегущая строка (эталон: .r-marq) ===================== */
[data-site="ref"] .r-marq {
  border-block: 1px solid var(--r-line);
  overflow: hidden;
  white-space: nowrap;
  padding-block: 18px;
  position: relative;
  z-index: 2;
  background: var(--r-bg);
}
[data-site="ref"] .r-marq-t {
  display: inline-block;
  animation: r-marq 26s linear infinite;
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
[data-site="ref"] .r-marq-t .sep {
  color: transparent;
  -webkit-text-stroke: 1px var(--r-txt);
  margin: 0 4px;
}
[data-site="ref"] .r-marq-t .acc {
  color: var(--r-acc);
}
@keyframes r-marq { to { transform: translateX(-50%); } }

/* ===================== «Философия» (эталон: .r-phil) ===================== */
[data-site="ref"] .r-phil {
  position: relative;
  height: 230vh;
  z-index: 2;
}
[data-site="ref"] .r-phil-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--r-bg);
}
[data-site="ref"] .r-phil-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-origin: center center;
  will-change: transform, filter, border-radius;
  transform: scale(0.64);
  border-radius: 32px;
  filter: blur(16px);
  /* Фото в эталоне вшито без источника — здесь световая сцена в цвете акцента (DESIGN-GAPS). */
  background:
    radial-gradient(60% 55% at 30% 30%, color-mix(in srgb, var(--r-acc) 55%, transparent), transparent 70%),
    radial-gradient(50% 50% at 75% 70%, color-mix(in srgb, var(--acc) 70%, transparent), transparent 72%),
    linear-gradient(140deg, #14141a, #07070a);
}
[data-site="ref"] .r-phil-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.08) 50%, transparent calc(50% + 0.5px));
  background-size: 12.5% 100%;
}
[data-site="ref"] .r-phil-dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(62% 62% at 50% 46%, rgba(10, 6, 6, 0.28), rgba(8, 5, 5, 0.82));
}
[data-site="ref"] .r-phil-big {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3;
  font-size: clamp(42px, 9vw, 132px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  text-align: center;
  will-change: opacity, transform;
  pointer-events: none;
}
[data-site="ref"] .r-phil-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  z-index: 4;
  padding: 0 var(--r-gutter);
  opacity: 0;
  will-change: opacity, transform;
  pointer-events: none;
}
[data-site="ref"] .r-phil-text .pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid color-mix(in srgb, var(--r-acc) 55%, transparent);
  color: var(--r-acc);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 24px;
}
[data-site="ref"] .r-phil-text .pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--r-acc);
}
[data-site="ref"] .r-phil-text p {
  font-size: clamp(22px, 3.3vw, 44px);
  font-weight: 500;
  line-height: 1.3;
  max-width: 22ch;
  margin: 0;
  color: #f4f1ec;
}
[data-site="ref"] .r-phil-text p b {
  color: var(--r-acc);
  font-weight: 600;
}
@media (max-width: 600px) {
  [data-site="ref"] .r-phil {
    height: 200vh;
  }
}

/* ===================== общие секции ===================== */
[data-site="ref"] .r-sec {
  position: relative;
  z-index: 2;
  padding-block: clamp(70px, 10vw, 140px);
  padding-inline: var(--r-gutter) var(--r-gutter-r);
}
[data-site="ref"] .r-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-dim);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 34px;
}
[data-site="ref"] .r-label::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--r-acc);
  border-radius: 50%;
}

/* ===================== горизонтальные секции (.r-hsec / .r-hsticky / .r-htrack) ===================== */
[data-site="ref"] .r-hsec {
  position: relative;
  z-index: 2;
}
[data-site="ref"] .r-hsticky {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 70px;
}
[data-site="ref"] .r-hhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 24px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding-inline: var(--r-gutter) var(--r-gutter-r);
}
[data-site="ref"] .r-hhead .r-label {
  margin: 0;
}
[data-site="ref"] .r-htitle {
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 10px 0 0;
  line-height: 1.02;
}
[data-site="ref"] .r-hint {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--r-dim);
  margin: 0;
}
[data-site="ref"] .r-hint a {
  color: var(--r-acc);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* По умолчанию (мобилка, touch, reduced-motion, до гидрации) — нативный свайп со снапом. */
[data-site="ref"] .r-htrack {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--r-gutter);
  padding: 4px var(--r-gutter-r) 18px var(--r-gutter);
  scrollbar-width: thin;
  scrollbar-color: var(--r-line) transparent;
}
[data-site="ref"] .r-htrack > * {
  scroll-snap-align: start;
}
[data-site="ref"] .r-hbar {
  display: none;
}
/* Закреплённый режим: включается JS только на широких экранах без reduced-motion. */
@media (min-width: 900px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  [data-site="ref"] .r-hsec[data-pin="on"] .r-hsticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }
  [data-site="ref"] .r-hsec[data-pin="on"] .r-htrack {
    overflow: visible;
    scroll-snap-type: none;
    will-change: transform;
    padding-bottom: 4px;
  }
  /* Полоса прогресса под лентой (эталон: .r-hbar). */
  [data-site="ref"] .r-hsec[data-pin="on"] .r-hbar {
    display: block;
    position: absolute;
    left: var(--r-gutter);
    right: var(--r-gutter-r);
    bottom: 36px;
    height: 2px;
    background: var(--r-line);
  }
  [data-site="ref"] .r-hsec[data-pin="on"] .r-hbar span {
    display: block;
    height: 100%;
    width: calc(var(--p, 0) * 100%);
    background: var(--r-acc);
  }
}

/* ——— услуги (эталон: .r-panel) ——— */
[data-site="ref"] .r-panel {
  flex: 0 0 auto;
  width: min(80vw, 460px);
  min-height: min(58vh, 500px);
  border: 1px solid var(--r-line);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.35s var(--r-ease), background 0.35s var(--r-ease), transform 0.35s var(--r-ease);
}
[data-site="ref"] .r-panel:hover {
  border-color: var(--r-acc);
  background: color-mix(in srgb, var(--r-acc) 10%, transparent);
  transform: translateY(-4px);
}
[data-site="ref"] .r-panel .pn {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--r-dim);
  font-variant-numeric: tabular-nums;
}
[data-site="ref"] .r-panel .pt {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 14px 0 0;
  line-height: 1;
}
[data-site="ref"] .r-panel .pd {
  color: var(--r-dim);
  font-size: 15px;
  line-height: 1.5;
  margin: 16px 0 0;
  max-width: 34ch;
}
[data-site="ref"] .r-panel .pp {
  font-size: 24px;
  font-weight: 800;
  color: var(--r-acc);
  margin-top: auto;
  padding-top: 24px;
}
[data-site="ref"] .r-panel .pp span {
  display: block;
  font-size: 11px;
  color: var(--r-dim);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

/* ——— проекты (эталон: .r-pcard) ——— */
[data-site="ref"] .r-pcard {
  flex: 0 0 auto;
  width: min(68vw, 420px);
  display: block;
  outline: none;
}
[data-site="ref"] .r-pcimg {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--r-line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s;
}
[data-site="ref"] .r-pcimg img {
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--r-ease);
  will-change: transform;
}
[data-site="ref"] .r-pcard:hover .r-pcimg img,
[data-site="ref"] .r-pcard:focus-visible .r-pcimg img {
  transform: scale(1.045);
}
[data-site="ref"] .r-pcard:hover .r-pcimg,
[data-site="ref"] .r-pcard:focus-visible .r-pcimg {
  border-color: var(--r-acc);
}
[data-site="ref"] .r-pcopen {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #0a0a0b;
  background: var(--r-acc);
  opacity: 0;
  transform: translateY(-6px) scale(0.9);
  transition: 0.3s var(--r-ease);
}
[data-site="ref"] .r-pcard:hover .r-pcopen,
[data-site="ref"] .r-pcard:focus-visible .r-pcopen {
  opacity: 1;
  transform: none;
}
[data-site="ref"] .r-pcbd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}
[data-site="ref"] .r-pcn {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  transition: color 0.3s;
}
[data-site="ref"] .r-pcard:hover .r-pcn,
[data-site="ref"] .r-pcard:focus-visible .r-pcn {
  color: var(--r-acc);
}
[data-site="ref"] .r-pcc {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--r-dim);
  white-space: nowrap;
}
@media (max-width: 760px) {
  [data-site="ref"] .r-pcard {
    width: 82vw;
  }
}

/* ——— процесс: роадмап + бизнес-процесс (по решению владельца — горизонтально) ——— */
[data-site="ref"] .r-step {
  flex: 0 0 auto;
  width: min(80vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
[data-site="ref"] .r-steprow {
  display: flex;
  align-items: center;
  margin-right: -22px;
}
[data-site="ref"] .r-node {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: var(--r-bg);
  border: 1px solid var(--r-line);
  transition: border-color 0.4s var(--r-ease), color 0.4s var(--r-ease), box-shadow 0.4s var(--r-ease);
}
[data-site="ref"] .r-step[data-on="true"] .r-node {
  border-color: var(--r-acc);
  color: var(--r-acc);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--r-acc) 10%, transparent);
}
[data-site="ref"] .r-seg {
  position: relative;
  flex: 1;
  height: 2px;
  background: var(--r-line);
}
[data-site="ref"] .r-seg i {
  position: absolute;
  inset: 0;
  background: var(--r-acc);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 0.5s var(--r-ease);
  box-shadow: 0 0 14px color-mix(in srgb, var(--r-acc) 35%, transparent);
}
[data-site="ref"] .r-step[data-on="true"]:has(+ .r-step[data-on="true"]) .r-seg i {
  transform: scaleX(1);
}
[data-site="ref"] .r-step .r-panel {
  width: 100%;
  min-height: 0;
  flex: 1;
}
[data-site="ref"] .r-badge {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--r-line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--r-acc);
}
[data-site="ref"] .r-lane {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px dashed var(--r-line);
  display: grid;
  gap: 14px;
}
[data-site="ref"] .r-lane dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--r-dim);
}
[data-site="ref"] .r-lane dd {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

/* ——— цифры (эталон: .r-stats) ——— */
[data-site="ref"] .r-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid var(--r-line);
  padding-top: 44px;
}
[data-site="ref"] .r-stats .n {
  font-size: clamp(44px, 7vw, 86px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
[data-site="ref"] .r-stats .n b {
  color: var(--r-acc);
}
[data-site="ref"] .r-stats .l {
  color: var(--r-dim);
  font-size: 13px;
  margin-top: 8px;
}
@media (max-width: 620px) {
  [data-site="ref"] .r-stats {
    grid-template-columns: 1fr;
  }
}

/* ===================== финал (эталон: .r-final) ===================== */
[data-site="ref"] .r-final {
  text-align: center;
  padding-block: clamp(80px, 14vw, 200px);
  position: relative;
  z-index: 2;
  padding-inline: var(--r-gutter);
}
[data-site="ref"] .r-final .r-label {
  justify-content: center;
}
[data-site="ref"] .r-final h2 {
  font-size: clamp(48px, 13vw, 180px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.88;
  margin: 0;
}
[data-site="ref"] .r-final h2 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--r-txt);
}
[data-site="ref"] .r-final .r-hcta {
  margin-top: 40px;
}

/* ===================== подвал (эталон: .r-foot) ===================== */
[data-site="ref"] .r-foot {
  border-top: 1px solid var(--r-line);
  padding: 56px var(--r-gutter) 40px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
[data-site="ref"] .r-foot .big {
  font-size: clamp(64px, 21vw, 280px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.78;
  color: transparent;
  -webkit-text-stroke: 1px var(--r-line);
  white-space: nowrap;
}
[data-site="ref"] .r-foot .cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 26px 40px;
  margin-top: 36px;
}
[data-site="ref"] .r-foot .fh {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--r-dim);
  margin: 0 0 12px;
}
[data-site="ref"] .r-foot a {
  color: var(--r-dim);
  display: block;
  padding: 4px 0;
  font-size: 14px;
  transition: 0.2s;
}
[data-site="ref"] .r-foot a:hover {
  color: var(--r-acc);
}
[data-site="ref"] .r-foot .copy {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--r-line);
  color: var(--r-dim);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===================== кейс с depth-открытием (эталон: .r-case) ===================== */
[data-site="ref"] .r-case {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #07070a;
}
[data-site="ref"] .r-case[hidden] {
  display: none;
}
[data-site="ref"] .rc-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: scale(0.62);
  border-radius: 34px;
  filter: blur(18px);
  opacity: 0.25;
  transition: transform 0.75s var(--r-ease-io), border-radius 0.75s var(--r-ease-io), filter 0.7s ease, opacity 0.5s ease;
}
[data-site="ref"] .r-case.open .rc-media {
  transform: scale(1);
  border-radius: 0;
  filter: blur(0);
  opacity: 1;
}
[data-site="ref"] .rc-media img {
  object-fit: cover;
  object-position: top center;
}
[data-site="ref"] .rc-dim {
  position: absolute;
  inset: 0;
  /* Эталон — только вертикальный градиент; слева добавлена подложка под текст:
     на скриншотах сайтов с крупным текстом без неё не читается (DESIGN-GAPS). */
  background:
    linear-gradient(180deg, rgba(7, 7, 10, 0.5), rgba(7, 7, 10, 0.15) 38%, rgba(7, 7, 10, 0.94)),
    linear-gradient(90deg, rgba(7, 7, 10, 0.86), rgba(7, 7, 10, 0.55) 45%, rgba(7, 7, 10, 0) 80%);
}
[data-site="ref"] .rc-close {
  position: absolute;
  top: 22px;
  right: var(--r-gutter-r);
  z-index: 3;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 10px 18px;
  backdrop-filter: blur(6px);
}
[data-site="ref"] .rc-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: clamp(28px, 5vw, 64px) var(--r-gutter);
  max-width: 760px;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease 0.28s, transform 0.6s var(--r-ease) 0.28s;
}
[data-site="ref"] .r-case.open .rc-body {
  opacity: 1;
  transform: none;
}
[data-site="ref"] .rc-cat {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--r-acc);
  font-weight: 700;
}
[data-site="ref"] .rc-title {
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin: 14px 0 0;
}
[data-site="ref"] .rc-desc {
  color: #dad7d0;
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.55;
  max-width: 52ch;
  margin: 18px 0 0;
}
[data-site="ref"] .rc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}
[data-site="ref"] .rc-tags span {
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #cfcbc4;
  padding: 6px 12px;
  border-radius: 999px;
}
[data-site="ref"] .rc-body .r-hcta {
  justify-content: flex-start;
  margin-top: 26px;
}

/* ===================== reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  [data-site="ref"] .r-glow,
  [data-site="ref"] .r-mark .ch,
  [data-site="ref"] .r-marq-t,
  [data-site="ref"] .r-eyebrow::before {
    animation: none;
  }
  [data-site="ref"] .r-scroll .ln::after {
    display: none;
  }
  [data-site="ref"] .r-phil {
    height: auto;
  }
  [data-site="ref"] .r-phil-sticky {
    position: relative;
    height: 70vh;
  }
  [data-site="ref"] .r-phil-media {
    transform: none;
    border-radius: 0;
    filter: none;
  }
  [data-site="ref"] .r-phil-big {
    display: none;
  }
  [data-site="ref"] .r-phil-text {
    opacity: 1;
  }
  [data-site="ref"] *,
  [data-site="ref"] *::before,
  [data-site="ref"] *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Контейнеры меню и кейса фокусируются программно (запасная точка фокус-ловушки) — без рамки. */
[data-site="ref"] .r-menu:focus,
[data-site="ref"] .r-case:focus {
  outline: none;
}

/* ===================== внутренние страницы ===================== */
[data-site="ref"] .r-phead {
  padding-top: clamp(120px, 15vw, 190px);
  padding-bottom: clamp(30px, 4vw, 56px);
}
[data-site="ref"] .r-ptitle {
  font-size: clamp(52px, 11vw, 150px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
  margin: 0;
}
[data-site="ref"] .r-pintro {
  color: var(--r-dim);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.55;
  max-width: 54ch;
  margin: 26px 0 0;
}
[data-site="ref"] .r-back {
  color: var(--r-dim);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
[data-site="ref"] .r-back:hover {
  color: var(--r-acc);
}
[data-site="ref"] .r-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}
[data-site="ref"] .r-filter button {
  background: none;
  color: var(--r-dim);
  border: 1px solid var(--r-line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  transition: 0.25s;
}
[data-site="ref"] .r-filter button:hover {
  color: var(--r-txt);
  border-color: var(--r-txt);
}
[data-site="ref"] .r-filter button[aria-pressed="true"] {
  background: var(--r-acc);
  border-color: var(--r-acc);
  color: #0a0a0b;
}
[data-site="ref"] .r-psec {
  padding-top: 0;
}
[data-site="ref"] .r-pgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(36px, 5vw, 64px) clamp(22px, 3vw, 40px);
}
[data-site="ref"] .r-pgrid .r-pcard {
  width: auto;
}
[data-site="ref"] .r-pgrid .r-pcard:nth-child(even) {
  margin-top: clamp(0px, 8vw, 110px);
}
@media (max-width: 760px) {
  [data-site="ref"] .r-pgrid {
    grid-template-columns: 1fr;
  }
  [data-site="ref"] .r-pgrid .r-pcard:nth-child(even) {
    margin-top: 0;
  }
}
[data-site="ref"] .r-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 48px;
  margin: 36px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--r-line);
}
[data-site="ref"] .r-meta dt {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--r-dim);
  font-weight: 700;
}
[data-site="ref"] .r-meta dd {
  margin: 8px 0 0;
  font-size: 15px;
}
[data-site="ref"] .r-meta .rc-tags {
  margin-top: 8px;
}
[data-site="ref"] .r-phead .r-hcta {
  margin-top: 32px;
}
[data-site="ref"] .r-cover {
  position: relative;
  z-index: 2;
  height: min(78vh, 760px);
  margin: 0 var(--r-gutter);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--r-line);
}
[data-site="ref"] .r-cover img {
  object-fit: cover;
  object-position: top center;
}
[data-site="ref"] .r-story {
  display: grid;
  gap: clamp(44px, 6vw, 80px);
}
[data-site="ref"] .r-story .r-label {
  margin-bottom: 18px;
}
[data-site="ref"] .r-storyt {
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.02em;
  max-width: 34ch;
  margin: 0;
}
[data-site="ref"] .r-gal {
  padding-top: 0;
}
[data-site="ref"] .r-pnav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--r-line);
  padding-block: 44px;
}
[data-site="ref"] .r-pnav a {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
[data-site="ref"] .r-pnav a span {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--r-dim);
  font-weight: 700;
}
[data-site="ref"] .r-pnav a b {
  font-size: clamp(26px, 4.4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  transition: color 0.3s;
}
[data-site="ref"] .r-pnav a:hover b {
  color: var(--r-acc);
}
[data-site="ref"] .r-pnav .nx {
  text-align: right;
  align-items: flex-end;
}
@media (max-width: 760px) {
  /* Скриншот сайта горизонтальный — на мобилке высокий кадр обрезал бы его в полоску. */
  [data-site="ref"] .r-cover {
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
  }
}

/* ===================== услуги ===================== */
[data-site="ref"] .r-svlist {
  border-top: 1px solid var(--r-line);
}
[data-site="ref"] .r-svrow {
  border-bottom: 1px solid var(--r-line);
  padding-block: clamp(26px, 3.4vw, 44px);
}
[data-site="ref"] .r-svhead {
  display: grid;
  grid-template-columns: 56px 1fr auto 40px;
  align-items: baseline;
  gap: 18px;
  transition: padding 0.5s var(--r-ease);
}
[data-site="ref"] .r-svhead:hover {
  padding-left: 18px;
}
[data-site="ref"] .r-svhead .no {
  font-size: 13px;
  color: var(--r-dim);
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
[data-site="ref"] .r-svhead h2 {
  font-size: clamp(32px, 6vw, 80px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0;
  transition: color 0.3s;
}
[data-site="ref"] .r-svhead:hover h2 {
  color: var(--r-acc);
}
[data-site="ref"] .r-svhead .pr {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  color: var(--r-acc);
  white-space: nowrap;
}
[data-site="ref"] .r-svhead .ar {
  font-size: 22px;
  color: var(--r-dim);
  justify-self: end;
}
[data-site="ref"] .r-svbody {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 48px;
  margin: 18px 0 0 74px;
  color: var(--r-dim);
  font-size: 15px;
  line-height: 1.6;
}
[data-site="ref"] .r-svbody p {
  margin: 0;
  max-width: 48ch;
}
[data-site="ref"] .r-svbody .r-lane {
  margin: 0;
  padding: 0;
  border: 0;
}
[data-site="ref"] .r-svbody .r-lane dd {
  color: var(--r-txt);
}
@media (max-width: 760px) {
  [data-site="ref"] .r-svhead {
    grid-template-columns: 1fr auto;
  }
  [data-site="ref"] .r-svhead .no,
  [data-site="ref"] .r-svhead .ar {
    display: none;
  }
  [data-site="ref"] .r-svbody {
    grid-template-columns: 1fr;
    margin-left: 0;
  }
}
[data-site="ref"] .r-svprice {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  color: var(--r-acc);
}
[data-site="ref"] .r-svprice span {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--r-dim);
  font-weight: 700;
  margin-right: 6px;
}
[data-site="ref"] .r-incl {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--r-line);
}
[data-site="ref"] .r-incl li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 20px 20px 20px 0;
  border-bottom: 1px solid var(--r-line);
  font-size: 16px;
}
[data-site="ref"] .r-incl li span {
  color: var(--r-acc);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 900px) {
  [data-site="ref"] .r-incl {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  [data-site="ref"] .r-incl {
    grid-template-columns: 1fr;
  }
}
[data-site="ref"] .r-pgrid3 {
  grid-template-columns: repeat(3, 1fr);
}
[data-site="ref"] .r-pgrid3 .r-pcard:nth-child(even) {
  margin-top: 0;
}
@media (max-width: 900px) {
  [data-site="ref"] .r-pgrid3 {
    grid-template-columns: 1fr;
  }
}
[data-site="ref"] .r-faq {
  border-top: 1px solid var(--r-line);
  max-width: 900px;
}
[data-site="ref"] .r-faq details {
  border-bottom: 1px solid var(--r-line);
  padding-block: 24px;
}
[data-site="ref"] .r-faq summary {
  cursor: pointer;
  list-style: none;
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
[data-site="ref"] .r-faq summary::-webkit-details-marker {
  display: none;
}
[data-site="ref"] .r-faq summary::after {
  content: "+";
  color: var(--r-acc);
  transition: transform 0.3s var(--r-ease);
}
[data-site="ref"] .r-faq details[open] summary::after {
  transform: rotate(45deg);
}
[data-site="ref"] .r-faq details p {
  color: var(--r-dim);
  font-size: 16px;
  line-height: 1.65;
  max-width: 66ch;
  margin: 14px 0 0;
}
/* При фильтре скрытые карточки сбивают «шахматку» — отключаем сдвиг. */
[data-site="ref"] .r-pgrid[data-filter] .r-pcard:nth-child(even) {
  margin-top: 0;
}

/* ===================== встроенные блоки старого дизайна (.v-embed, shared.css) ===================== */
[data-site="ref"] .v-embed {
  --e-bg: #121215;
  --e-bg2: #0e0e11;
  --e-txt: var(--r-txt);
  --e-dim: var(--r-dim);
  --e-line: var(--r-line);
  --e-acc: var(--r-acc);
  --e-on-acc: #0a0a0b;
  --e-surface: rgba(255, 255, 255, 0.035);
  --e-ink: var(--r-txt);
  --e-muted: var(--r-dim);
  --e-line-l: var(--r-line);
  position: relative;
  z-index: 2;
}
/* Форма заявки: её кнопка — bg-night/text-day, на тёмном фоне делаем её акцентной. */
[data-site="ref"] .v-embed.v-form {
  --e-bg: var(--r-acc);
  --e-txt: #0a0a0b;
}
[data-site="ref"] .r-split {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 860px) {
  [data-site="ref"] .r-split {
    grid-template-columns: 1fr;
  }
}
[data-site="ref"] .r-direct {
  border-top: 1px solid var(--r-line);
}
[data-site="ref"] .r-direct a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--r-line);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 600;
  transition: color 0.25s, padding 0.4s var(--r-ease);
}
[data-site="ref"] .r-direct a:hover {
  color: var(--r-acc);
  padding-left: 10px;
}
[data-site="ref"] .r-direct a span {
  color: var(--r-dim);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  align-self: center;
}
[data-site="ref"] .r-note {
  color: var(--r-dim);
  font-size: 14px;
  line-height: 1.6;
  margin: 22px 0 0;
}
[data-site="ref"] .r-vals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--r-line);
}
[data-site="ref"] .r-vals article {
  padding: 30px 28px 30px 0;
}
[data-site="ref"] .r-vals article + article {
  padding-left: 28px;
  border-left: 1px solid var(--r-line);
}
[data-site="ref"] .r-vals h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 12px 0 0;
}
[data-site="ref"] .r-vals p {
  color: var(--r-dim);
  font-size: 15px;
  line-height: 1.6;
  margin: 12px 0 0;
}
@media (max-width: 860px) {
  [data-site="ref"] .r-vals {
    grid-template-columns: 1fr;
  }
  [data-site="ref"] .r-vals article + article {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--r-line);
  }
}
[data-site="ref"] .r-lead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}
[data-site="ref"] .r-lead p {
  margin: 0;
}
[data-site="ref"] .r-lead p + p {
  color: var(--r-dim);
}
@media (max-width: 760px) {
  [data-site="ref"] .r-lead {
    grid-template-columns: 1fr;
  }
}
[data-site="ref"] .r-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
[data-site="ref"] .r-stack span {
  border: 1px solid var(--r-line);
  border-radius: 999px;
  padding: 12px 20px;
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 600;
}
/* Появление проектов с двух сторон (RefSideReveal): трансформации ставит скрипт по скроллу. */
[data-site="ref"] .r-pgrid[data-reveal="on"] > .r-pcard {
  will-change: transform, opacity;
}

/* ===================== главная: агентство, стек, калькулятор ===================== */
[data-site="ref"] .r-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(44px, 6vw, 72px);
}
[data-site="ref"] .r-about-grid .r-htitle {
  margin: 0;
}
[data-site="ref"] .r-about-text {
  color: var(--r-dim);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  margin: 0;
  max-width: 52ch;
}
[data-site="ref"] .r-about .r-cta {
  display: inline-flex;
}
@media (max-width: 760px) {
  [data-site="ref"] .r-about-grid {
    grid-template-columns: 1fr;
  }
}
[data-site="ref"] .r-calc {
  border: 1px solid var(--r-line);
  border-radius: 24px;
  padding: clamp(32px, 5vw, 64px);
  background:
    radial-gradient(60% 120% at 100% 0%, color-mix(in srgb, var(--r-acc) 18%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.02);
}
[data-site="ref"] .r-calc .r-htitle {
  max-width: 18ch;
  margin: 0 0 18px;
}
[data-site="ref"] .r-calc .r-hcta {
  margin-top: 30px;
}
/* стек: вкладки как фильтр каталога, иконки — монохромная маска цвета текста */
[data-site="ref"] .v-stack-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
[data-site="ref"] .v-stack-tabs button {
  background: none;
  color: var(--r-dim);
  border: 1px solid var(--r-line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  transition: 0.25s;
}
[data-site="ref"] .v-stack-tabs button:hover {
  color: var(--r-txt);
  border-color: var(--r-txt);
}
[data-site="ref"] .v-stack-tabs button[aria-pressed="true"] {
  background: var(--r-acc);
  border-color: var(--r-acc);
  color: #0a0a0b;
}
[data-site="ref"] .v-stack-grid {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--r-line);
  border-left: 1px solid var(--r-line);
}
[data-site="ref"] .v-stack-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 12px;
  border-right: 1px solid var(--r-line);
  border-bottom: 1px solid var(--r-line);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background 0.3s, color 0.3s;
}
[data-site="ref"] .v-stack-grid li:hover {
  background: color-mix(in srgb, var(--r-acc) 10%, transparent);
  color: var(--r-acc);
}
[data-site="ref"] .v-stack-grid .ic {
  width: 32px;
  height: 32px;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}
@media (max-width: 1000px) {
  [data-site="ref"] .v-stack-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 560px) {
  [data-site="ref"] .v-stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
[data-site="ref"] .v-stack-more {
  display: block;
  margin: 28px auto 0;
  background: none;
  color: var(--r-txt);
  border: 1px solid var(--r-line);
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
}
[data-site="ref"] .v-stack-more:hover {
  border-color: var(--r-acc);
  color: var(--r-acc);
}
