/* HXR Creators — shared tokens and the public form.
   Layout: one narrow column on HXR black; each step opens with the slanted black/gold ribbon from the reels. */
:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #0f0e0c;
  --surface-2: #171511;
  --line: #2b271e;
  --line-strong: #4a412c;
  --ink: #f4f0e7;
  --muted: #aaa396;
  --placeholder: #857e70;
  --gold: #d9b456;
  --gold-deep: #b2924f;
  --gold-light: #e4ca8c;
  --gold-grad: linear-gradient(100deg, #b2924f 0%, #e4ca8c 55%, #c9a65a 100%);
  --on-gold: #0a0906;
  --danger: #ff9a88;
  --ok: #8fd6a8;
  --font: 'IBM Plex Sans Arabic', 'Geeza Pro', Tahoma, sans-serif;
  --radius: 10px;
  --bar-h: 58px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 var(--font);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.wrap {
  max-width: 760px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button, label, select, a { touch-action: manipulation; }
a { color: var(--gold-light); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }

/* ---------- hero ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(60% 90% at 50% -10%, rgba(217, 180, 86, 0.16), transparent 70%), var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
}
.hero .wrap { padding-block: 36px 32px; display: grid; gap: 20px; }
.logo { width: min(200px, 50vw); height: auto; display: block; }
.eyebrow { margin: 0; color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: 0.28em; direction: ltr; text-align: right; }
h1 { margin: 0; font-size: clamp(28px, 6.4vw, 44px); line-height: 1.25; font-weight: 700; text-wrap: balance; }
h1 em { font-style: normal; color: var(--gold-light); }
.lede { margin: 0; color: var(--muted); font-size: 17px; max-width: 58ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.facts li { display: flex; align-items: center; gap: 9px; }
.facts li::before { content: ''; width: 14px; height: 3px; background: var(--gold-grad); transform: skewX(-24deg); flex: none; }

/* ---------- sticky progress ---------- */
.progress {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.progress .wrap { display: flex; align-items: center; gap: 14px; min-height: var(--bar-h); }
.steps { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.steps button {
  width: 100%;
  min-height: 44px;
  display: grid;
  gap: 5px;
  align-content: center;
  background: none;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  text-align: start;
  border-radius: 6px;
}
.steps button::before { content: ''; height: 5px; background: var(--line); transform: skewX(-24deg); transition: background 0.2s; }
.steps button .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps button.done::before { background: var(--gold-grad); }
.steps button.done { color: var(--gold-light); }
.steps button.current { color: var(--ink); font-weight: 700; }
.steps button.current:not(.done)::before { background: var(--line-strong); box-shadow: 0 0 0 1px var(--gold-deep) inset; }
.steps button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.count { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }
.count b { color: var(--gold-light); font-weight: 700; }

/* ---------- draft bar ---------- */
.draftbar { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: 14px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 10px 4px; min-height: 44px; color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.link-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- ribbon step header ---------- */
form { display: grid; gap: 44px; padding-block: 32px 64px; }
.req-note { margin: 0 0 -22px; color: var(--muted); font-size: 13.5px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 20px; scroll-margin-top: calc(var(--bar-h) + 18px + env(safe-area-inset-top, 0px)); }
.ribbon {
  display: flex;
  align-items: stretch;
  min-height: 62px;
  background: #000;
  border-block: 1px solid var(--line-strong);
  clip-path: polygon(16px 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
  padding: 0;
  width: 100%;
  margin-bottom: 22px;
}
.ribbon::before { content: ''; flex: none; width: 22px; background: var(--gold-grad); clip-path: polygon(16px 0, 100% 0, calc(100% - 16px) 100%, 0 100%); margin-inline-start: 10px; }
.ribbon-text { flex: 1; min-width: 0; display: grid; align-content: center; padding: 8px 14px; }
.ribbon-ar { font-size: 20px; font-weight: 700; line-height: 1.3; color: #fff; }
.ribbon-en { font-size: 11.5px; letter-spacing: 0.22em; color: var(--gold); direction: ltr; text-align: right; font-weight: 500; }
.ribbon-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 78px;
  background: var(--gold-grad);
  color: var(--on-gold);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%);
  padding-inline-start: 14px;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
.step-note { margin: -6px 0 0; color: var(--muted); font-size: 14.5px; }

/* ---------- fields ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .group-label { font-size: 14.5px; font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
input[type='text'], input[type='tel'], input[type='email'], input[type='password'], input[type='search'], select, textarea {
  width: 100%;
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: border-color 0.15s, background 0.15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23d9b456' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: 16px 50%;
  background-repeat: no-repeat;
  padding-left: 42px;
  cursor: pointer;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); background-color: var(--surface-2); }
.ltr { direction: ltr; text-align: left; }
.invalid input:not([type='radio']):not([type='checkbox']), .invalid select, .invalid textarea, .invalid .cards label, .invalid.check, .invalid .chips span { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13.5px; margin: -10px 0 0; display: flex; gap: 7px; align-items: baseline; }
.err::before { content: '!'; flex: none; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; line-height: 1; transform: translateY(2px); }
.field > .err, .grid .err { margin-top: 0; }

/* creator type cards */
.cards { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards label {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 16px 16px 16px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cards label:hover { border-color: var(--line-strong); }
.cards input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cards .t { font-weight: 700; font-size: 16.5px; direction: ltr; text-align: right; display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 8px; }
.cards .t::after { content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: 0.15s; }
.cards .d { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.cards label:has(input:checked) { border-color: var(--gold); background: linear-gradient(180deg, rgba(217, 180, 86, 0.13), rgba(217, 180, 86, 0.03)); }
.cards label:has(input:checked) .t { color: var(--gold-light); }
.cards label:has(input:checked) .t::after { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 0 42%, transparent 46%); }
.cards label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: grid; place-items: center; min-height: 44px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14.5px; transition: 0.15s; }
.chips label:hover span { border-color: var(--line-strong); }
.chips input:checked + span { background: var(--gold-grad); color: var(--on-gold); border-color: transparent; font-weight: 600; }
.chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* account rows + price rows */
.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 132px; gap: 10px; align-items: center; }
.row .name { font-weight: 600; font-size: 15px; direction: ltr; text-align: right; }
.rows-head { color: var(--muted); font-size: 12.5px; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.price-row .what { display: grid; gap: 1px; min-width: 0; cursor: pointer; }
.price-row .what b { font-weight: 600; font-size: 15.5px; }
.price-row .what small { color: var(--muted); font-size: 13px; }
.price-row:focus-within { border-color: var(--line-strong); }
.money { position: relative; }
.money input { padding-left: 52px; background: var(--bg); font-variant-numeric: tabular-nums; }
.money::after { content: 'ج.م'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 13.5px; pointer-events: none; }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-size: 14.5px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--gold); flex: none; cursor: pointer; }
.check.slim { background: none; border-style: dashed; padding: 11px 14px; }

/* ---------- submit ---------- */
.submit { display: grid; gap: 14px; }
.btn {
  min-height: 56px;
  border: 0;
  border-radius: var(--radius);
  background: var(--gold-grad);
  color: var(--on-gold);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  padding: 12px 24px;
  transition: filter 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn[disabled] { opacity: 0.65; cursor: progress; }
.btn.busy::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(10, 9, 6, 0.3); border-top-color: var(--on-gold); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-ghost { background: none; border: 1px solid var(--line-strong); color: var(--ink); font-size: 15px; min-height: 46px; font-weight: 600; padding: 8px 18px; }
.btn-ghost:hover { border-color: var(--gold); filter: none; }
.form-msg { margin: 0; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--danger); color: var(--danger); font-size: 14.5px; }
.privacy { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- done ---------- */
.done { padding-block: 56px 80px; display: grid; gap: 18px; justify-items: start; }
.done:focus { outline: none; }
.done h2 { margin: 0; font-size: clamp(26px, 6vw, 38px); line-height: 1.3; }
.done p { margin: 0; color: var(--muted); max-width: 56ch; }
.done .mark { width: 74px; height: 12px; background: var(--gold-grad); transform: skewX(-24deg); }
.next { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; width: 100%; }
.next li { display: flex; gap: 12px; align-items: baseline; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; }
.next li b { color: var(--gold); font-variant-numeric: tabular-nums; direction: ltr; flex: none; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer .wrap { padding-block: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer b { color: var(--gold); letter-spacing: 0.2em; font-weight: 600; }

@media (max-width: 620px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr) 118px; }
  .row .name { grid-column: 1 / -1; margin-bottom: -4px; }
  .rows-head { display: none; }
  .price-row { grid-template-columns: minmax(0, 1fr) 132px; }
  .ribbon-num { width: 66px; font-size: 18px; }
  .ribbon-ar { font-size: 18px; }
  form { gap: 38px; padding-block: 26px 48px; }
  .steps button .lbl { display: none; }
  .steps button { min-height: 44px; }
  .hero .wrap { padding-block: 28px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .btn.busy::before { animation-duration: 1.6s; }
}
