:root{
  --brand:#1e9bff;            /* фирменный синий */
  --brand-2:#24b0ff;
  --ink:#eaf2ff;
  --bg-deep:#0f2445;
  --panel:#121d33;
  --stroke:#24324f;
  --glow:0 0 0 1px rgba(36,176,255,.15), 0 12px 40px rgba(18,29,51,.55), 0 0 60px rgba(30,155,255,.25);
}

/* MODAL */
.modal{position:fixed;inset:0;z-index:9990;display:none;}
.modal[aria-hidden="false"]{display:block;}

.modal__overlay{
  position:absolute;inset:0;background:rgba(3,10,22,.72);
  backdrop-filter:saturate(140%) blur(8px);
}

.modal__dialog{
  position:relative;z-index:1;max-width:720px;margin:6vh auto;padding:0 20px;
}
@media (max-width:560px){ .modal__dialog{margin:3vh auto;} }

.modal__dialog::before{
  content:"";position:absolute;inset:0;margin:auto;z-index:-1;
  width:100%;height:100%;filter:blur(60px);opacity:.35;
  background:radial-gradient(60% 50% at 20% 0%, rgba(36,176,255,.16), transparent 70%),
             radial-gradient(60% 50% at 100% 80%, rgba(16,83,170,.2), transparent 70%);
  pointer-events:none;
}

.modal__form, .modal__title{
  background:linear-gradient(180deg, rgba(18,29,51,.98), rgba(12,21,40,.98));
  border:1px solid rgba(36,176,255,.12);
  border-radius:20px;
  box-shadow:var(--glow);
}

.modal__title{
  color:#fff;text-align:center;
  padding:34px 28px 10px;margin:0 0 10px;
  font:800 32px/1.18 "Inter", "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing:.2px;
}
@media (max-width:560px){ .modal__title{font-size:24px;padding:24px 18px 6px;} }

.modal__form{
  padding:26px 28px 24px;color:var(--ink);
}
@media (max-width:560px){ .modal__form{padding:18px;} }

