@font-face {
  font-family: 'Estedad';
  src: url('fonts/Estedad-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad';
  src: url('fonts/Estedad-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad';
  src: url('fonts/Estedad-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Estedad';
  src: url('fonts/Estedad-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #09090a;
  --surface: #111113;
  --surface-2: #17171b;
  --surface-3: #1e1e23;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --gold: #c9a96a;
  --gold-bright: #e8d2a0;
  --gold-dim: rgba(201, 169, 106, 0.16);
  --text: #f3f1ec;
  --text-2: #b9b4ab;
  --muted: #8d8880;
  --danger: #e0685f;
  --ok: #6fc28a;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --t-fast: 160ms;
  --t-mid: 260ms;
  --t-slow: 420ms;

  --font: 'Estedad', 'Vazirmatn', ui-sans-serif, system-ui, 'Segoe UI', Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient gold light, purely decorative */
body::before {
  content: '';
  position: fixed;
  inset: -30vh 0 auto 0;
  height: 70vh;
  background: radial-gradient(60% 60% at 50% 40%, rgba(201, 169, 106, 0.1), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 140px;
}

/* ---------- Header ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  border: 1px solid rgba(201, 169, 106, 0.35);
  background: linear-gradient(145deg, rgba(201, 169, 106, 0.18), rgba(201, 169, 106, 0.02));
  display: grid;
  place-items: center;
  color: var(--gold);
}

.brand__name {
  font-size: 15px;
}

.brand__name small {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}

.step-count {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Progress ---------- */

.progress {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  box-shadow: 0 0 14px rgba(201, 169, 106, 0.45);
  transition: width 520ms var(--ease);
}

/* ---------- Card ---------- */

.card {
  margin-top: 26px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 30px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

@media (max-width: 560px) {
  .card {
    padding: 26px 18px;
    border-radius: 16px;
  }
  .shell {
    padding: 20px 14px 150px;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

h1.step-title {
  margin: 0 0 8px;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.step-desc {
  margin: 0 0 26px;
  color: var(--text-2);
  font-size: 14.5px;
  max-width: 56ch;
}

/* ---------- Fields ---------- */

.field {
  margin-bottom: 24px;
}

.field:last-child {
  margin-bottom: 4px;
}

.field__label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 9px;
  color: var(--text);
}

.field__label .req {
  color: var(--gold);
  margin-inline-start: 4px;
}

.field__help {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 7px;
}

.input,
.textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 15px;
  min-height: 48px;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, background var(--t-fast) ease;
}

.textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.85;
}

.input::placeholder,
.textarea::placeholder {
  color: #5e5a54;
}

.input:hover,
.textarea:hover {
  border-color: var(--line-2);
}

.input:focus,
.textarea:focus {
  outline: none;
  background: #212127;
  border-color: rgba(201, 169, 106, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 169, 106, 0.14);
}

.input[dir='ltr'],
.textarea[dir='ltr'] {
  text-align: left;
}

/* ---------- Chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  position: relative;
  font: inherit;
  font-size: 14px;
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 9px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) ease,
    color var(--t-fast) ease, background var(--t-fast) ease, box-shadow var(--t-fast) ease;
}

.chip:hover {
  border-color: var(--line-2);
  color: var(--text);
}

.chip:active {
  transform: scale(0.96);
}

.chip[aria-pressed='true'] {
  color: var(--gold-bright);
  border-color: rgba(201, 169, 106, 0.5);
  background: var(--gold-dim);
  box-shadow: 0 0 0 1px rgba(201, 169, 106, 0.18), 0 6px 18px -10px rgba(201, 169, 106, 0.6);
}

.chip__tick {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity var(--t-fast) ease, transform var(--t-mid) var(--ease);
}

.chip[aria-pressed='true'] .chip__tick {
  opacity: 1;
  transform: scale(1);
}

.chip:focus-visible,
.btn:focus-visible,
.opt:focus-visible,
.dropzone:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.chips-max {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 9px;
}

.chips-max.is-full {
  color: var(--gold);
}

/* ---------- Radio ---------- */

.opts {
  display: grid;
  gap: 9px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  font: inherit;
  font-size: 14.5px;
  text-align: start;
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 15px;
  min-height: 50px;
  width: 100%;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) ease,
    color var(--t-fast) ease, background var(--t-fast) ease;
}

.opt:hover {
  border-color: var(--line-2);
  color: var(--text);
}

.opt:active {
  transform: scale(0.99);
}

.opt[aria-pressed='true'] {
  color: var(--gold-bright);
  border-color: rgba(201, 169, 106, 0.5);
  background: var(--gold-dim);
}

.opt__dot {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  position: relative;
  transition: border-color var(--t-fast) ease;
}

.opt__dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
  transform: scale(0);
  transition: transform var(--t-mid) var(--ease);
}

.opt[aria-pressed='true'] .opt__dot {
  border-color: var(--gold);
}

.opt[aria-pressed='true'] .opt__dot::after {
  transform: scale(1);
}

/* ---------- Uploads ---------- */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 26px 18px;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--t-fast) ease, background var(--t-fast) ease, transform var(--t-fast) var(--ease);
}

.dropzone:hover {
  border-color: rgba(201, 169, 106, 0.45);
  background: rgba(201, 169, 106, 0.05);
}

.dropzone.is-over {
  border-color: var(--gold);
  background: rgba(201, 169, 106, 0.09);
  transform: scale(1.01);
}

.dropzone svg {
  color: var(--gold);
  opacity: 0.85;
}

.dropzone small {
  color: var(--muted);
  font-size: 12px;
}

.files {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  animation: pop-in var(--t-mid) var(--ease) both;
}

.file-item__thumb {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 7px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--line);
}

.file-item__thumb--doc {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.file-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item__size {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  flex: none;
}

.file-item__x {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t-fast) ease, background var(--t-fast) ease;
}

.file-item__x:hover {
  color: var(--danger);
  background: rgba(224, 104, 95, 0.1);
}

.file-item__bar {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  transition: width 200ms linear;
}

.file-item.is-uploading {
  position: relative;
  overflow: hidden;
  opacity: 0.75;
}

.file-error {
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 8px;
}

/* ---------- Actions ---------- */

.actions {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(9, 9, 10, 0), rgba(9, 9, 10, 0.92) 38%, var(--bg));
  padding: 30px 20px calc(18px + env(safe-area-inset-bottom));
  backdrop-filter: blur(6px);
}

.actions__inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--r-md);
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) ease,
    border-color var(--t-fast) ease, color var(--t-fast) ease, opacity var(--t-fast) ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  flex: 1;
  color: #1a1509;
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  box-shadow: 0 10px 26px -14px rgba(201, 169, 106, 0.9);
  font-weight: 600;
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(160deg, #f2e0b8, var(--gold-bright));
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-2);
}

