/* ============================================================
   contact.css — окно «Контакты» (слайд 19)
   Капча-ворота → блок мессенджеров.
   ВАЖНО: размеры в px/clamp, НЕ в rem. Корневой font-size деки
   масштабируется со сценой 1920x1080 и на телефоне падает до 6px,
   поэтому окно живёт в собственной, независимой метрике.
   Палитра наследует токены деки (--orange, --teal-light).
   ============================================================ */

/* кнопка-триггер на слайде 19 (бывшая ссылка) — сброс под <button> */
button.cta-btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
}

/* ---------- оверлей ---------- */
.sgc-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 40px);
  font-family: var(--font, 'Manrope', system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}
.sgc-overlay[hidden] { display: none; }

.sgc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 15, .72);
  backdrop-filter: blur(7px) saturate(120%);
  -webkit-backdrop-filter: blur(7px) saturate(120%);
  opacity: 0;
  transition: opacity .32s var(--ease, cubic-bezier(.2, .7, .3, 1));
}
.sgc-overlay.is-open .sgc-backdrop { opacity: 1; }

/* ---------- диалог ---------- */
.sgc-dialog {
  position: relative;
  width: min(540px, 100%);
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 90% at 8% -8%, rgba(226, 96, 40, .18), transparent 46%),
    radial-gradient(120% 120% at 108% 4%, rgba(49, 194, 167, .14), transparent 50%),
    #1b1f25;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  box-shadow:
    0 40px 90px -28px rgba(0, 0, 0, .72),
    0 2px 0 0 rgba(255, 255, 255, .05) inset;
  opacity: 0;
  transform: translateY(22px) scale(.975);
  transition:
    opacity .34s var(--ease, cubic-bezier(.2, .7, .3, 1)),
    transform .42s var(--ease, cubic-bezier(.2, .7, .3, 1));
  overflow: hidden;
}
.sgc-overlay.is-open .sgc-dialog { opacity: 1; transform: none; }

/* тонкая верхняя акцентная полоса */
.sgc-dialog::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange, #e26028), var(--teal-light, #31c2a7));
  opacity: .9;
  z-index: 4;
}

/* ---------- кнопка закрытия ---------- */
.sgc-x {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 5;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #cfd6dd;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.sgc-x svg { width: 18px; height: 18px; }
.sgc-x:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-color: rgba(255, 255, 255, .22);
}
.sgc-x:active { transform: scale(.92); }

/* ---------- прокручиваемая область ---------- */
.sgc-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 30px clamp(20px, 5vw, 38px) clamp(24px, 5vw, 34px);
}
.sgc-scroll::-webkit-scrollbar { width: 9px; }
.sgc-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .16);
  border-radius: 9px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* ---------- виды (ворота / контакты) ---------- */
.sgc-view { animation: sgc-view-in .34s var(--ease, cubic-bezier(.2, .7, .3, 1)) both; }
.sgc-view[hidden] { display: none; }
@keyframes sgc-view-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- заголовки ---------- */
.sgc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--orange, #e26028);
}
.sgc-sq { width: 9px; height: 9px; border-radius: 3px; background: currentColor; }
.sgc-title {
  margin: 0 0 16px;
  font-size: clamp(21px, 4.6vw, 27px);
  line-height: 1.16;
  letter-spacing: -.02em;
  font-weight: 800;
  text-wrap: balance;
}
.sgc-motiv {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: #b8c0ca;
}

/* ---------- ворота: капча ---------- */
.sgc-captcha-host {
  display: flex;
  justify-content: center;
  min-height: 100px;
  margin-top: 4px;
}
.sgc-gate-hint {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: #8f98a3;
  text-align: center;
}
.sgc-gate-hint[hidden] { display: none; }
.sgc-linkbtn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--teal-light, #31c2a7);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.sgc-linkbtn:hover { color: #fff; }

/* ---------- ряд мессенджеров ---------- */
.sgc-msgrow {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.sgc-msg {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .045);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
  transition: transform .18s, border-color .2s, background .2s, box-shadow .2s;
}
.sgc-msg:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .08); }
.sgc-msg:active { transform: translateY(0); }
.sgc-msg-ic {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 10px;
  color: #fff;
}
.sgc-msg-ic svg { width: 19px; height: 19px; }
.sgc-msg-tx { min-width: 0; }

/* фирменные оттенки иконок + подсветка рамки на hover */
.sgc-msg--tg    .sgc-msg-ic { background: linear-gradient(135deg, #37bbfe, #007dbb); }
.sgc-msg--max   .sgc-msg-ic { background: linear-gradient(135deg, #7d5cff, #4a6bff); }
.sgc-msg--wa    .sgc-msg-ic { background: linear-gradient(135deg, #5ffc7b, #1fa855); }
.sgc-msg--phone .sgc-msg-ic { background: linear-gradient(135deg, #f0894a, #d24e1f); }

.sgc-msg--tg:hover    { border-color: rgba(55, 187, 254, .6); box-shadow: 0 10px 26px -14px rgba(55, 187, 254, .8); }
.sgc-msg--max:hover   { border-color: rgba(125, 92, 255, .6); box-shadow: 0 10px 26px -14px rgba(125, 92, 255, .8); }
.sgc-msg--wa:hover    { border-color: rgba(31, 168, 85, .6);  box-shadow: 0 10px 26px -14px rgba(31, 168, 85, .8); }
.sgc-msg--phone:hover { border-color: rgba(226, 96, 40, .6);  box-shadow: 0 10px 26px -14px rgba(226, 96, 40, .8); }
.sgc-msg--phone.is-revealed .sgc-msg-tx { font-family: var(--mono, monospace); letter-spacing: .02em; }

/* фокус-кольца для доступности */
.sgc-overlay :focus-visible {
  outline: 2px solid var(--teal-light, #31c2a7);
  outline-offset: 2px;
}

/* ---------- адаптив ---------- */
@media (max-width: 460px) {
  .sgc-msgrow { grid-template-columns: 1fr; }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sgc-backdrop,
  .sgc-dialog,
  .sgc-view,
  .sgc-msg { transition: none; animation: none; }
  .sgc-dialog { transform: none; }
}
