:root {
  --charcoal: #16161a;
  --charcoal-2: #24242a;
  --ink: #1d1d22;
  --muted: #6e6c68;
  --line: #e7e3da;
  --paper: #fbfaf7;
  --white: #ffffff;
  --gold: #b8975a;
  --gold-light: #d9c08f;
  --gold-soft: rgba(184, 151, 90, 0.1);
  --error: #b4443a;
  --radius: 14px;
  --serif: "Cormorant Garamond", "Playfair Display", Didot, "Bodoni MT", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

button, input { font: inherit; color: inherit; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Hero ---------- */
.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(90% 60% at 85% 15%, rgba(184, 151, 90, 0.22) 0%, rgba(184, 151, 90, 0) 60%),
    radial-gradient(120% 80% at 10% 100%, #2d2a24 0%, var(--charcoal) 65%);
  background-color: var(--charcoal);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600' fill='none' stroke='%23b8975a' stroke-width='0.6'%3E%3Cpath d='M0 420 C120 380 200 440 300 400 S480 340 600 380'/%3E%3Cpath d='M0 450 C120 410 200 470 300 430 S480 370 600 410'/%3E%3Cpath d='M0 480 C120 440 200 500 300 460 S480 400 600 440'/%3E%3Cpath d='M0 510 C120 470 200 530 300 490 S480 430 600 470'/%3E%3Cpath d='M0 540 C120 500 200 560 300 520 S480 460 600 500'/%3E%3Cpath d='M0 570 C120 530 200 590 300 550 S480 490 600 530'/%3E%3C/svg%3E") bottom center / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 20%, #000 80%);
  mask-image: linear-gradient(180deg, transparent 20%, #000 80%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  height: 100%;
  padding: clamp(2rem, 4vw, 3.5rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--gold-light);
}

.brand__name {
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 600;
}

.brand__name em {
  font-style: normal;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero__lede {
  max-width: 30rem;
  margin: 1.5rem 0 0;
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.82);
}

.hero__lede strong { color: var(--gold-light); font-weight: 500; }

.hero__stats {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 0;
  padding: 1.5rem 0 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.hero__stats span {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--serif);
  font-size: 1.9rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
}

/* ---------- Panel ---------- */
.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: var(--paper);
}

.panel__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 34rem;
  min-height: min(640px, 100%);
}

/* ---------- Progress ---------- */
.progress { margin-bottom: 2.5rem; }

.progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.progress__label { color: var(--ink); font-weight: 600; }
.progress__hint { color: var(--muted); }

.progress__track {
  height: 2px;
  background: var(--line);
  overflow: hidden;
  border-radius: 2px;
}

.progress__bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.6s var(--ease);
}

/* ---------- Steps ---------- */
.form { flex: 1; display: flex; flex-direction: column; }

.step {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.step.is-active {
  display: block;
  animation: stepIn 0.55s var(--ease) both;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.step__title {
  display: block;
  padding: 0;
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.15;
  color: var(--charcoal);
}

.step__num {
  display: block;
  margin-bottom: 0.9rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--gold);
}

.tag-urgent {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin-top: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(184, 151, 90, 0.9);
}

.tag-urgent__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8a2c22;
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(138, 44, 34, 0.6); }
  100% { box-shadow: 0 0 0 7px rgba(138, 44, 34, 0); }
}

.step__sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Choices ---------- */
.choices {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.choices--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.05rem 3rem 1.05rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}

.choice__body::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.25rem;
  width: 18px;
  height: 18px;
  border: 1px solid #cfc9bd;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: all 0.25s var(--ease);
}

.choice input[type="checkbox"] + .choice__body::after { border-radius: 5px; }

.choice__title { font-weight: 500; font-size: 1rem; color: var(--charcoal); }
.choice__desc { font-size: 0.85rem; color: var(--muted); }

.choice:hover .choice__body {
  border-color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -16px rgba(22, 22, 26, 0.35);
}

.choice input:focus-visible + .choice__body {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.choice input:checked + .choice__body {
  border-color: var(--gold);
  background: linear-gradient(0deg, var(--gold-soft), var(--gold-soft)), var(--white);
  box-shadow: 0 0 0 1px var(--gold) inset;
}

.choice input:checked + .choice__body::after {
  border-color: var(--gold);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat,
    var(--gold);
}

.choice--chip .choice__body { padding: 1rem 2.75rem 1rem 1.1rem; min-height: 100%; justify-content: center; }
.choice--chip .choice__body::after { right: 1rem; }

/* ---------- Fields ---------- */
.fields {
  display: grid;
  gap: 1.15rem;
  margin-top: 1.75rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal-2);
}

