/* KIBERone lead form — дизайн-система (§2 ТЗ).
   Шрифты только локальные: внешних CDN нет (§8). */

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0400-045F, U+2010-2027, U+20B4, U+2116;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0400-045F, U+2010-2027, U+20B4, U+2116;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0400-045F, U+2010-2027, U+20B4, U+2116;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0400-045F, U+2010-2027, U+20B4, U+2116;
}

:root {
  --kib-yellow:        #FFD400;
  --kib-yellow-deep:   #F5C400;
  --kib-turquoise:     #00B5C0;
  --kib-turquoise-dp:  #00949D;
  --kib-ink:           #10202B;
  --kib-muted:         #6B7C8A;
  --kib-bg:            #FFFFFF;
  --kib-bg-soft:       #F3FBFC;
  --kib-error:         #D93025;
  --kib-success:       #18A06E;
  --radius:            20px;
  --shadow:            0 10px 30px rgba(16, 32, 43, .10);

  --font: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --gap: 16px;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Собственный display у .btn перебивает [hidden] из стилей браузера — чиним явно. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;              /* не меньше 16px — иначе iOS зумит инпуты */
  font-weight: 400;
  line-height: 1.55;
  color: var(--kib-ink);
  background: var(--kib-bg-soft);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

img, svg { max-width: 100%; }

a { color: var(--kib-turquoise-dp); }
a:hover { color: var(--kib-turquoise); }

:focus-visible {
  outline: 2px solid var(--kib-turquoise);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---------- декор ---------- */
.decor { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.decor__blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; }
.decor__blob--y {
  width: 300px; height: 300px; top: -110px; right: -90px;
  background: radial-gradient(circle, rgba(255, 212, 0, .55), rgba(255, 212, 0, 0) 70%);
}
.decor__blob--t {
  width: 360px; height: 360px; bottom: -140px; left: -130px;
  background: radial-gradient(circle, rgba(0, 181, 192, .35), rgba(0, 181, 192, 0) 70%);
}
.decor__blob--y2 {
  width: 220px; height: 220px; top: 42%; left: 60%;
  background: radial-gradient(circle, rgba(255, 212, 0, .28), rgba(255, 212, 0, 0) 70%);
}

/* ---------- контент ---------- */
.main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 560px;
  padding-block: 24px 40px;
}

/* ---------- карточка формы ---------- */
.card {
  position: relative;
  background: var(--kib-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card__stripe { height: 6px; background: var(--kib-yellow); }
.card__body { padding: 20px 18px 24px; }
.card__title {
  margin: 0 0 6px;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--kib-turquoise-dp);
}
.card__lead { margin: 0 0 18px; color: var(--kib-muted); font-size: 15px; }

.form { display: grid; gap: 16px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { display: grid; gap: 6px; }
.field__label { font-weight: 600; font-size: 15px; }
.field__input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--kib-ink);
  background: var(--kib-bg);
  border: 1.5px solid #D6E3E8;
  border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field__input::placeholder { color: #9FB0BB; }
.field__input:hover { border-color: #B9CDD5; }
.field__input:focus-visible { border-color: var(--kib-turquoise); }
.field__select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2300949D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px 20px;
}
.field__input[aria-invalid="true"] { border-color: var(--kib-error); }
.field__error { margin: 0; color: var(--kib-error); font-size: 14px; font-weight: 500; }
.field__hint { margin: 0; color: var(--kib-muted); font-size: 13px; }

.field--consent { margin-top: 2px; }
.consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 0;          /* тач-цель по высоте ≥ 44px */
  cursor: pointer;
}
.consent__box {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--kib-turquoise);
  flex: none;
}
.consent__text { font-size: 14px; line-height: 1.45; color: var(--kib-ink); }

/* ---------- кнопки ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--kib-ink);       /* на жёлтом — только тёмный текст */
  background: var(--kib-yellow);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
}
.btn:hover:not(:disabled) { background: var(--kib-yellow-deep); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn--ghost {
  background: transparent;
  color: var(--kib-turquoise-dp);
  border: 1.5px solid var(--kib-turquoise);
}
.btn--ghost:hover:not(:disabled) { background: var(--kib-bg-soft); }

.btn__spinner { display: none; width: 18px; height: 18px; flex: none; }
.btn.is-loading .btn__spinner {
  display: block;
  border: 2.5px solid rgba(16, 32, 43, .25);
  border-top-color: var(--kib-ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form__status { margin: 0; font-size: 14px; font-weight: 500; min-height: 0; }
.form__status:empty { display: none; }
.form__status--error { color: var(--kib-error); }
.form__status--ok { color: var(--kib-success); }

/* ---------- экран успеха ---------- */
.success { text-align: center; padding-block: 36px 32px; display: grid; gap: 10px; justify-items: center; }
.success__emoji { font-size: 40px; margin: 0; line-height: 1; }
.success__title { margin: 0; font-size: clamp(22px, 5vw, 26px); font-weight: 700; color: var(--kib-success); }
.success__text { margin: 0 0 8px; color: var(--kib-muted); }
.success .btn { max-width: 320px; }

/* ---------- футер ---------- */
.footer {
  flex: none;
  background: var(--kib-bg);
  border-top: 1px solid #E4EEF1;
  padding-block: 18px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}
.footer__inner { display: grid; gap: 4px; font-size: 14px; color: var(--kib-muted); }
.footer__year { color: #9FB0BB; }

/* ---------- десктоп ---------- */
@media (min-width: 900px) {
  .main { padding-block: 56px 64px; }
  .card__body { padding: 30px 32px 34px; }
  .footer__inner { grid-auto-flow: column; justify-content: space-between; align-items: center; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .decor { display: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- статическая страница (privacy) ---------- */
.doc { max-width: 820px; }
.doc h1 { font-size: clamp(24px, 5vw, 34px); font-weight: 700; margin: 0 0 8px; }
.doc h2 { font-size: 19px; font-weight: 600; margin: 28px 0 8px; color: var(--kib-turquoise-dp); }
.doc p, .doc li { font-size: 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc__back { margin: 0 0 8px; font-size: 14px; }
.doc__meta { color: var(--kib-muted); font-size: 14px; margin: 0 0 24px; }
.doc__note {
  background: #FFF8D6;
  border-left: 4px solid var(--kib-yellow);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  margin: 0 0 24px;
}
