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

:root {
  --bg: #050507;
  --fg: #f2f2f0;
  --dim: rgba(242, 242, 240, .45);
  --faint: rgba(242, 242, 240, .18);
  --line: rgba(242, 242, 240, .08);
  /* Oswald — кириллический фолбек той же конденсированной пластики */
  --font: 'Barlow Condensed', 'Oswald', 'Arial Narrow', sans-serif;
}

/* Украинская версия: Barlow Condensed НЕ содержит кириллицы, поэтому в смешанном
   тексте («Meta Ads для бізнесу») латиница шла Barlow'ом, а кириллица — Oswald'ом,
   и английские слова резко выбивались. На uk весь UI ведём Oswald'ом: одна
   пластика для обоих алфавитов. DE/FR/EN остаются на Barlow Condensed. */
html[lang="uk"] {
  --font: 'Oswald', 'Barlow Condensed', 'Arial Narrow', sans-serif;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button { font-family: var(--font); background: none; border: none; color: var(--fg); cursor: pointer; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }

/* ============ GRID LINES ============ */
/* Лежат ПОД 3D-сценой (канвас прозрачный) — планета их перекрывает, а не наоборот */
.grid-lines { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tick {
  position: absolute; left: -1px; width: 3px; height: 46px;
  background: rgba(242, 242, 240, .55);
  animation: tickfall 9s linear infinite;
}
.t1 { animation-delay: 0s; }
.t2 { animation-delay: -3.2s; animation-duration: 12s; }
.t3 { animation-delay: -6.1s; animation-duration: 8s; }
.t4 { animation-delay: -1.4s; animation-duration: 11s; }
@keyframes tickfall {
  0% { top: -8%; opacity: 0; }
  8% { opacity: .8; }
  92% { opacity: .8; }
  100% { top: 104%; opacity: 0; }
}

/* ============ HUD ============ */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 27; /* поверх каюты(26), под #page(28)/меню(30) */
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 44px 56px 0;
}
.hud-item { letter-spacing: .3em; font-size: 13px; font-weight: 600; }

#menu-btn { display: flex; align-items: center; gap: 14px; color: var(--fg); }
.burger { display: flex; flex-direction: column; gap: 4px; width: 22px; }
.burger i { height: 1px; background: var(--fg); transition: transform .4s, opacity .4s; }
.burger i:nth-child(2) { width: 70%; }
#menu-btn:hover .burger i:nth-child(2) { width: 100%; }
body.menu-open .burger i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.menu-open .burger i:nth-child(2) { opacity: 0; }
body.menu-open .burger i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

#lang { position: relative; text-align: right; }
#lang-current { letter-spacing: .3em; font-size: 13px; font-weight: 600; color: var(--fg); }
#lang-current b { font-weight: 400; opacity: .5; font-style: normal; transition: transform .3s; display: inline-block; }
#lang.open #lang-current b { transform: rotate(180deg); }
#lang-list {
  list-style: none; position: absolute; right: 0; top: 130%;
  display: flex; flex-direction: column; gap: 2px;
  pointer-events: none;
}
#lang-list li {
  letter-spacing: .3em; font-size: 13px; font-weight: 600; color: var(--dim);
  padding: 6px 2px; cursor: pointer; text-align: right;
  opacity: 0; transform: translateY(-8px);
  transition: color .25s;
}
#lang.open #lang-list { pointer-events: auto; }
#lang-list li:hover { color: var(--fg); }

.hud-corner {
  position: fixed; bottom: 88px; z-index: 20;
  font-size: 12px; font-weight: 600; letter-spacing: .28em; line-height: 1.7;
  color: var(--dim);
}
.corner-bl { left: 56px; }
.corner-br { right: 56px; }

#services-label, #results-label, #about-label, #contact-label, #star-back, #star-service {
  position: fixed; top: 140px; right: 56px; z-index: 20;
  font-size: 12px; font-weight: 600; letter-spacing: .3em; color: var(--dim);
  transition: color .3s;
  opacity: 0; pointer-events: none;
}
#services-label:hover, #results-label:hover, #about-label:hover, #contact-label:hover, #star-back:hover, #star-service:hover { color: var(--fg); }
/* в каюте кнопка перехода не нужна — мы уже там */
body.in-cabin #contact-label { opacity: 0 !important; pointer-events: none !important; }
/* «назад к услугам» — слева, чтобы не спорить с правыми лейблами переходов */
#star-back { right: auto; left: 56px; }
/* вход на страницу услуги — справа сверху, напротив «назад к услугам» */
#star-service {
  right: 56px; left: auto; top: 140px;
  color: var(--fg); border-bottom: 1px solid var(--faint); padding-bottom: 6px;
}
/* на узких экранах кнопки не помещаются в строку — переносим ниже */
@media (max-width: 720px) { #star-service { top: 176px; right: auto; left: 56px; } }

.hints {
  position: fixed; left: 56px; bottom: 170px; z-index: 20;
  font-size: 12px; font-weight: 500; letter-spacing: .22em; line-height: 2;
  color: var(--dim);
  opacity: 0; pointer-events: none;
}
.hint-line { display: block; width: 28px; height: 1px; background: var(--dim); margin-bottom: 14px; }

.foot-priv { color: inherit; text-decoration: none; pointer-events: auto; transition: color .3s; }
.foot-priv:hover { color: var(--fg); }
.hud-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 27; /* поверх каюты(26) — лого/политика видны на экране монитора */
  padding: 0 56px 26px; text-align: center;
  pointer-events: none;
}
.foot-logo { height: 34px; width: auto; margin-bottom: 8px; }
.foot-copy { font-size: 11px; letter-spacing: .3em; color: var(--dim); }
.foot-copy i { font-style: normal; margin: 0 12px; opacity: .5; }

/* ============ HERO ============ */
#hero {
  position: fixed; inset: 0; z-index: 10;
  pointer-events: none;
}
.hero-right {
  position: absolute; right: 8%; top: 50%; transform: translateY(-58%);
  text-align: right;
}
#title-canvas { display: block; }
.tagline {
  margin-top: 6px;
  font-size: 15px; font-weight: 600; letter-spacing: .34em; color: var(--dim);
}
#explore-btn {
  position: absolute; left: 23%; bottom: 17%;
  pointer-events: auto;
}

.frame-btn {
  position: relative;
  padding: 18px 44px;
  font-size: 13px; font-weight: 600; letter-spacing: .3em; color: var(--fg);
  transition: letter-spacing .35s;
}
.frame-btn::before, .frame-btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 26px;
  border: 1px solid rgba(242, 242, 240, .5);
  transition: width .35s, border-color .35s;
}
.frame-btn::before { left: 0; border-right: none; }
.frame-btn::after { right: 0; border-left: none; }
.frame-btn:hover::before, .frame-btn:hover::after { width: 50%; border-color: var(--fg); }
.frame-btn:hover { letter-spacing: .36em; }

/* ============ MARKER TIP ============ */
/* Якорь 0×0 в точке маркера; линия рисуется от точки вверх-вправо,
   текст проявляется у её конца. Снятие hover — обратная анимация. */
#marker-tip { position: fixed; z-index: 25; pointer-events: none; width: 0; height: 0; }
.tip-line {
  position: absolute; left: 0; top: 0;
  width: 120px; height: 1px;
  background: rgba(242, 242, 240, .8);
  transform-origin: 0 0;
  transform: rotate(-38deg) scaleX(0);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
}
#marker-tip.on .tip-line { transform: rotate(-38deg) scaleX(1); }
.tip-text {
  position: absolute; left: 102px; top: -112px;
  white-space: nowrap;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}
