/* ============================================================================
   CTA-форма главной портала. Механика/вид 1:1 с HoReCa (тёмная фокус-секция
   на светлой странице). Палитра HoReCa наследуется через тёмный скоуп токенов
   СЕЛЕКТОРЫ КЛАССОВЫЕ (.cta.sec): форма живёт на главной (#cta), хабах ниш (#cta-final) и посадочных (#zayavka) — правила общие. НЕ редактировать руками —
   регенерируется /tmp/gen_cta_css.py.
   ============================================================================ */
.cta.sec{
  --bg:#0d0b09; --bg-2:#16120e; --bg-3:#1c1813; --card:#181410;
  --line:rgba(255,255,255,0.10); --line-2:rgba(255,255,255,0.16);
  --text:#fff; --muted:#b9b2a8; --muted-2:#8d877d;
  --accent:#fe8b66; --accent-2:#ff6b2b; --accent-3:#ffc49e;
  --accent-soft:rgba(254,139,102,0.14);
  --grad:linear-gradient(135deg,#ffc49e 0%,#fe8b66 45%,#ff6b2b 100%);
  --f-display:var(--font-display);
  --r-sm:10px; --r-md:16px; --r-lg:24px; --r-xl:32px;
  background:#0d0b09; color:var(--text);
}
.cta.sec .section__title,.cta.sec h2{color:#fff;font-family:var(--font-display);font-weight:800;letter-spacing:-.03em;font-size:clamp(30px,4.4vw,52px);line-height:1.04;margin:14px 0 0}
.cta.sec .section-kick{color:var(--accent);display:inline-block;margin-bottom:8px}
.cta.sec .cta__content > p{color:#cfc8bd;font-size:clamp(15px,1.6vw,17px);line-height:1.6;margin:16px 0 0;max-width:480px}
.cta.sec a:not(.btn){color:var(--accent)}

.chip {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.25s ease;
}

.chip:hover { color: #fff; border-color: var(--line-2); }

.chip--active {
  background: var(--grad);
  color: #101010;
  border-color: transparent;
  font-weight: 600;
}

.cta__wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 60px;
  background: linear-gradient(135deg, #121212 0%, #0a0a0a 100%);
  border: 1px solid rgba(255, 138, 92, 0.2);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
}

.cta__glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  background: radial-gradient(circle, rgba(255,107,43,0.3), transparent 60%);
  top: -200px; right: -200px;
  pointer-events: none;
}

.cta__content { position: relative; z-index: 2; }

.cta__list {
  list-style: none;
  margin-top: 32px;
}

.cta__list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  font-size: 15px;
  color: var(--text);
}

.cta__list svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }

.cta__form {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}

.field {
  position: relative;
  padding-top: 14px;
}

.field--full { grid-column: 1 / -1; }

.cta__form > button.btn { align-self: start; height: auto; }

.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 15px;
  color: #fff;
  transition: border-color 0.25s ease, background 0.25s ease;
  resize: none;
}

.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  background: rgba(0,0,0,0.6);
}

.field label {
  position: absolute;
  top: 26px; left: 16px;
  font-size: 14px;
  color: var(--muted);
  pointer-events: none;
  transition: all 0.25s ease;
  background: #0a0a0a;
  padding: 0 6px;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field.is-filled label {
  top: 5px; left: 12px;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.field input::placeholder, .field textarea::placeholder { color: transparent; }

.chips {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chips__legend {
  font-size: 13px;
  color: var(--muted);
  padding: 0;
  margin: 0 0 2px 2px;
  letter-spacing: 0.01em;
}

.chips__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

@media (max-width: 780px) {
  .chips__row .chip span { padding: 11px 10px; font-size: 12.5px; }
}

.chips__row .chip {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  cursor: pointer;
  user-select: none;
  /* декор чипа несёт вложенный span; сбрасываем пилюлю базового .chip,
     иначе двойной овал и span ужимается паддингами label */
  padding: 0;
  border: 0;
  background: transparent;
}

.chips__row .chip input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}

.chips__row .chip span {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.chips__row .chip:hover span {
  border-color: rgba(255, 138, 92, 0.45);
  color: #fff;
}

.chips__row .chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chips__row .chip input:checked + span {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(255, 138, 92, 0.22), rgba(255, 108, 70, 0.1));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 138, 92, 0.35) inset, 0 6px 24px -10px rgba(255, 138, 92, 0.55);
}

.chips__row .chip:active span { transform: scale(0.97); }

.cta__policy {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.5;
  margin-top: 4px;
}

.cta__policy a { color: var(--accent); }

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 1100px) {
  .cta__wrap { grid-template-columns: 1fr; padding: 40px; }
}

@media (max-width: 780px) {
  .cta__form { grid-template-columns: 1fr; padding: 20px; min-width: 0; }
  .cta__content { min-width: 0; }
}

@media (max-width: 480px) {
  .cta__wrap { padding: 24px 18px; gap: 28px; }
  .cta__form { padding: 18px 14px; gap: 12px; }
  .field input, .field textarea { padding: 13px 14px; font-size: 14.5px; }
  .field label { left: 14px; font-size: 13.5px; }
  .field input:focus + label,
  .field input:not(:placeholder-shown) + label,
  .field textarea:focus + label,
  .field textarea:not(:placeholder-shown) + label,
  .field.is-filled label { left: 10px; font-size: 10.5px; }
  .chips__row { grid-template-columns: 1fr; gap: 6px; }
  .chips__row .chip span { padding: 11px 14px; font-size: 13px; }
  .cta__consent-text { font-size: 12.5px; line-height: 1.45; }
  .cta__policy { font-size: 11.5px; }
}

