:root {
  color-scheme: light;
  --cream: #f7f1e6;
  --cream-deep: #eee3d3;
  --paper: #fffdf9;
  --purple: #5a257e;
  --purple-deep: #3f165b;
  --purple-soft: #f2ebf5;
  --gold: #bf9724;
  --gold-deep: #86660f;
  --ink: #2d2032;
  --muted: #6b626d;
  --border: #d9d0d9;
  --error: #a52a35;
  --success: #286146;
  --focus: #8c56ad;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

[hidden] {
  display: none !important;
}

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

html {
  min-width: 320px;
  background: var(--cream);
  scroll-behavior: smooth;
  scrollbar-color: var(--gold) var(--cream-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--cream);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  color: var(--paper);
  background: var(--purple);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 68%, white);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: var(--purple-deep);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(390px, 0.82fr) minmax(600px, 1.18fr);
}

.brand-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--cream);
  background: var(--purple-deep);
}

.brand-panel::after {
  position: absolute;
  right: clamp(28px, 4vw, 64px);
  bottom: 0;
  left: clamp(28px, 4vw, 64px);
  height: 1px;
  content: "";
  background: rgba(191, 151, 36, 0.5);
}

.brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: clamp(34px, 4.2vw, 68px) clamp(30px, 4.8vw, 76px) clamp(30px, 3.8vw, 58px);
}

.brand-header {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: clamp(238px, 22vw, 350px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.brand-content {
  width: min(100%, 610px);
  margin: auto 0;
  padding: clamp(52px, 8vh, 108px) 0 clamp(44px, 7vh, 92px);
}

.brand-content h1,
.form-intro h2,
.success-message h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.brand-content h1 {
  max-width: 12ch;
  color: var(--paper);
  font-size: clamp(2.8rem, 4.6vw, 5.35rem);
  line-height: 0.98;
}

.brand-content > p {
  max-width: 52ch;
  margin: 28px 0 0;
  color: rgba(247, 241, 230, 0.82);
  font-size: clamp(1rem, 1.12vw, 1.12rem);
  line-height: 1.7;
}

.brand-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 610px;
  margin-top: clamp(38px, 5vh, 58px);
  padding-top: 22px;
  border-top: 1px solid rgba(247, 241, 230, 0.18);
}

.brand-pillars > div {
  min-width: 0;
  padding-right: 20px;
}

.brand-pillars > div + div {
  padding-left: 20px;
  border-left: 1px solid rgba(247, 241, 230, 0.16);
}

.brand-pillars strong,
.brand-pillars span {
  display: block;
}

.brand-pillars strong {
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.02rem, 1.2vw, 1.2rem);
  font-weight: 600;
}

.brand-pillars span {
  margin-top: 4px;
  color: rgba(247, 241, 230, 0.66);
  font-size: 0.72rem;
  line-height: 1.35;
}

.brand-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  color: rgba(247, 241, 230, 0.74);
}

.brand-footer p,
.brand-footer span {
  margin: 0;
}

.brand-footer p {
  max-width: 32ch;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.35;
}

.brand-footer span {
  max-width: 24ch;
  color: rgba(247, 241, 230, 0.5);
  font-size: 0.68rem;
  line-height: 1.4;
  text-align: right;
}

.form-panel {
  min-width: 0;
  background: var(--paper);
}

.form-wrap {
  width: min(100%, 780px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(52px, 7vw, 96px) clamp(34px, 6vw, 92px) clamp(64px, 8vw, 112px);
}

.form-intro {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--cream-deep);
}

.form-intro h2 {
  max-width: 13ch;
  color: var(--purple-deep);
  font-size: clamp(2.35rem, 3.8vw, 4rem);
  line-height: 1.04;
}

.form-intro > p {
  max-width: 60ch;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.form-assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  color: var(--purple-deep);
  font-size: 0.72rem;
  font-weight: 600;
}

.form-assurances span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.form-assurances span::before {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  content: "";
  background: var(--gold);
  border-radius: 50%;
}

#lead-form {
  margin-top: 32px;
}

.form-progress {
  margin-bottom: 34px;
  scroll-margin-top: 24px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--purple-deep);
  font-size: 0.78rem;
  font-weight: 600;
}