#marker-tip.on .tip-text { opacity: 1; transform: none; transition-delay: .18s; }
.tip-text b { display: block; font-size: 15px; font-weight: 700; letter-spacing: .26em; }
.tip-text span { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .26em; color: var(--dim); }

/* ============ STAR LABELS ============ */
#star-labels { position: fixed; inset: 0; z-index: 15; pointer-events: none; }

/* ── Наведение на ядро звезды: гасим всё, кроме ядра и подсказки ──
   Виньетка (z:14 - НАД канвасом со спутниками, ПОД подписями и тултипом):
   центр прозрачный - ядро в середине экрана остаётся ярким, спутники по
   орбитам затемняются. Подписи кейсов дожимаем до почти нуля отдельно:
   body.core-hot ставит updateRaycast (main.js). */
#core-dim {
  position: fixed; inset: 0; z-index: 14; pointer-events: none;
  /* closest-side: радиус = полвысоты экрана, спутники по орбитам попадают в
     тёмную зону (до farthest-corner темнота начиналась за пределами орбит) */
  background: radial-gradient(circle closest-side at 50% 50%,
    transparent 15%, rgba(3, 3, 6, .5) 34%, rgba(3, 3, 6, .82) 78%);
  opacity: 0; transition: opacity .4s;
}
body.core-hot #core-dim { opacity: 1; }
/* Гасим АДРЕСНО подписи спутников (.sat-label). Общие .star-label/.form-label
   нельзя: скрытые подписи других экранов (opacity 0 инлайном) проявились бы
   «призраками» на 5%. !important - у видимых подписей opacity пишется
   инлайном каждый кадр. */
body.core-hot .sat-label { opacity: .05 !important; }
body.core-hot #star-hints, body.core-hot #star-back, body.core-hot #star-service { opacity: .12 !important; }
.star-label {
  position: absolute; transform: translate(22px, -50%);
  white-space: nowrap; cursor: pointer; pointer-events: auto;
  display: flex; align-items: baseline; gap: 12px;
  opacity: 0;
  transition: opacity .3s;
}
/* Звезда в правой части экрана — лейбл раскрывается влево, чтобы не обрезался.
   --dy — вертикальный сдвиг анти-оверлапа (лейблы раздвигаются, если пересеклись) */
.star-label { transform: translate(22px, calc(-50% + var(--dy, 0px))); }
.star-label.flip { transform: translate(calc(-100% - 22px), calc(-50% + var(--dy, 0px))); flex-direction: row-reverse; }
.star-label.flip .sl-col { text-align: right; align-items: flex-end; }
.star-label em { font-style: normal; font-size: 12px; letter-spacing: .2em; color: var(--dim); }
.star-label b { font-size: 17px; font-weight: 700; letter-spacing: .3em; transition: letter-spacing .3s; }
.star-label:hover b { letter-spacing: .4em; }

/* Топ-кейсы: главная цифра под названием — видна без клика.
   Яркий текст + тёмная подложка-тень, чтобы не сливаться с частицами галактики */
.sl-col { display: flex; flex-direction: column; text-align: left; }
.sl-hook {
  font-style: normal; margin-top: 6px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .22em;
  color: rgba(242, 242, 240, .92);
  transition: color .3s;
}
.star-label b, .sl-hook, .star-label em {
  text-shadow:
    0 0 6px rgba(5, 5, 7, .95),
    0 0 14px rgba(5, 5, 7, .85),
    0 2px 20px rgba(5, 5, 7, .7);
}
.star-label:hover .sl-hook { color: var(--fg); }

/* ============ FORM LABELS (формация About: линия от модели + тема) ============ */
/* Г-образный каллаут: пульсирующий глоу-дот на модели → короткая диагональ →
   горизонтальный хвост → подпись. Компактный (~90px), не вылезает за экран.
   Позиция контейнера — через transform (субпиксели, без дёрганий).
   Направления: ur (вверх-вправо), ul (вверх-влево), dl (вниз-влево). */
.form-label { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.fl-dot {
  position: absolute; left: -3.5px; top: -3.5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, .85), 0 0 18px 6px rgba(160, 200, 255, .45);
  opacity: 0; transition: opacity .3s;
  animation: flPulse 2.6s ease-in-out infinite;
}
.form-label.on .fl-dot { opacity: 1; }
@keyframes flPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}
/* Линия — один SVG-путь (диагональ + горизонталь) со скруглённым изломом,
   без зазора на стыке; старт отодвинут от глоу-точки на ~8px.
   Появление — «прорисовка» через stroke-dashoffset (pathLength=1). */
.fl-svg { position: absolute; overflow: visible; pointer-events: none; }
.fl-svg path {
  fill: none;
  stroke: rgba(242, 242, 240, .8);
  stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset .55s cubic-bezier(.16, 1, .3, 1) .1s;
}
.form-label.on .fl-svg path { stroke-dashoffset: 0; }
.fl-text {
  position: absolute; white-space: nowrap;
  font-size: 13px; font-weight: 700; letter-spacing: .3em;
  color: var(--fg); cursor: pointer; pointer-events: auto;
  text-shadow: 0 0 6px rgba(5, 5, 7, .95), 0 0 14px rgba(5, 5, 7, .85);
  opacity: 0;
  transition: opacity .3s .28s, letter-spacing .3s;
}
.form-label.on .fl-text { opacity: 1; }
.fl-text:hover { letter-spacing: .42em; }
/* .hot — курсор на самой 3D-модели: подпись отзывается так же, как на ховер
   по тексту, чтобы связь «модель ↔ раздел» читалась до клика (main.js) */
.form-label.hot .fl-text { letter-spacing: .42em; }
/* позиции подписи на конце горизонтального хвоста (геометрия пути — в main.js) */
.form-label.ur .fl-text { left: 93px; top: -27px; transform: translateY(-50%); }
.form-label.ul .fl-text { left: -93px; top: -27px; transform: translate(-100%, -50%); }
.form-label.dl .fl-text { left: -93px; top: 27px; transform: translate(-100%, -50%); }

