/* ===== Варианты первого экрана (hero-1/2/3.html) ===== */

.hx {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}
.hx__ui {
  position: relative;
  z-index: 20;
  /* экран не ниже окна, но растёт под содержимое — на низких ноутбуках ничего не залезает под шапку */
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 34px;
  padding: 108px var(--gut) var(--gut);
  pointer-events: none;
}
.hx__ui a, .hx__ui button, .hx__ui input, .hx__ui form { pointer-events: auto; }

.hx__top {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  min-height: 0;
}
.hx__copy {
  grid-column: 1 / span 7;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hx__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: rgba(12, 13, 18, .6); margin-bottom: 30px; }
.hx__kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(18, 183, 106, .16); }
.hx__kicker i { width: 18px; height: 1px; background: currentColor; opacity: .4; }

.hx__title {
  font-size: clamp(44px, 5.4vw, 104px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.055em;
}
.hx__title em { font-style: normal; color: var(--electric); }
.hx__title .rl > span { white-space: nowrap; }
.hx__title .tagpill { font-size: 20px; top: -.9em; }

.hx__lead {
  margin-top: 26px;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(12, 13, 18, .75);
}
.hx__cta { margin-top: 28px; display: flex; align-items: center; gap: 24px; }
.hx__cta .ulink { font-size: 17px; font-weight: 500; }
.hx__cta small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: rgba(12, 13, 18, .5); }