.progress-copy span:last-child {
  color: var(--muted);
  font-weight: 500;
}

progress {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  appearance: none;
  background: var(--cream-deep);
  border: 0;
  border-radius: 999px;
}

progress::-webkit-progress-bar {
  background: var(--cream-deep);
}

progress::-webkit-progress-value {
  background: var(--gold);
}

progress::-moz-progress-bar {
  background: var(--gold);
}

.form-step,
.question-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
}

.field,
.field-full {
  min-width: 0;
}

.field-full {
  grid-column: 1 / -1;
}

.field label,
.question-group > legend {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.field label span:not(.optional),
.question-group > legend span,
.consent-row label span {
  color: var(--gold-deep);
}

.field label .optional {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 54px;
  color: var(--ink);
  caret-color: var(--purple);
  background: #fffefa;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

input {
  padding: 0 15px;
}

textarea {
  min-height: 122px;
  padding: 14px 15px;
  line-height: 1.55;
  resize: vertical;
}

select {
  appearance: none;
  padding: 0 42px 0 15px;
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  color: #7a707c;
  opacity: 1;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #a695aa;
}

input:focus,
textarea:focus,
select:focus {
  outline: 0;
  background: white;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(90, 37, 126, 0.12);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 2px rgba(165, 42, 53, 0.1);
}

.select-wrap {
  position: relative;
}

.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  color: var(--purple);
  pointer-events: none;
  transform: translateY(-50%);
}

.field-error {
  min-height: 18px;
  margin: 6px 0 0;
  color: var(--error);
  font-size: 0.76rem;
  line-height: 1.35;
}

.question-group {
  padding-top: 4px;
}

.question-group + .question-group {
  margin-top: 8px;
}

.question-group > legend {
  width: 100%;
  margin-bottom: 12px;
  line-height: 1.5;
}

.option-list,
.option-grid {
  display: grid;
  gap: 10px;
}

.option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-list label,
.option-grid label {
  display: flex;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  color: var(--muted);
  background: #fffefa;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1.35;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}

.option-list label:hover,
.option-grid label:hover {
  color: var(--purple-deep);
  border-color: #ad9bb1;
  transform: translateY(-1px);
}

.option-list input,
.option-grid input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  accent-color: var(--purple);
  cursor: pointer;
}

.option-list label:has(input:checked),
.option-grid label:has(input:checked) {
  color: var(--purple-deep);
  background: var(--purple-soft);
  border-color: var(--purple);
}

.question-group[aria-invalid="true"] > legend {
  color: var(--error);
}

.consent-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 24px;
}

.consent-row input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--purple);
  cursor: pointer;
}

.consent-row label {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.5;
  cursor: pointer;
}

.consent-error {
  margin-left: 32px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.submit-button,
.secondary-button {
  min-height: 56px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  touch-action: manipulation;
}

.submit-button {
  width: 100%;
  padding: 0 24px;
  color: white;
  background: var(--purple);
  border: 1px solid var(--purple);
  box-shadow: 0 12px 28px rgba(90, 37, 126, 0.2);
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
}

.form-actions .submit-button {
  width: auto;
  flex: 1;
}

.submit-button:hover {
  background: var(--purple-deep);
  border-color: var(--purple-deep);
  box-shadow: 0 16px 34px rgba(63, 22, 91, 0.24);
  transform: translateY(-1px);
}

.submit-button:active,
.secondary-button:active {
  transform: scale(0.985);
}

.submit-button[disabled],
.secondary-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.secondary-button {
  padding: 0 22px;
  color: var(--purple);
  background: transparent;
  border: 1px solid var(--border);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease);
}

.secondary-button:hover {
  background: var(--purple-soft);
  border-color: var(--purple);
}

.privacy-note,
.form-status {
  margin: 14px auto 0;
  text-align: center;
  font-size: 0.76rem;
}

.privacy-note {
  max-width: 54ch;
  color: var(--muted);
}

.form-status {
  min-height: 20px;
  color: var(--success);
  font-weight: 600;
}

.form-status.is-error {
  color: var(--error);
}