/* ============ MISSION CONTROL (p=5): форма на голо-терминале ============ */
#mission {
  position: fixed; inset: 0; z-index: 12;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
}
#mission-form, #mission-done {
  width: min(460px, 92vw);
  max-height: 86vh; overflow-y: auto;
  padding: 34px 38px;
  background: rgba(6, 12, 22, .78);
  border: 1px solid rgba(130, 190, 255, .3);
  box-shadow: 0 0 34px rgba(90, 160, 255, .12), inset 0 0 60px rgba(90, 160, 255, .05);
  backdrop-filter: blur(5px);
  position: relative;
}
#mission-form::after, #mission-done::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(160, 210, 255, .045) 0 1px, transparent 1px 3px);
}
.mc-kicker { font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: .34em; color: #8fd0ff; }
#mc-title, #mc-sent { margin-top: 12px; font-size: 30px; font-weight: 700; letter-spacing: .12em; text-shadow: 0 0 16px rgba(140, 205, 255, .35); }
.mc-sub { margin-top: 6px; font-size: 11.5px; letter-spacing: .22em; color: var(--dim); }
.mc-field { display: block; margin-top: 18px; }
.mc-field span { display: block; font-size: 10.5px; letter-spacing: .26em; color: #8fd0ff; margin-bottom: 7px; }
.mc-field input, .mc-field select, .mc-field textarea {
  width: 100%; padding: 10px 12px;
  background: rgba(10, 20, 36, .6);
  border: 1px solid rgba(130, 190, 255, .22);
  color: var(--fg);
  font-family: inherit; font-size: 15px; letter-spacing: .06em;
  outline: none; border-radius: 0; resize: vertical;
  transition: border-color .25s, box-shadow .25s;
}
.mc-field input:focus, .mc-field select:focus, .mc-field textarea:focus {
  border-color: rgba(160, 215, 255, .65);
  box-shadow: 0 0 14px rgba(110, 180, 255, .18);
}
.mc-field select { appearance: none; cursor: pointer; }
.mc-field .invalid { border-color: rgba(255, 120, 120, .65); }
#mc-launch { margin-top: 26px; width: 100%; }
/* сообщение об ошибке отправки: тот же красный, что в контактной форме */
.mc-note { margin-top: 14px; font-size: 12.5px; letter-spacing: .04em; color: #ff8a8a; }
#mission-done { text-align: center; padding: 60px 38px; }
.mc-done-icon { font-size: 34px; color: #aadcff; text-shadow: 0 0 22px rgba(140, 205, 255, .8); }

/* ============ FULL PAGE (услуга / кейс): длинная скролл-страница ============ */
#page {
  position: fixed; inset: 0; z-index: 28;
  background: rgba(4, 5, 8, .97);
  opacity: 0; pointer-events: none;
  transition: opacity .5s ease;
}
#page.open { opacity: 1; pointer-events: auto; }
#page-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
#page-close {
  position: fixed; top: 40px; right: 44px; z-index: 2;
  font-size: 18px; color: var(--dim);
  transition: color .3s, transform .3s;
}
#page-close:hover { color: var(--fg); transform: rotate(90deg); }
#page-body {
  max-width: 880px; margin: 0 auto;
  padding: 110px 32px 140px;
  transform: translateY(26px);
  transition: transform .6s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
}
#page.open #page-body { transform: translateY(0); }
/* переход между страницами (кейс → кейс): растворение + сдвиг */
#page.open #page-body.swap { opacity: 0; transform: translateY(20px); }
.pg-back {
  font-size: 11px; letter-spacing: .3em; color: var(--dim);
  cursor: pointer; transition: color .3s;
}
.pg-back:hover { color: var(--fg); }
.pg-tag { margin-top: 34px; font-size: 12px; letter-spacing: .34em; }
.pg-title {
  margin-top: 16px;
  font-size: clamp(38px, 6vw, 64px); font-weight: 800;
  letter-spacing: .04em; line-height: 1.05; text-transform: uppercase;
}
.pg-sub {
  margin-top: 18px; max-width: 640px;
  font-size: 18px; line-height: 1.6; letter-spacing: .03em;
  color: rgba(242, 242, 240, .78);
}
.pg-cover {
  margin-top: 44px; width: 100%; border: 1px solid var(--line);
  display: block;
}
.pg-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px; margin-top: 46px;
}
.pg-stats b { display: block; font-size: 40px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.pg-stats span { display: block; margin-top: 8px; font-size: 11px; letter-spacing: .24em; color: var(--dim); }
.pg-sec { margin-top: 76px; }
.pg-num { font-size: 12px; letter-spacing: .3em; color: var(--dim); }
.pg-h {
  margin-top: 10px; font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.pg-text { margin-top: 18px; font-size: 16.5px; line-height: 1.65; letter-spacing: .03em; color: rgba(242, 242, 240, .82); max-width: 700px; }
.pg-list { margin-top: 22px; }
.pg-list li {
  list-style: none; position: relative;
  padding: 13px 0 13px 30px;
  border-bottom: 1px solid var(--faint);
  font-size: 16px; line-height: 1.55; letter-spacing: .03em;
  color: rgba(242, 242, 240, .85);
}
.pg-list li::before { content: '—'; position: absolute; left: 0; color: var(--dim); }
.pg-list li b { font-weight: 700; color: var(--fg); }
.pg-result {
  margin-top: 26px; padding: 18px 22px;
  border-left: 2px solid var(--pg-accent, #3dff7f);
  font-size: 16px; line-height: 1.6; letter-spacing: .03em;
  color: rgba(242, 242, 240, .9);
  background: rgba(255, 255, 255, .025);
}
.pg-quote {
  margin-top: 46px; padding: 26px 30px;
  border-left: 2px solid var(--pg-accent, #3dff7f);
  font-size: 21px; font-weight: 700; line-height: 1.45; letter-spacing: .04em;
  background: rgba(255, 255, 255, .03);
}
.pg-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 24px; }
.pg-media-grid img { width: 100%; border: 1px solid var(--line); display: block; }
.pg-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.pg-ba figure { margin: 0; }
.pg-ba img { width: 100%; border: 1px solid var(--line); display: block; }
.pg-ba figcaption { margin-top: 10px; font-size: 11px; letter-spacing: .28em; color: var(--dim); text-align: center; }
.pg-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 26px; }
.pg-case-card {
  position: relative; display: block; cursor: pointer;
  border: 1px solid var(--line); overflow: hidden;
  background: rgba(255, 255, 255, .02);
  transition: border-color .3s, transform .3s;
  text-align: left;
}
.pg-case-card:hover { border-color: rgba(242, 242, 240, .45); transform: translateY(-3px); }
.pg-case-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; opacity: .85; }
.pg-case-card .no-img { width: 100%; aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--dim); background: rgba(255,255,255,.03); }
.pg-case-card .cc-body { padding: 16px 18px 18px; }
.pg-case-card .cc-name { font-size: 15px; font-weight: 700; letter-spacing: .18em; }
.pg-case-card .cc-hook { margin-top: 7px; font-size: 12px; letter-spacing: .18em; color: var(--pg-accent, #8fd0ff); }
/* ── страница контактов: инфо слева, форма справа ── */
.pg-contact { display: grid; gap: 46px; margin-top: 54px; }
@media (min-width: 900px) { .pg-contact { grid-template-columns: 1fr 1.4fr; gap: 70px; } }
.ci-row { padding: 20px 0; border-bottom: 1px solid var(--faint); }
.ci-row span { display: block; font-size: 10.5px; letter-spacing: .26em; color: var(--dim); }
.ci-row b { display: block; margin-top: 9px; font-size: 19px; font-weight: 700; letter-spacing: .06em; }
/* логотип заполняет пустоту левой колонки под строками инфо */
.ci-logo {
  display: block; width: 150px; margin-top: 56px; opacity: .45;
  filter: grayscale(1); transition: opacity .4s;
}
.ci-logo:hover { opacity: .8; }
.cf-field { display: block; margin-bottom: 22px; }
.cf-field span { display: block; margin-bottom: 9px; font-size: 10.5px; letter-spacing: .26em; color: var(--dim); }
.cf-field input, .cf-field select, .cf-field textarea {
  width: 100%; padding: 13px 14px;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line); border-radius: 0;
  color: var(--fg); font: inherit; font-size: 16px; letter-spacing: .04em;
  outline: none; transition: border-color .3s;
}
.cf-field select option { background: #0b0e16; color: var(--fg); }
.cf-field textarea { resize: vertical; min-height: 100px; }
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus { border-color: rgba(242, 242, 240, .5); }
.cf-field .is-bad { border-color: rgba(255, 110, 110, .65); }
/* honeypot: невидим для человека, но не display:none — часть ботов такие пропускает */
.cf-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cf-send { cursor: pointer; background: none; margin-top: 8px; }
.cf-send:disabled { opacity: .55; cursor: default; }
.cf-note { margin-top: 16px; font-size: 14px; letter-spacing: .04em; color: #ff8a8a; }
.cf-done { padding: 34px 0 10px; }
.cf-done-icon { font-size: 26px; color: var(--fg); }
.cf-done b { display: block; margin-top: 18px; font-size: 28px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cf-done p { margin-top: 12px; font-size: 15.5px; letter-spacing: .03em; color: rgba(242, 242, 240, .75); }
/* ссылка на реальный проект клиента (из Notion) */
.pg-link {
  display: inline-block; padding: 12px 24px;
  border: 1px solid var(--line); color: var(--fg);
  font-size: 11.5px; font-weight: 600; letter-spacing: .26em;
  transition: border-color .3s, letter-spacing .3s;
}
.pg-link:hover { border-color: var(--fg); letter-spacing: .32em; }
/* тарифы услуги (как «Наші послуги» у readhead): номер, рамка боли, состав, результат */
.pg-tiers { margin-top: 26px; display: grid; gap: 20px; }
.pg-tier {
  border: 1px solid var(--line); padding: 30px 30px 32px;
  background: rgba(255, 255, 255, .015);
  transition: border-color .3s, transform .3s;
}
.pg-tier:hover { border-color: rgba(242, 242, 240, .38); transform: translateY(-2px); }
.pg-tier .t-num { font-size: 11px; letter-spacing: .3em; color: var(--pg-accent, #8fd0ff); }
.pg-tier .t-name { margin-top: 10px; font-size: 24px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pg-tier .t-frame { margin-top: 12px; font-size: 15px; font-style: italic; letter-spacing: .02em; color: rgba(242, 242, 240, .62); }
.pg-tier .t-cap { margin-top: 22px; font-size: 10.5px; letter-spacing: .26em; color: var(--dim); }
.pg-tier ul { margin-top: 10px; }
.pg-tier li {
  list-style: none; position: relative; padding: 9px 0 9px 010px; padding-left: 20px;
  font-size: 15px; line-height: 1.5; color: rgba(242, 242, 240, .85);
}
.pg-tier li::before { content: '·'; position: absolute; left: 4px; color: var(--pg-accent, #8fd0ff); }
.pg-tier .t-out {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--faint);
  font-size: 15px; line-height: 1.5; color: var(--fg);
}
.pg-tier .t-out span { color: var(--dim); letter-spacing: .2em; font-size: 10.5px; display: block; margin-bottom: 7px; }
@media (min-width: 900px) { .pg-tiers { grid-template-columns: repeat(3, 1fr); } }
/* полоса опыта агентства (proof band) */
.pg-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px; margin-top: 44px;
  padding: 30px 0; border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint);
}
.pg-band b { display: block; font-size: 30px; font-weight: 800; letter-spacing: .02em; line-height: 1; color: var(--pg-accent, #fff); }
.pg-band span { display: block; margin-top: 9px; font-size: 11px; letter-spacing: .2em; color: var(--dim); }

/* ============ КУРСОР: точка + догоняющее кольцо ============ */
/* Порт эффекта из шаблона КП (commercial_proposal-template v2.html). Системный
   курсор НЕ прячем: сцена сама переключает pointer/grabbing на моделях и
   маркерах — без него пропала бы половина подсказок о кликабельности. */
.cur-dot, .cur-ring {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; opacity: 0; transition: opacity .3s;
  transform: translate(-50%, -50%);
}
.cur-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--fg); }
.cur-ring {
  width: 26px; height: 26px; border: 1px solid rgba(242, 242, 240, .55); border-radius: 50%;
  transition: width .28s cubic-bezier(.22, .8, .28, 1), height .28s cubic-bezier(.22, .8, .28, 1),
              border-color .3s, opacity .3s;
}
body.cur-on .cur-dot, body.cur-on .cur-ring { opacity: 1; }
body.cur-hot .cur-ring { width: 46px; height: 46px; border-color: var(--fg); }
/* тач и «меньше движения» — эффекта нет вовсе */
@media (hover: none), (pointer: coarse) { .cur-dot, .cur-ring { display: none; } }
@media (prefers-reduced-motion: reduce) { .cur-dot, .cur-ring { display: none; } }

/* ============ АРХИВ СЕРТИФИКАТОВ ============ */
/* Сканы — на белом; в тёмной сцене они «кричат», поэтому в сетке приглушены
   и доводятся до полной яркости только под курсором. */
.cert-hint { margin-top: 30px; font-size: 11px; letter-spacing: .24em; color: var(--dim); }
.cert-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 18px; margin-top: 16px;
}
.cert-card {
  display: flex; flex-direction: column; text-align: left;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  padding: 0; cursor: pointer; color: inherit; font: inherit;
  transition: border-color .3s, transform .3s, background .3s;
}
.cert-card:hover { border-color: rgba(242, 242, 240, .45); transform: translateY(-3px); background: rgba(255, 255, 255, .05); }
.cert-card:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }
.cert-shot { display: block; overflow: hidden; border-bottom: 1px solid var(--line); }
.cert-shot img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center;
  opacity: .78; filter: saturate(.85);
  transition: opacity .35s, filter .35s, transform .6s cubic-bezier(.16, 1, .3, 1);
}
.cert-card:hover .cert-shot img { opacity: 1; filter: none; transform: scale(1.03); }
.cert-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.cert-issuer { font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--fg); }
.cert-issuer i { font-style: normal; font-weight: 400; letter-spacing: .12em; color: var(--dim); }
.cert-name { font-size: 13px; line-height: 1.45; letter-spacing: .06em; color: rgba(242, 242, 240, .8); }
.cert-foot {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 2px;
  font-size: 10px; letter-spacing: .18em; color: var(--dim);
}
.cert-foot i { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ ABOUT US — экипаж и озброєння ============ */
.crew-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 26px; }
.crew-card {
  display: flex; gap: 20px; align-items: flex-start;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  padding: 22px;
  transition: border-color .3s, background .3s;
}
.crew-card:hover { border-color: rgba(242, 242, 240, .3); background: rgba(255, 255, 255, .05); }
.crew-photo {
  flex: 0 0 92px; width: 92px; height: 92px; border-radius: 50%;
  overflow: hidden; border: 1px solid var(--faint);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .03); /* «иллюминатор» */
}
.crew-photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9); }
.crew-noface { display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--dim); background: rgba(255, 255, 255, .03); }
.crew-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.crew-name { font-size: 17px; font-weight: 700; letter-spacing: .12em; }
.crew-role { font-size: 10.5px; letter-spacing: .26em; color: var(--pg-accent, #8fd0ff); }
.crew-desc { font-size: 13.5px; line-height: 1.55; letter-spacing: .04em; color: rgba(242, 242, 240, .75); }

.about-svcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 24px; }
.about-svc {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 16px 18px; background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer;
  transition: border-color .3s, transform .3s;
}
.about-svc:hover { border-color: var(--sc, rgba(242, 242, 240, .45)); transform: translateY(-2px); }
.about-svc em { font-style: normal; font-size: 10px; letter-spacing: .2em; color: var(--dim); }
.about-svc b { font-size: 13px; font-weight: 700; letter-spacing: .18em; flex: 1; }
.about-svc span { color: var(--dim); transition: transform .3s, color .3s; }
.about-svc:hover span { transform: translateX(4px); color: var(--sc, var(--fg)); }
.about-links { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 24px; }

/* ============ REVIEWS — передачи ============ */
.rev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 34px; }
.rev-card {
  display: flex; flex-direction: column; gap: 14px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  padding: 22px;
}
.rev-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rev-ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--faint); }
.rev-from { font-size: 10.5px; letter-spacing: .22em; color: var(--dim); }
.rev-result { margin-left: auto; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--pg-accent, #8fd0ff); }
.rev-quote { font-size: 15px; line-height: 1.6; letter-spacing: .03em; color: rgba(242, 242, 240, .85); }
.rev-quote::before { content: '« '; color: var(--dim); }
.rev-quote::after { content: ' »'; color: var(--dim); }
.rev-case { align-self: flex-start; }
/* пустое состояние: канал открыт, ждём передачи */
.rev-empty {
  margin-top: 44px; padding: 44px 34px;
  border: 1px dashed rgba(242, 242, 240, .22);
  position: relative;
}
.rev-empty-h { font-size: 13px; font-weight: 700; letter-spacing: .3em; color: var(--fg); }
.rev-empty .pg-text { margin-top: 14px; }
.rev-blink {
  position: absolute; top: 46px; right: 34px;
  width: 8px; height: 8px; border-radius: 50%; background: #7fdc93;
  box-shadow: 0 0 10px 2px rgba(127, 220, 147, .5);
  animation: revBlink 1.6s ease-in-out infinite;
}
@keyframes revBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* лайтбокс */
#cert-box {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 5vh 5vw;
  background: rgba(3, 3, 6, .93); backdrop-filter: blur(7px);
  opacity: 0; pointer-events: none; transition: opacity .32s;
}
#cert-box.open { opacity: 1; pointer-events: auto; }
#cert-box figure { margin: 0; max-width: 1100px; max-height: 100%; display: flex; flex-direction: column; }
#cert-box img {
  display: block; width: 100%; max-height: calc(90vh - 66px); object-fit: contain;
  border: 1px solid var(--line); background: #fff;
  transform: scale(.97); transition: transform .38s cubic-bezier(.16, 1, .3, 1);
}
#cert-box.open img { transform: scale(1); }
#cert-box figcaption {
  margin-top: 14px; font-size: 11.5px; letter-spacing: .16em; color: var(--dim);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline;
}
#cert-box figcaption b { color: var(--fg); letter-spacing: .2em; }
.cb-verify { color: var(--fg); border-bottom: 1px solid var(--faint); letter-spacing: .2em; }
.cb-verify:hover { border-color: var(--fg); }
.cb-close {
  position: fixed; top: 34px; right: 40px; z-index: 2;
  font-size: 16px; color: var(--dim); transition: color .3s, transform .3s;
}
.cb-close:hover { color: var(--fg); transform: rotate(90deg); }
/* FAQ */
.pg-faq { margin-top: 24px; }
.pg-faq details {
  border-bottom: 1px solid var(--faint); padding: 18px 0;
}
.pg-faq summary {
  list-style: none; cursor: pointer;
  font-size: 17px; font-weight: 600; letter-spacing: .03em;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.pg-faq summary::-webkit-details-marker { display: none; }
.pg-faq summary::after { content: '+'; color: var(--dim); font-size: 22px; transition: transform .3s; }
.pg-faq details[open] summary::after { transform: rotate(45deg); }
.pg-faq p { margin-top: 14px; font-size: 15.5px; line-height: 1.6; letter-spacing: .02em; color: rgba(242, 242, 240, .78); max-width: 660px; }
.pg-cta-wrap { margin-top: 90px; text-align: center; }
.pg-cta-lead { font-size: 17px; letter-spacing: .06em; color: rgba(242, 242, 240, .8); }
.pg-cta {
  margin-top: 26px; display: inline-block;
  padding: 18px 44px;
  border: 1px solid rgba(242, 242, 240, .5);
  font-size: 13px; font-weight: 700; letter-spacing: .34em;
  cursor: pointer; transition: background .3s, color .3s, letter-spacing .3s;
}
.pg-cta:hover { background: var(--fg); color: #0a0a0c; letter-spacing: .4em; }
@media (max-width: 640px) {
  .pg-ba { grid-template-columns: 1fr; }
  #page-close { top: 22px; right: 22px; }
  #page-body { padding-top: 84px; }
}

/* ── вход в каюту: простое затемнение ── */
#cabin-shutter {
  position: fixed; inset: 0; z-index: 29; /* поверх сцены/HUD на миг перехода */
  background: #000; opacity: 0; pointer-events: none;
  transition: opacity .45s ease;
}
#cabin-shutter.on { opacity: 1; }

/* ============ КАЮТА (пролёт + живой экран монитора) ============ */
#cabin {
  position: fixed; inset: 0; z-index: 26; /* выше меток(15), ниже #page(28) — форма поверх */
  background: #000; opacity: 0; visibility: hidden;
  transition: opacity .25s ease; /* быстрый вход, драму даёт варп-флэш */
}
#cabin.on { opacity: 1; visibility: visible; }
/* варп-джамп: яркая сине-белая вспышка прячет склейку 3D→видео */
#cabin-flash {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 45%, #f2f8ff, #bcd8ff 42%, #6ba6ff 100%);
}
#cabin.warp #cabin-flash { animation: cabinFlash .55s ease-out; }
@keyframes cabinFlash { 0% { opacity: 0; } 10% { opacity: .95; } 100% { opacity: 0; } }
#cabin-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
/* живой idle-луп поверх последнего кадра пролёта: первый кадр лупа = кадр 240,
   поэтому кроссфейд по opacity бесшовный */