/* --- полоса тезисов + купон --- */
.hx__facts {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: stretch;
}
.fact {
  grid-column: span 2;
  align-self: end;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.fact__n { display: flex; justify-content: space-between; color: rgba(12, 13, 18, .45); }
.fact b {
  display: block;
  font-size: clamp(40px, 3.9vw, 70px);
  font-weight: 500;
  letter-spacing: -.06em;
  line-height: .9;
  white-space: nowrap;
}
/* единицы («мин», «лет») — рядом с числом, по нижней линии */
.fact b sup { font-size: .36em; letter-spacing: -.02em; vertical-align: baseline; position: relative; top: 0; margin-left: .14em; }
.fact b .u { font-size: .36em; letter-spacing: -.02em; } /* «0 ₽» — рубль так же, как «мин» и «лет» */
.fact p { margin-top: 10px; font-size: 14px; line-height: 1.35; color: rgba(12, 13, 18, .62); max-width: 190px; }
.fact p strong { color: var(--ink); font-weight: 500; }

.hcoupon {
  grid-column: span 4;
  align-self: end;
  position: relative;
  background: var(--electric);
  color: #fff;
  border-radius: 22px;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.hcoupon::before, .hcoupon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px; height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--paper);
}
.hcoupon::before { left: -11px; }
.hcoupon::after { right: -11px; }
.hcoupon__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.hcoupon__head b { font-size: 46px; font-weight: 500; letter-spacing: -.06em; line-height: .9; }
.hcoupon__head p { font-size: 14px; line-height: 1.35; max-width: 210px; color: rgba(255, 255, 255, .8); }
.hcoupon__form { display: flex; gap: 6px; background: #fff; border-radius: 999px; padding: 5px; }
.hcoupon__form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  padding: 0 16px;
}
.hcoupon__form input::placeholder { color: rgba(12, 13, 18, .4); }
.hcoupon__form .btn { height: 46px; padding-left: 20px; font-size: 14px; gap: 12px; }
.hcoupon__form .btn-ico { width: 36px; height: 36px; }
.hcoupon__form.is-err { box-shadow: 0 0 0 2px var(--signal); }
.hcoupon__legal { font-size: 11px; line-height: 1.4; color: rgba(255, 255, 255, .6); }
.hcoupon__legal a { color: rgba(255, 255, 255, .85); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 2px; transition: color .3s, text-decoration-color .3s; }
.hcoupon__legal a:hover { color: #fff; text-decoration-color: #fff; }
.hcoupon__done { display: none; font-size: 15px; line-height: 1.4; padding: 12px 0 4px; }
.hcoupon.is-sent .hcoupon__form, .hcoupon.is-sent .hcoupon__legal { display: none; }
.hcoupon.is-sent .hcoupon__done { display: block; }

/* ===== Вариант 1: 3D справа ===== */
.hx--3d .hero__canvas { z-index: 1; }
.hx--3d .hx__hint {
  grid-column: 9 / span 4;
  align-self: start;
  text-align: right;
  color: rgba(12, 13, 18, .5);
}

/* ===== Вариант 2: фото ===== */
.hx--photo .hx__copy { grid-column: 1 / span 7; }
.hx__media {
  grid-column: 8 / span 5;
  position: relative;
  margin-top: -16px;
  border-radius: 28px;
  overflow: hidden;
  background: #d9dbe2;
  pointer-events: auto;
}
.hx__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 30%;
  transform: scale(1.08);
  transition: transform 2.4s var(--ease);
}
.is-in .hx__media img { transform: none; }
.hx__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 13, 18, 0) 55%, rgba(12, 13, 18, .55));
}
.hx__media .pcur { opacity: 1; left: 22%; top: 60%; z-index: 2; animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(8px, -10px); } }
.hx__badge {
  position: absolute;
  left: 18px; top: 18px;
  z-index: 2;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 9px 14px 9px 12px;
}
.hx__badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hx__cap {
  position: absolute;
  left: 22px; right: 22px; bottom: 20px;
  z-index: 2;
  color: #fff;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.hx__cap q { font-size: 22px; line-height: 1.2; letter-spacing: -.02em; max-width: 420px; quotes: "«" "»"; }
.hx__cap .hx__who {
  flex-shrink: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 9px 14px;
  white-space: nowrap;
}


/* --- вариант 2: фото во всю высоту, слева оффер + звонок и купон --- */
.hx__ui--photo {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 24px;
  row-gap: 30px;
}
.hx__ui--photo .hx__copy { grid-column: 1 / span 7; grid-row: 1; min-height: 0; }
.hx__ui--photo .hx__media { grid-column: 8 / span 5; grid-row: 1 / 3; margin-top: -16px; }
.hx__ui--photo .hx__kicker { margin-bottom: 26px; }
.hx__facts3 { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hx__facts3 .fact { grid-column: auto; align-self: start; } /* верхние линии и цифры на одном уровне, даже если подписи разной длины */
.hx--photo .hx__title { font-size: clamp(40px, min(5.1vw, 9.6svh), 96px); }


.hx__facts3 .fact { gap: 18px; }
.hx__facts3 .fact b { font-size: clamp(40px, 3.7vw, 64px); }

.hx__deal { grid-column: 1 / span 7; grid-row: 2; display: grid; grid-template-columns: 5fr 7fr; gap: 12px; }
.hx__deal .hcoupon { grid-column: auto; align-self: stretch; }
.hx__deal .hcoupon__head b { font-size: 40px; }
.hx__deal .hcoupon__head p { max-width: 300px; }

.hcall {
  background: #fff;
  border-radius: 22px;
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hcall__lbl { display: flex; align-items: center; gap: 8px; color: rgba(12, 13, 18, .55); }
.hcall__lbl .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(18, 183, 106, .16); }
.hcall__num { font-size: 30px; font-weight: 500; letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; transition: color .3s; }
.hcall__num:hover { color: var(--electric); }
.hcall__btns { margin-top: auto; padding-top: 8px; display: grid; gap: 6px; }
.hcall__btns .btn { height: 46px; font-size: 15px; gap: 12px; }
.hcall__btns .btn-ico { width: 36px; height: 36px; }
.hcall__call { width: 100%; justify-content: space-between; padding-left: 20px; }
.hcall__msg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mbtn {
  height: 46px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(12, 13, 18, .06);
  transition: background .35s, color .35s, box-shadow .35s, transform .35s var(--ease);
}
.mbtn svg { transition: transform .5s var(--ease); }
.mbtn:hover { background: var(--electric); color: #fff; box-shadow: inset 0 0 0 1px var(--electric); }
.mbtn:hover svg { transform: rotate(-12deg) scale(1.08); }
/* запасной вариант в фирменных цветах мессенджеров: добавить .is-brand к .hcall__msg */
.hcall__msg.is-brand .mbtn { color: #fff; box-shadow: none; }
.hcall__msg.is-brand .mbtn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.hcall__msg.is-brand .mbtn--tg { background: #2aabee; }
.hcall__msg.is-brand .mbtn--max { background: linear-gradient(135deg, #3d6bff, #8a3dff); }

/* ===== Вариант 3: трекер вызова ===== */
.hx--track .hx__copy { grid-column: 1 / span 7; }
.trk {
  grid-column: 8 / span 5;
  margin-top: -16px;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--ink);
  color: #fff;
  border-radius: 28px;
  overflow: hidden;
  pointer-events: auto;
}
.trk__map { position: relative; overflow: hidden; }
.trk__map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trk__top {
  position: absolute;
  left: 18px; right: 18px; top: 18px;
  z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  color: rgba(255, 255, 255, .6);
}
.trk__top b { color: #fff; font-weight: 500; }
.trk__eta {
  position: absolute;
  left: 18px; bottom: 16px;
  z-index: 2;
}
.trk__eta .mono { color: rgba(255, 255, 255, .55); }
.trk__eta strong {
  display: block;
  margin-top: 6px;
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .9;
  font-variant-numeric: tabular-nums;
}
.trk__who {
  position: absolute;
  right: 18px; bottom: 18px;
  z-index: 2;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line-w);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  font-size: 13px;
}
.trk__who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 60% 20%; }
.trk__steps { border-top: 1px solid var(--line-w); }
.trk__steps li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-w);
  color: rgba(255, 255, 255, .35);
  font-size: 15px;
  transition: color .5s, background .5s;
}
.trk__steps li:last-child { border-bottom: 0; }
.trk__steps li i {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  position: relative;
  transition: background .5s, border-color .5s;
}
.trk__steps li.is-done { color: rgba(255, 255, 255, .7); }
.trk__steps li.is-done i { background: var(--electric); border-color: var(--electric); }
.trk__steps li.is-done i::after {
  content: "";
  position: absolute;
  left: 5px; top: 3px;
  width: 5px; height: 8px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.trk__steps li.is-now { color: #fff; background: rgba(255, 255, 255, .05); }
.trk__steps li.is-now i { border-color: var(--electric); box-shadow: 0 0 0 4px rgba(36, 56, 255, .35); animation: ping 1.4s infinite; }
@keyframes ping { 50% { box-shadow: 0 0 0 7px rgba(36, 56, 255, 0); } }
.trk__steps li .mono { color: inherit; opacity: .8; }

/* ===== Переключатель вариантов (только для просмотра) ===== */
.vswitch {
  position: fixed;
  left: 50%;
  top: 19px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  gap: 4px;
  padding: 5px;
  background: rgba(12, 13, 18, .88);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(12, 13, 18, .25);
}
.vswitch a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  padding: 9px 14px;
  border-radius: 999px;
  transition: background .3s, color .3s;
}
.vswitch a:hover { color: #fff; }
.vswitch a.is-on { background: #fff; color: var(--ink); }
.hcoupon__head p strong { color: #fff; font-weight: 500; }

/* низкие экраны ноутбуков (1280×650–800): всё компактнее, чтобы звонок и купон оставались в первом экране */
@media (min-width: 901px) and (max-height: 820px) {
  .hx__ui { padding-top: 112px; row-gap: 22px; }
  .hx__lead { margin-top: 16px; max-width: 640px; font-size: 16px; }
  .hx__facts3 { margin-top: 20px; }
  .hx__facts3 .fact { gap: 10px; padding-top: 10px; }
  .hx__facts3 .fact b { font-size: clamp(34px, 6svh, 52px); }
  .hx__facts3 .fact p { margin-top: 6px; font-size: 13px; }
  .hcall { padding: 16px 18px 14px; }
  .hcall__num { font-size: 26px; }
}
@media (min-width: 901px) and (max-height: 720px) {
  .hx--photo .hx__title { font-size: clamp(40px, min(5.1vw, 8.4svh), 96px); }
  .hx__ui { padding-top: 104px; padding-bottom: 16px; row-gap: 14px; }
  .hx__facts3 { margin-top: 12px; }
  .hx__lead { margin-top: 12px; }
  .hx__facts3 .fact b { font-size: 34px; }
  .hx__deal .hcoupon__head b { font-size: 34px; }
  .hcoupon { padding-top: 16px; padding-bottom: 14px; gap: 12px; }
  .hx__lead { max-width: 720px; }
  .hcall__btns .btn { height: 44px; }
  .hcall .mbtn { height: 40px; }
  .hcoupon__form .btn { height: 42px; }
  .hcoupon__form .btn-ico { width: 32px; height: 32px; }
}
