/* ГолосБетон — приглашение на экскурсию (карточка-билет + окно с роликом), 2026-10-31 */
.gbx, .gbx * , .gbx-modal, .gbx-modal * { box-sizing: border-box; }

/* ---------- Карточка-билет в левом нижнем углу ---------- */
.gbx {
  --gbx-navy: #313a87;
  --gbx-sky: #0085c0;
  --gbx-ink: #1b2160;
  position: fixed;
  left: 20px;
  bottom: 20px;
  /* Выше подсказки чата Алёны, ниже окна с роликом */
  z-index: 2147483640;
  /* На невысоком экране карточка ужимается, чтобы целиком влезть по высоте */
  width: clamp(104px, calc((100vh - 150px) * .5625), 184px);
  font-family: inherit;
  opacity: 0;
  transform: translate(-36px, 18px) rotate(-6deg);
  transform-origin: 0 100%;
  pointer-events: none;
  transition: opacity .45s ease, transform .7s cubic-bezier(.2, 1.4, .4, 1);
}
.gbx[hidden] { display: none; }
.gbx.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.gbx-card {
  position: relative;
  border-radius: 16px;
  padding: 3px;
  background: linear-gradient(135deg, var(--gbx-navy), var(--gbx-sky));
  box-shadow: 0 18px 40px rgba(27, 33, 96, .35);
  animation: gbx-breathe 3.2s ease-in-out 1s infinite;
  transition: transform .25s ease;
}
.gbx-card:hover { transform: translateY(-4px); }

@keyframes gbx-breathe {
  0%, 100% { box-shadow: 0 18px 40px rgba(27, 33, 96, .35), 0 0 0 0 rgba(0, 133, 192, .0); }
  50%      { box-shadow: 0 18px 40px rgba(27, 33, 96, .35), 0 0 0 8px rgba(0, 133, 192, .22); }
}

.gbx-card__open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 13px;
  overflow: hidden;
  background: var(--gbx-ink);
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gbx-card__open:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.gbx-card__screen {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  background: var(--gbx-navy) center / cover no-repeat;
}
.gbx-card__screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Кнопка «смотреть» с расходящимся кольцом */
.gbx-card__play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.gbx-card__play::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 13px;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent var(--gbx-sky);
}
.gbx-card__play::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: gbx-ring 2s ease-out infinite;
}
@keyframes gbx-ring {
  from { transform: scale(1); opacity: .9; }
  to   { transform: scale(1.9); opacity: 0; }
}

/* Корешок билета: линия отрыва и вырезы по краям */
.gbx-card__stub {
  position: relative;
  display: block;
  padding: 11px 14px 13px;
  background: linear-gradient(90deg, var(--gbx-navy), var(--gbx-sky));
  border-top: 2px dashed rgba(255, 255, 255, .45);
}
.gbx-card__stub::before,
.gbx-card__stub::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}
.gbx-card__stub::before { left: -9px; }
.gbx-card__stub::after  { right: -9px; }

.gbx-card__title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.gbx-card__sub {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.3;
  opacity: .9;
}

.gbx-card__close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--gbx-ink);
  font-size: 22px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.gbx-card__close:hover { background: #eef3fb; }
.gbx-card__close:focus-visible { outline: 3px solid var(--gbx-sky); outline-offset: 2px; }

/* ---------- Окно с роликом ---------- */
.gbx-modal {
  --gbx-navy: #313a87;
  --gbx-sky: #0085c0;
  position: fixed;
  inset: 0;
  /* Поверх всего, в том числе чата Алёны */
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: inherit;
}
.gbx-modal[hidden] { display: none; }

.gbx-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 52, .78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: gbx-fade .3s ease both;
}
.gbx-modal__box {
  position: relative;
  width: min(980px, 100%);
  max-height: 100%;
  overflow: auto;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--gbx-navy), var(--gbx-sky));
  color: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  animation: gbx-pop .45s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes gbx-fade { from { opacity: 0; } }
@keyframes gbx-pop  { from { opacity: 0; transform: translateY(24px) scale(.96); } }

.gbx-modal__video {
  background: #000;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}
.gbx-modal__video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  background: #000;
}

.gbx-modal__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  padding: 20px 24px 24px;
}
.gbx-modal__text { flex: 1 1 300px; margin: 0; }
.gbx-modal__title {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.gbx-modal__note {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.4;
  opacity: .9;
}
.gbx-modal__phones { display: flex; flex-wrap: wrap; gap: 10px; }

.gbx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #fff;
  color: var(--gbx-navy) !important;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease;
}
.gbx-btn:hover { transform: translateY(-2px); }
.gbx-btn--ghost { background: transparent; color: #fff !important; }
.gbx-btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.gbx-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.gbx-btn svg { width: 18px; height: 18px; flex: none; }

.gbx-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 26px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
}
.gbx-modal__close:hover { background: rgba(0, 0, 0, .75); }
.gbx-modal__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

html.gbx-lock, html.gbx-lock body { overflow: hidden; }
/* Пока смотрят ролик, чат Алёны прячется, чтобы не закрывать кнопки звонка */
html.gbx-lock noya-chat { visibility: hidden !important; }

/* Телефон / вертикальный экран: вертикальный ролик */
@media (max-aspect-ratio: 1/1) {
  .gbx-modal { padding: 12px; }
  .gbx-modal__box { width: min(460px, 100%); }
  .gbx-modal__video video { aspect-ratio: 9 / 16; max-height: 68vh; }
  .gbx-modal__cta { padding: 16px 16px 18px; gap: 12px; }
  .gbx-modal__title { font-size: 19px; }
  .gbx-modal__phones { width: 100%; }
  .gbx-btn { flex: 1 1 100%; justify-content: center; }
}

@media (max-width: 600px) {
  /* Снизу на телефоне — кнопка и подсказка чата Алёны, поэтому карточка выше */
  .gbx { left: 12px; bottom: 140px; width: clamp(96px, calc((100vh - 280px) * .5625), 132px); }
  .gbx-card { border-radius: 13px; }
  .gbx-card__open { border-radius: 10px; }
  .gbx-card__play { width: 36px; height: 36px; right: 8px; bottom: 8px; }
  .gbx-card__play::before { left: 14px; top: 11px; border-width: 7px 0 7px 11px; }
  .gbx-card__stub { padding: 8px 10px 10px; }
  .gbx-card__title { font-size: 13.5px; }
  .gbx-card__sub { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .gbx, .gbx-card, .gbx-btn { transition: opacity .2s ease; }
  .gbx { transform: none; }
  .gbx-card, .gbx-card__play::after, .gbx-modal__box, .gbx-modal__backdrop { animation: none; }
}