.field input,
.input-group {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.field input {
  padding: 0.95rem 1.1rem;
  font-size: 1rem;
  outline: none;
}

.input-group {
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.input-group__prefix {
  display: flex;
  align-items: center;
  padding: 0 0.95rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  background: #f6f4ef;
}

.input-group input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
}

.field input::placeholder { color: #b3aea4; }

.field > input:focus,
.input-group:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

.field.has-error > input,
.field.has-error .input-group {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(180, 68, 58, 0.08);
}

.field--hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Consent ---------- */
.consent {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 0.35rem;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--charcoal-2);
}

.consent input {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
  margin: 0;
}

.consent__box {
  flex: 0 0 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid #c9c2b5;
  border-radius: 5px;
  background: var(--white);
  transition: all 0.2s var(--ease);
}

.consent input:checked + .consent__box {
  border-color: var(--gold);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat,
    var(--gold);
}

.consent input:focus-visible + .consent__box {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.consent.has-error .consent__box { border-color: var(--error); }

.consent + .error { margin-top: -0.6rem; padding-left: 2rem; }

/* ---------- Errors ---------- */
.error,
.form-error {
  margin: 0.45rem 0 0;
  min-height: 0;
  font-size: 0.82rem;
  color: var(--error);
}

.error:empty,
.form-error:empty { display: none; }

.form-error {
  margin-top: 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(180, 68, 58, 0.25);
  border-radius: 10px;
  background: rgba(180, 68, 58, 0.05);
}

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.25s, color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s, opacity 0.25s;
}

.btn[hidden] { display: none; }

.btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--ghost {
  padding: 0.95rem 0.25rem;
  background: transparent;
  color: var(--muted);
}

.btn--ghost:hover { color: var(--charcoal); }

.btn--primary {
  margin-left: auto;
  padding: 1.05rem 1.9rem;
  background: var(--charcoal);
  color: var(--white);
  box-shadow: 0 12px 30px -14px rgba(22, 22, 26, 0.6);
}

.btn--primary:hover {
  background: #000;
  transform: translateY(-1px);
}

.btn--primary:focus-visible,
.btn--ghost:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn--submit {
  position: relative;
  background: linear-gradient(135deg, var(--charcoal) 0%, #2c2a26 100%);
  border: 1px solid rgba(184, 151, 90, 0.5);
}

.btn--submit .btn__label { transition: opacity 0.25s; }

.spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(217, 192, 143, 0.25);
  border-top-color: var(--gold-light);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s;
}

.btn--submit.is-loading {
  cursor: progress;
  pointer-events: none;
}

.btn--submit.is-loading .btn__label { opacity: 0; }

.btn--submit.is-loading .spinner {
  opacity: 1;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Success ---------- */
.step--success { text-align: center; padding-top: 1rem; }

.step--success h2 {
  margin: 1.5rem 0 0.75rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.2rem;
  color: var(--charcoal);
}

.step--success p {
  max-width: 26rem;
  margin: 0 auto;
  color: var(--muted);
}

.success__icon svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success__icon circle {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: draw 0.9s var(--ease) forwards;
}

.success__icon path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.5s 0.6s var(--ease) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Legal ---------- */
.legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.legal p { margin: 0; }

.legal a {
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 1px;
}

.legal a:hover { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .hero { position: relative; height: auto; }

  .hero__content { gap: 2rem; padding: 1.5rem 1.5rem 2rem; }
  .hero h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
  .hero__lede { font-size: 0.98rem; margin-top: 1rem; }
  .hero__stats { display: none; }

  .panel { align-items: flex-start; padding: 2rem 1.25rem 1.5rem; }
  .panel__inner { min-height: 0; }
}

@media (max-width: 520px) {
  .eyebrow { margin-bottom: 0.75rem; font-size: 0.65rem; }
  .choices--grid { grid-template-columns: 1fr; }  .progress { margin-bottom: 1.75rem; }
  .progress__hint { display: none; }

  .nav {
    position: sticky;
    bottom: 0;
    margin: 0 -1.25rem;
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(251, 250, 247, 0) 0%, var(--paper) 30%);
  }

  .btn--primary { flex: 1; padding: 1.05rem 1.25rem; }
  .btn--submit { letter-spacing: 0.08em; white-space: normal; text-align: center; }
  .legal { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
