:root {
  color-scheme: light;
  --cream: #f7f1e6;
  --cream-deep: #eee3d3;
  --paper: #fffdf9;
  --purple: #5a257e;
  --purple-deep: #43185f;
  --purple-soft: #f0e8f4;
  --gold: #bf9724;
  --gold-deep: #8a6810;
  --ink: #2d2032;
  --muted: #665d69;
  --border: #d9d0d9;
  --error: #a52a35;
  --success: #286146;
  --focus: #8c56ad;
  --shadow: 0 22px 55px rgba(56, 30, 67, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

[hidden] {
  display: none !important;
}

.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;
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

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

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;
}

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

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

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: var(--purple);
  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(420px, 0.94fr) minmax(560px, 1.06fr);
}

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

.brand-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: clamp(30px, 3.5vw, 58px) clamp(30px, 4.2vw, 68px) clamp(28px, 3.5vw, 52px);
}

.brand-header {
  display: flex;
  align-items: center;
  min-height: 60px;
}

.brand-logo {
  display: block;
  width: clamp(190px, 18vw, 278px);
  height: auto;
}

.brand-content {
  width: min(100%, 620px);
  margin: auto 0;
  padding: clamp(38px, 5.5vh, 76px) 0;
}

.gold-line {
  width: 64px;
  height: 1px;
  margin-bottom: 28px;
  background: var(--gold);
}

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

.brand-content h1 {
  max-width: 12ch;
  font-size: clamp(2.7rem, 3.9vw, 4.7rem);
  line-height: 1;
}

.brand-content > p {
  max-width: 50ch;
  margin: 26px 0 0;
  color: rgba(247, 241, 230, 0.82);
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
}

.brand-content .brand-principles {
  display: flex;
  width: min(100%, 430px);
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 28px;
  padding-top: 18px;
  color: var(--cream);
  border-top: 1px solid rgba(247, 241, 230, 0.22);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-principles span {
  position: relative;
}

.brand-principles span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -14px;
  width: 3px;
  height: 3px;
  content: "";
  background: var(--gold);
  border-radius: 50%;
  transform: translateY(-50%);
}

.brand-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(247, 241, 230, 0.73);
}

.brand-footer p {
  max-width: 32ch;
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.98rem;
  font-style: italic;
}

.signature-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: var(--gold);
}

.brand-portrait {
  position: relative;
  min-height: clamp(250px, 33vh, 410px);
  flex: 0 0 clamp(250px, 33vh, 410px);
  margin: 0;
  overflow: hidden;
  background: #e9e9e6;
}

.brand-portrait picture,
.brand-portrait img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-portrait img {
  object-fit: cover;
  object-position: center 31%;
  transition: transform 900ms var(--ease);
}

.brand-portrait figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  min-width: 230px;
  gap: 2px;
  padding: 15px 22px 16px;
  color: var(--purple-deep);
  background: var(--cream);
}

.brand-portrait figcaption strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
}

.brand-portrait figcaption span {
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (hover: hover) {
  .brand-portrait:hover img {
    transform: scale(1.025);
  }
}

.form-panel {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 6vw, 104px) clamp(28px, 7vw, 120px);
  background: var(--paper);
}

.form-wrap {
  width: min(100%, 700px);
  animation: form-in 650ms var(--ease) both;
}

.step-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.step-label::before {
  width: 28px;
  height: 1px;
  content: "";
  background: var(--gold);
}

.form-intro h2 {
  color: var(--purple-deep);
  font-size: clamp(2.25rem, 3.7vw, 4.2rem);
  line-height: 1.02;
}

.form-intro > p:last-child {
  max-width: 59ch;
  margin: 20px 0 0;
  color: var(--muted);
}

#lead-form {
  margin-top: clamp(32px, 5vh, 52px);
}

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

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--purple-deep);
  font-size: 0.79rem;
  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 {
  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: 52px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

input {
  padding: 0 4px;
}

textarea {
  min-height: 118px;
  padding: 14px 4px;
  line-height: 1.55;
  resize: vertical;
}

select {
  appearance: none;
  padding: 0 38px 0 4px;
  cursor: pointer;
}

input::placeholder,
textarea::placeholder,
select:invalid {
  color: #7b707e;
  opacity: 1;
}

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

input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: var(--purple);
  box-shadow: 0 2px 0 var(--purple);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 1px 0 var(--error);
}