#cabin-idle {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
  opacity: 0; transition: opacity .6s ease;
}
#cabin-idle.show { opacity: 1; }
/* живой слой на экране монитора — JS варпит его matrix3d'ом в 4 угла экрана
   (positionCabinScreen). overflow:hidden обрезает контент строго по контуру. */
#cabin-screen {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  overflow: hidden;
  transform-origin: 0 0; backface-visibility: hidden;
}
#cabin-screen.live { opacity: 1; pointer-events: auto; }
/* лёгкий экранный отлив поверх запечённого монитора, чтобы «наш» экран сел плотно */
#cabin-screen::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(10,16,28,.62), rgba(4,7,14,.82));
}
/* контент в БАЗОВОМ пространстве слоя 1000x560 (px), потом варпится matrix3d'ом.
   Размеры крупные — экран это герой финального кадра. */
.cs-inner {
  position: relative; z-index: 2; text-align: center;
  width: 100%; padding: 26px 50px;
}
.cs-logo { width: 220px; filter: drop-shadow(0 0 14px rgba(140,190,255,.4)); }
.cs-clock { margin-top: 6px; font-weight: 800; letter-spacing: .02em; line-height: 1;
  color: #f4f6fa; display: flex; align-items: baseline; justify-content: center; gap: .18em; }
.cs-clock span { font-size: 122px; }
.cs-clock em { font-size: .40em; font-style: normal; color: #aecdff; letter-spacing: .1em; }
.cs-slogan { margin-top: 16px; font-size: 30px; letter-spacing: .3em;
  color: #aecdff; text-transform: uppercase; }
.cs-cta {
  margin-top: 34px; padding: 16px 36px; cursor: pointer;
  background: rgba(140,190,255,.1); border: 1.5px solid rgba(174,205,255,.6);
  color: #eaf2ff; font: inherit; font-size: 26px;
  font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  transition: background .3s, letter-spacing .3s;
}
.cs-cta:hover { background: rgba(140,190,255,.2); letter-spacing: .28em; }
/* boot: скан-линия проезжает + контент проявляется снизу */
.cs-scan {
  position: absolute; left: 0; right: 0; top: -20%; height: 20%; z-index: 3;
  background: linear-gradient(180deg, transparent, rgba(160,200,255,.25), transparent);
  opacity: 0;
}
#cabin-screen.booting .cs-scan { animation: csScan .7s ease-out forwards; }
#cabin-screen.booting .cs-inner,
#cabin-screen.live .cs-inner { animation: csRise .6s ease-out .25s both; }
@keyframes csScan { 0% { top: -20%; opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes csRise { 0% { opacity: 0; transform: translateY(10%) scale(.98); } 100% { opacity: 1; transform: none; } }
/* в каюте боковые тех-элементы (линии с тиками, углы) — поверх видео,
   как на всех остальных экранах; под HUD-текстом (тот тоже 27, но позже в DOM) */
body.in-cabin .grid-lines { z-index: 27; }
body.in-cabin .hud-corner { z-index: 27; }
/* подсказка — в той же позиции, что .hints на других экранах */
#cabin-hint {
  position: absolute; left: 56px; bottom: 170px; z-index: 4;
  font-size: 11px; letter-spacing: .26em; color: var(--dim);
  display: flex; flex-direction: column; gap: 14px; opacity: 0; transition: opacity .5s;
}
#cabin.on #cabin-hint { opacity: 1; }
#cabin-hint.hide { opacity: 0 !important; }
@media (max-width: 720px) { #cabin-hint { left: 24px; bottom: 32px; } }

/* ============ SWIPE (быстрый переход из меню, без пролёта камеры) ============ */
/* На CSS-переходах, а НЕ на gsap: в фоновой вкладке gsap усыпляет тикер и
   переход застревал бы вместе с навигацией. */
#swipe {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  transform: translateX(-100%);
  background: linear-gradient(100deg, #05050a 0%, #0b0e16 55%, #05050a 100%);
  border-right: 1px solid rgba(242, 242, 240, .16);
}
#swipe.cover { transform: translateX(0); transition: transform .24s cubic-bezier(.5, 0, .9, .3); }
#swipe.gone { transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .4, 1); }

/* ============ PANEL ============ */
#panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40;
  width: min(430px, 92vw);
  background: rgba(7, 7, 10, .92);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(6px);
  transform: translateX(102%);
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
  display: flex; align-items: center;
}
#panel.open { transform: translateX(0); }
/* длинные кейсы (метрики + мета + цитата + кнопка) не влезают в экран —
   панель скроллится, контент центрируется только когда помещается */
/* Скроллит ВНУТРЕННИЙ слой, а не сама панель: #panel-close - её прямой ребёнок,
   и при прокрутке самой панели он уезжал вместе с контентом (в альбомной
   ориентации телефона панель не закрывалась, пока не проскроллишь обратно).
   Теперь крестик неподвижен, прокручивается только .panel-inner. */
#panel { display: block; overflow: hidden; }
.panel-inner { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.panel-inner {
  position: relative; z-index: 1;
  min-height: 100%; display: flex; flex-direction: column;
}
/* Вертикальное центрирование БЕЗ justify-content:center: у флекса центрирование
   переполненного контента выталкивает края за пределы скролла - с добавлением
   цитаты клиента CTA «уезжал» за низ. Авто-поля на псевдоэлементах центрируют
   короткий контент и схлопываются в 0 у длинного - всё доступно скроллу. */
.panel-inner::before, .panel-inner::after { content: ''; margin: auto 0; }
/* fixed + z-index: панель теперь скроллится, а .panel-inner лежит слоем выше —
   без этого крестик уезжал с контентом и перекрывался, переставая нажиматься */
#panel-close {
  position: fixed; top: 44px; right: 44px; z-index: 3;
  font-size: 16px; color: var(--dim); transition: color .3s, transform .3s;
}
#panel-close:hover { color: var(--fg); transform: rotate(90deg); }
.panel-inner { padding: 60px 52px; width: 100%; }
/* Баннер кейса — подложка в ВИДИМОЙ области панели (fixed внутри #panel:
   у панели есть transform, поэтому она сама становится системой координат).
   Фон на самом #panel растягивался на всю высоту прокрутки и вылезал за края. */
#panel::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;   /* по ширине панели, шапкой сверху */
  opacity: 0; transition: opacity .35s;
}
#panel.has-cover::before {
  opacity: 1;
  background-image:
    linear-gradient(180deg, rgba(7,7,10,.66) 0%, rgba(7,7,10,.9) 40%, rgba(7,7,10,1) 62%),
    var(--panel-cover);
}
.panel-kicker { font-size: 11px; letter-spacing: .3em; color: var(--dim); margin-bottom: 18px; }
#panel-title { font-size: 34px; font-weight: 700; letter-spacing: .12em; line-height: 1.1; }
.panel-sub { font-size: 13px; letter-spacing: .26em; color: var(--dim); margin-top: 8px; }
#panel-desc {
  margin-top: 26px; font-size: 17px; font-weight: 400; line-height: 1.6;
  letter-spacing: .04em; color: rgba(242, 242, 240, .8);
}
/* Терминальный режим (панели формации About): бортовой компьютер — холодная
   подсветка, моноширинный киккер, сканлайны поверх */
#panel.terminal {
  background: rgba(4, 9, 17, .93);
  border-left: 1px solid rgba(130, 190, 255, .28);
}
#panel.terminal::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(160, 210, 255, .05) 0 1px, transparent 1px 3px);
}
#panel.terminal .panel-kicker {
  font-family: 'Courier New', monospace;
  color: #8fd0ff; letter-spacing: .34em;
}
#panel.terminal #panel-title { text-shadow: 0 0 16px rgba(140, 205, 255, .35); }
#panel.terminal #panel-meta b { color: #aadcff; }