.modal__field{margin:14px 0;}
.modal__label{display:block;margin:0 0 8px;color:#bcd3ff;font-size:14px;opacity:.9}

.modal__input{
  width:100%;height:54px;padding:14px 16px;border-radius:14px;
  border:1px solid var(--stroke);background:#0d1730;color:var(--ink);
  outline:none;transition:border-color .2s ease, box-shadow .2s ease;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
.modal__textarea{min-height:96px;resize:vertical;padding:14px 16px;}

.modal__input::placeholder{color:#7ea4d8;opacity:.7}
.modal__input:focus{
  border-color:rgba(36,176,255,.55);
  box-shadow:0 0 0 3px rgba(36,176,255,.18), inset 0 1px 0 rgba(255,255,255,.05);
}

.modal__submit{
  margin-top:8px;width:100%;height:56px;border-radius:14px;border:0;
  background:linear-gradient(180deg,var(--brand),var(--brand-2));
  color:#fff;font-weight:800;letter-spacing:.3px;cursor:pointer;
  box-shadow:0 10px 28px rgba(36,176,255,.28);
  transition:transform .15s ease, box-shadow .2s ease;
}
.modal__submit:hover{transform:translateY(-1px);box-shadow:0 16px 38px rgba(36,176,255,.36);}
.modal__submit:active{transform:translateY(0);}

.modal__policy{
  margin:10px 0 0;font-size:12px;color:#93b3e6;opacity:.9;text-align:center;
}
.modal__policy a{color:#bfe1ff;text-decoration:underline dotted 1px}
.modal__policy a:hover{text-decoration:underline}

.modal__close{
  position:absolute;right:18px;top:-1px;width:36px;height:36px;border-radius:10px;
  border:3px solid rgba(36,176,255,.15);background:#0d1730;cursor:pointer;
}
.modal__close::before,.modal__close::after{
  content:"";position:absolute;left:50%;top:50%;width:18px;height:2px;background:#cfe3ff;border-radius:2px;
  transform-origin:center;
}
.modal__close::before{transform:translate(-50%,-50%) rotate(45deg)}
.modal__close::after{transform:translate(-50%,-50%) rotate(-45deg)}
.modal__close:hover{box-shadow:0 0 0 3px rgba(36,176,255,.15)}

.hp{position:absolute !important;left:-9999px !important;opacity:0 !important;}

/* =============================
   Newton Modal – visual patch
   ============================= */

/* Бренд-переменные (при желании подстрой) */
:root{
  --nm-primary: #1ea7ff;
  --nm-primary-2: #2f6bff;
  --nm-bg-glass: rgba(15, 28, 55, .72);  /* стекло */
  --nm-stroke: rgba(255,255,255,.07);
  --nm-soft:   rgba(9, 15, 30, .55);
  --nm-text:   rgba(255,255,255,.92);
  --nm-muted:  rgba(255,255,255,.70);
}

/* Оверлей чуть мягче */
.modal__overlay{
  background: radial-gradient(1200px 900px at 50% -10%, rgba(30,167,255,.08), transparent 60%),
              rgba(4,8,16,.65);
  backdrop-filter: blur(4px);
}

/* Карточка: единый контейнер (заголовок и форма «склеены») */
.modal__dialog{
  max-width: 620px;            /* компактнее на десктопе */
  margin: min(5vh, 36px) auto;
  padding: 0;                  /* убираем внутренние отступы у диалога – все внутри формы */
  background: transparent;
  box-shadow: none;
}

/* Вся форма – единой «плитой» */
.modal__form{
  color: var(--nm-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 50%) border-box,
    var(--nm-bg-glass);
  border: 1px solid var(--nm-stroke);
  border-radius: 18px;
  box-shadow:
    0 12px 40px -10px rgba(0,0,0,.45),
    0 0 0 1px rgba(255,255,255,.03) inset;
  overflow: hidden;            /* чтобы заголовок и контент были единым полотном */
}

/* Заголовок: соединён с формой, подчёркнут, хороший контраст */
.modal__title{
  margin: 0;
  padding: 22px 24px 18px;
  text-align: center;
  font-weight: 800;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.25;
  letter-spacing: .2px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 50% -30%, rgba(30,167,255,.10), transparent 55%),
    transparent;
  border-bottom: 1px solid var(--nm-stroke);
}

/* Тело формы */
.modal__field{
  padding: 14px 20px 0;
}
.modal__field:last-of-type{
  padding-bottom: 8px;
}
.modal__label{
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--nm-muted);
}

/* Поля ввода */
.modal__input{
  width: 100%;
  height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  color: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.modal__textarea{
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
}

/* Фокус и hover – чётко видны на тёмном фоне */
.modal__input:hover{
  border-color: rgba(30,167,255,.35);
}
.modal__input:focus{
  outline: 0;
  border-color: rgba(30,167,255,.65);
  box-shadow: 0 0 0 3px rgba(30,167,255,.22);
  background: rgba(255,255,255,.04);
}

/* Кнопка */
.modal__submit{
  display: block;
  width: calc(100% - 40px);
  margin: 16px 20px 14px;
  height: 50px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--nm-primary), var(--nm-primary-2));
  box-shadow: 0 10px 24px -8px rgba(30,167,255,.45);
  transition: transform .06s ease, box-shadow .2s ease, filter .2s ease;
  cursor: pointer;
}
.modal__submit:hover{
  box-shadow: 0 16px 32px -10px rgba(30,167,255,.55);
  filter: brightness(1.03);
}
.modal__submit:active{
  transform: translateY(1px);
}
.modal__submit:disabled{
  opacity: .6;
  cursor: not-allowed;
}

/* Политика */
.modal__policy{
  margin: 0 20px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--nm-muted);
}
.modal__policy a{
  color: #7cc7ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Крестик: больше hit-area, лучше нажатие */
.modal__close{
  position: absolute;
  right: 1px;
  top: 1px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--nm-stroke);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  display: grid;
  place-items: center;
  color: #d8deea;
  cursor: pointer;
  transition: transform .08s ease, background-color .2s ease, border-color .2s ease;
}
.modal__close:hover{
  border-color: rgba(30,167,255,.45);
  color: #ffffff;
}
.modal__close:active{
  transform: scale(.96);
}

