/* Wakeel — customer-facing styles. Arabic-first, RTL by default, mobile-first. */

:root {
  --ink: #12201f;          /* body text */
  --teal: #0f3b3a;         /* brand ink, headings, primary surfaces */
  --teal-2: #1d5c59;       /* hover / secondary teal */
  --mist: #f4f8f7;         /* page background, cool white */
  --paper: #ffffff;        /* cards */
  --line: #d6e1de;         /* borders */
  --muted: #566866;        /* secondary text */
  --saffron: #f2b33d;      /* the one accent: voice note, primary action */
  --saffron-ink: #3a2a00;  /* text on saffron */
  --danger: #b3261e;
  --ok: #1f7a4d;

  --radius-s: 10px;
  --radius-m: 18px;
  --bubble: 22px;

  --font: "Readex Pro", "Noto Sans Arabic", system-ui, sans-serif;
  --font-mark: "Reem Kufi", "Readex Pro", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.9rem, 6.5vw, 3.1rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.75;
  color: var(--ink);
  background: var(--mist);
}

html[lang="en"] body { line-height: 1.6; }

img, svg { display: block; max-width: 100%; }

a { color: var(--teal); text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 32px, 1040px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  background: var(--teal);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-s);
  z-index: 10;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  padding-block: 18px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mark {
  font-family: var(--font-mark);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--teal);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.mark small {
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--muted);
}
.lang-toggle {
  font: inherit;
  font-size: var(--step--1);
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--teal);
  border-radius: 999px;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--teal-2); }

