/* سند. landing — same palette and type as the ad video */
:root {
  --cream: #f4efe4;
  --paper: #fffdf8;
  --ink: #10204a;
  --muted: #55627f;
  --blue: #1d49b5;
  --navy: #0d2463;
  --yellow: #ffd12e;
  --line: #e2dccd;
  --wa-bg: #0e0b0f;
  --wa-in: #262427;
  --wa-out: #154332;
  --r-lg: 36px;
  --r-md: 22px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
a, button, input, select, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 18px/1.75 "IBM Plex Sans Arabic", Tahoma, sans-serif; }
h1, h2, h3 { font-family: "Readex Pro", "IBM Plex Sans Arabic", sans-serif; line-height: 1.3; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.4vw, 66px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.muted { color: var(--muted); }
.fine { font-size: 15px; color: var(--muted); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 12px; }

/* yellow highlight from the video — used once per screen, not everywhere */
.pill { background: var(--yellow); color: var(--ink); padding: 0 .28em .08em; border-radius: .32em; display: inline-block; transform: rotate(-1.5deg); }

.logo { font: 700 30px/1 "Readex Pro", sans-serif; color: var(--ink); text-decoration: none; }
.logo span { color: var(--blue); }

/* buttons */
.btn:disabled { opacity: .6; cursor: progress; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 28px; border-radius: 999px; font: 600 18px/1 "Readex Pro", sans-serif; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease; }
.btn:active { transform: scale(.97); }
.btn-b { background: var(--blue); color: #fff; }
.btn-b:hover { background: var(--navy); }
.btn-y { background: var(--yellow); color: var(--ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 16px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--cream) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top-in { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.links { display: flex; gap: 24px; margin-inline-start: auto; }
.links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; }
.links a:hover { color: var(--blue); }

/* hero */
.hero { padding: 48px 0 88px; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.lead { font-size: 21px; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 12px; }
.phone { margin: 0; justify-self: center; width: min(360px, 100%); aspect-ratio: 9 / 16; border-radius: 52px; background: #000; padding: 10px; box-shadow: 0 40px 90px rgba(13, 36, 99, .32), inset 0 0 0 2px #2b2b2b; transform: rotate(-2deg); }
.phone video { width: 100%; height: 100%; border-radius: 44px; object-fit: cover; background: #000; display: block; }

/* evidence band */
.band { background: var(--blue); color: #fff; padding: 80px 0; background-image: radial-gradient(800px 500px at 85% 0%, #2a5fd6 0%, transparent 60%); }
.h-white { color: #fff; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 36px; border-top: 2px solid rgba(255, 255, 255, .25); }
.fact { padding: 28px 24px 8px 0; border-inline-start: 2px solid rgba(255, 255, 255, .25); padding-inline-start: 24px; }
.fact:first-child { border-inline-start: 0; padding-inline-start: 0; }
.fact b { display: block; font: 700 64px/1 "Readex Pro", sans-serif; direction: ltr; text-align: right; }
.fact p { margin: 14px 0 10px; font-size: 18px; color: #e3ebff; }
.fact a { color: var(--yellow); font-size: 14px; }

/* calculator */
.calc { padding: 96px 0; }
.calc-in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.slider { display: block; margin: 26px 0; }
.slider span { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.slider output { font: 700 22px/1 "Readex Pro", sans-serif; color: var(--blue); }
input[type="range"] { width: 100%; margin-top: 12px; accent-color: var(--blue); height: 28px; }
.result { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 40px; }
.result > p:first-child { color: #c9d6f7; margin: 0; }
.result strong { display: block; font: 700 clamp(48px, 6vw, 76px)/1.1 "Readex Pro", sans-serif; color: var(--yellow); margin: 10px 0 26px; font-variant-numeric: tabular-nums; }
.result strong small { font-size: .35em; color: #fff; }
.result dl { margin: 0 0 18px; display: grid; gap: 10px; }
.result dl div { display: flex; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 10px; }
.result dt { color: #c9d6f7; }
.result dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.result .fine { color: #9fb1dd; margin: 0 0 22px; }
.after-cta { margin: 44px 0 0; }
.form [aria-invalid="true"] { border-color: #b42318; }

/* real chat */
.demo { padding: 40px 0 96px; }
.demo-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.chat { background: var(--wa-bg); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 80px rgba(13, 36, 99, .3); max-width: 520px; justify-self: center; width: 100%; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #1a171b; color: #fff; }
.chat-head small { display: block; color: #9a989c; font-size: 13px; }
.chat-head .av { width: 40px; height: 40px; border-radius: 50%; background: #fff url(icon.svg) center / 70% no-repeat; flex: none; }
.chat-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 22px; min-height: 520px; }
.b { max-width: 84%; padding: 10px 14px 6px; border-radius: 18px; font-size: 15.5px; line-height: 1.6; color: #f1f1f1; white-space: pre-line; overflow-wrap: anywhere; }
.b.u { align-self: flex-start; background: var(--wa-out); border-start-start-radius: 6px; }
.b.r { align-self: flex-end; background: var(--wa-in); border-start-end-radius: 6px; }
.b .lnk { color: #53bdeb; text-decoration: underline; direction: ltr; unicode-bidi: embed; }
.b.hide { display: none; }
.typing { align-self: flex-end; background: var(--wa-in); border-radius: 18px; padding: 12px 16px; display: flex; gap: 6px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: #9a989c; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .3; } }

/* patient journey — a real sequence, so the three stages read in order */
.journey { padding: 96px 0; background: var(--paper); border-block: 1px solid var(--line); }
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 30px; }
.stage { padding: 6px 30px 0; border-inline-start: 2px solid var(--line); }
.stage:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stage h3 { color: var(--blue); }
.stage ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.stage li { font-size: 17px; color: var(--muted); }
.stage li b { color: var(--ink); }

/* comparison */
.compare { padding: 96px 0 40px; }
.compare table { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 17px; }
.compare th, .compare td { text-align: start; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font: 600 16px/1.4 "Readex Pro", sans-serif; color: var(--muted); border-bottom: 2px solid var(--ink); }
.compare thead th:last-child { color: var(--blue); }
.compare tbody th { font-weight: 600; }
.compare td:nth-child(2) { color: var(--muted); }
.compare td:last-child { color: var(--ink); font-weight: 600; background: #eef3ff; }
@media (max-width: 560px) {
  .compare thead { display: none; }
  .compare tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .compare tbody th { grid-column: 1 / -1; border: 0; padding: 4px 0; }
  .compare td { border: 0; padding: 6px 8px; border-radius: 10px; }
  .compare td:nth-child(2)::before { content: "رد آلي بالقوائم"; display: block; font-size: 13px; font-weight: 400; }
  .compare td:last-child::before { content: "سند"; display: block; font-size: 13px; font-weight: 400; color: var(--blue); }
}

/* steps */
.steps { padding: 96px 0; }
.steps ol { list-style: none; counter-reset: s; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { counter-increment: s; display: grid; gap: 6px; }
.steps li::before { content: counter(s, arabic-indic); font: 700 46px/1 "Readex Pro", sans-serif; color: var(--blue); }
.steps li b { font: 600 22px/1.4 "Readex Pro", sans-serif; }
.steps li span { color: var(--muted); }

/* privacy */
.privacy { background: var(--navy); color: #dbe4fb; padding: 80px 0; }
.privacy-in { max-width: 900px; }

/* faq */
.faq { padding: 96px 0; }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font: 600 20px/1.5 "Readex Pro", sans-serif; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--blue); font-size: 26px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 12px 0 0; color: var(--muted); }

/* trial form */
.trial { padding: 96px 0; background: var(--blue); color: #fff; }
.trial-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.trial .fine { color: #c9d6f7; }
.form { background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: 34px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 16px; }
.form input:not([type="radio"]), .form select { font: inherit; font-weight: 400; min-height: 50px; padding: 0 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); width: 100%; }
.form input:focus, .form select:focus { border-color: var(--blue); outline: none; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { font-weight: 600; font-size: 16px; margin-bottom: 8px; padding: 0; }
.seg label { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 500; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--blue); background: #eef3ff; }
.seg input { accent-color: var(--blue); }
#slots { display: contents; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; }
.form-msg { margin: 0; font-weight: 600; min-height: 1.5em; }
.form-msg.ok { color: #0f7a43; }
.form-msg.err { color: #b42318; }

/* footer */
.foot { padding: 36px 0 90px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot-in p { margin: 0; color: var(--muted); }
.foot-in nav { display: flex; gap: 20px; margin-inline-start: auto; }
.foot-in nav a { color: var(--ink); }

.wa-float { position: fixed; inset-inline-start: 18px; bottom: 18px; width: 60px; height: 60px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); z-index: 30; }

/* the one orchestrated moment: the highlight sweeps in on load */
@media (prefers-reduced-motion: no-preference) {
  .hero .pill { animation: sweep .9s .25s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes sweep { from { background-size: 0 100%; transform: rotate(0); } to { background-size: 100% 100%; transform: rotate(-1.5deg); } }
  .hero .pill { background: linear-gradient(var(--yellow), var(--yellow)) right / 100% 100% no-repeat; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .typing i { animation: none; }
}

/* tablet and phone */
@media (max-width: 960px) {
  .links { display: none; }
  .top-in { justify-content: space-between; }
  .hero-in, .calc-in, .demo-in, .trial-in { grid-template-columns: 1fr; gap: 40px; }
  .phone { transform: none; width: min(320px, 100%); }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .stages { grid-template-columns: 1fr; gap: 34px; }
  .stage { border-inline-start: 0; padding: 0; }
  .steps ol { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero { padding-top: 24px; }
  .facts { grid-template-columns: 1fr; }
  .fact { border-inline-start: 0; padding-inline-start: 0; border-bottom: 1px solid rgba(255, 255, 255, .2); padding-bottom: 20px; }
  .fact b { font-size: 54px; }
  .cta-row .btn { width: 100%; }
  .result, .form { padding: 24px; }
  .form .two { grid-template-columns: 1fr; }
  .chat-body { min-height: 460px; }
}
