:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: rgba(255, 255, 255, 0.78);
  --blue: #2f6bff;
  --blue-deep: #1e54e8;
  --blue-soft: #eef4ff;
  --gray-fill: #f4f7fb;
  --danger: #e11d48;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 60px -28px rgba(37, 67, 140, 0.45);
  --radius: 28px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.22, 1.18, 0.36, 1);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background: #d7e2f0;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
.option-card,
.submit-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 255, 255, 0.7), transparent 55%),
    linear-gradient(180deg, #e7eef8 0%, #d5e0ee 48%, #c9d6e8 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
}

.orb-a {
  width: 340px;
  height: 340px;
  top: -90px;
  right: -70px;
  background: #9ec0ff;
  opacity: 0.55;
  animation: drift 22s ease-in-out infinite;
}

.orb-b {
  width: 280px;
  height: 280px;
  left: -90px;
  bottom: 12%;
  background: #c4d4fe;
  opacity: 0.7;
  animation: drift 28s ease-in-out infinite reverse;
}

.orb-c {
  width: 220px;
  height: 220px;
  right: 18%;
  bottom: -80px;
  background: #ffffff;
  opacity: 0.45;
  animation: drift 26s 1.5s ease-in-out infinite;
}

.page {
  width: min(520px, 100%);
  margin: 0 auto;
}

.screen {
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  padding: calc(14px + var(--safe-top)) 16px 12px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(10px);
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 16px rgba(47, 107, 255, 0.28));
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.sheet {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  padding: 16px 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
}

.is-ready .brand {
  animation: enter-up 0.7s var(--ease-out) both;
}

.is-ready .sheet {
  animation: enter-sheet 0.8s 0.07s var(--ease-out) both;
}