/* ---------- Hero ---------- */
.hero {
  padding-block: 12px 48px;
  display: grid;
  gap: 32px;
}
.hero h1 {
  font-size: var(--step-3);
  line-height: 1.25;
  font-weight: 700;
  color: var(--teal);
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
html[lang="en"] .hero h1 { max-width: 20ch; line-height: 1.15; }
.hero .lede {
  font-size: var(--step-1);
  color: var(--muted);
  margin: 16px 0 0;
  max-width: 34ch;
}
.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--saffron);
  color: var(--saffron-ink);
}
.btn-primary:hover { background: #f6c262; }
.btn-quiet {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--line);
}
.btn-quiet:hover { border-color: var(--teal-2); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.honest {
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: 14px;
}

/* The conversation: the hero's main visual */
.chat {
  background: var(--teal);
  border-radius: 28px;
  padding: 22px 18px 24px;
  display: grid;
  gap: 14px;
  color: #fff;
  align-content: start;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step--1);
  color: #cfe3e0;
}
.chat-head .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--saffron);
}
.bubble {
  border-radius: var(--bubble);
  padding: 12px 14px;
  max-width: 92%;
}
.bubble-me {
  background: #ffffff;
  color: var(--ink);
  justify-self: start;
  border-start-start-radius: 6px;
}
.bubble-wakeel {
  background: #164a48;
  color: #fff;
  justify-self: end;
  border-start-end-radius: 6px;
  width: 92%;
}
.voice {
  display: flex;
  align-items: center;
  gap: 12px;
}
.voice .play {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--saffron);
  display: grid;
  place-items: center;
}
.voice .play svg { width: 14px; height: 14px; fill: var(--saffron-ink); }
.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  flex: 1;
}
.wave span {
  width: 3px;
  border-radius: 3px;
  background: var(--teal);
  opacity: 0.85;
}
.voice .len { font-size: 0.8rem; color: var(--muted); }
.transcript {
  margin: 8px 0 0;
  font-size: var(--step--1);
  color: var(--muted);
}
.options {
  list-style: none;
  margin: 10px 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.options li {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  font-size: var(--step--1);
}
.options b { font-weight: 600; }
.options .slot { color: #cfe3e0; }
.options .price { grid-row: span 2; align-self: center; font-weight: 600; color: var(--saffron); }
.approve-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: var(--step--1);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--saffron);
  color: var(--saffron-ink);
  font-weight: 600;
}
.chip-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.35); }
.status {
  justify-self: end;
  font-size: var(--step--1);
  color: #cfe3e0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status svg { width: 16px; height: 16px; stroke: var(--saffron); fill: none; stroke-width: 2.4; }

@media (prefers-reduced-motion: no-preference) {
  .chat .bubble, .chat .status {
    animation: rise 0.5s ease both;
  }
  .chat .bubble:nth-child(3) { animation-delay: 0.7s; }
  .chat .status { animation-delay: 1.3s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */
section { padding-block: 40px; }
section h2 {
  font-size: var(--step-2);
  line-height: 1.35;
  color: var(--teal);
  margin: 0 0 20px;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.steps li {
  counter-increment: step;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px 18px 18px 18px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
}
.steps li::before {
  content: counter(step);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.steps h3 { margin: 0; font-size: var(--step-1); color: var(--teal); line-height: 1.4; }
.steps p { margin: 4px 0 0; color: var(--muted); }

.price-block {
  background: var(--paper);
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  padding: 24px;
  display: grid;
  gap: 8px;
}
.price-block .amount {
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--teal);
  line-height: 1.2;
}
.price-block p { margin: 0; color: var(--muted); max-width: 52ch; }

.never {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.never li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.never svg { flex: none; width: 22px; height: 22px; margin-top: 4px; stroke: var(--danger); fill: none; stroke-width: 2.2; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding-block: 4px;
}
.faq summary {
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--teal);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  margin-inline-start: auto;
  font-size: 1.4rem;
  color: var(--muted);
}
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 14px; color: var(--muted); max-width: 62ch; }

.final-cta {
  text-align: center;
  padding-block: 48px 120px;
}
.final-cta h2 { margin-bottom: 18px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 20px 100px;
  font-size: var(--step--1);
  color: var(--muted);
}

.split > div + div { margin-top: 40px; }

/* Sticky action on small screens; hidden while another "send" button is on screen */
.sticky-cta {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 5;
  box-shadow: 0 8px 24px rgba(15, 59, 58, 0.25);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.sticky-cta.is-hidden {
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    padding-block: 32px 72px;
  }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { grid-template-columns: 1fr; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .split > div + div { margin-top: 0; }
  .sticky-cta { display: none; }
  .final-cta { padding-block: 64px; }
  .site-footer { padding-bottom: 24px; }
}

/* ---------- Request form ---------- */
.form-page { padding-block: 8px 64px; }
.form-page h1 {
  font-size: var(--step-2);
  color: var(--teal);
  margin: 0 0 6px;
  line-height: 1.35;
}
.form-page .intro { color: var(--muted); margin: 0 0 24px; max-width: 52ch; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 { font-size: var(--step-1); margin: 0 0 14px; color: var(--teal); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label, .field legend { font-weight: 600; font-size: var(--step--1); }
.field .hint { font-size: 0.82rem; color: var(--muted); margin: 0; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="number"],
.field textarea,
.field select {
  font: inherit;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal-2); }
.field .error { color: var(--danger); font-size: 0.85rem; margin: 0; }
.field[aria-invalid="true"] input,
.field[aria-invalid="true"] textarea { border-color: var(--danger); }
input[type="tel"] { direction: ltr; text-align: start; }
html[dir="rtl"] input[type="tel"] { text-align: right; }

fieldset.field { border: 0; padding: 0; margin: 0 0 16px; }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.choice {
  position: relative;
}
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}
.choice input:checked + span { background: var(--teal); color: #fff; border-color: var(--teal); }
.choice input:focus-visible + span { outline: 3px solid var(--saffron); outline-offset: 2px; }

.recorder {
  display: grid;
  gap: 12px;
}
.rec-btn {
  justify-self: start;
  background: var(--saffron);
  color: var(--saffron-ink);
}
.rec-btn[data-state="recording"] { background: var(--danger); color: #fff; }
.rec-status { font-size: var(--step--1); color: var(--muted); margin: 0; min-height: 1.5em; }
.recorder audio { width: 100%; }
.upload-alt {
  justify-self: start;
  position: relative;
  font-size: var(--step--1);
  min-height: 44px;
}
.upload-alt input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.upload-alt:focus-within { outline: 3px solid var(--saffron); outline-offset: 2px; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.consent input { width: 22px; height: 22px; margin-top: 4px; flex: none; accent-color: var(--teal); }

.form-error {
  background: #fdecea;
  color: var(--danger);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.done {
  text-align: center;
  padding-block: 32px;
}
.done .ref {
  direction: ltr;
  display: inline-block;
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.04em;
  background: var(--paper);
  border: 1px dashed var(--teal-2);
  border-radius: var(--radius-m);
  padding: 8px 20px;
  margin: 12px 0;
}
.done p { color: var(--muted); max-width: 46ch; margin-inline: auto; }

.demo-banner {
  background: #fff6df;
  color: var(--saffron-ink);
  font-size: var(--step--1);
  padding: 8px 0;
  text-align: center;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
