/* Credit.Club — Заявка на кредит. Production stylesheet (V2). */

@font-face {
  font-family: 'UniNeue';
  src: url('fonts/UniNeue-Regular.woff2') format('woff2'),
       url('fonts/UniNeue-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'UniNeue';
  src: url('fonts/UniNeue-Bold.woff2') format('woff2'),
       url('fonts/UniNeue-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'UniNeue';
  src: url('fonts/UniNeue-Heavy.woff2') format('woff2'),
       url('fonts/UniNeue-Heavy.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0b1f30;
  --body: #4b5b6b;
  --muted: #8693a3;
  --hair: #e5e9ee;
  --field: #f3f5f8;
  --accent: #00a1dc;
  --accent-deep: #0085b8;
  --hero-bg: #0b1f30;
  --error: #dc2626;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: 'UniNeue', system-ui, -apple-system, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #fff;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.page { min-height: 100vh; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 48px; }

/* ─── HERO ─────────────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  color: #fff;
  padding: 28px 0 0;
}
.mast {
  display: flex; align-items: center; justify-content: flex-start;
  padding-bottom: 64px;
}
.brand {
  display: inline-flex; align-items: center; line-height: 1;
}
.brand-logo { display: block; height: 40px; width: auto; }

.h1 {
  margin: 0 0 24px;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -2.5px;
  color: #fff;
  max-width: 920px;
  text-wrap: balance;
}
.h1-accent { color: var(--accent); }

.sub {
  margin: 0 0 64px;
  font-size: 19px; line-height: 1.5; color: #b6c5d3;
  max-width: 620px; font-weight: 400; text-wrap: pretty;
}

.trust {
  margin: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 32px 0 36px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.trust-item { padding-right: 28px; }
.trust-item dt {
  font-weight: 800; font-size: 26px; line-height: 1;
  letter-spacing: -0.8px; color: #fff; margin: 0 0 10px;
}
.trust-item dd {
  margin: 0; font-size: 13px; line-height: 1.45;
  color: rgba(255,255,255,.55); font-weight: 400;
}

/* ─── FEATURES ─────────────────────────────────────────── */
.features-wrap { padding: 72px 0 64px; }
.features {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.feature h3 {
  margin: 0 0 12px; font-weight: 700; font-size: 21px; line-height: 1.25;
  letter-spacing: -0.4px; color: var(--ink); text-wrap: balance;
}
.feature p {
  margin: 0; font-size: 15px; line-height: 1.6; color: var(--body); font-weight: 400;
  text-wrap: pretty;
}

/* ─── APPLICATION ──────────────────────────────────────── */
.app-wrap { padding: 0 0 80px; }
.application {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 24px;
  align-items: stretch;
}
.lead-form, .calculator {
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 32px 36px;
}
.calculator {
  padding: 32px;
  background: linear-gradient(180deg, #f8fbfd 0%, #fff 60%);
  display: flex; flex-direction: column;
}

.lead-form { display: flex; flex-direction: column; gap: 18px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* FORM HEAD — with merged progress */
.form-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hair);
}
.form-headtop {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  margin-bottom: 6px;
}
.form-headtop h2 {
  margin: 0;
  font-weight: 800; font-size: 28px; letter-spacing: -0.8px;
  color: var(--ink); line-height: 1.1;
}
.form-prob {
  margin: 0;
  font-size: 14px; color: var(--body); font-weight: 400; line-height: 1.4;
  flex: 0 0 auto;
}
.form-sub {
  margin: 0 0 14px;
  font-size: 14px; color: var(--body); font-weight: 400;
}
.form-bar {
  height: 3px; background: #eef0f4; border-radius: 999px; overflow: hidden;
}
.form-bar-fill {
  display: block; width: 5%; height: 100%; background: var(--accent);
  border-radius: 999px; transition: width 300ms ease;
}

/* FIELDS */
.field { display: flex; flex-direction: column; position: relative; }
.field label {
  font-size: 13px;
  color: var(--body); font-weight: 500; margin-bottom: 8px;
}
.field input, .field select {
  height: 56px; border: 0; outline: 0;
  background: var(--field); padding: 0 18px;
  font-family: inherit;
  font-size: 16px; font-weight: 500; color: var(--ink);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: background .18s, box-shadow .18s;
}
.field input::placeholder { color: #b6bcc7; font-weight: 400; }
.field input:focus, .field select:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px rgba(0,161,220,.13);
}
.field-select { position: relative; }
.field-select::after {
  content: ''; position: absolute; right: 18px; bottom: 23px;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg); pointer-events: none;
}
.field select { appearance: none; padding-right: 40px; cursor: pointer; }

.field.has-error input,
.field.has-error select {
  box-shadow: inset 0 0 0 1.5px var(--error), 0 0 0 3px rgba(220,38,38,.1);
}
.field.has-error .address-suggestions {
  border-color: rgba(220,38,38,.25);
}
.field-error {
  display: block; min-height: 0;
  margin-top: 0;
  color: var(--error);
  font-size: 12px; font-weight: 500;
}
.field.has-error .field-error { min-height: 18px; margin-top: 4px; }
.address-suggestions {
  margin-top: 8px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(11,31,48,.08);
}
.address-suggestion {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--hair);
  background: #fff;
  padding: 14px 16px;
  text-align: left;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.address-suggestion:first-child {
  border-top: 0;
}
.address-suggestion:hover,
.address-suggestion.is-active {
  background: rgba(0,161,220,.08);
  color: var(--ink);
}
.address-suggestions-status {
  min-height: 18px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.privacy {
  margin: 6px 0 0;
  font-size: 12.5px; color: var(--muted); line-height: 1.55; font-weight: 400;
}
.privacy a { color: var(--accent); text-decoration: underline; }

/* ─── CALCULATOR ───────────────────────────────────────── */
.calc-title {
  margin: 0 0 24px;
  font-weight: 800; font-size: 22px; letter-spacing: -0.6px;
  color: var(--ink); line-height: 1.15;
}
.calc-block { margin-bottom: 26px; }
.calc-label {
  display: block;
  font-size: 13px; color: var(--body); font-weight: 500; margin-bottom: 6px;
}
.calc-value {
  display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px;
}
.calc-num, .calc-unit {
  font-weight: 500;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.calc-input {
  width: auto; min-width: 0;
  background: transparent; border: 0; outline: 0; padding: 0; margin: 0;
  font-family: inherit; font-weight: 500; font-size: 24px; line-height: 1;
  letter-spacing: -0.4px; color: var(--ink);
  border-bottom: 1.5px dashed transparent;
  transition: border-color .15s;
  field-sizing: content;
}
.calc-input:hover { border-bottom-color: rgba(0,161,220,.3); }
.calc-input:focus { border-bottom-color: var(--accent); }
.calc-input-period { width: 2ch; text-align: left; }

input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; background: #e6eaef; border-radius: 999px;
  margin: 0 0 10px;
  outline: 0; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--accent); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,161,220,.3);
  transition: box-shadow .15s, transform .1s;
}
input[type=range]::-webkit-slider-thumb:hover {
  box-shadow: 0 3px 12px rgba(0,161,220,.45); transform: scale(1.06);
}
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--accent); cursor: pointer;
}
.calc-ticks {
  display: flex; justify-content: space-between; gap: 4px;
  font-size: 12px; color: var(--muted); font-weight: 400;
}

.calc-divider {
  border: 0; border-top: 1px solid var(--hair);
  margin: 0 0 24px;
  margin-top: auto;
  width: 100%;
}
.calc-results {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-bottom: 20px;
}
.calc-results .calc-block { margin-bottom: 0; }
.calc-block-result .calc-num { white-space: nowrap; }

/* ─── BUTTONS ──────────────────────────────────────────── */
.button, .ghost-button {
  height: 60px;
  border: 0; cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 700; letter-spacing: -0.2px;
  border-radius: 8px;
  transition: background .15s, transform .1s, box-shadow .15s, color .15s;
}
.button {
  width: 100%;
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 16px rgba(0,161,220,.32);
}
.button:hover { background: var(--accent-deep); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled, .ghost-button:disabled {
  cursor: wait; opacity: .6; transform: none !important; box-shadow: none !important;
}
.ghost-button {
  height: 48px;
  background: transparent; color: var(--body);
  font-size: 14px; font-weight: 500;
}
.ghost-button:hover { color: var(--ink); }

/* ─── STAGE PANELS (SMS / ESIA) ────────────────────────── */
.stage-panel {
  width: 100%; max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 40px 44px 36px;
}
.stage-head { margin-bottom: 28px; }
.stage-h1 {
  margin: 0 0 8px;
  font-weight: 800; font-size: 36px; line-height: 1.1;
  letter-spacing: -1.2px; color: var(--ink); text-wrap: balance;
}
.stage-sub {
  margin: 0;
  font-size: 15px; line-height: 1.55; color: var(--body); font-weight: 400;
}

.sms-form { display: flex; flex-direction: column; gap: 20px; }
#smsCode {
  height: 72px;
  font-size: 32px; font-weight: 800;
  letter-spacing: 12px; text-align: center;
}

.stage-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 24px;
}