/* Крупные метрики топ-кейса (галактика = глубина, не повторяем панели Земли) */
#panel-stats {
  display: none; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 30px;
}
#panel-stats .stat b { display: block; font-size: 27px; font-weight: 800; letter-spacing: .03em; line-height: 1; }
#panel-stats .stat span { display: block; margin-top: 7px; font-size: 10px; letter-spacing: .22em; color: var(--dim); }

/* Плейсхолдер отзыва/логотипа клиента */
#panel-quote {
  display: none; margin-top: 26px; padding: 14px 18px;
  border-left: 1px solid var(--faint);
  font-size: 10px; letter-spacing: .26em; color: var(--faint);
}
/* реальный отзыв (setPanelQuote): читаемый текст вместо стиля заглушки */
#panel-quote.has-quote {
  font-size: 13.5px; line-height: 1.55; letter-spacing: .03em;
  color: rgba(242, 242, 240, .78);
  border-left-color: rgba(242, 242, 240, .3);
}
#panel-quote.has-quote i { font-style: normal; display: block; }
#panel-quote.has-quote b {
  display: block; margin-top: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: .22em; color: var(--dim);
}

.panel-meta { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.panel-meta div { font-size: 12px; letter-spacing: .24em; color: var(--dim); }
.panel-meta div b { color: var(--fg); font-weight: 600; margin-left: 8px; }
.panel-cta { margin-top: 40px; }

/* ── ВЕРТИКАЛЬНЫЙ РИТМ ПАНЕЛИ ──
   Ступенчатое сжатие по media-height давало «кашу»: на просторных экранах
   оставалось 340px пустоты, а блоки всё равно шли одинаковыми зазорами и
   читались одной стеной. Здесь зазоры ТЕКУЧИЕ (clamp от vh): растут на
   высоких экранах, ужимаются на низких - панель влезает целиком без ступеней.
   Группировка: [кикер+тайтл+саб] → [описание] → [цифры: stats+meta] → [цитата] → [CTA].
   ВНУТРИ группы зазор меньше, МЕЖДУ группами - больше; это и даёт читаемость. */
.panel-inner { padding: clamp(28px, 5.2vh, 60px) 52px; }

/* описание отделено от шапки и подчёркнуто хэйрлайном - явная граница
   «рассказ / цифры», без неё stats читались продолжением текста */
#panel-desc { margin-top: clamp(14px, 2.6vh, 26px); }
#panel.has-data #panel-desc {
  padding-bottom: clamp(16px, 3vh, 30px);
  border-bottom: 1px solid var(--line);
}
/* stats и meta - ОДНА группа цифр: между ними зазор заметно меньше */
#panel-stats { margin-top: clamp(16px, 3.2vh, 32px); }
.panel-meta { margin-top: clamp(10px, 1.8vh, 20px); }
/* цитата и CTA - самостоятельные блоки, им нужен воздух */
#panel-quote { margin-top: clamp(16px, 3.2vh, 34px); }
.panel-cta { margin-top: clamp(18px, 3.6vh, 40px); }