.select-wrap {
  position: relative;
}

.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 20px;
  height: 20px;
  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: 48px;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  color: var(--muted);
  background: transparent;
  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;
}

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

.option-list input,
.option-grid input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 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: 28px;
}

.consent-row input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 2px 0 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;
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 0 24px;
  color: white;
  background: var(--purple);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(90, 37, 126, 0.22);
  cursor: pointer;
  font-weight: 600;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
  touch-action: manipulation;
}

.submit-button svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  transition: transform 180ms var(--ease);
}

.submit-button:hover {
  background: var(--purple-deep);
  box-shadow: 0 14px 30px rgba(67, 24, 95, 0.26);
}

.submit-button:hover svg {
  transform: translateX(4px);
}

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

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

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

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

.secondary-button {
  min-height: 58px;
  padding: 0 22px;
  color: var(--purple);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 180ms ease, border-color 180ms ease;
}

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

.secondary-button:active {
  background: #e6d9ed;
}

.secondary-button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.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 -14px;
  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: 540px;
  padding: clamp(40px, 8vh, 84px) 0;
  color: var(--purple-deep);
}

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

.success-message h2 {
  max-width: 11ch;
  margin: 28px 0 16px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.success-message p {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
}

@keyframes form-in {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .page-shell {
    grid-template-columns: minmax(360px, 0.86fr) minmax(500px, 1.14fr);
  }

  .brand-copy {
    padding: 34px 36px 30px;
  }

  .form-panel {
    padding: 56px 42px;
  }

  .brand-content h1 {
    font-size: clamp(2.55rem, 4.4vw, 3.85rem);
  }
}

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

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

  .brand-copy {
    min-height: min(720px, 82vh);
    padding: 28px 24px 36px;
  }

  .brand-logo {
    width: 202px;
  }

  .brand-content {
    padding: 64px 0 58px;
  }

  .brand-content h1 {
    max-width: 16ch;
    font-size: clamp(2.65rem, 8vw, 4.3rem);
  }

  .brand-footer {
    position: relative;
    z-index: 1;
  }

  .brand-portrait {
    min-height: 380px;
    flex-basis: 380px;
  }

  .brand-portrait img {
    object-position: center 27%;
  }

  .form-panel {
    min-height: auto;
    padding: 64px 24px 72px;
  }
}

@media (max-width: 560px) {
  .brand-content {
    padding: 50px 0 56px;
  }

  .brand-content h1 {
    font-size: clamp(2.5rem, 12vw, 3.55rem);
  }

  .brand-content > p {
    margin-top: 24px;
  }

  .brand-content .brand-principles {
    gap: 8px 20px;
  }

  .brand-principles span:not(:last-child)::after {
    right: -12px;
  }

  .brand-footer p {
    font-size: 0.9rem;
  }

  .brand-portrait {
    min-height: 340px;
    flex-basis: 340px;
  }

  .brand-portrait figcaption {
    min-width: 205px;
    padding: 13px 18px 14px;
  }

  .form-panel {
    padding: 54px 20px 64px;
  }

  .form-intro h2 {
    font-size: clamp(2.35rem, 11vw, 3.2rem);
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

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

  .field-full {
    grid-column: auto;
  }

  .submit-button {
    padding: 0 18px;
    font-size: 0.93rem;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .brand-content {
    padding: 26px 0;
  }

  .brand-content h1 {
    font-size: clamp(2.35rem, 3.5vw, 3.5rem);
  }

  .brand-content > p {
    margin-top: 18px;
  }

  .brand-content .brand-principles {
    margin-top: 18px;
    padding-top: 14px;
  }

  .brand-footer {
    display: none;
  }

  .brand-portrait {
    min-height: 220px;
    flex-basis: 30vh;
  }

  .form-panel {
    align-items: flex-start;
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

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

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