.esia-points {
  list-style: none; margin: 0 0 28px; padding: 24px 0 0;
  border-top: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 18px;
}
.esia-points li {
  display: grid; grid-template-columns: 110px 1fr; gap: 20px;
  align-items: baseline;
}
.esia-points h3 {
  margin: 0; font-weight: 700; font-size: 16px;
  color: var(--ink); letter-spacing: -0.2px;
}
.esia-points p {
  margin: 0; font-size: 14px; line-height: 1.55;
  color: var(--body); font-weight: 400;
}

.stage-foot {
  margin: 0; padding-top: 20px;
  border-top: 1px solid var(--hair);
  font-size: 12.5px; line-height: 1.55; color: var(--muted); font-weight: 400;
}

/* ─── Misc ─────────────────────────────────────────────── */
.message {
  min-height: 26px;
  margin: 24px auto 0;
  max-width: 600px;
  color: var(--body); font-size: 15px; font-weight: 400; text-align: center;
}
.message.is-error { color: var(--error); }

.captcha {
  position: fixed; left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* ─── Application process ─────────────────────────────── */
.process-hero { padding-bottom: 52px; }
.process-mast {
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 44px;
}
.process-back-link {
  color: rgba(255,255,255,.72);
  font-size: 14px;
  font-weight: 700;
  transition: color .15s;
}
.process-back-link:hover { color: #fff; }
.process-title {
  max-width: 760px;
  font-size: clamp(40px, 5vw, 64px);
}
.process-sub { margin-bottom: 0; }
.process-panel { max-width: 760px; }
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 30px;
}
.process-step {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--hair);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: #fff;
}
.process-step.is-active {
  color: var(--ink);
  border-color: rgba(0,161,220,.36);
  background: rgba(0,161,220,.08);
}
.process-step.is-done {
  color: #047857;
  border-color: rgba(4,120,87,.24);
  background: rgba(4,120,87,.07);
}
.document-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}
.document-card {
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}
.document-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--ink);
}
.document-card p {
  margin: 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.5;
}
.document-preview-button {
  margin-top: 12px;
  padding: 0;
}
.document-preview {
  margin: 14px 0 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--hair);
  background: var(--field);
  color: var(--body);
  white-space: pre-wrap;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.sign-code-note { margin-bottom: 18px; }
