:root {
  --surface: #ffffff;
  --ink: #111827;
  --muted: #556272;
  --line: #d8e0ea;
  --primary: #0b7285;
  --primary-dark: #075264;
  --danger: #b42318;
  --success-bg: #ecfdf3;
  --success-text: #067647;
  --shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #07196b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.page-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px 12px;
}

.lead-card {
  position: relative;
  width: 100%;
  max-width: 680px;
  min-width: 0;
  color: #ffffff;
  background: #07196b;
  isolation: isolate;
  border: 1px solid rgba(110, 203, 255, 0.36);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px 16px 18px;
  overflow: hidden;
}

.card-bg {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  filter: contrast(1.35) saturate(1.35) brightness(1.08);
}

.lead-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(3, 16, 58, 0.12);
  pointer-events: none;
  z-index: 2;
}

.card-header,
form {
  position: relative;
  z-index: 3;
}

.card-header {
  margin-bottom: 20px;
  text-align: center;
}

.page-logo {
  display: flex;
  justify-content: center;
  padding: 20px 0 12px;
}

.logo-badge {
  width: 64px;
  height: 64px;
  background: #07196b;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.logo-badge img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.card-header p:last-child {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

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

.field,
.field-group {
  min-width: 0;
  display: grid;
  gap: 8px;
}

label,
legend {
  font-size: 0.95rem;
  font-weight: 760;
  color: #ffffff;
}

.group-legend {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 760;
  color: #ffffff;
}

.group-box {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(173, 221, 255, 0.34);
  border-radius: 18px;
  background: rgba(3, 22, 82, 0.42);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(210, 232, 255, 0.78);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.choice {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(210, 232, 255, 0.78);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #243244;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.nested-field {
  padding-top: 4px;
}

.error {
  min-height: 16px;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 650;
}

.form-message {
  display: none;
  border-radius: 14px;
  padding: 13px 14px;
  font-weight: 720;
  line-height: 1.4;
}

.form-message.is-success {
  display: block;
  color: var(--success-text);
  background: var(--success-bg);
  border: 1px solid #abefc6;
}

.form-message.is-error {
  display: block;
  color: var(--danger);
  background: #fff4f3;
  border: 1px solid #fecdca;
}

.submit-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0ea5e9, #064d83);
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(2, 8, 23, 0.34);
}

.submit-button:hover {
  background: linear-gradient(135deg, #0284c7, #053f70);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (min-width: 720px) {
  .page-shell {
    padding: 44px 24px;
  }

  .lead-card {
    padding: 34px;
    border-radius: 28px;
  }

  h1 {
    font-size: 2.8rem;
    line-height: 1.05;
  }

  form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-group,
  .form-message,
  .submit-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .page-shell {
    align-items: start;
    padding: 10px;
  }

  .lead-card {
    width: 100%;
    border-radius: 18px;
    padding: 20px 14px 16px;
  }

  h1 {
    font-size: 1.65rem;
    line-height: 1.12;
  }

  .card-header p:last-child {
    font-size: 0.95rem;
  }

  .group-box {
    padding: 12px;
    border-radius: 14px;
  }

  .choice {
    align-items: flex-start;
    padding: 11px 10px;
    font-size: 0.94rem;
  }

  .choice input {
    margin-top: 1px;
  }
}

@media (max-width: 340px) {
  .page-shell {
    padding: 6px;
  }

  .lead-card {
    border-radius: 14px;
    padding: 16px 10px 12px;
  }

  h1 {
    font-size: 1.45rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  .submit-button {
    border-radius: 12px;
  }
}
