:root {
  color-scheme: light dark;
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e8eef7;
  --muted: #9aa8bc;
  --accent: #5b9bd5;
  --accent-hover: #7eb3e8;
  --border: #2a3a52;
  --error: #e07a7a;
  --ok: #7bc96f;
  font-family: "Segoe UI", system-ui, sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 10% -10%, #1c2a44, var(--bg));
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hero {
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.5rem;
}

.lead {
  color: var(--muted);
  margin: 0 auto 2rem;
  max-width: 36rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0;
  padding: 1rem 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lead-form fieldset > label,
#lead-form fieldset > .field-block,
#lead-form fieldset > .budget-control,
#lead-form fieldset > .radio-row {
  width: 100%;
  max-width: 420px;
}

legend {
  padding: 0 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  width: 100%;
  text-align: center;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text);
}

#lead-form label:not(.radio-row label) {
  text-align: center;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="range"],
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0d1218;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem;
  justify-content: center;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.95rem;
}

.form-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0.25rem;
}

.submit {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #0a0f14;
  cursor: pointer;
  min-width: 8rem;
}

.submit:hover {
  background: var(--accent-hover);
}

.submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.status {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.95rem;
  text-align: center;
  width: 100%;
}

.status.error {
  color: var(--error);
}

.status.ok {
  color: var(--ok);
}

.field-block {
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  text-align: center;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.budget-control {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.budget-slider {
  width: 100%;
  margin-top: 0.35rem;
  accent-color: var(--accent);
}

.budget-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.budget-control .muted {
  text-align: center;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f0f4fa;
    --card: #ffffff;
    --text: #1a2332;
    --muted: #5c6b80;
    --border: #c8d4e6;
  }

  body {
    background: radial-gradient(1200px 600px at 10% -10%, #dce8fb, var(--bg));
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="range"],
  textarea,
  select {
    background: #f7f9fc;
    color: var(--text);
  }

  .submit {
    color: #0a0f14;
  }
}