.process-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 18px 0 0; }
  .mast { padding-bottom: 28px; }
  .brand-logo { height: 32px; }

  .h1 {
    font-size: 38px; letter-spacing: -1.2px;
    margin-bottom: 16px;
  }
  .sub {
    font-size: 15px; margin-bottom: 24px;
  }

  .trust {
    grid-template-columns: 1fr 1fr;
    padding: 24px 0;
  }
  .trust-item { padding: 0 0 16px; }
  .trust-item dt { font-size: 22px; }
  .trust-item:nth-child(n+4) {
    grid-column: span 2;
    padding-top: 12px; padding-bottom: 0;
    border-top: 1px solid rgba(255,255,255,.1);
  }

  .features-wrap { padding: 40px 0 8px; }
  .features {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .feature {
    padding: 24px 0;
    border-top: 1px solid var(--hair);
  }
  .feature:first-child { border-top: 0; padding-top: 0; }
  .feature h3 { font-size: 18px; }

  .app-wrap { padding: 24px 0 32px; }
  .application {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  /* On mobile: calculator first, then form */
  .calculator { order: 1; padding: 26px 22px 22px; }
  .lead-form  { order: 2; padding: 26px 22px 22px; gap: 14px; }

  .form-headtop { align-items: flex-end; }
  .form-headtop h2 { font-size: 22px; letter-spacing: -0.5px; }
  .form-prob { font-size: 12.5px; text-align: right; }
  .form-sub { font-size: 13px; }

  .row-2 { grid-template-columns: 1fr; }
  .field input, .field select { height: 54px; padding: 0 16px; font-size: 16px; }

  .calc-title { font-size: 22px; margin-bottom: 22px; }
  .calc-num, .calc-unit, .calc-input { font-size: 22px; }
  .calc-results { grid-template-columns: 1fr 1fr; gap: 16px; }

  .stage-panel { padding: 28px 22px; }
  .stage-h1 { font-size: 26px; letter-spacing: -0.8px; }
  .esia-points li { grid-template-columns: 1fr; gap: 4px; }
  .process-steps { grid-template-columns: 1fr; }
  .process-step { justify-content: flex-start; padding: 0 14px; }
}
