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

:root {
  --ink: #0f0e0d;
  --ink-2: #3a3833;
  --ink-3: #7a7773;
  --surface: #faf9f7;
  --surface-2: #f2f0ec;
  --surface-3: #e8e5de;
  --gold: #b08a4e;
  --gold-light: #d4aa6e;
  --gold-pale: #f5edde;
  --danger: #c0392b;
  --success: #2d6a4f;
  --border: #dbd8d0;
  --shadow: 0 2px 24px rgba(15, 14, 13, 0.08);
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--surface);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem 5rem;
}

.shell {
  width: 100%;
  max-width: 700px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeUp 0.5s ease both;
}
.header-eyebrow {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.header h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.header p {
  margin-top: 0.75rem;
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 300;
}

/* Progress */
.progress-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.5s 0.1s ease both;
}
.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--surface);
  transition: all 0.35s ease;
  position: relative;
}
.step-circle.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-pale);
}
.step-circle.done {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}
.step-circle.done::after {
  content: "✓";
  font-size: 14px;
}
.step-circle.done .num {
  display: none;
}
.step-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 0.3s;
}
.step-node.active .step-label {
  color: var(--gold);
}
.step-node.done .step-label {
  color: var(--ink-2);
}
.step-line {
  flex: 1;
  height: 1.5px;
  background: var(--border);
  margin: 0 8px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.step-line-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--gold);
  width: 0;
  transition: width 0.4s ease;
}

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 2.5rem 2.5rem 2rem;
  animation: fadeUp 0.4s ease both;
}
@media (max-width: 520px) {
  .card {
    padding: 1.5rem 1.25rem 1.5rem;
  }
}

/* Card logo bar — shown on steps 2,3,4 */
.card-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--surface-3);
}
.card-logo img {
  height: 32px;
  object-fit: contain;
}

.section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.section-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 2rem;
  font-weight: 300;
}

.divider {
  height: 1px;
  background: var(--surface-3);
  margin: 1.75rem 0;
}

/* Fields */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (max-width: 520px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 4px;
}
.req {
  color: var(--gold);
  font-size: 14px;
  line-height: 1;
}

.field input,
.field select {
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
  width: 100%;
}
.field input::placeholder {
  color: var(--ink-3);
  opacity: 0.7;
}
.field input:hover,
.field select:hover {
  border-color: #c8c3b8;
}
.field input:focus,
.field select:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(176, 138, 78, 0.1);
}
.field input.error,
.field select.error {
  border-color: var(--danger);
}
.field-hint {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 300;
}
.field-err {
  font-size: 11px;
  color: var(--danger);
  display: none;
}
.field input.error ~ .field-err,
.field select.error ~ .field-err {
  display: block;
}

.optional-tag {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 4px;
  padding: 1px 6px;
  text-transform: none;
}

/* Tax group */
.tax-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1rem;
}
.tax-group-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Buttons */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}
.btn-next {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.btn-next:hover {
  background: var(--gold-light);
}
.btn-next:active {
  transform: scale(0.98);
}
.btn-back {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-3);
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.btn-back:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}
.btn-submit {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: var(--ink);
  color: var(--surface);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.btn-submit:hover {
  background: var(--ink-2);
}

/* Steps */
.step {
  display: none;
  padding-left: 20px;
}
.step.active {
  display: block;
}

/* Confirmation */
.confirm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
  font-size: 13.5px;
}
@media (max-width: 520px) {
  .confirm-grid {
    grid-template-columns: 1fr;
  }
}
.confirm-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--surface-3);
}
.confirm-row:last-child {
  border: none;
}
.confirm-key {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 500;
}
.confirm-val {
  color: var(--ink);
  font-weight: 400;
}
.confirm-val.empty {
  color: var(--ink-3);
  font-style: italic;
}

.confirm-section {
  margin-bottom: 1.5rem;
}
.confirm-section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--gold-pale);
}

/* Success */
.success-wrap {
  text-align: center;
  padding: 3rem 1rem 2rem;
  display: none;
}
.success-wrap.visible {
  display: block;
  animation: fadeUp 0.5s ease both;
}
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold-pale);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 1.5rem;
}
.success-wrap h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}
.success-wrap p {
  font-size: 14px;
  color: var(--ink-3);
  max-width: 400px;
  margin: 0 auto;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

select option {
  background: #fff;
}
