/* Start a project: a short hero, then the three steps on black. Without JavaScript the steps are one long form that
   posts to the server; js/start.js adds .is-stepped and shows one step at a time. */
.st-hero { position: relative; padding: 148px 0 8px; text-align: center; isolation: isolate; overflow: hidden; }
.st-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(58% 70% at 50% 0%, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 72%); pointer-events: none; }
.st-hero .sx-hero-sub { max-width: 40em; margin-inline: auto; }

.st-wrap { padding: clamp(40px, 5vw, 64px) 0 clamp(72px, 8vw, 112px); }
.st-form { display: grid; gap: 18px; max-width: 780px; margin: 0 auto; text-align: left; }
.st-form.is-stepped { gap: 0; }

/* One step: the question, then its groups with room between them. The legend floats so the grid's gap applies. */
.st-step { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 22px; }
.st-form:not(.is-stepped) .st-step + .st-step { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.st-q { float: left; width: 100%; margin-bottom: 4px; padding: 0; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -.01em; }
.st-hint { margin-top: -14px; font-size: 15px; color: var(--soft); }
.st-group { display: grid; gap: 12px; min-width: 0; }
.st-label { font-size: 16px; color: #fefffe; }
.st-group .opt, .sx-field .opt { color: #a6a6a6; }

.st-progress { font-size: 13px; color: var(--soft); }
.st-progress::after {
  content: ""; display: block; height: 3px; margin-top: 12px; border-radius: 3px;
  background: linear-gradient(90deg, #fefffe var(--done, 33%), rgba(255, 255, 255, .16) var(--done, 33%));
  transition: background .4s var(--ease);
}
.is-stepped .st-progress { margin-bottom: 34px; }

/* The choices: cards with a real checkbox or radio inside, so they work with a keyboard and without JavaScript. */
.st-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.st-choices--row { grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); grid-auto-rows: auto; gap: 10px; }
.st-choice {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: #fefffe; font-size: 15.5px;
  line-height: 1.35; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.st-choices--row .st-choice { min-height: 54px; padding: 12px 16px; border-radius: 16px; font-size: 15px; }
.st-choice:hover { border-color: rgba(255, 255, 255, .42); }
.st-choice input {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; display: grid;
  place-items: center; border: 1px solid rgba(255, 255, 255, .55); border-radius: 6px; background: transparent; cursor: pointer;
}
.st-choice input[type="radio"] { border-radius: 50%; }
.st-choice input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.st-choice input:checked { background: #fefffe; border-color: #fefffe; }
.st-choice input[type="checkbox"]:checked::after { content: ""; width: 5px; height: 10px; border: solid #000; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.st-choice input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #000; }
.st-choice:has(input:checked) { background: #fefffe; border-color: #fefffe; color: #000; }
.st-choice:has(input:checked) input { border-color: #000; background: #000; }
.st-choice:has(input[type="checkbox"]:checked) input::after { border-color: #fefffe; }
.st-choice:has(input[type="radio"]:checked) input::after { background: #fefffe; }
.st-choices > .st-choice:last-child:nth-child(odd) { grid-column: 1 / -1; }
.st-choices--row > .st-choice:last-child:nth-child(odd) { grid-column: auto; }
.st-group.is-invalid .st-choice { border-color: #ff8a80; }

/* The text fields: one per row at every width, the full width of the choices, with the same label and spacing as the
   questions above them. Autofill keeps the dark field. */
.st-fields { display: grid; gap: 22px; }
.st-field { gap: 12px; }
.st-field > label { font-size: 16px; color: #fefffe; }
.st-field input { -webkit-appearance: none; appearance: none; }
.st-field input:-webkit-autofill, .st-field input:-webkit-autofill:hover, .st-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff; caret-color: #fff; box-shadow: inset 0 0 0 100px var(--card); transition: background-color 0s 600000s;
}
.st-field small { margin-top: -4px; font-size: 14px; line-height: 1.45; }
.sx-field textarea { min-height: 120px; }
.sx-field [aria-invalid="true"] { border-color: #ff8a80; }
.check { display: flex; gap: 12px; align-items: flex-start; max-width: 60em; font-size: 13.5px; line-height: 1.55; color: var(--soft); cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; display: grid;
  place-items: center; border: 1px solid rgba(255, 255, 255, .55); border-radius: 6px; background: var(--card); cursor: pointer;
}
.check input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.check input:checked { background: #fefffe; border-color: #fefffe; }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid #000; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }

/* The estimate: the package that fits, what it includes, when it goes live and how the proposal works. */
.st-estimate { display: grid; gap: 14px; padding: clamp(24px, 3vw, 34px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); }
.st-estimate-wait { color: var(--soft); }
.st-est-kicker { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.st-est-name { font-weight: 400; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.15; letter-spacing: -.01em; }
.st-est-fits { color: var(--soft); }
.st-est-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.st-est-list li { position: relative; padding-left: 26px; }
.st-est-list li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 6px; height: 11px; border: solid #fefffe; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.st-est-when { color: #fefffe; }
.st-est-more { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.55; color: var(--soft); }
.st-est-more strong { font-weight: 500; color: #fefffe; }
.st-estimate a { color: #fefffe; text-underline-offset: 3px; }

.st-errors { padding: 14px 18px; border: 1px solid #ff8a80; border-radius: 16px; background: rgba(255, 138, 128, .08); font-size: 15px; line-height: 1.5; }
.st-errors p { margin-bottom: 6px; font-weight: 500; }
.st-errors ul { padding-left: 20px; }
.st-errors a { color: #ffb4ab; text-underline-offset: 2px; }
.is-stepped .st-errors { margin-bottom: 24px; }

.form-legal { font-size: 13px; line-height: 1.5; color: var(--soft); }
.form-legal a { color: #fefffe; }
.is-stepped .form-legal { margin-top: 28px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 4px; }
.is-stepped .form-actions { margin-top: 34px; }
.st-submit:disabled { opacity: .6; cursor: wait; }
.form-status { font-size: 14px; color: var(--soft); }
.form-status.is-err { color: #ffb4ab; }
.st-back {
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: none; color: #fefffe; font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); cursor: pointer; transition: background-color .25s;
}
.st-back:hover { background: rgba(255, 255, 255, .08); }
.st-small { margin-top: 22px; font-size: 14px; color: var(--soft); }
.st-small a { color: #fefffe; text-underline-offset: 3px; }

/* The thank-you that takes the form's place. */
.st-thanks { display: grid; gap: 14px; max-width: 780px; margin: 0 auto; padding: clamp(28px, 4vw, 40px); border-radius: 32px; background: var(--card); text-align: left; }
.st-thanks:focus { outline: none; }
.st-thanks h1, .st-thanks h2 { font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; }
.st-hero--reply { padding-bottom: clamp(72px, 8vw, 112px); }
.st-hero--reply .st-thanks { margin-top: 8px; }
.st-thanks p { color: var(--soft); }
.st-thanks .sx-actions { justify-content: flex-start; margin-top: 8px; }
.st-thanks .st-next { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: #fefffe; }
.st-thanks .st-book { min-width: 300px; min-height: 68px; gap: 22px; padding: 6px 6px 6px 30px; font-size: 18px; font-weight: 500; }
.st-thanks .st-book .sx-arrow { width: 56px; height: 56px; }
.st-thanks .st-book .sx-arrow svg { width: 18px; height: 18px; }
.st-thanks .st-book-link { font-size: 14px; overflow-wrap: anywhere; }
.st-thanks .st-book-link a { color: #fefffe; text-underline-offset: 3px; }
.st-thanks .st-est-more { margin-top: 10px; }

@media (prefers-reduced-motion: no-preference) {
  .is-stepped .st-step:not([hidden]) { animation: st-step-in .45s var(--ease); }
  @keyframes st-step-in { from { opacity: 0; transform: translateY(10px); } }
}
@media (max-width: 640px) {
  .st-hero { padding: 128px 0 4px; }
  .st-choices { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 10px; }
  .st-choices--row { grid-template-columns: minmax(0, 1fr); }
  .st-choice { min-height: 56px; }
  .st-thanks .st-book { width: 100%; min-width: 0; }
  .is-stepped .form-actions { margin-top: 30px; }
}
.st-hint--after { margin-top: 2px; }
.st-field-error { font-size: 14px; line-height: 1.4; color: #ffb4ab; }
