:root {
  --bg: #eef4fb;
  --panel: #ffffff;
  --panel-soft: #f7fafe;
  --text: #12223a;
  --muted: #66758b;
  --line: #dbe6f2;
  --primary: #185abc;
  --primary-dark: #12386b;
  --primary-soft: #e6f0ff;
  --danger: #b3261e;
  --success: #16804a;
  --shadow: 0 22px 70px rgba(20, 45, 82, 0.16);
  --radius: 24px;
  --field-radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(24, 90, 188, 0.16), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(18, 56, 107, 0.12), transparent 28rem),
    linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 52px) 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.34fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: start;
}

.hero-panel,
.form-card {
  border: 1px solid rgba(219, 230, 242, 0.96);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  position: sticky;
  top: 24px;
  overflow: hidden;
  min-height: 520px;
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -110px auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(24, 90, 188, 0.18), rgba(18, 56, 107, 0.04));
}

.brand-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.06em;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 36px rgba(24, 90, 188, 0.24);
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel h1 {
  position: relative;
  z-index: 1;
  margin: 28px 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.075em;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.65;
}

.trust-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.trust-row span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.form-card {
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 40px);
}

.form-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.form-heading p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.notice {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid #bfd5f6;
  border-radius: 18px;
  background: var(--primary-soft);
  color: #163863;
  line-height: 1.55;
}

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

.grid {
  display: grid;
  gap: 18px;
}

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

.three-columns {
  grid-template-columns: 1.1fr 1fr 0.9fr;
}

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

.field span,
.choice-group legend {
  color: #24344c;
  font-size: 0.94rem;
  font-weight: 760;
}

.field b,
.choice-group b {
  color: var(--danger);
  margin-left: 3px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--field-radius);
  outline: none;
  background: var(--panel-soft);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  border-color: rgba(24, 90, 188, 0.62);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24, 90, 188, 0.12);
}

.field.invalid input,
.upload-box.invalid,
.choice-group.invalid,
.consent-row.invalid {
  border-color: rgba(179, 38, 30, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.08);
}

.upload-box {
  position: relative;
  border: 1px dashed #a9bdd8;
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfdff, #f5f9ff);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.upload-box:focus-within {
  border-color: rgba(24, 90, 188, 0.72);
  box-shadow: 0 0 0 4px rgba(24, 90, 188, 0.1);
}

.upload-label {
  min-height: 94px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.upload-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
}

.upload-text {
  display: grid;
  gap: 5px;
}

.upload-text strong {
  color: var(--text);
}

.upload-text em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.4;
}

.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-group {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(247, 250, 254, 0.8);
}

.choice-group legend {
  padding: 0 7px;
  line-height: 1.45;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.segmented.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented label {
  min-width: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: #33445c;
  font-weight: 760;
  text-align: center;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.segmented input:focus-visible + span {
  outline: 3px solid rgba(24, 90, 188, 0.24);
  outline-offset: 2px;
}

.segmented input:checked + span {
  border-color: rgba(24, 90, 188, 0.75);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(24, 90, 188, 0.2);
}

.segmented label:hover span {
  transform: translateY(-1px);
  border-color: rgba(24, 90, 188, 0.36);
}

.consent-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: #314158;
  line-height: 1.55;
}

.consent-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.form-errors {
  padding: 14px 16px;
  border: 1px solid rgba(179, 38, 30, 0.25);
  border-radius: 16px;
  background: #fff4f2;
  color: var(--danger);
  font-weight: 700;
  line-height: 1.45;
}

.submit-button {
  position: relative;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 36px rgba(24, 90, 188, 0.25);
  font-weight: 850;
  letter-spacing: -0.015em;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(24, 90, 188, 0.3);
}

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

.button-loader {
  display: none;
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: middle;
  animation: spin 720ms linear infinite;
}

.submit-button.is-loading .button-loader {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 20, 39, 0.54);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.success-modal {
  width: min(460px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #e8f6ef;
  color: var(--success);
  font-size: 2rem;
  font-weight: 900;
}

.success-modal h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.success-modal p {
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.success-modal button {
  min-width: 140px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

@media (max-width: 920px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    position: relative;
    top: auto;
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding: 10px 0 24px;
  }

  .hero-panel,
  .form-card {
    border-radius: 22px;
  }

  .two-columns,
  .three-columns,
  .segmented.three {
    grid-template-columns: 1fr;
  }

  .segmented.three span {
    min-height: 46px;
  }

  .upload-label {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
