:root {
  --bg: #f2f6fc;
  --bg-accent: rgba(79, 109, 255, 0.08);
  --card: #ffffff;
  --card-soft: #f8fbff;
  --border: #dfe7f3;
  --border-strong: #cad6ea;
  --text: #111827;
  --muted: #5b6475;
  --accent: #4f6dff;
  --accent-strong: #405ad8;
  --accent-soft: rgba(79, 109, 255, 0.1);
  --success: #0f9d58;
  --danger: #dc2626;
  --shadow: 0 24px 60px rgba(24, 38, 69, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(79, 109, 255, 0.12), transparent 35%),
    linear-gradient(180deg, #f7f9fd 0%, #eef3fa 100%);
  color: var(--text);
  font-family: var(--font-sans);
}

body {
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}

.form-card {
  width: min(760px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 0 28px 28px;
}

.brand-line {
  height: 8px;
  border-radius: 999px;
  margin: 18px 0 20px;
  background: linear-gradient(90deg, var(--accent), #8a7dff);
}

.hero {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.hero-kicker {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero h1,
.success-card h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
}

.hero-copy,
.message-box,
.success-card p {
  color: var(--muted);
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.message-box {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.message-box.is-error {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b91c1c;
}

.message-box.is-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.success-card {
  margin-top: 20px;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid #cdeedc;
  background: linear-gradient(180deg, #f7fffb, #eefcf4);
  text-align: center;
}

.success-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(15, 157, 88, 0.12);
  color: var(--success);
  font-size: 28px;
  font-weight: 700;
}

#lead-form {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.field-group {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--card-soft);
  border: 1px solid var(--border);
}

.field {
  display: grid;
  gap: 10px;
}

.field-label,
.choice-block legend {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
}

.choice-block {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 14px;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  padding: 14px 15px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

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

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  transform: translateY(-1px);
}

.choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.choice input[type="checkbox"],
.choice input[type="radio"] {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.choice span {
  line-height: 1.5;
}

.choice-other {
  grid-template-columns: 22px auto minmax(0, 1fr);
  align-items: center;
}

.other-input {
  min-width: 0;
}

.other-input:disabled {
  opacity: 0.6;
  background: #f4f7fb;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.mailing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  line-height: 1.5;
}

.mailing-toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.primary-button,
.secondary-button,
.link-button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.primary-button,
.secondary-button {
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #617bff);
  color: #ffffff;
}

.secondary-button {
  background: #ffffff;
  color: var(--accent-strong);
  border: 1px solid var(--border-strong);
}

.link-button {
  background: transparent;
  color: var(--accent-strong);
  padding: 0;
}

.primary-button:hover,
.secondary-button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.link-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 720px) {
  .page-shell {
    padding: 16px 12px;
  }

  .form-card {
    padding: 0 16px 18px;
    border-radius: 22px;
  }

  .field-group {
    padding: 16px;
  }

  .choice-other {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .choice-other .other-input {
    grid-column: 2 / -1;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .link-button {
    width: 100%;
    text-align: center;
  }
}