.lead-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.progress-segments {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.seg {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.seg::after {
  content: "";
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
}

.seg.is-on::after {
  transform: scaleX(1);
}

.progress-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}

.viewport {
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.track {
  display: flex;
  width: 400%;
  height: 100%;
  transition: transform 0.58s var(--ease-out);
  will-change: transform;
}

.step {
  width: 25%;
  padding: 0 2px 4px;
  flex-shrink: 0;
  height: 100%;
  overflow: auto;
}

.step-contact {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.step-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.step-cta {
  flex-shrink: 0;
  padding-top: 8px;
}

.step-intro {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--blue-soft);
}

.step-intro p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  color: var(--ink);
}

.step-intro .step-intro-sub {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step h2 {
  margin: 0 0 20px;
  font-size: clamp(1.45rem, 5.6vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: -0.038em;
  font-weight: 750;
}

.options {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.option {
  display: block;
  cursor: pointer;
}

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

.option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition:
    border-color 0.28s ease,
    background 0.28s ease,
    transform 0.28s var(--ease-spring),
    box-shadow 0.28s ease;
}

.option-check {
  width: 22px;
  height: 22px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  background: #fff;
  transition: border-color 0.28s ease, transform 0.32s var(--ease-spring);
}

.option-check::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--blue);
  transform: scale(0);
  transition: transform 0.32s var(--ease-spring);
}

.option-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.option:active .option-card {
  transform: scale(0.98);
}

.option input:checked + .option-card {
  border-color: #b6ccff;
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
  animation: option-settle 0.42s var(--ease-out);
}

.option input:checked + .option-card .option-check {
  border-color: var(--blue);
  transform: scale(1.06);
}

.option input:checked + .option-card .option-check::after {
  transform: scale(1);
}

@media (hover: hover) and (pointer: fine) {
  .option:hover .option-card {
    border-color: #c9d7ee;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -16px rgba(15, 23, 42, 0.35);
  }

  .option:hover input:checked + .option-card,
  .option input:checked + .option-card:hover {
    transform: translateY(-1px);
  }
}

.option input:focus-visible + .option-card {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.fields {
  display: grid;
  gap: 12px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  color: #334155;
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--gray-fill);
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    transform 0.22s var(--ease-out);
}

.field input::placeholder {
  color: #94a3b8;
}

.field input:focus {
  border-color: #93b4ff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.14);
}

.field.has-error input {
  border-color: #fda4af;
  background: #fff1f2;
  animation: field-shake 0.42s var(--ease-out);
}

.field-error {
  overflow: hidden;
  max-height: 0;
  margin: 0;
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    max-height 0.28s var(--ease-out),
    opacity 0.22s ease,
    transform 0.28s var(--ease-out),
    margin 0.28s var(--ease-out);
}

.field.has-error .field-error {
  max-height: 24px;
  margin: 5px 0 0;
  opacity: 1;
  transform: none;
}

.form-error {
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff1f2;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}

.submit-btn,
.back-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.submit-btn {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  border-radius: 14px;
  background: linear-gradient(180deg, #4d80ff 0%, var(--blue) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 20px -8px rgba(47, 107, 255, 0.7);
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    color 0.28s ease,
    transform 0.2s var(--ease-spring);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.submit-btn:disabled {
  background: #c5d0de;
  color: #f8fafc;
  box-shadow: none;
  cursor: not-allowed;
}

.submit-btn.is-armed:not(:disabled) {
  animation: arm-button 0.55s var(--ease-spring);
}

.tcpa {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(8px);
  margin: 0;
  transition:
    grid-template-rows 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.4s ease,
    margin 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.tcpa.is-in {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  margin: 4px 0 10px;
}

.tcpa-inner {
  overflow: hidden;
  min-height: 0;
}

.tcpa-inner p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
}

.nav {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  flex-shrink: 0;
  transition: grid-template-rows 0.35s var(--ease-out), margin 0.35s var(--ease-out);
}

.nav.has-back {
  grid-template-rows: 1fr;
  margin-top: 2px;
}

.nav-inner {
  overflow: hidden;
  min-height: 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 10px 2px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out), color 0.2s ease;
}

.nav.has-back .back-btn {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-btn:active {
  color: var(--ink);
}

.back-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-out);
}

.nav.has-back .back-btn:active svg {
  transform: translateX(-2px);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.overlay[hidden] {
  display: none;
}

.overlay-card,
.success-card {
  width: min(360px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.overlay-card {
  transform: translateY(14px) scale(0.97);
  transition: transform 0.45s var(--ease-out);
}

.overlay.is-visible .overlay-card {
  transform: none;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 16px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.overlay-title,
.success h2 {
  margin: 0 0 8px;
  letter-spacing: -0.035em;
  font-weight: 750;
}

.overlay-title {
  font-size: 1.2rem;
}

.overlay-copy,
.success p {
  margin: 0;
  color: var(--muted);
}

.success {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 32px 24px;
  z-index: 30;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 255, 255, 0.75), transparent 55%),
    linear-gradient(180deg, #e7eef8 0%, #d5e0ee 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.success.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.success[hidden] {
  display: none;
}

.success-card {
  animation: none;
}

.success.is-visible .success-card {
  animation: enter-sheet 0.7s var(--ease-out) both;
}

.success-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #4d80ff 0%, var(--blue) 100%);
  box-shadow: 0 12px 24px -8px rgba(47, 107, 255, 0.65);
}

.success.is-visible .success-mark {
  animation: mark-pop 0.55s 0.08s var(--ease-spring) both;
}

.success-mark svg {
  width: 34px;
  height: 34px;
}

.check-path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.success.is-visible .check-path {
  animation: draw 0.55s 0.28s ease forwards;
}

.success.is-visible h2 {
  animation: rise-in 0.55s 0.22s var(--ease-out) both;
}

.success.is-visible p {
  animation: rise-in 0.55s 0.32s var(--ease-out) both;
}

.success h2 {
  max-width: 18ch;
  margin: 0 auto 10px;
  font-size: clamp(1.45rem, 5.4vw, 1.85rem);
  line-height: 1.2;
}

.success p {
  max-width: 30ch;
  margin: 0 auto;
  font-size: 0.98rem;
  line-height: 1.5;
}

.site-footer {
  padding: 28px 18px calc(32px + var(--safe-bottom));
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--blue-deep);
  font-weight: 650;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.step.is-entering .step-intro,
.step.is-entering .eyebrow,
.step.is-entering h2,
.step.is-entering .option,
.step.is-entering .step-body,
.step.is-entering .step-cta {
  animation: rise-in 0.52s var(--ease-out) both;
}

.step.is-entering .eyebrow {
  animation-delay: 0.05s;
}

.step.is-entering h2 {
  animation-delay: 0.08s;
}

.step.is-entering .options .option:nth-child(2) { animation-delay: 0.12s; }
.step.is-entering .options .option:nth-child(3) { animation-delay: 0.17s; }
.step.is-entering .options .option:nth-child(4) { animation-delay: 0.22s; }
.step.is-entering .options .option:nth-child(5) { animation-delay: 0.27s; }
.step.is-entering .options .option:nth-child(6) { animation-delay: 0.32s; }

.step.is-entering .step-body {
  animation-delay: 0.06s;
}

.step.is-entering .step-cta {
  animation-delay: 0.16s;
}

.step-contact.is-entering .eyebrow,
.step-contact.is-entering h2 {
  animation: none;
}

.page.is-complete .screen,
.page.is-complete .site-footer {
  visibility: hidden;
}

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

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(18px, -14px) scale(1.04);
  }
}

@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes enter-sheet {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes option-settle {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.985);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes field-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

@keyframes arm-button {
  0% {
    transform: scale(0.98);
  }
  55% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes mark-pop {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  70% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .brand,
  .sheet,
  .step.is-entering .step-intro,
  .step.is-entering .eyebrow,
  .step.is-entering h2,
  .step.is-entering .option,
  .step.is-entering .step-body,
  .step.is-entering .step-cta,
  .submit-btn.is-armed,
  .success.is-visible .success-card,
  .success.is-visible .success-mark,
  .success.is-visible h2,
  .success.is-visible p {
    animation: none !important;
  }

  .brand,
  .sheet {
    opacity: 1;
    transform: none;
  }

  .track,
  .seg::after,
  .option-card,
  .option-check,
  .option-check::after,
  .field input,
  .field-error,
  .submit-btn,
  .tcpa,
  .nav,
  .back-btn,
  .overlay,
  .overlay-card,
  .success {
    transition: none !important;
  }
}

@media (min-width: 640px) {
  .screen {
    padding-top: calc(28px + var(--safe-top));
  }

  .sheet {
    padding: 22px 22px 14px;
  }
}

@media (max-height: 740px) {
  .brand-sub {
    display: none;
  }

  .step-intro {
    margin-bottom: 12px;
    padding: 10px 12px;
  }

  .step h2 {
    margin-bottom: 14px;
    font-size: clamp(1.28rem, 5vw, 1.55rem);
  }

  .fields {
    gap: 8px;
  }

  .field input {
    min-height: 46px;
  }
}

.legal-body .page {
  min-height: 100svh;
  padding: calc(18px + var(--safe-top)) 18px calc(28px + var(--safe-bottom));
}

.legal-sheet {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  padding: 22px 20px 28px;
}

.legal-sheet h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 6vw, 2rem);
  letter-spacing: -0.04em;
  font-weight: 750;
  line-height: 1.15;
}

.legal-updated {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.legal-sheet h2 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.legal-sheet p,
.legal-sheet li {
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

.legal-sheet p {
  margin: 0 0 12px;
}

.legal-sheet ul {
  margin: 0 0 12px;
  padding-left: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  color: var(--blue-deep);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.back-link svg {
  width: 18px;
  height: 18px;
}
