/* Wasl's public site. Arabic is the resting language; html[lang="en"] swaps every
   .ar span for its .en twin (site/lang.js). Colours are tokens so the dark scheme
   only redefines values. */

:root {
  --ground: #F5F6F3;
  --surface: #FFFFFF;
  --sunk: #EBEEE9;
  --ink: #15201C;
  --muted: #5E6A64;
  --line: #D7DDD8;
  --accent: #0F5C4A;
  --accent-ink: #FFFFFF;
  --accent-soft: #DDEDE6;
  --gold: #D99A1E;
  --gold-soft: #F8EBCB;
  --bubble-user: #DCEFE4;
  --bubble-agent: #FFFFFF;
  --shadow: 0 10px 30px rgba(21, 32, 28, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0F1613;
    --surface: #182420;
    --sunk: #121B17;
    --ink: #E8EDE9;
    --muted: #9AA7A1;
    --line: #2A3833;
    --accent: #3FA58A;
    --accent-ink: #0B1511;
    --accent-soft: #1B3A31;
    --gold: #F0B43A;
    --gold-soft: #3A2E12;
    --bubble-user: #1F3A31;
    --bubble-agent: #1E2B26;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

:root[data-theme="dark"] {
  --ground: #0F1613;
  --surface: #182420;
  --sunk: #121B17;
  --ink: #E8EDE9;
  --muted: #9AA7A1;
  --line: #2A3833;
  --accent: #3FA58A;
  --accent-ink: #0B1511;
  --accent-soft: #1B3A31;
  --gold: #F0B43A;
  --gold-soft: #3A2E12;
  --bubble-user: #1F3A31;
  --bubble-agent: #1E2B26;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Readex Pro", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.15rem; font-weight: 500; }
p { margin: 0; max-width: 62ch; }
a { color: var(--accent); }
img { max-width: 100%; }

/* Language switching: Arabic at rest, English when html[lang="en"]. */
.en { display: none; }
html[lang="en"] .en { display: inline; }
html[lang="en"] .ar { display: none; }
html[lang="en"] .en.block { display: block; }

.wrap { width: min(1120px, 92vw); margin: 0 auto; }
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: "Readex Pro", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.lede { color: var(--muted); font-size: 1.1rem; margin-top: 14px; }

/* Top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
  font-family: "Readex Pro", sans-serif; font-weight: 700; font-size: 1.25rem;
}
.mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent);
  display: grid; place-items: center; color: var(--accent-ink);
  font-family: "Readex Pro", sans-serif; font-weight: 700; font-size: 1rem;
}
.bar-actions { display: flex; align-items: center; gap: 10px; }
.toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 0.95rem; cursor: pointer;
}
.toggle:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn {
  display: inline-block; border-radius: 999px; padding: 9px 18px; font-size: 0.95rem;
  font-weight: 600; text-decoration: none; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
}
.btn.quiet { background: transparent; color: var(--accent); }

/* Hero */
.hero { padding: 48px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.outcomes { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 30px; }
.outcomes div { border-inline-start: 3px solid var(--gold); padding-inline-start: 14px; font-size: 0.95rem; color: var(--muted); }
.outcomes b { display: block; color: var(--ink); font-family: "Readex Pro", sans-serif; font-weight: 500; font-size: 1.02rem; margin-bottom: 2px; }

/* The phone */
.phone {
  background: var(--sunk); border: 1px solid var(--line); border-radius: 28px;
  padding: 14px; box-shadow: var(--shadow); max-width: 420px; margin: 0 auto; width: 100%;
}
.phone-head {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px;
  font-size: 0.9rem; color: var(--muted);
}
.phone-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg {
  max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 0.95rem; line-height: 1.55;
  background: var(--bubble-agent); border: 1px solid var(--line);
}
.msg.user { align-self: flex-start; background: var(--bubble-user); border-color: transparent; }
.msg.agent { align-self: flex-end; }
html[lang="en"] .phone { direction: ltr; }
html[lang="en"] .msg.user { align-self: flex-end; }
html[lang="en"] .msg.agent { align-self: flex-start; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 0.85rem; }
.card .swatch { height: 54px; border-radius: 8px; margin-bottom: 8px; }
.card .price { font-family: "Readex Pro", sans-serif; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  border: 1px solid var(--accent); color: var(--accent); border-radius: 999px;
  padding: 3px 11px; font-size: 0.8rem; background: transparent;
}
.chip.gold { border-color: var(--gold); color: var(--gold); }
.linkline {
  display: inline-block; margin-top: 6px; padding: 8px 12px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 0.85rem;
}
.sys { align-self: center; font-size: 0.78rem; color: var(--muted); }

/* Journey */
.journey { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 36px; }
@media (max-width: 980px) { .journey { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .journey { grid-template-columns: repeat(2, 1fr); } }
.step { display: flex; flex-direction: column; gap: 8px; }
.step .n { font-family: "Readex Pro", sans-serif; font-weight: 700; color: var(--gold); font-size: 0.85rem; letter-spacing: 0.06em; }
.step .rail { height: 3px; background: var(--line); border-radius: 2px; position: relative; }
.step .rail::after { content: ""; position: absolute; inset: 0; width: 100%; background: var(--accent); border-radius: 2px; }
.step h3 { font-size: 1rem; }
.step p { font-size: 0.9rem; color: var(--muted); }

/* Two columns */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.list li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; }
.list .ico { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; margin-top: 4px; }
.yes .ico { background: var(--accent-soft); color: var(--accent); }
.no .ico { background: var(--gold-soft); color: var(--gold); }
.col h3 { margin-bottom: 16px; }

/* Merchant */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.tile h3 { font-weight: 700; }
.tile p { font-size: 0.95rem; color: var(--muted); }

/* Channels */
.channels { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.channel { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; }
.channel .soon { font-size: 0.75rem; color: var(--muted); font-weight: 400; }

/* Plans */
.plans { width: 100%; border-collapse: collapse; margin-top: 32px; font-variant-numeric: tabular-nums; }
.plans th, .plans td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.plans th { font-family: "Readex Pro", sans-serif; font-weight: 500; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.04em; }
.plans td.num { font-family: "Readex Pro", sans-serif; font-weight: 700; font-size: 1.15rem; }
.plans tr.pack td { background: var(--gold-soft); }
.table-wrap { overflow-x: auto; }
.note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }

/* Under the hood */
.hood { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 32px; }
@media (max-width: 860px) { .hood { grid-template-columns: 1fr 1fr; } }
.hood div { border-top: 3px solid var(--accent); padding-top: 12px; font-size: 0.95rem; }
.hood b { display: block; font-family: "Readex Pro", sans-serif; font-weight: 500; margin-bottom: 4px; }

/* Prose pages */
.prose { padding: 40px 0 72px; }
.prose h2 { margin-top: 40px; }
.prose p, .prose li { color: var(--muted); }
.prose p { margin-top: 12px; }
.prose ul { margin: 12px 0 0; padding-inline-start: 22px; }
.prose li { margin-bottom: 8px; }
.prose .updated { font-size: 0.85rem; }

footer { padding: 40px 0 60px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot p { max-width: 60ch; }

@media (prefers-reduced-motion: no-preference) {
  .msg { animation: rise 0.5s ease both; }
  .chat .msg:nth-child(2) { animation-delay: 0.1s; }
  .chat .msg:nth-child(3) { animation-delay: 0.2s; }
  .chat .msg:nth-child(4) { animation-delay: 0.3s; }
  .chat .msg:nth-child(5) { animation-delay: 0.4s; }
  .chat .msg:nth-child(6) { animation-delay: 0.5s; }
  .chat .msg:nth-child(7) { animation-delay: 0.6s; }
  .chat .msg:nth-child(8) { animation-delay: 0.7s; }
  @keyframes rise { from { opacity: 0.35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
