/* ===== Продажник.kz: первый экран. Значения сняты с макета, не менять ===== */
:root {
  /* 1 единица макета: ровно 1px на экранах 1280x678 и 392x678 */
  --u: clamp(0.75px, min(0.078125vw, 0.14749vh), 1.5px);
  --pad-top: 2.04;
  --gap-logo: 79;
  --gap-text: 12;
  --gap-btn: 87.5;
  --bg-pos: 50% 7%;
}

@media (max-width: 767px), (orientation: portrait) {
  :root {
    --u: clamp(0.7px, min(0.255102vw, 0.14749vh), 1.5px);
    --pad-top: 0;
    --gap-logo: 62;
    --gap-btn: 70.5;
    --bg-pos: 50% 0%;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: #16181c;
}

body {
  min-width: 100%;
  min-height: 100%;
}

button,
input {
  font: inherit;
}

.hero {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--pad-top) * var(--u)) 0 0;
  background-color: #16181c;
  background-image: url("/hero-bg.jpg");
  background-size: cover;
  background-position: var(--bg-pos);
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
}

.hero-logo {
  display: block;
  width: auto;
  max-width: none;
  height: calc(42.54 * var(--u));
  margin: 0;
}

.hero-title {
  margin: calc(var(--gap-logo) * var(--u)) 0 0;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-variation-settings: "opsz" 14;
  font-size: calc(30 * var(--u));
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  color: #fff;
}

.hero-subtitle {
  margin: calc(var(--gap-text) * var(--u)) 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: calc(16 * var(--u));
  line-height: calc(19 * var(--u));
  letter-spacing: 0;
  white-space: nowrap;
  color: #fff;
}

.hero-button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(188 * var(--u));
  height: calc(51 * var(--u));
  margin: calc(var(--gap-btn) * var(--u)) 0 0;
  padding: calc(1 * var(--u)) 0 0;
  border: 0;
  border-radius: calc(7 * var(--u));
  background: #3761e2;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: calc(18 * var(--u));
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero-button:hover { background: #4a71ea; }
.hero-button:active { background: #2e55d4; }
.hero-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ===== Окно заявки ===== */
.lead-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 16px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.6);
}

.lead-overlay[hidden] { display: none; }

.lead-modal {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 400px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #15171c;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: "Roboto", sans-serif;
  text-align: left;
  outline: none;
}

.lead-overlay[data-state="open"] { animation: lead-fade 0.15s ease-out; }
.lead-modal[data-state="open"] { animation: lead-pop 0.15s ease-out; }

@keyframes lead-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lead-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .lead-overlay[data-state="open"],
  .lead-modal[data-state="open"] { animation: none; }
}

@media (max-width: 480px) {
  .lead-modal { padding: 28px 20px 24px; }
}

.lead-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.lead-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.lead-close svg { width: 20px; height: 20px; }

.lead-title {
  margin: 0;
  padding-right: 32px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-variation-settings: "opsz" 14;
  font-size: 24px;
  line-height: 1.2;
  color: #fff;
}

.lead-text {
  margin: 8px 0 0;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.lead-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.85);
}

.lead-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.lead-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.lead-input:focus { border-color: #3761e2; background: rgba(255, 255, 255, 0.08); }
.lead-input[aria-invalid="true"] { border-color: #ff6b6b; }

.lead-error {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.3;
  color: #ff8a8a;
}

.lead-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.lead-alert {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #ff8a8a;
  text-align: center;
  text-wrap: balance;
}

.lead-submit {
  box-sizing: border-box;
  width: 100%;
  height: 51px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #3761e2;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.lead-submit:hover { background: #4a71ea; }
.lead-submit:active { background: #2e55d4; }
.lead-submit:disabled { opacity: 0.6; cursor: default; }

.lead-consent {
  margin: -4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  text-wrap: balance;
}

.lead-success { padding-top: 8px; text-align: center; }
.lead-success[hidden] { display: none; }
.lead-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(55, 97, 226, 0.15);
  color: #3761e2;
}
.lead-success-icon svg { width: 28px; height: 28px; }
.lead-success .lead-title { padding-right: 0; text-wrap: balance; }
.lead-success .lead-submit { margin-top: 24px; }

[hidden] { display: none !important; }