.btn--ghost:hover:not(:disabled) {
  border-color: var(--line-2);
  color: var(--text);
}

.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding: 0 14px;
}

.btn--quiet:hover:not(:disabled) {
  color: var(--gold);
}

.btn--icon {
  padding: 0;
  width: 52px;
  flex: none;
}

.spinner {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid rgba(26, 21, 9, 0.3);
  border-top-color: #1a1509;
  animation: spin 620ms linear infinite;
}

/* ---------- Step motion ---------- */

.step {
  animation: step-in var(--t-slow) var(--ease) both;
}

.step.is-leaving {
  animation: step-out 190ms var(--ease-in) both;
}

.step.dir-back {
  animation-name: step-in-back;
}

.step.dir-back.is-leaving {
  animation-name: step-out-back;
}

.step .field,
.step .step-actions-hint {
  animation: field-in 380ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms + 90ms);
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes step-in-back {
  from {
    opacity: 0;
    transform: translate3d(0, -16px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes step-out {
  to {
    opacity: 0;
    transform: translate3d(0, -12px, 0);
  }
}

@keyframes step-out-back {
  to {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
}

@keyframes field-in {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Intro + Done ---------- */

.intro {
  text-align: center;
  padding: 18px 4px 6px;
}

.intro h1 {
  font-size: 32px;
  line-height: 1.5;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
}

.intro p {
  color: var(--text-2);
  max-width: 48ch;
  margin: 0 auto 10px;
  font-size: 15px;
}

.intro__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pill {
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.02);
}

.done {
  text-align: center;
  padding: 26px 4px;
}

.done__mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 1px solid rgba(201, 169, 106, 0.4);
  background: var(--gold-dim);
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  animation: pop-in 480ms var(--ease) both;
}

.done__mark svg path {
  stroke-dasharray: 32;
  stroke-dashoffset: 32;
  animation: draw 560ms var(--ease) 220ms forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.done h1 {
  font-size: 26px;
  margin: 0 0 12px;
}

.ref-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 11px 18px;
  border: 1px solid rgba(201, 169, 106, 0.3);
  border-radius: var(--r-md);
  background: rgba(201, 169, 106, 0.07);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.toast {
  position: fixed;
  inset-inline: 0;
  bottom: 96px;
  z-index: 40;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.toast__inner {
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: 99px;
  padding: 10px 20px;
  font-size: 13.5px;
  box-shadow: 0 16px 40px -20px #000;
  animation: pop-in var(--t-mid) var(--ease) both;
}

.saved-hint {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
  transition: opacity var(--t-mid) ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