.error-summary {
  margin: 28px 0 -10px;
  padding: 18px 20px;
  color: var(--error);
  background: #fff3f3;
  border: 1px solid #e5bcc1;
  border-radius: 12px;
}

.error-summary h3 {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.08rem;
}

.error-summary ul {
  margin: 0;
  padding-left: 20px;
}

.error-summary a {
  color: currentColor;
  text-underline-offset: 3px;
}

.success-message {
  max-width: 560px;
  padding: clamp(42px, 8vh, 88px) 0;
  color: var(--purple-deep);
}

.success-message > svg {
  width: 58px;
  height: 58px;
  color: var(--gold);
}

.success-message h2 {
  max-width: 12ch;
  margin: 28px 0 16px;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.02;
}

.success-message p {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: minmax(360px, 0.72fr) minmax(540px, 1.28fr);
  }

  .brand-inner {
    padding-right: 38px;
    padding-left: 38px;
  }

  .brand-footer {
    display: block;
  }

  .brand-footer span {
    display: none;
  }

  .brand-pillars > div {
    padding-right: 12px;
  }

  .brand-pillars > div + div {
    padding-left: 12px;
  }
}

@media (max-width: 900px) {
  .page-shell {
    display: block;
  }

  .brand-panel {
    position: relative;
    height: auto;
    min-height: 0;
  }

  .brand-panel::after {
    right: 24px;
    left: 24px;
  }

  .brand-inner {
    min-height: 0;
    padding: 34px clamp(24px, 7vw, 60px) 30px;
  }

  .brand-logo {
    width: clamp(225px, 38vw, 320px);
  }

  .brand-content {
    margin: 0;
    padding: 52px 0 44px;
  }

  .brand-content h1 {
    max-width: 14ch;
    font-size: clamp(2.75rem, 7.8vw, 4.7rem);
  }

  .brand-content > p {
    max-width: 58ch;
    margin-top: 22px;
  }

  .brand-pillars {
    max-width: 620px;
    margin-top: 34px;
  }

  .brand-footer {
    display: none;
  }

  .form-wrap {
    width: min(100%, 760px);
    min-height: auto;
    padding: 58px clamp(24px, 7vw, 60px) 76px;
  }
}

@media (max-width: 620px) {
  .brand-inner {
    padding: 20px 20px 18px;
  }

  .brand-logo {
    width: 180px;
  }

  .brand-content {
    padding: 28px 0 20px;
  }

  .brand-content h1 {
    font-size: clamp(2.3rem, 11.5vw, 3rem);
    line-height: 1;
  }

  .brand-content > p {
    margin-top: 14px;
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .brand-pillars {
    margin-top: 20px;
    padding-top: 14px;
  }

  .brand-pillars > div {
    padding: 0 4px;
    text-align: center;
  }

  .brand-pillars > div + div {
    padding-left: 4px;
  }

  .brand-pillars strong {
    font-size: clamp(0.7rem, 3.25vw, 0.88rem);
    overflow-wrap: anywhere;
  }

  .brand-pillars span {
    display: none;
  }

  .form-wrap {
    padding: 36px 20px 64px;
  }

  .form-intro {
    padding-bottom: 24px;
  }

  .form-intro h2 {
    max-width: 14ch;
    font-size: clamp(2rem, 10.4vw, 2.65rem);
  }

  .form-intro > p {
    margin-top: 14px;
    font-size: 0.88rem;
    line-height: 1.58;
  }

  .form-assurances {
    gap: 6px 14px;
    margin-top: 17px;
  }

  #lead-form {
    margin-top: 24px;
  }

  .field-grid,
  .option-grid,
  .option-grid-three {
    grid-template-columns: 1fr;
  }

  .field-grid {
    gap: 18px;
  }

  .option-list label,
  .option-grid label {
    min-height: 52px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-actions .submit-button,
  .secondary-button {
    width: 100%;
  }
}

@media (max-width: 370px) {
  .brand-logo {
    width: 205px;
  }

  .brand-content h1 {
    font-size: 2.35rem;
  }

  .brand-pillars strong {
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .brand-panel {
    position: static;
    height: auto;
  }

  .page-shell {
    display: block;
  }

  .brand-inner,
  .form-wrap {
    min-height: auto;
  }
}
