:root {
  --bg: #0D1B2A;
  --bg-soft: #142236;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.6);
  --accent: #E63946;
  --accent-hover: #ff4c5a;
  --err: #ff6b74;
  --border: rgba(255, 255, 255, 0.14);
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 10;
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4rem 1.5rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

#lg-form {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
}
.step.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.step__inner {
  width: 100%;
  max-width: 580px;
}
.step__inner--center {
  text-align: center;
}

.step__eyebrow {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.step__q {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 5vw, 1.9rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  color: #fff;
}
.text-accent { color: #7dd3fc; }

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

.step__note {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}
.step__note-label { color: #fbbf24; font-weight: 600; }

.hide { display: none !important; }

.input {
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  padding: 0.95rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.input::placeholder { color: rgba(255, 255, 255, 0.35); }
.input:focus {
  border-color: var(--accent);
  background: #19273d;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23ffffff99' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
select.input option {
  background: var(--bg-soft);
  color: var(--fg);
}

.choice-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.choice-pill {
  appearance: none;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  border-radius: 999px;
  padding: 0.9rem 1.1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.choice-pill:hover,
.choice-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.75);
  background: rgba(125, 211, 252, 0.08);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.12);
  outline: none;
}

.choice-pill.is-selected {
  border-color: rgba(125, 211, 252, 0.95);
  background: rgba(125, 211, 252, 0.16);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.14);
}

.err {
  min-height: 1.2rem;
  color: var(--err);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

.nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
}
.nav.nav--end .btn--ghost { visibility: hidden; }

.btn {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn--primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--fg); }
.btn[hidden] { display: none; }

.check {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.step--success .step__q {
  font-size: clamp(1.8rem, 6vw, 2.4rem);
}

/* Once submitted, let the success step flow so the Calendly embed fits */
.form.is-done {
  min-height: 100vh;
}
.form.is-done #lg-form {
  display: block;
  flex: none;
  height: auto;
  padding-top: 1rem;
}
.form.is-done .step {
  position: static;
}
.form.is-done .step:not(.is-active) {
  display: none;
}
.form.is-done .step--success.is-active {
  display: block;
  opacity: 1;
  transform: none;
  visibility: visible;
  padding: 1rem 0 3rem;
}
.form.is-done .step__inner--center {
  max-width: 720px;
  margin: 0 auto;
}
.form.is-done .calendly-inline-widget {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

@media (max-width: 560px) {
  .form {
    padding: calc(2rem + env(safe-area-inset-top, 0px)) 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  #lg-form {
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 0.5rem;
    padding-bottom: 6.5rem;
  }
  .step {
    align-items: flex-start;
  }
  .step__q { font-size: 1.5rem; }
  .choice-grid { gap: 0.65rem; }
  .choice-pill { width: 100%; }
  .nav {
    position: fixed;
    left: 50%;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(calc(100% - 2.5rem), 670px);
    flex-direction: row-reverse;
    padding: 0.75rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(13, 27, 42, 0.78) 0%, rgba(13, 27, 42, 0.96) 100%);
    backdrop-filter: blur(8px);
    z-index: 20;
  }
  .nav .btn--primary { flex: 1; }
  .nav .btn--ghost { flex: 0 0 auto; }
}