/* Цитата - тизер (полная версия на странице отзывов): клампим по строкам,
   иначе длинный отзыв съедал бюджет высоты и выдавливал кнопку */
#panel-quote.has-quote i {
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 4; overflow: hidden;
}
/* Кегли ужимаем только когда экран действительно низкий - не ради «влезания»,
   а чтобы на 13" ноутбуке не пришлось резать сами блоки */
@media (max-height: 820px) {
  #panel-title { font-size: 29px; }
  #panel-desc { font-size: 15.5px; line-height: 1.55; }
  #panel-stats .stat b { font-size: 24px; }
  #panel-quote.has-quote { font-size: 12.5px; }
  #panel-quote.has-quote i { -webkit-line-clamp: 3; }
}
@media (max-height: 680px) {
  .panel-inner { padding-left: 40px; padding-right: 40px; }
  #panel-title { font-size: 25px; }
  #panel-desc { font-size: 14px; line-height: 1.5; }
  #panel-stats .stat b { font-size: 21px; }
  .panel-meta div { font-size: 11px; }
}
.panel-soon { margin-top: 14px; font-size: 10px; letter-spacing: .3em; color: var(--faint); }

/* ============ MENU OVERLAY ============ */
#menu-overlay {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(4, 4, 6, .82);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .5s;
  display: flex; align-items: center;
}
body.menu-open #menu-overlay { opacity: 1; pointer-events: auto; }
#menu-overlay nav {
  margin-left: 62%;
  display: flex; flex-direction: column; gap: 34px;
}
.menu-link {
  text-align: left;
  font-size: 30px; font-weight: 700; letter-spacing: .26em; color: var(--dim);
  transition: color .3s, letter-spacing .3s;
  opacity: 0; transform: translateY(18px);
}
.menu-link:hover { color: var(--fg); letter-spacing: .32em; }
.menu-link.is-soon { cursor: default; color: var(--faint); }
.menu-link.is-soon:hover { letter-spacing: .26em; }
.menu-link em { font-style: normal; font-size: 11px; letter-spacing: .3em; vertical-align: super; margin-left: 10px; }

