:root {
  --color-yellow: #fdb913;
  --color-orange: #f6921e;
  --color-red: #e73828;
  --color-brand-gradient: linear-gradient(135deg, var(--color-yellow), var(--color-orange), var(--color-red));
  --color-bg: #faf9f7;
  --color-surface: #ffffff;
  --color-text: #221c1a;
  --color-muted: #6b625d;
  --color-border: #e8e2dd;
  --color-error: #c6281c;
  --color-success: #c6281c;
  --radius: 10px;
  --max-width: 760px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

/* ---------- Hero / Intro ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2rem 1.25rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 12, 8, 0.75) 0%, rgba(20, 12, 8, 0.55) 45%, rgba(20, 12, 8, 0.9) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  text-align: center;
  color: #fff;
}

.hero-logo {
  height: 40px;
  margin-bottom: 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  background: var(--color-brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow--light {
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-content h1 {
  font-size: 2.1rem;
  line-height: 1.25;
  margin: 0 0 1.25rem;
}

.intro {
  color: var(--color-muted);
  margin: 0 0 0.9rem;
}

.intro--light {
  color: rgba(255, 255, 255, 0.88);
}

.intro--muted {
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.65);
}

.hero-meta {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Buttons ---------- */

.btn-primary {
  background: var(--color-brand-gradient);
  color: #fff;
  border: none;
  padding: 0.9rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px -8px rgba(231, 56, 40, 0.6);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(231, 56, 40, 0.7); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover { background: var(--color-surface); border-color: var(--color-orange); }

/* ---------- Wizard shell ---------- */

.wizard {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.wizard[hidden] { display: none; }

.wizard-header {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  padding: 0.75rem 0 1.25rem;
  z-index: 5;
}

.wizard-logo {
  height: 26px;
  display: block;
  margin: 0 auto 1.25rem;
}

.progress-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.9rem;
}

.progress-fill {
  height: 100%;
  width: 20%;
  background: var(--color-brand-gradient);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  cursor: default;
  opacity: 0.55;
}

.progress-step .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-muted);
  background: var(--color-surface);
  transition: all 0.2s ease;
}

.progress-step .label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-muted);
  display: none;
}

@media (min-width: 560px) {
  .progress-step .label { display: block; }
}

.progress-step.is-active { opacity: 1; }
.progress-step.is-active .dot {
  border-color: var(--color-orange);
  background: var(--color-brand-gradient);
  color: #fff;
  box-shadow: 0 4px 10px -4px rgba(231, 56, 40, 0.6);
}
.progress-step.is-active .label { color: var(--color-text); }

.progress-step.is-complete { opacity: 1; cursor: pointer; }
.progress-step.is-complete .dot {
  border-color: var(--color-orange);
  background: var(--color-surface);
  color: var(--color-orange);
}

/* ---------- Step panels ---------- */

.step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-top: 0.5rem;
  animation: step-in 0.25s ease;
}

.step[hidden] { display: none; }

@keyframes step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.step h2 {
  font-size: 1.15rem;
  margin: 0 0 1.4rem;
  color: var(--color-text);
  position: relative;
  padding-bottom: 0.75rem;
}

.step h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-brand-gradient);
}

.section-note {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
}

.field {
  border: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

.field:last-of-type { margin-bottom: 0; }

.field legend,
.field > label:first-child {
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: block;
  padding: 0;
}

.field[data-required="true"] legend::after,
.field[data-required="true"] > label:first-child::after {
  content: " *";
  color: var(--color-error);
}

.field-hint {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: -0.5rem 0 0.75rem;
}

.radio {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  margin: 0 -0.6rem;
  border-radius: 8px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.12s ease;
}

.radio:hover { background: #fdf6ee; }

.radio input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--color-orange);
}

.conditional-input {
  margin-top: 0.5rem;
  margin-left: 1.75rem;
  width: calc(100% - 1.75rem);
}

.sub-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.sub-field label {
  flex: 0 0 180px;
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.sub-field--currency label {
  flex-basis: 420px;
}

input[type="text"],
input[type="email"],
input[type="number"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
}

input:focus,
select:focus {
  outline: 2px solid var(--color-orange);
  outline-offset: 1px;
}

.currency-input {
  display: flex;
  align-items: center;
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-surface);
}

.currency-input span {
  padding: 0.6rem 0.5rem 0.6rem 0.75rem;
  color: var(--color-muted);
}

.currency-input input {
  border: none;
  flex: 1;
  padding: 0.6rem 0.75rem 0.6rem 0;
}

.currency-input input:focus {
  outline: none;
}

.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
}

.rank-row:last-of-type { border-bottom: none; }

.rank-row label {
  font-weight: 400;
}

.rank-select {
  width: 80px;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
}

.field-error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.field.has-error legend,
.field.has-error > label:first-child {
  color: var(--color-error);
}

.field.has-error {
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ---------- Step navigation ---------- */

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.form-status {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  min-height: 1.2em;
  text-align: center;
}

.form-status[data-state="error"] { color: var(--color-error); }
.form-status[data-state="success"] { color: var(--color-success); font-weight: 600; }

@media (max-width: 520px) {
  .sub-field,
  .rank-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .sub-field label,
  .sub-field--currency label {
    flex-basis: auto;
  }
  .hero-content h1 { font-size: 1.6rem; }
  .step { padding: 1.25rem; }
}
