/* ===== Design tokens — مأخوذة من لوجو Pharavix ===== */
:root {
  --brand: #0a2d85;          /* أزرق Pharavix */
  --brand-dark: #022264;     /* كحلي اللوجو */
  --brand-soft: #e8edf8;
  --accent: #0090a0;         /* تركواز الصليب */
  --accent-light: #1fb5a8;
  --accent-soft: #e2f5f5;
  --warn: #e8590c;
  --warn-soft: #fff1e8;

  --bg: #f3f6fa;
  --surface: #ffffff;
  --text: #0f1a3a;
  --muted: #5a6582;
  --border: #d9e0ec;
  --danger: #d6336c;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(2, 34, 100, .09);
  --font: "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ===== Top bar ===== */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 16px; }
.topbar__inner {
  max-width: 760px; margin: 0 auto; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.topbar__logo { height: 52px; width: auto; display: block; margin-inline-start: -14px; }
.topbar__tag {
  font-size: .82rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 4px 12px; border-radius: 999px;
}

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(circle at 15% 110%, rgba(31, 181, 168, .45), transparent 55%),
    linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 60%, var(--accent) 130%);
  color: #fff;
  padding: 40px 16px 96px;
}
.hero__inner { max-width: 760px; margin: 0 auto; }
.hero__eyebrow {
  display: inline-block; margin-bottom: 10px; font-size: .85rem; font-weight: 700;
  color: #9fe7e0; letter-spacing: .2px;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; }
.hero__lead { margin: 0; opacity: .9; max-width: 600px; }

.steps {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.steps__item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); font-size: .9rem; font-weight: 600;
  transition: background .2s;
}
.steps__item span {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.2); font-size: .8rem;
}
.steps__item.is-active { background: #fff; color: var(--brand-dark); }
.steps__item.is-active span { background: var(--brand); color: #fff; }
.steps__item.is-done span { background: var(--accent); color: #fff; }

/* ===== Layout ===== */
.container { max-width: 760px; margin: -64px auto 0; padding: 0 16px 48px; }
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px;
}
.step__title { margin: 0 0 20px; font-size: 1.3rem; color: var(--brand-dark); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }

label { font-weight: 600; font-size: .95rem; }
label b { color: var(--danger); font-weight: 700; }
.opt { color: var(--muted); font-weight: 400; font-size: .85rem; }

input, select, textarea {
  font: inherit; color: inherit;
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
input[dir="ltr"] { text-align: right; }
input[dir="ltr"]:not(:placeholder-shown) { text-align: left; }
textarea { resize: vertical; min-height: 160px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.error { color: var(--danger); font-size: .82rem; min-height: 1em; }
.field__meta { display: flex; justify-content: space-between; gap: 12px; }
.counter { color: var(--muted); font-size: .8rem; white-space: nowrap; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }

/* ===== Question box ===== */
.question {
  border: 1px solid var(--border); border-inline-start: 4px solid var(--accent);
  background: var(--brand-soft); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 20px;
}
.question p { margin: 8px 0 0; }
.question q { font-weight: 600; }
.question__tag {
  display: inline-block; font-size: .78rem; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
}
.question__tag--sales { background: var(--warn-soft); color: var(--warn); }
.question__tag--med { background: var(--accent-soft); color: #007582; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin-top: 18px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 5px; accent-color: var(--brand); flex: none; }

/* ===== Buttons ===== */
.actions { display: flex; gap: 12px; justify-content: flex-start; margin-top: 28px; flex-wrap: wrap; }
.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border: 0; border-radius: var(--radius-sm);
  padding: 12px 28px; min-width: 130px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: transparent; color: var(--brand-dark); border: 1.5px solid var(--border); }
.btn--ghost:hover { border-color: var(--brand); }
.btn:disabled { opacity: .7; cursor: wait; }
.btn[hidden] { display: none; }

.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-alert {
  margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-sm);
  background: #fdecf2; color: var(--danger); font-weight: 600;
}

/* ===== Success ===== */
.success { text-align: center; padding: 48px 32px; }
.success__icon {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.success__icon svg { width: 38px; height: 38px; }
.success h2 { margin: 0 0 8px; color: var(--brand-dark); }
.success p { margin: 0; color: var(--muted); }

.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 0 16px 32px; }

.step { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .topbar__inner { height: 60px; }
  .topbar__logo { height: 42px; margin-inline-start: -10px; }
  .hero { padding: 28px 16px 88px; }
  .card { padding: 22px 18px; }
  .grid { grid-template-columns: 1fr; }
  .btn { flex: 1; }
  .steps__item { font-size: .8rem; padding: 4px 10px 4px 8px; }
}
