:root {
  --ink: #151a22;
  --muted: #68707d;
  --line: #e3e6ea;
  --surface: #ffffff;
  --canvas: #f5f6f7;
  --orange: #ff7a00;
  --orange-dark: #dc6200;
  --orange-soft: #fff3e7;
  --green: #16834b;
  --shadow: 0 20px 60px rgba(18, 24, 33, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--canvas);
  background-image: linear-gradient(rgba(19, 25, 33, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(19, 25, 33, .035) 1px, transparent 1px);
  background-size: 32px 32px;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.onboarding-topbar {
  height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.onboarding-brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; width: max-content; }
.onboarding-brand img { width: 76px; height: 48px; object-fit: contain; object-position: left center; }
.security-label { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: .76rem; font-weight: 700; }
.security-label svg, .summary-security svg { width: 19px; height: 19px; fill: currentColor; flex: 0 0 auto; }
.exit-link { justify-self: end; color: #4f5661; text-decoration: none; font-size: .82rem; font-weight: 700; padding: 10px 14px; border-radius: 999px; background: #eef0f2; }
.exit-link span { margin-right: 7px; font-size: .95rem; }

.progress-nav { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); }
.progress-nav ol { max-width: 760px; margin: 0 auto; padding: 17px 24px; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); }
.progress-nav li { position: relative; display: flex; align-items: center; gap: 9px; color: #a0a5ad; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.progress-nav li:not(:last-child)::after { content: ""; height: 1px; background: #d8dce1; position: absolute; left: 34px; right: 10px; top: 13px; z-index: 0; }
.progress-nav li span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #d6dae0; border-radius: 50%; background: #fff; position: relative; z-index: 1; font-weight: 800; }
.progress-nav li strong { font-weight: 700; background: #fff; position: relative; z-index: 1; padding-right: 10px; }
.progress-nav li.is-active { color: var(--ink); }
.progress-nav li.is-active span { color: #fff; border-color: var(--ink); background: var(--ink); }
.progress-nav li.is-complete { color: var(--orange-dark); }
.progress-nav li.is-complete span { color: #fff; border-color: var(--orange); background: var(--orange); font-size: 0; }
.progress-nav li.is-complete span::before { content: "✓"; font-size: .75rem; }

.onboarding-main { padding: clamp(34px, 5vw, 70px) 22px 90px; }
.onboarding-layout { width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: clamp(30px, 5vw, 70px); align-items: start; }
.onboarding-form { min-width: 0; }
.form-step { animation: step-in .3s ease both; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-kicker, .summary-eyebrow { color: var(--orange-dark); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.form-step h1 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.05; letter-spacing: -.045em; margin: 0; max-width: 740px; }
.step-subtitle { color: var(--muted); max-width: 680px; font-size: .98rem; line-height: 1.7; margin: 15px 0 32px; }

.choice-group { border: 0; padding: 0; margin: 0 0 30px; min-width: 0; }
.choice-group legend { display: block; width: 100%; margin-bottom: 12px; font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #555d69; }
.segment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-tile, .plan-card, .coach-card {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
  text-align: left;
}
.choice-tile:hover, .plan-card:hover, .coach-card:hover { border-color: #b7bdc6; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(18,24,33,.08); }
.choice-tile.is-selected, .plan-card.is-selected, .coach-card.is-selected { border: 2px solid var(--orange); background: #fffaf5; box-shadow: 0 0 0 4px rgba(255,122,0,.09); }
.choice-tile { min-height: 94px; padding: 18px; display: flex; align-items: center; gap: 14px; }
.choice-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: #f0f2f4; font-size: 1.25rem; }
.choice-tile.is-selected .choice-icon { background: var(--orange); color: #fff; }
.choice-tile strong, .choice-tile small { display: block; }
.choice-tile strong { font-size: .94rem; margin-bottom: 5px; }
.choice-tile small { color: var(--muted); line-height: 1.45; font-size: .72rem; }
.choice-tile--modality { min-height: 76px; justify-content: center; text-align: center; letter-spacing: .08em; }
.choice-tile--modality strong { margin: 0; font-size: .88rem; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-card { padding: 20px; min-height: 175px; position: relative; }
.plan-card__period { display: block; font-weight: 800; margin-bottom: 18px; }
.plan-card__price { font-size: 1.65rem; font-weight: 800; letter-spacing: -.04em; }
.plan-card__price small { font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan-card__total { display: block; margin-top: 8px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.plan-card__tag { display: inline-block; margin-top: 15px; padding: 5px 8px; border-radius: 999px; background: #f0f2f4; color: #545c68; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.plan-card.is-selected .plan-card__tag { background: var(--orange); color: #fff; }
.loading-box { color: var(--muted); font-size: .85rem; padding: 18px; border: 1px dashed #cfd4da; border-radius: 14px; background: rgba(255,255,255,.5); }
.loading-box:not(:empty).segment-grid, .loading-box:not(:empty).plan-grid, .loading-box:not(:empty).coach-grid { display: block; }

.coach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 14px; margin-top: 32px; }
.coach-card { padding: 0; min-height: 220px; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; text-align: center; }
.coach-photo { display: block; width: 100%; aspect-ratio: 1 / 1.05; overflow: hidden; background: #202731; }
.coach-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; filter: saturate(.9); transition: transform .25s ease, filter .25s ease; }
.coach-card:hover .coach-photo img, .coach-card.is-selected .coach-photo img { transform: scale(1.025); filter: saturate(1); }
.coach-card__body { display: grid; place-items: center; min-height: 58px; padding: 12px 10px; background: #fff; }
.coach-card.is-selected .coach-card__body { background: #fff8f1; }
.coach-avatar { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 50%; background: linear-gradient(145deg, #202731, #48515e); color: #fff; font-size: 1.15rem; font-weight: 800; }
.coach-card.is-selected .coach-avatar { background: linear-gradient(145deg, var(--orange), var(--orange-dark)); }
.coach-card strong { font-size: .84rem; line-height: 1.35; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.field--full { grid-column: 1 / -1; }
.field--wide { grid-column: span 1; }
.field label { display: block; margin-bottom: 8px; color: #414954; font-size: .76rem; font-weight: 800; }
.field label span { color: #949aa3; font-weight: 500; }
.field input { width: 100%; height: 52px; border: 1px solid #d7dbe0; border-radius: 11px; padding: 0 14px; background: #fff; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,122,0,.1); }
.field input.is-invalid { border-color: #c53636; box-shadow: 0 0 0 3px rgba(197,54,54,.08); }
.field > small { display: block; color: #858c96; margin-top: 6px; font-size: .67rem; line-height: 1.4; }
.field-status.is-success { color: var(--green); }
.field-status.is-error { color: #a42929; }
.privacy-note { margin-top: 26px; padding: 15px 17px; border-radius: 13px; color: #4f5965; background: #eef6f1; display: flex; gap: 12px; font-size: .73rem; line-height: 1.55; }
.privacy-note svg { width: 23px; height: 23px; fill: var(--green); flex: 0 0 auto; }

.terms-check { margin-top: 24px; display: flex; gap: 11px; align-items: flex-start; font-size: .73rem; line-height: 1.55; color: #515966; cursor: pointer; }
.terms-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--orange); flex: 0 0 auto; }
.terms-check a { color: var(--orange-dark); font-weight: 700; }
.turnstile-wrap { margin-top: 22px; }
.turnstile-wrap > small { display: block; margin-top: 7px; color: #8a9098; font-size: .65rem; }

.step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; }
.step-actions--end { justify-content: flex-end; }
.primary-action, .secondary-action { min-height: 50px; border-radius: 999px; padding: 0 24px; font-weight: 800; font-size: .78rem; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.primary-action { border: 0; color: #fff; background: var(--ink); box-shadow: 0 8px 22px rgba(21,26,34,.16); }
.primary-action:hover { transform: translateY(-1px); background: var(--orange); box-shadow: 0 10px 24px rgba(255,122,0,.22); }
.primary-action:disabled { cursor: wait; opacity: .65; transform: none; }
.primary-action span { margin-left: 8px; }
.secondary-action { border: 1px solid #d9dde2; background: #fff; color: #555d68; }
.secondary-action:hover { border-color: #aeb4bd; }
.secondary-action span { margin-right: 7px; }
.step-error { min-height: 18px; margin: 12px 0 0; color: #a42929; font-size: .72rem; text-align: right; }
.form-status { display: none; margin-top: 18px; padding: 13px 15px; border-radius: 10px; font-size: .75rem; font-weight: 700; }
.form-status.is-error { display: block; color: #982b2b; background: #fff0f0; }
.form-status.is-loading { display: block; color: #4c5664; background: #edf0f3; }
.submit-disclaimer { color: #858c95; font-size: .67rem; text-align: right; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.selection-summary { position: sticky; top: 165px; padding: 25px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.selection-summary h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.025em; }
.selection-summary dl { margin: 22px 0 0; }
.selection-summary dl > div { padding: 12px 0; border-bottom: 1px solid #eceef1; }
.selection-summary dt { color: #90969e; font-size: .61rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 4px; }
.selection-summary dd { margin: 0; font-size: .78rem; font-weight: 700; line-height: 1.4; }
.summary-price { margin-top: 16px; border-radius: 13px; padding: 14px; background: var(--orange-soft); color: #8c3d00; }
.summary-price strong, .summary-price small { display: block; }
.summary-price strong { font-size: 1.2rem; }
.summary-price small { margin-top: 3px; font-size: .64rem; line-height: 1.45; }
.summary-security { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; color: var(--green); font-size: .67rem; font-weight: 700; line-height: 1.45; }
.summary-help { margin: 20px 0 0; color: #858b94; font-size: .66rem; line-height: 1.6; }
.summary-help a { color: var(--ink); font-weight: 800; }

.onboarding-footer { min-height: 64px; padding: 18px clamp(20px, 4vw, 64px); border-top: 1px solid var(--line); background: rgba(255,255,255,.9); display: flex; justify-content: space-between; align-items: center; color: #8b9199; font-size: .65rem; }

.success-page { display: flex; flex-direction: column; }
.success-page .onboarding-footer { margin-top: auto; }
.success-main { flex: 1; display: grid; place-items: center; padding: clamp(44px, 7vw, 90px) 20px; }
.success-card { width: min(680px, 100%); padding: clamp(30px, 5vw, 54px); text-align: center; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.success-icon { width: 74px; height: 74px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); box-shadow: 0 10px 28px rgba(22,131,75,.22); font-size: 1.8rem; font-weight: 800; }
.success-card h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -.045em; }
.success-card > p { max-width: 570px; margin: 17px auto 0; color: var(--muted); font-size: .88rem; line-height: 1.75; }
.success-summary { margin: 26px 0 0; padding: 18px 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border: 1px solid #e5e8eb; border-radius: 16px; background: #fffaf5; text-align: left; }
.success-summary[hidden] { display: none; }
.success-summary div { min-width: 0; }
.success-summary dt { margin-bottom: 5px; color: #9298a1; font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.success-summary dd { margin: 0; font-size: .75rem; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.success-next { margin-top: 30px; padding: 22px; border-radius: 16px; background: #f5f7f8; text-align: left; }
.success-next > strong { display: block; margin-bottom: 14px; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.success-next ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.success-next li { display: flex; align-items: center; gap: 11px; color: #4f5863; font-size: .74rem; font-weight: 600; }
.success-next li span { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #fff; color: var(--orange-dark); border: 1px solid #e1e4e8; font-size: .65rem; font-weight: 800; }
.success-actions { margin-top: 27px; display: flex; justify-content: center; gap: 11px; flex-wrap: wrap; }
.success-actions a { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.success-actions .whatsapp-action { background: #16834b; box-shadow: 0 8px 22px rgba(22,131,75,.2); }
.success-actions .whatsapp-action:hover { background: #116c3d; box-shadow: 0 10px 24px rgba(22,131,75,.25); }
.success-reassurance { display: block; margin-top: 17px; color: #8a9199; font-size: .65rem; }

@media (max-width: 930px) {
  .onboarding-layout { grid-template-columns: 1fr; }
  .selection-summary { position: static; grid-row: 1; padding: 18px 20px; }
  .selection-summary dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
  .selection-summary dl > div { border: 0; padding: 0; }
  .summary-security, .summary-help { display: none; }
  .summary-price { display: inline-block; }
}
@media (max-width: 700px) {
  .onboarding-topbar { height: 68px; grid-template-columns: 1fr auto; padding: 0 16px; }
  .onboarding-brand img { width: 62px; height: 42px; }
  .security-label { display: none; }
  .exit-link { font-size: .72rem; }
  .progress-nav ol { padding: 12px 16px; }
  .progress-nav li { gap: 0; justify-content: center; }
  .progress-nav li strong { display: none; }
  .progress-nav li:not(:last-child)::after { left: 50%; right: -50%; top: 13px; }
  .onboarding-main { padding: 28px 16px 60px; }
  .onboarding-layout { gap: 28px; }
  .selection-summary { display: none; }
  .form-step h1 { font-size: 2rem; }
  .step-subtitle { font-size: .85rem; margin-bottom: 25px; }
  .segment-grid, .plan-grid, .coach-grid, .field-grid { grid-template-columns: 1fr; }
  .coach-grid { grid-template-columns: 1fr 1fr; }
  .field--full, .field--wide, .field--state { grid-column: auto; }
  .plan-card { min-height: 0; }
  .step-actions { margin-top: 28px; }
  .primary-action, .secondary-action { padding-left: 18px; padding-right: 18px; }
  .onboarding-footer { flex-direction: column; gap: 7px; text-align: center; }
  .success-main { padding: 32px 16px 50px; }
  .success-card { padding: 30px 20px; }
  .success-summary { grid-template-columns: 1fr; gap: 12px; }
  .success-actions { flex-direction: column; }
  .success-actions a { width: 100%; }
}
@media (max-width: 420px) {
  .coach-grid { grid-template-columns: 1fr; }
  .step-actions .primary-action { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