/* ============ PRELOADER ============ */
#preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px;
}
.pl-logo-wrap { position: relative; width: 170px; height: 170px; }
.pl-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
}
.pl-img.ga { animation: glitch-a 2.4s steps(1) infinite; }
.pl-img.gb { animation: glitch-b 2.9s steps(1) infinite; opacity: .7; }
.pl-logo-wrap.no-img .pl-img { display: none; }
.pl-logo-wrap.no-img .pl-logo { display: flex; }

.pl-logo {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  font-size: 120px; font-weight: 800; line-height: 1;
}
.pl-logo[hidden] { display: none; }
.pl-logo-wrap.no-img .pl-logo[hidden] { display: flex; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.glitch::before {
  color: rgba(242, 242, 240, .8);
  animation: glitch-a 2.4s steps(1) infinite;
}
.glitch::after {
  color: rgba(160, 170, 200, .6);
  animation: glitch-b 2.9s steps(1) infinite;
}
@keyframes glitch-a {
  0%, 91% { clip-path: inset(0 0 100% 0); transform: none; }
  92% { clip-path: inset(12% 0 55% 0); transform: translate(-6px, 0); }
  94% { clip-path: inset(60% 0 8% 0); transform: translate(5px, 0); }
  96% { clip-path: inset(30% 0 40% 0); transform: translate(-3px, 0); }
  98%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
}
@keyframes glitch-b {
  0%, 88% { clip-path: inset(0 0 100% 0); transform: none; }
  89% { clip-path: inset(45% 0 20% 0); transform: translate(7px, -2px); }
  92% { clip-path: inset(8% 0 70% 0); transform: translate(-5px, 1px); }
  95% { clip-path: inset(70% 0 5% 0); transform: translate(4px, 0); }
  97%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
}
.pl-count { font-size: 13px; letter-spacing: .4em; color: var(--dim); }
.pl-bar { width: 180px; height: 1px; background: var(--line); }
.pl-bar i { display: block; width: 0%; height: 100%; background: var(--fg); }

/* pointer-events снимаем СРАЗУ: visibility едет через transition, и всё это
   время невидимый прелоадер продолжал перехватывать клики по сцене */
#preloader.done {
  transition: opacity .7s, visibility .7s;
  opacity: 0; visibility: hidden; pointer-events: none;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hud-top { padding: 26px 24px 0; }
  .corner-bl, .hints { left: 24px; }
  .corner-br, #services-label { right: 24px; }
  .hero-right { right: 6%; }
  #explore-btn { left: 50%; transform: translateX(-50%); bottom: 14%; }
  #menu-overlay nav { margin-left: 14%; }
  .hud-corner { display: none; }
}

/* ============ ТЕЛЕФОН ============================================
   Экран узкий и высокий: подписи не должны налезать друг на друга,
   боковые панели становятся полноэкранными, тап-цели ≥ 44px. */
