/* ——— звонок ИИ: позвонить на …27 или оставить номер (assets/ring.js) ——— */
.ring { background: var(--night); color: var(--night-text); scroll-margin-top: 56px; }
.ring ::selection { background: var(--blue-night); color: var(--night); }
.ring :focus-visible { outline-color: var(--blue-night); }
.ring .dot { color: var(--blue-night); }
.ring .link { color: var(--blue-night); }
.ring__in {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(72px, 10vw, 136px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px clamp(32px, 5vw, 88px); align-items: center;
}
.ring__story { display: grid; gap: 20px; align-content: start; }
.ring__say { font-family: var(--voice); font-style: italic; font-weight: 300; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; color: var(--night-stone); max-width: 26ch; text-wrap: balance; }
.ring__title { font-weight: 700; font-size: clamp(38px, 5vw, 68px); line-height: .98; letter-spacing: -0.035em; text-wrap: balance; max-width: 14ch; }
.ring__steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 20px; counter-reset: st; max-width: 46ch; }
.ring__steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 3px 16px; counter-increment: st; }
.ring__steps li::before {
  content: counter(st); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--night-line);
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--night-text);
}
.ring__steps b { font-weight: 600; font-size: 18px; line-height: 1.35; padding-top: 5px; }
.ring__steps span { color: var(--night-stone); font-size: 16px; line-height: 1.45; }

/* карточка: номер крупно, ниже перезвон */
.ring__card {
  position: relative; display: grid; gap: 22px;
  background: #191815; border: 1px solid var(--night-line); border-radius: 28px;
  padding: clamp(22px, 3vw, 40px);
}
.ring__k { font-size: 14px; color: var(--night-stone); }
.ring__tel { display: flex; align-items: center; gap: 18px; color: var(--night-text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.ring__ico { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; transition: background-color .2s, transform .15s var(--ease-out); }
.ring__ico .ico { width: 26px; height: 26px; }
/* спокойный «звонок»: волна от кнопки раз в пару секунд */
.ring__ico::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(124, 133, 255, .5); animation: ringWave 2.4s cubic-bezier(.23, 1, .32, 1) infinite; }
@keyframes ringWave { 0% { box-shadow: 0 0 0 0 rgba(124, 133, 255, .45); } 70%, 100% { box-shadow: 0 0 0 18px rgba(124, 133, 255, 0); } }
.ring__num { font-weight: 700; font-size: clamp(28px, 3.1vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ring__tel:active .ring__ico { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) {
  .ring__tel:hover .ring__ico { background: var(--blue-press); }
  .ring__tel:hover .ring__num { color: #fff; }
}
.ring__or { padding-top: 22px; border-top: 1px solid var(--night-line); font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }

.ring__form[hidden] { display: none; }
.ring__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ring__form .fld label { color: var(--night-text); }
.ring__form .opt { color: var(--night-stone); }
.ring__phone { position: relative; }
.ring__cc { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font: 500 19px/1 var(--sans); color: var(--stone); pointer-events: none; }
.ring__phone .input { padding-left: 44px; }
.ring__hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.ring__go { grid-column: 1 / -1; display: grid; gap: 10px; justify-items: start; }
.ring .err { color: #FF8F80; }
.ring__fine { grid-column: 1 / -1; font-size: 13px; line-height: 1.5; color: var(--night-stone); }

.ring__done { display: grid; gap: 14px; justify-items: start; }
.ring__done[hidden] { display: none; }
.ring__done:focus { outline: none; }
.ring .status { background: rgba(124, 133, 255, .16); color: var(--night-text); }
.ring .status i { background: var(--blue-night); }
.ring .status[data-mode="listen"] i { animation: typing 1.1s var(--ease-out) infinite; }
.ring .status[data-mode="listen"] i:nth-of-type(2) { animation-delay: .14s; }
.ring .status[data-mode="listen"] i:nth-of-type(3) { animation-delay: .28s; }
.ring .status[data-mode="stop"] i:nth-of-type(n+2) { display: none; }
.ring__doneT { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; max-width: 26ch; }
.ring__doneS { font-size: 16px; line-height: 1.5; color: var(--night-stone); max-width: 40ch; }
.ring__doneS b { color: var(--night-text); font-weight: 600; white-space: nowrap; }
.ring__again { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; cursor: pointer; }

@media (max-width: 900px) { .ring__in { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .ring__form { grid-template-columns: minmax(0, 1fr); }
  .ring__go, .ring__go .btn { width: 100%; justify-items: stretch; }
  .ring__ico { width: 56px; height: 56px; }
  .ring__tel { gap: 14px; }
}

/* первый экран: вторая кнопка — звонок ИИ */
.call { gap: 12px; }

/* плавающая «Позвонить ИИ» слева от WhatsApp; на телефоне — круглая */
.ring-fab {
  position: fixed; left: 20px; bottom: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 15;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 14px 22px 14px 18px; border-radius: 999px;
  background: var(--night); color: var(--night-text); font-size: 16px; font-weight: 600; text-decoration: none;
  box-shadow: 0 14px 32px -12px rgba(21, 20, 15, .6);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s var(--ease-out), visibility .25s, background-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.ring-fab .ico { width: 22px; height: 22px; color: var(--blue-night); }
.ring-fab.is-on { opacity: 1; visibility: visible; transform: none; }
.ring-fab:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ring-fab:hover { background: #24231F; } }
@media (max-width: 520px) {
  .ring-fab { left: 14px; bottom: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); min-height: 52px; width: 52px; padding: 0; justify-content: center; }
  .ring-fab span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ring-fab { transition: none; }
  .ring__ico::after { animation: none; }
}
