@font-face {
  font-family: "Vision Arabic";
  src: url("/arabic-regular.woff") format("woff");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "Vision Arabic";
  src: url("/arabic-bold.woff") format("woff");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f3f4f8;
  --muted: #aeb5c2;
  --line: #2b313b;
  --gold: #e4b980;
  --ice: #a7c9ef;
  font: 16px/1.75 "Vision Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 22% 16%, #16202e, #0b0d12 48%, #090a0d 76%);
}
h1, h2, p, dl, dd { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.icon-library, .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.icon, .brand-mark svg {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; }
.shell { width: min(1200px, calc(100% - 88px)); margin-inline: auto; }

.topbar { border-bottom: 1px solid #262b34; background: #0a0c10; }
.header-inner { display: flex; align-items: center; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 12px; border-radius: 8px; }
.brand-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid #445264;
  border-radius: 11px;
  color: #f1f3f6;
  background: linear-gradient(145deg, #2b3644, #111721 80%);
  box-shadow: inset 0 1px #ffffff22;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font: 750 1.1rem/1 system-ui, sans-serif; letter-spacing: .26em; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.29fr) minmax(0, 1fr);
  grid-template-areas: "form poster";
  align-items: start;
  gap: 20px;
  padding-block: clamp(28px, 5.6vw, 78px) 48px;
}

.poster, .panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 23px;
  box-shadow: 0 28px 76px #0005;
}

.poster {
  grid-area: poster;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  min-height: 540px;
  overflow: hidden;
  border-color: #344354;
  background: #0b1017;
}
.poster::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(0deg, #0a0f17 3%, #0a0f17e8 17%, #0a0f1700 56%),
    url("/vision-hero.webp") 15% 0% / auto 91% no-repeat;
}
.poster::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 13px;
  pointer-events: none;
  border: 1px solid #c1d3ed19;
  border-radius: 14px;
}
.poster-copy {
  width: 100%;
  padding: 20px clamp(24px, 3.6vw, 50px) 38px;
}
.poster-copy::before {
  content: "";
  display: block;
  width: 39px;
  height: 2px;
  margin-block-end: 15px;
  background: linear-gradient(90deg, #a77a3e50, #f3ce9c);
  box-shadow: 0 0 14px #eac18b50;
}
h1 { font-size: clamp(1.65rem, 2.6vw, 2.5rem); font-weight: 800; line-height: 1.45; }
.poster-copy p { margin-block-start: 8px; color: #bdc7d5; max-width: 30ch; }

.panel {
  grid-area: form;
  padding: clamp(26px, 4vw, 52px);
  background: radial-gradient(ellipse at right top, #1b2029, transparent 69%), #11141b;
  border-top-color: #424a59;
  box-shadow: inset 0 1px #ffffff0a, 0 28px 76px #0006;
}
.progress {
  padding-block-end: 26px;
  border-bottom: 1px solid var(--line);
}
.step-count { margin-block-end: 11px; color: #d9c5a7; font-size: .875rem; font-weight: 700; }
.step-track { display: flex; gap: 6px; }
.step-track span { flex: 1 1 0; height: 4px; border-radius: 8px; background: #303640; }
.step-track .done { background: #956d42; }
.step-track .current { background: #f0c89a; box-shadow: 0 0 12px #eab87972; }

.step { margin-block: 28px; }
.wizard-ready form { display: flex; flex-direction: column; min-height: 372px; }
.wizard-ready .step { margin-block: 38px 25px; animation: appear .24s ease-out both; }
@keyframes appear {
  from { opacity: .4; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
h2 { font-size: clamp(1.63rem, 3.2vw, 2.55rem); font-weight: 800; line-height: 1.45; }
h2:focus { outline: none; }
.step-hint { margin-block: 8px 22px; color: var(--muted); }

input:not([type=file]), textarea {
  display: block;
  width: 100%;
  color: var(--ink);
  background: #0b0e14;
  border: 1px solid #3a4453;
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 1rem;
  transition: border-color .15s ease, background-color .15s ease;
}
input:not([type=file]) { min-height: 58px; }
input:not([type=file]):hover, textarea:hover { border-color: #667187; }
input:not([type=file]):focus, textarea:focus { border-color: #acbdd2; background-color: #10151e; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: #d08b96; }
::placeholder { color: #8e99ac; opacity: 1; }
.textarea-wrap, .link-input { position: relative; }
textarea { min-height: 138px; padding-block-end: 36px; resize: vertical; }
.count {
  pointer-events: none;
  position: absolute;
  inset-inline-end: 13px;
  inset-block-end: 8px;
  color: var(--muted);
  font-size: .8125rem;
}
.latin-input { font-family: system-ui, sans-serif; }
.link-input .icon { pointer-events: none; position: absolute; top: 19px; left: 14px; color: var(--ice); }
.link-input input:not([type=file]) { padding-left: 45px; }

.upload {
  position: relative;
  min-width: 0;
  border: 1px dashed #536074;
  border-radius: 13px;
  background: #0d121a;
}
.upload:hover, .upload.drag-over, .upload:focus-within { border-color: var(--ice); background: #141f2c; }
.upload:has(input:focus-visible) { outline: 2px solid var(--ice); outline-offset: 3px; }
.upload.has-file { border-style: solid; }
.upload-target {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 94px;
  padding: 15px;
  cursor: pointer;
}
.has-file .upload-target { padding-inline-end: 62px; }
.upload-icon {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  flex: none;
  border: 1px solid #40546c;
  border-radius: 12px;
  background: #182534;
  color: var(--ice);
}
.upload-copy { display: grid; min-width: 0; }
.upload-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.upload-hint { color: var(--muted); font-size: .875rem; }
.remove-file {
  position: absolute;
  inset-inline-end: 10px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid #4b5869;
  border-radius: 9px;
  background: #202937;
  color: var(--ink);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block-start: 19px;
  margin-block-start: auto;
  border-top: 1px solid var(--line);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 49px;
  padding: 8px 18px;
  border-radius: 11px;
  font-weight: 800;
}
.button:disabled { cursor: wait; opacity: .72; }
.submit {
  min-width: 118px;
  margin-inline-start: auto;
  color: #1a140d;
  background: linear-gradient(165deg, #f8d9ac, #dcb27e);
  border: 1px solid #f6d7aa;
  box-shadow: inset 0 1px #fff3db, 0 5px 18px #0006;
}
.submit:hover:not(:disabled) { background: #f4d4aa; }
.submit .icon { width: 18px; height: 18px; transform: scaleX(-1); }
.secondary { color: var(--ink); background: #181d26; border: 1px solid #404958; }
.secondary:hover:not(:disabled), .edit:hover:not(:disabled) { border-color: var(--ice); }
.message {
  margin-block-end: 16px;
  padding: 9px 13px;
  border: 1px solid #875763;
  border-radius: 9px;
  color: #f8c9d2;
  background: #34212a;
  font-size: .9375rem;
  overflow-wrap: anywhere;
}

.review-list { border: 1px solid var(--line); border-radius: 12px; background: #0c1017; }
.review-row { padding: 10px 13px; }
.review-row + .review-row { border-top: 1px solid var(--line); }
.review-row dt { color: var(--muted); font-size: .875rem; font-weight: 700; }
.review-row dd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-row bdi { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.edit {
  flex: none;
  min-height: 37px;
  padding: 3px 8px;
  border: 1px solid #404958;
  border-radius: 7px;
  color: var(--ice);
  background: #151d28;
  font-size: .875rem;
}
.receipt { display: grid; gap: 15px; align-content: center; justify-items: start; min-height: 400px; }
.receipt p { color: var(--muted); }
.receipt-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid #53826a;
  border-radius: 14px;
  background: #19342a;
  color: #b6ebd1;
}
.receipt .reference bdi { margin-inline-start: 5px; color: var(--gold); font-family: ui-monospace, monospace; }
.receipt .submit { margin: 5px 0 0; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 48px); }
  .poster { min-height: 510px; }
  .poster::before {
    background:
      linear-gradient(0deg, #0a0f17 3%, #0a0f17e8 17%, #0a0f1700 56%),
      url("/vision-hero.webp") 18% 0% / auto 80% no-repeat;
  }
}

@media (max-width: 720px) {
  .shell { width: calc(100% - 30px); }
  .header-inner { min-height: 61px; }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "poster" "form";
    gap: 13px;
    padding-block: 16px 32px;
  }
  .poster, .panel { border-radius: 17px; }
  .poster { min-height: 177px; }
  .poster::after { inset: 8px; border-radius: 10px; }
  .poster::before {
    background:
      linear-gradient(90deg, #0a0f1700 30%, #0a0f17ed 62%, #0a0f17 100%),
      url("/vision-hero.webp") left center / auto 113% no-repeat;
  }
  .poster-copy { width: min(77%, 300px); padding: 16px 18px; }
  .poster-copy::before { margin-block-end: 8px; }
  .poster-copy p { margin-block-start: 3px; font-size: .875rem; }
  .panel { padding: 22px 18px; }
  .progress { padding-block-end: 18px; }
  .wizard-ready .step { margin-block-start: 27px; }
  .wizard-ready form { min-height: 289px; }
  .receipt { min-height: 291px; }
}

@media (prefers-reduced-motion: reduce) {
  .wizard-ready .step { animation: none; }
  input:not([type=file]), textarea { transition: none; }
}