@media (max-width: 720px) {
  /* — HUD и декор — */
  .grid-lines { display: none; }          /* вертикальные линии съедают ширину */
  .hud-top { padding: 16px 16px 0; }
  .menu-word { font-size: 12px; letter-spacing: .22em; }
  #lang-current { font-size: 12px; }
  #lang-list li { padding: 7px 0; font-size: 12px; }
  .hud-footer { padding: 0 16px 14px; }
  .foot-logo { width: 20px; }
  .foot-copy { font-size: 9px; letter-spacing: .1em; line-height: 1.5; }

  /* подсказки внизу слева — компактнее и выше подвала */
  .hints { left: 16px; bottom: 120px; font-size: 9.5px; letter-spacing: .16em; }
  .hint-line { width: 34px; }

  /* кнопки-переходы: не сталкиваются между собой */
  #services-label, #results-label, #about-label, #contact-label { right: 16px; font-size: 10px; letter-spacing: .2em; }
  /* top: auto ОБЯЗАТЕЛЕН: базовое правило задаёт top:140px, и вместе с bottom
     элемент растягивался на 598px - подпись уезжала в центр экрана, а её
     невидимая тап-зона накрывала 19% площади и перехватывала жесты по планете */
  #services-label { top: auto; bottom: 74px; }
  #results-label, #about-label, #contact-label { top: 118px; }
  #star-back { left: 16px; top: 118px; font-size: 10px; }
  #star-service { left: 16px; top: 150px; right: auto; font-size: 10px; }

  /* — HERO — */
  .hero-right { right: auto; left: 50%; width: 90vw; text-align: center;
    transform: translate(-50%, -62%); }
  #title-canvas { margin: 0 auto; }
  .tagline { margin-top: 10px; font-size: 10.5px; letter-spacing: .18em; }
  #explore-btn { bottom: 15%; font-size: 11px; padding: 14px 22px; }

  /* — БОКОВАЯ ПАНЕЛЬ: на всю ширину — */
  #panel { width: 100%; border-left: none; }
  .panel-inner { padding: 66px 20px 34px; }
  #panel-close { top: 16px; right: 16px; font-size: 20px; padding: 8px; }
  #panel-title { font-size: 32px; }
  #panel-desc { font-size: 15px; }
  #panel-stats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  #panel-stats .stat b { font-size: 26px; }
  .panel-cta { width: 100%; font-size: 11px; }

  /* — ПОЛНОЭКРАННЫЕ СТРАНИЦЫ — */
  /* фон полностью непрозрачный: сквозь него не просвечивают HUD и 3D-сцена */
  #page { background: #050507; }
  #page-body { padding: 74px 18px 90px; }
  #page-close { top: 14px; right: 14px; font-size: 22px; padding: 8px; }
  .pg-title { font-size: clamp(28px, 9vw, 40px); }
  .pg-sub { font-size: 15.5px; }
  .pg-tag { margin-top: 24px; font-size: 10.5px; letter-spacing: .26em; }
  .pg-sec { margin-top: 46px; }
  .pg-h { font-size: 20px; }
  .pg-text, .pg-list li { font-size: 15px; }
  .pg-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; }
  .pg-stats b { font-size: 28px; }
  .pg-cover { margin-top: 28px; }
  /* галереи и карточки — в одну колонку, иначе картинки становятся марками */
  .pg-media-grid, .pg-cases { grid-template-columns: 1fr; }
  .pg-ba { grid-template-columns: 1fr; }
  .pg-band { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .pg-band b { font-size: 24px; }
  /* About/Reviews: одна колонка, компактный экипаж */
  .crew-grid, .rev-grid, .about-svcs { grid-template-columns: 1fr; gap: 14px; }
  .crew-card { gap: 16px; padding: 18px; }
  .crew-photo { flex-basis: 72px; width: 72px; height: 72px; }
  .rev-empty { padding: 30px 20px; }
  .rev-blink { top: 32px; right: 20px; }
  /* сертификаты: одна колонка, скан целиком (обрезка 4:3 съедала бы подписи) */
  .cert-grid { grid-template-columns: 1fr; gap: 14px; }
  .cert-shot img { aspect-ratio: auto; opacity: .92; filter: none; }
  .cert-foot { flex-direction: column; gap: 5px; }
  #cert-box { padding: 64px 14px 20px; }
  #cert-box img { max-height: calc(100vh - 190px); }
  .cb-close { top: 20px; right: 20px; }
  .pg-tier { padding: 22px 18px; }
  .pg-tier .t-name { font-size: 20px; }
  .pg-faq summary { font-size: 15px; }
  .pg-cta-wrap { margin-top: 56px; }
  .pg-cta { width: 100%; text-align: center; }
  .pg-link { width: 100%; text-align: center; }
  /* форма контактов: поля во всю ширину, крупный тап-таргет */
  .pg-contact { gap: 30px; margin-top: 34px; }
  .ci-row b { font-size: 17px; }
  .ci-logo { width: 110px; margin-top: 30px; }
  .cf-field input, .cf-field select, .cf-field textarea { font-size: 16px; padding: 14px; }
  .cf-send { width: 100%; }

  /* — МЕНЮ — */
  /* Тап-таргеты меню: сама строка ~26px - меньше рекомендованных 44px, и тап
     между пунктами уходил в пустоту. Переносим зазор внутрь ссылки padding'ом:
     визуальный ритм тот же, а нажимаемая зона вырастает до ~48px. */
  #menu-overlay nav { margin-left: 10%; gap: 0; }
  .menu-link { font-size: 21px; letter-spacing: .18em; padding: 11px 0; }

  /* — ПОДПИСИ ЗВЁЗД (созвездие и галактика) — */
  .star-label { transform: translate(14px, calc(-50% + var(--dy, 0px))); }
  .star-label.flip { transform: translate(calc(-100% - 14px), calc(-50% + var(--dy, 0px))); }
  .star-label b { font-size: 13px; letter-spacing: .18em; }
  .star-label em { font-size: 9.5px; letter-spacing: .12em; }
  .star-label { gap: 7px; }
  .sl-hook { font-size: 10px; letter-spacing: .14em; margin-top: 4px; }
  /* подписи формации About и кейсов внутри звезды */
  .fl-text { font-size: 10px; letter-spacing: .16em; }

  /* — КАЮТА: экран монитора превращается в карточку по центру — */
  /* corner-pin в портрете не годится: 16:9-кадр обрезается по бокам,
     монитор уезжает за границы. Ставим читаемую панель поверх видео. */
  #cabin-screen.card {
    transform: none !important;
    left: 50% !important; top: 50% !important;
    width: min(86vw, 380px) !important; height: auto !important;
    translate: -50% -50%;
    border: 1px solid rgba(174, 205, 255, .5);
    box-shadow: 0 0 60px rgba(0, 0, 0, .7);
  }
  #cabin-screen.card::before { background: linear-gradient(150deg, rgba(8, 13, 24, .93), rgba(3, 6, 12, .96)); }
  #cabin-screen.card .cs-inner { padding: 26px 20px 28px; }
  #cabin-screen.card .cs-logo { width: 76px; }
  #cabin-screen.card .cs-clock span { font-size: 44px; }
  #cabin-screen.card .cs-slogan { font-size: 10px; letter-spacing: .2em; margin-top: 10px; }
  #cabin-screen.card .cs-cta { margin-top: 22px; font-size: 12px; padding: 14px 22px; width: 100%; }
  #cabin-hint { left: 16px; bottom: 118px; font-size: 9.5px; }
}

/* очень узкие экраны (iPhone SE и подобные) */
@media (max-width: 380px) {
  .pg-title { font-size: 26px; }
  #panel-title { font-size: 27px; }
  .menu-link { font-size: 18px; }
  #cabin-screen.card .cs-clock span { font-size: 38px; }
}

/* Текст только для скринридеров и краулеров: убран из потока, но не display:none
   (тогда его игнорировали бы вспомогательные технологии). Используется для h1
   главной - визуальный заголовок там рисуется на canvas. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
