:root {
  --navy-950: #071a35;
  --navy-900: #0c2c57;
  --navy-800: #123b6d;
  --navy-700: #18558e;
  --teal-600: #187d98;
  --teal-500: #2694af;
  --teal-300: #87cad7;
  --gold-700: #886a32;
  --gold-600: #a58749;
  --gold-500: #c3a96f;
  --gold-300: #ded0ae;
  --sand-100: #f3ecdf;
  --sand-50: #faf7f1;
  --white: #fff;
  --ink: #1f2935;
  --muted: #697381;
  --line: #d8d8d2;
  --danger: #a34a3c;
  --shadow: 0 28px 80px rgba(7, 26, 53, 0.13);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #eeeae3; }
body { margin: 0; min-height: 100vh; padding: 16px; color: var(--ink); background: radial-gradient(circle at 10% 8%, #fffdfa 0, #f1eee8 42%, #e7ebed 100%); font: 400 15px/1.55 "Inter", system-ui, sans-serif; accent-color: var(--gold-600); }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { color: var(--navy-950); background: var(--gold-300); }
:focus-visible { outline: 3px solid var(--teal-300); outline-offset: 3px; }

.diagnostic-shell { width: min(1500px, 100%); height: calc(100dvh - 32px); min-height: 680px; margin: 0 auto; display: grid; grid-template-columns: minmax(320px, .72fr) minmax(690px, 1.28fr); overflow: hidden; border: 1px solid rgba(12, 44, 87, .08); border-radius: 20px; background: #fffdfa; box-shadow: var(--shadow); }
.brand-panel { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: clamp(30px, 3.2vw, 54px); color: var(--navy-950); background: linear-gradient(155deg, #fbf8f1, #eee5d5); isolation: isolate; }
.brand-panel::before { content: ""; position: absolute; width: 430px; height: 430px; right: -250px; top: -210px; z-index: -1; border: 1px solid rgba(165, 135, 73, .25); border-radius: 50%; box-shadow: 0 0 0 65px rgba(165, 135, 73, .045), 0 0 0 130px rgba(24, 125, 152, .025); }
.brand-panel::after { content: ""; position: absolute; left: -150px; bottom: -220px; z-index: -1; width: 390px; height: 390px; border: 1px solid rgba(24, 125, 152, .18); border-radius: 50%; }
.brand-link { display: block; width: min(290px, 82%); padding: 0; }
.brand-link img { display: block; width: 100%; height: auto; }
.intro-copy { margin: auto 0; }
.eyebrow, .step-kicker { margin: 0 0 14px; color: var(--gold-700); font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.intro-copy h1, .step-header h2, .success-state h2 { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; letter-spacing: -.025em; text-wrap: balance; }
.intro-copy h1 { max-width: 12ch; font-size: clamp(2.65rem, 3.65vw, 4.35rem); font-weight: 600; line-height: .98; }
.intro-copy > p:last-child { max-width: 38ch; margin: 23px 0 0; color: #586272; font-size: .96rem; }
.brand-footer { display: flex; align-items: flex-start; gap: 10px; margin-top: 24px; color: #68717c; font-size: .75rem; }
.brand-footer p { max-width: 39ch; margin: 0; }
.security-mark { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; color: #fff; background: var(--navy-900); border-radius: 50%; font-size: .72rem; font-weight: 900; }

.form-area { display: flex; min-width: 0; flex-direction: column; overflow-y: auto; padding: clamp(24px, 3vw, 44px) clamp(28px, 4vw, 64px); background: #fffdfa; }
.progress-list { display: flex; width: 100%; margin: 0 0 clamp(24px, 4vh, 44px); padding: 0; list-style: none; }
.progress-item { position: relative; display: grid; flex: 1; grid-template-columns: 31px 1fr; gap: 8px; align-items: center; min-width: 0; color: #718091; }
.progress-item:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: 31px; width: calc(100% - 31px); height: 1px; background: var(--line); }
.progress-marker { z-index: 1; display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #b9c8d3; border-radius: 50%; background: var(--white); font-size: .72rem; font-weight: 800; }
.progress-item > span:last-child { display: grid; min-width: 0; }
.progress-item strong, .progress-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-item strong { color: #526273; font-size: .72rem; }
.progress-item small { color: #82909f; font-size: .61rem; }
.progress-item.is-current .progress-marker, .progress-item.is-complete .progress-marker { color: var(--white); border-color: var(--navy-900); background: var(--navy-900); }
.progress-item.is-current strong { color: var(--navy-900); }
.progress-item.is-complete:not(:last-child)::after { background: var(--gold-500); }
.mobile-progress { display: none; }

#lead-form { display: grid; flex: 1; width: 100%; align-items: center; }
.form-step { display: none; width: min(100%, 880px); margin: auto; }
.form-step.is-active { display: block; animation: step-in .38s var(--ease) both; }
@keyframes step-in { from { opacity: .01; transform: translateY(9px); filter: blur(2px); } }
.step-header { margin-bottom: 24px; }
.step-kicker { color: var(--teal-600); }
.step-header h2, .success-state h2 { color: var(--navy-950); font-size: clamp(2.15rem, 3.25vw, 3.25rem); font-weight: 600; line-height: .99; }
.step-header p:last-child { max-width: 60ch; margin: 10px 0 0; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-full { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; color: var(--navy-900); font-size: .86rem; font-weight: 700; }
.field input { width: 100%; min-height: 52px; padding: 11px 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.field input::placeholder { color: #82909f; opacity: 1; }
.field input:hover { border-color: #aebfcb; }
.field input:focus { border-color: var(--gold-600); box-shadow: 0 0 0 4px rgba(165, 135, 73, .11); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--danger); background: #fff9f7; }
.field-error { display: block; margin-top: 6px; color: var(--danger); font-size: .76rem; font-weight: 700; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.goal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.goal-card { position: relative; min-height: 142px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 14px; color: var(--white); border: 2px solid transparent; border-radius: 13px; box-shadow: 0 10px 25px rgba(7, 26, 53, .14); cursor: pointer; transition: transform .22s var(--ease), border-color .18s ease, box-shadow .22s ease; isolation: isolate; }
.goal-card:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(7, 26, 53, .2); }
.goal-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .3s ease; }
.goal-card:hover img { transform: scale(1.035); }
.goal-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 15, 31, .03) 24%, rgba(4, 15, 31, .36) 57%, rgba(4, 15, 31, .92) 100%); }
.goal-card input, .choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.goal-card:has(input:checked) { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(195, 169, 111, .23), 0 14px 30px rgba(7, 26, 53, .23); }
.goal-card input:focus-visible ~ strong, .choice input:focus-visible + span { outline: 3px solid var(--gold-500); outline-offset: 4px; }
.goal-card strong { position: relative; max-width: 15ch; font-size: .77rem; line-height: 1.22; text-wrap: balance; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }
.selection-mark { position: absolute; top: 9px; right: 9px; display: grid; width: 23px; height: 23px; place-items: center; color: var(--navy-950); border-radius: 50%; background: var(--gold-300); font-size: .72rem; font-weight: 900; opacity: 0; transform: scale(.72); transition: opacity .18s ease, transform .18s ease; }
.goal-card:has(input:checked) .selection-mark { opacity: 1; transform: scale(1); }
.conditional-field { margin-top: 14px; }

.choice-list, .choice-grid { display: grid; gap: 10px; }
.choice-grid { grid-template-columns: 1fr 1fr; }
.choice { position: relative; display: flex; align-items: center; min-height: 52px; padding: 11px 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.choice:hover { border-color: #a8bbc8; background: #f7fafc; }
.choice:has(input:checked) { border-color: var(--gold-600); background: #fbf7ee; box-shadow: 0 0 0 1px var(--gold-600); }
.choice span { display: flex; gap: 10px; align-items: center; }
.choice span::before { content: ""; width: 18px; height: 18px; flex: 0 0 18px; border: 1.5px solid #8798a8; border-radius: 50%; box-shadow: inset 0 0 0 4px var(--white); background: var(--white); }
.choice input:checked + span::before { border-color: var(--gold-600); background: var(--gold-600); }
.question-group + .question-group { margin-top: 24px; }
.question-group legend, .readiness-list legend { margin-bottom: 11px; color: var(--navy-900); font-weight: 800; }
.readiness-list legend { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.45rem; font-weight: 600; line-height: 1.2; }

.consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin-top: 22px; color: #536170; font-size: .84rem; cursor: pointer; }
.consent input { width: 19px; height: 19px; margin: 2px 0 0; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-feedback { min-height: 20px; margin-top: 12px; color: var(--danger); font-size: .82rem; font-weight: 700; }
.step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.step-actions-end { justify-content: flex-end; }
.button { min-height: 49px; padding: 10px 22px; border: 0; border-radius: 8px; font-weight: 700; text-decoration: none; transition: transform .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease; }
.button-primary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; color: var(--white); background: linear-gradient(108deg, var(--navy-950), var(--navy-800)); box-shadow: 0 9px 22px rgba(7, 26, 53, .22); }
.button-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 27px rgba(16, 56, 115, .28); }
.button-secondary { color: var(--navy-800); background: #eeeae2; }
.button-secondary:hover { background: #e4ddd1; }
.button:disabled { cursor: not-allowed; opacity: .62; box-shadow: none; transform: none; }
.button-loading { display: none; }
.is-loading .button-label { display: none; }
.is-loading .button-loading { display: inline; }

.success-state { width: min(100%, 650px); margin: auto; text-align: center; }
.success-icon { display: grid; width: 68px; height: 68px; margin: 0 auto 20px; place-items: center; color: var(--white); border-radius: 50%; background: linear-gradient(135deg, var(--teal-500), var(--navy-800)); font-size: 1.55rem; font-weight: 900; }
.success-state > p:not(.step-kicker) { max-width: 570px; margin: 14px auto 24px; color: var(--muted); font-size: 1.03rem; }
.success-state small { display: block; margin-top: 18px; color: #788696; }
.whatsapp-button { width: min(100%, 320px); }
.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; }

@media (max-width: 1080px) {
  .diagnostic-shell { grid-template-columns: 290px minmax(0, 1fr); }
  .form-area { padding-inline: 30px; }
  .progress-item small { display: none; }
  .goal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .goal-card { min-height: 118px; }
}

@media (max-width: 760px) {
  body { padding: 0; }
  .diagnostic-shell { width: 100%; height: auto; min-height: 100vh; margin: 0; display: block; border-radius: 0; }
  .brand-panel { min-height: 215px; padding: 20px; }
  .brand-link { width: 205px; padding: 7px 10px; }
  .intro-copy { margin: 27px 0 0; }
  .intro-copy .eyebrow { margin-bottom: 8px; }
  .intro-copy h1 { max-width: 17ch; font-size: 2rem; }
  .intro-copy > p:last-child { display: none; }
  .brand-footer { margin-top: 20px; }
  .form-area { min-height: calc(100vh - 215px); overflow: visible; padding: 22px 20px 38px; }
  .progress-list { display: none; }
  .mobile-progress { display: grid; gap: 8px; margin-bottom: 28px; color: var(--navy-800); font-size: .78rem; font-weight: 800; }
  .mobile-progress-track { height: 5px; overflow: hidden; border-radius: 5px; background: #dce7ed; }
  .mobile-progress-track span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--navy-800), var(--teal-500)); transform: scaleX(.2); transform-origin: left; transition: transform .35s var(--ease); }
  #lead-form { display: block; }
  .form-step { width: 100%; }
  .step-header h2 { font-size: 1.92rem; }
  .field-grid, .choice-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .goal-grid { grid-template-columns: 1fr 1fr; }
  .goal-card { min-height: 132px; }
  .step-actions { position: sticky; bottom: 0; margin: 25px -4px -17px; padding: 14px 4px max(17px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--white) 78%, rgba(255, 255, 255, 0)); }
  .button { flex: 1; }
}

@media (max-width: 390px) {
  .goal-card { min-height: 120px; padding: 12px; }
  .goal-card strong { font-size: .74rem; }
  .step-header h2 { font-size: 1.75rem; }
}

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