.cta__consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 10px 4px 6px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cta__consent input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cta__consent-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.02);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  margin-top: 1px;
  color: #101010;
}

.cta__consent-box svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
  display: block;
}

.cta__consent:hover .cta__consent-box {
  border-color: rgba(255, 138, 92, 0.55);
  background: rgba(255, 138, 92, 0.08);
}

.cta__consent input[type="checkbox"]:focus-visible + .cta__consent-box {
  outline: 2px solid rgba(255, 138, 92, 0.6);
  outline-offset: 2px;
}

.cta__consent input[type="checkbox"]:checked + .cta__consent-box {
  background: var(--grad);
  border-color: transparent;
  transform: scale(1.04);
}

.cta__consent input[type="checkbox"]:checked + .cta__consent-box svg {
  opacity: 1;
  transform: scale(1);
}

.cta__consent-text {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.76);
}

.cta__consent-text a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(255, 138, 92, 0.4);
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.cta__consent-text a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.cta__form.is-err-consent .cta__consent-box {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
  animation: consentShake 0.5s ease;
}

.cta__form.is-err-consent .cta__consent-text {
  color: #ff8080;
}

.cta__form .field--req label::after { content: " *"; color: var(--accent); font-weight: 700; }

.cta__consent.is-req .cta__consent-text::after { content: " *"; color: var(--accent); font-weight: 700; }

.cta__submit:disabled,
.cta__submit[disabled] {
  opacity: .5; cursor: not-allowed; filter: grayscale(.3);
  box-shadow: none; transform: none !important; pointer-events: none;
}

.cta__submit:not(:disabled) { cursor: pointer; }

.cta__form-hint {
  grid-column: 1 / -1; text-align: center; font-size: .82rem;
  color: rgba(255,255,255,.62); margin: -4px 0 0; transition: opacity .25s;
}

.cta__form.is-ready .cta__form-hint { opacity: 0; height: 0; margin: 0; overflow: hidden; }

.cta__submit { position: relative; overflow: visible; }

.cta__submit::before { border-radius: inherit; }

.cta__submit > span:not(.cta__sparkles),
.cta__submit > svg { position: relative; z-index: 1; }

.cta__sparkles { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 0; opacity: 0; }

.cta__submit:not(:disabled) .cta__sparkles { opacity: 1; }

.cta__sparkles i {
  position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle, #fff 35%, rgba(255,255,255,.6) 65%, rgba(255,255,255,0) 80%);
  box-shadow: 0 0 12px rgba(255,255,255,.95), 0 0 4px rgba(255,255,255,.85);
  opacity: 0;
}

.cta__submit:not(:disabled) .cta__sparkles i {
  animation: ctaSparkleFly 4.8s ease-out infinite;
  animation-delay: calc(var(--i) * .55s);
}

.cta__sparkles i:nth-child(1){ --tx:-90px; --ty:-22px }

.cta__sparkles i:nth-child(2){ --tx:90px;  --ty:-22px }

.cta__sparkles i:nth-child(3){ --tx:-130px;--ty:0px }

.cta__sparkles i:nth-child(4){ --tx:130px; --ty:0px }

.cta__sparkles i:nth-child(5){ --tx:-70px; --ty:30px }

.cta__sparkles i:nth-child(6){ --tx:70px;  --ty:30px }

.cta__sparkles i:nth-child(7){ --tx:-40px; --ty:-40px }

.cta__sparkles i:nth-child(8){ --tx:40px;  --ty:-40px }

@keyframes ctaSparkleFly {
  0%   { transform: translate(-50%,-50%) scale(.5); opacity: 0 }
  15%  { opacity: 1 }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.4); opacity: 0 }
}

@media (max-width: 768px) {
  .cta__glow { filter: blur(38px) !important; width: 320px !important; height: 320px !important; }
}

/* --- ФИКС раскладки чипов/рядов на портале (форма растягивалась под тёмную
   секцию → grid-треки и чипы вытягивались в высокие «эллипсы»). Жёсткий flex
   для чипов + ряды формы не растягиваем. --- */
.cta.sec .cta__form{align-content:start}
.cta.sec .cta__wrap{align-items:start}
.cta.sec .chips__row{display:flex;flex-wrap:wrap;gap:8px;align-items:stretch}
.cta.sec .chips__row .chip{flex:1 1 auto;width:auto;min-width:max-content;justify-content:center;text-align:center}
.cta.sec .chips__row .chip span{width:100%;text-align:center;justify-content:center;padding-left:12px;padding-right:12px}
@media(max-width:560px){.cta.sec .chips__row{flex-wrap:wrap}.cta.sec .chips__row .chip{flex:1 1 100%}}

/* === Сабмит формы → общий primary-контракт (family face + dark ink + white offset). ===
   Здесь остаются только светлая кромка на тёмной форме и читаемый disabled,
   который сохраняет геометрию той же кнопки без декоративной анимации. */
.cta__submit{border:1px solid rgba(255,255,255,.12)}
@media(max-width:560px){.cta__submit{white-space:normal;font-size:15.5px;padding:14px 16px;width:100%;justify-content:center}}
.cta__submit:disabled,.cta__submit[disabled]{opacity:.62;filter:none;box-shadow:3px 3px 0 rgba(255,255,255,.42)}

/* Motion-safe CTA: keep the complete static state while removing decorative
   flight, validation shake and non-essential transitions. */
@media (prefers-reduced-motion: reduce) {
  .cta *,
  .cta *::before,
  .cta *::after {
    transition: none !important;
  }

  .cta__sparkles {
    display: none !important;
  }

  .cta__sparkles i,
  .cta__form.is-err-consent .cta__consent-box {
    animation: none !important;
  }

  .cta__form.is-err-consent .cta__consent-box {
    transform: none !important;
  }
}