/* Хонеypot */
.hp{ position:absolute!important; left:-9999px!important; opacity:0!important; }

/* Компактнее на узких экранах */
@media (max-width: 560px){
  .modal__dialog{ max-width: min(92vw, 520px); }
  .modal__title{ padding: 18px 16px 14px; }
  .modal__field{ padding: 12px 14px 0; }
  .modal__submit{ width: calc(100% - 28px); margin: 14px 14px 12px; }
  .modal__policy{ margin: 0 14px 16px; }
}

/* Ещё чуть уже на очень больших экранах – чтобы не казалась растянутой */
@media (min-width: 1200px){
  .modal__dialog{ max-width: 580px; }
}

/* Видимый фокус для клавиатуры */
.modal__close:focus,
.modal__submit:focus,
.modal__input:focus{
  outline: 2px solid rgba(30,167,255,.75);
  outline-offset: 2px;
}

/* Когда модалка открыта – фикс скролла фона (если используешь класс на body) */
.is-modal-open{ overflow: hidden; }

/* === Scroll Reveal (универсально) === */
.sr{
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: opacity .6s cubic-bezier(.22,.8,.24,1),
              transform .6s cubic-bezier(.22,.8,.24,1);
  will-change: opacity, transform;
}
.sr.sr--in{
  opacity: 1;
  transform: none;
}

/* Варианты направлений (если захочешь точечно) */
.sr.sr--left   { transform: translateX(-22px); }
.sr.sr--right  { transform: translateX(22px); }
.sr.sr--in.sr--left,
.sr.sr--in.sr--right { transform: none; }

/* Учитываем системную настройку "уменьшить анимации" */
@media (prefers-reduced-motion: reduce){
  .sr{ opacity:1; transform:none; transition:none; }
}

.whatsapp-button {
    position: fixed;
    right: 13px;
    bottom: 90px;
    transform: translate(-50%, -50%);
    background: #25D366; 
    border-radius: 50%;
    width: 48px; 
    height: 48px; 
    color: #fff;
    text-align: center;
    line-height: 53px; 
    font-size: 35px; 
    z-index: 9999;
}

.whatsapp-button a {
    content: " ";
    display: block;
    position: absolute;
    border: 50%;
    border: 1px solid #25D366; 
    left: -20px;
    right: -20px;
    top: -20px;
    bottom: -20px;
    border-radius: 50%;
    animation: animate 1.5s linear infinite;
    opacity: 0;
    backface-visibility: hidden; 
}
 
.whatsapp-button a {
    animation-delay: .5s;
}
 
@keyframes animate
{
    0%
    {
        transform: scale(0.5);
        opacity: 0;
    }
    50%
    {
        opacity: 1;
    }
    100%
    {
        transform: scale(1.2);
        opacity: 0;
    }
}

@media only screen and (max-width: 767px){

.whatsapp-button {   
    bottom: 5px;
    left: 70px; 
}
}

/* Статус внутри формы */
.form-status{
  margin:10px 2px 0;
  padding:10px 12px;
  font-size:14px;
  line-height:1.35;
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  background:rgba(12,21,40,.85);
  color:#eaf3ff;
  box-shadow:0 8px 20px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.03);
  opacity:0;
  transform:translateY(6px);
  transition:opacity .25s ease, transform .25s ease;
}
.form-status.is-in{ opacity:1; transform:none; }
.form-status--ok{ border-color: rgba(37,211,102,.35); box-shadow: 0 0 0 1px rgba(37,211,102,.15) inset; }
.form-status--err{ border-color: rgba(255,86,86,.35); box-shadow: 0 0 0 1px rgba(255,86,86,.15) inset; }

/* Спиннер на кнопке отправки */
button.is-loading,
.lf__btn.is-loading,
.modal__submit.is-loading{
  position:relative;
  pointer-events:none;
  opacity:.95;
}
button.is-loading::after,
.lf__btn.is-loading::after,
.modal__submit.is-loading::after{
  content:"";
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  width:16px; height:16px; border-radius:50%;
  border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  animation: nmSpin 1s linear infinite;
}
@keyframes nmSpin { to { transform: translateY(-50%) rotate(360deg); } }

