/* Madriss — shared stylesheet for /, /ar/ and /compare/.
   One file, cached once: the pages differ in copy, not in design. */
:root {
  --ground: #FFFFFF;
  --wash: #F4F8FC;
  --ink: #0C1F33;
  --ink-soft: #41546A;
  --muted: #5B6B7E;
  --navy: #0A2A4A;
  --navy-deep: #071F38;
  --accent: #1D6FE0;
  --on-accent: #FFFFFF;
  --accent-ink: #0E4C8A;
  --tint: #D7E9FB;
  --tint-soft: #EAF3FC;
  --line: #E4EBF2;
  --good: #0B7A55;
  --on-navy: #FFFFFF;
  --on-navy-soft: #AFC6DC;
  --island: #0B0F14;
  --card-r: 28px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #071A2C;
    --wash: #0A2136;
    --ink: #E9EFF6;
    --ink-soft: #C0CEDC;
    --muted: #8CA0B4;
    --navy: #0D2843;
    --navy-deep: #081E33;
    --accent: #5CA2FF;
    --on-accent: #071A2C;
    --accent-ink: #8FC0FF;
    --tint: #153554;
    --tint-soft: #102C47;
    --line: #1C3A57;
    --good: #34D399;
    --on-navy: #F2F7FC;
    --on-navy-soft: #A9C2DA;
    --island: #04070B;
  }
}
:root[data-theme="dark"] {
  --ground: #071A2C;
  --wash: #0A2136;
  --ink: #E9EFF6;
  --ink-soft: #C0CEDC;
  --muted: #8CA0B4;
  --navy: #0D2843;
  --navy-deep: #081E33;
  --accent: #5CA2FF;
  --on-accent: #071A2C;
  --accent-ink: #8FC0FF;
  --tint: #153554;
  --tint-soft: #102C47;
  --line: #1C3A57;
  --good: #34D399;
  --on-navy: #F2F7FC;
  --on-navy-soft: #A9C2DA;
  --island: #04070B;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Figtree", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
.display { font-family: "Mona Sans", "Figtree", sans-serif; font-stretch: 118%; }
h1, h2, h3 { font-family: "Mona Sans", "Figtree", sans-serif; font-stretch: 118%; line-height: 1.08; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
section[id], header[id] { scroll-margin-top: 96px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */
.nav-wrap { position: sticky; top: 14px; z-index: 50; }
nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 12px 10px 18px;
  max-width: 900px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-family: "Mona Sans", sans-serif; font-stretch: 125%; font-weight: 800; letter-spacing: 0.02em; font-size: 1.02rem; }
.nav-links { display: flex; gap: 22px; font-size: 0.94rem; font-weight: 500; color: var(--ink-soft); }
.nav-links a { text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent-ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang {
  font-family: "IBM Plex Sans Arabic", "Figtree", system-ui, sans-serif; font-weight: 600; font-size: 0.92rem;
  text-decoration: none; color: var(--ink-soft); padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line);
}
.lang:hover { color: var(--accent-ink); border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 999px; padding: 12px 24px;
  font-family: "Figtree", sans-serif; font-weight: 700; font-size: 0.98rem;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-dark { background: var(--navy); color: var(--on-navy); }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-soft { background: var(--tint-soft); color: var(--accent-ink); }
nav .btn { padding: 10px 20px; }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 0; text-align: center; position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(560px 340px at 18% 8%, color-mix(in srgb, var(--tint) 65%, transparent), transparent 70%),
    radial-gradient(640px 400px at 85% 20%, color-mix(in srgb, var(--tint) 50%, transparent), transparent 70%);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tint-soft); border: 1px solid var(--line);
  color: var(--accent-ink); font-weight: 600; font-size: 0.88rem;
  border-radius: 999px; padding: 7px 16px 7px 8px; margin-bottom: 26px;
}
.chip img { width: 24px; height: 24px; border-radius: 7px; }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem); font-weight: 800; letter-spacing: -0.015em;
  max-width: 830px; margin: 0 auto;
}
.hero h1 em {
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400;
  font-stretch: 100%; color: var(--accent); letter-spacing: 0;
}
.hero .sub { color: var(--muted); font-size: 1.18rem; max-width: 600px; margin: 20px auto 0; }
.hero .ctas { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

.phones { display: flex; justify-content: center; align-items: flex-end; margin-top: 64px; height: clamp(400px, 46vw, 590px); overflow: hidden; }
.phone {
  border: 9px solid var(--island); border-bottom: none;
  border-radius: 48px 48px 0 0; overflow: hidden;
  background: var(--island);
  box-shadow: 0 30px 80px rgba(7, 31, 56, 0.28);
  position: relative; flex: none;
}
.phone img { width: 100%; aspect-ratio: 9 / 17; object-fit: cover; object-position: top; }
.phone-c { width: clamp(220px, 26vw, 330px); z-index: 3; }
.phone-l, .phone-r { width: clamp(180px, 21.5vw, 275px); z-index: 2; opacity: 0.94; }
.phone-l { margin-inline-end: clamp(-52px, -4vw, -28px); transform: translateY(12%) rotate(-3deg); }
.phone-r { margin-inline-start: clamp(-52px, -4vw, -28px); transform: translateY(12%) rotate(3deg); }
@media (max-width: 760px) {
  .phones { height: 460px; }
  .phone-l, .phone-r { display: none; }
  .phone-c { width: 280px; }
}

/* ---------- Claims strip ---------- */
.claims { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--wash); padding: 40px 0; }
.claims .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px; text-align: center; }
.claim .n { font-family: "Mona Sans", sans-serif; font-stretch: 118%; font-weight: 800; font-size: 1.9rem; }
.claim .k { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }

.eyebrow {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 14px;
}
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin-top: 14px; }
.center { text-align: center; }
.center .section-head { margin-left: auto; margin-right: auto; }

/* ---------- Island demo band ---------- */
.band { background: linear-gradient(165deg, var(--navy), var(--navy-deep)); color: var(--on-navy); border-radius: 36px; padding: 72px 28px; position: relative; overflow: hidden; }
.band .eyebrow { color: var(--on-navy-soft); }
.band h2 { color: var(--on-navy); }
.band .section-head p { color: var(--on-navy-soft); }
.band-glow { position: absolute; width: 700px; height: 700px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); top: -280px; inset-inline-end: -200px; pointer-events: none; }

.island-demo { display: flex; flex-direction: column; align-items: center; gap: 26px; margin-top: 8px; }
.island {
  background: var(--island); border-radius: 44px; padding: 20px 22px;
  width: min(430px, 92%); box-shadow: 0 24px 70px rgba(0,0,0,0.45);
  color: #F4F7FA; font-family: "Figtree", sans-serif;
}
.island .row1 { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 14px; }
.island .merchant { font-weight: 600; font-size: 1.02rem; color: #E7EDF3; }
.island .amount { font-family: "Mona Sans", sans-serif; font-stretch: 118%; font-weight: 800; font-size: 1.3rem; }
.island .cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.island .cat {
  background: #1A2430; border-radius: 16px; padding: 10px 4px 8px; text-align: center;
  font-size: 0.72rem; color: #C7D2DD; border: 1px solid #232F3D;
}
.island .cat .e { font-size: 1.25rem; display: block; margin-bottom: 3px; }
.island .cat.hot { background: #14273D; border-color: var(--accent); color: #DCEBFF; }
@keyframes tapPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 55% { box-shadow: 0 0 0 9px transparent; } }
.island .cat.hot { animation: tapPulse 2.4s ease-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .island .cat.hot { animation: none; }
  * { scroll-behavior: auto !important; }
}
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 54px; }
.step { background: color-mix(in srgb, var(--on-navy) 7%, transparent); border: 1px solid color-mix(in srgb, var(--on-navy) 14%, transparent); border-radius: 20px; padding: 22px; }
.step .num { font-family: "Mona Sans", sans-serif; font-weight: 800; color: var(--accent); font-size: 0.9rem; letter-spacing: 0.1em; }
.step h3 { font-size: 1.06rem; margin: 8px 0 6px; color: var(--on-navy); }
.step p { color: var(--on-navy-soft); font-size: 0.94rem; }

/* ---------- Coverage / networks ---------- */
.networks { display: flex; align-items: center; justify-content: center; gap: 34px; flex-wrap: wrap; margin: 34px 0 10px; }
.networks img { height: 34px; width: auto; }
.networks .tall { height: 46px; }
.matrix-card { background: var(--ground); border: 1px solid var(--line); border-radius: var(--card-r); padding: 10px 26px 16px; max-width: 720px; margin: 0 auto; overflow-x: auto; }
table.matrix { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 480px; }
.matrix th, .matrix td { padding: 13px 12px; text-align: start; border-bottom: 1px solid var(--line); }
.matrix tr:last-child td { border-bottom: none; }
.matrix th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.matrix .yes { color: var(--good); font-weight: 700; }
.matrix .no { color: var(--muted); }
.teaser { margin-top: 26px; color: var(--muted); font-size: 0.98rem; }
.teaser a { color: var(--accent-ink); font-weight: 600; }

/* ---------- Feature cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--wash); border: 1px solid var(--line); border-radius: var(--card-r);
  padding: 34px 34px 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
}
.feature h3 { font-size: 1.35rem; font-weight: 800; }
.feature p { color: var(--muted); }
.feature > p { max-width: 46ch; }
.feature .shot { margin-top: 22px; display: flex; justify-content: center; }
.feature .shot img {
  width: min(300px, 82%); border-radius: 34px 34px 0 0;
  border: 7px solid var(--island); border-bottom: none;
  box-shadow: 0 18px 44px rgba(7,31,56,0.22);
}
.feature.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 40px; padding: 44px; }
.feature.wide .shot { margin: 0 0 -56px; align-self: flex-end; }
@media (max-width: 820px) {
  .feature.wide { flex-direction: column; padding: 34px 34px 0; gap: 10px; }
  .feature.wide .shot { margin: 22px 0 0; align-self: stretch; justify-content: center; }
}

/* ---------- Privacy ---------- */
.privacy-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 44px; text-align: start; }
.p-item { border: 1px solid var(--line); background: var(--ground); border-radius: 20px; padding: 24px; }
.p-item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.p-item p { color: var(--muted); font-size: 0.94rem; }

/* ---------- FAQ ---------- */
details { border-bottom: 1px solid var(--line); padding: 6px 4px; }
details summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: "Mona Sans", sans-serif; font-stretch: 112%; font-weight: 700; font-size: 1.05rem;
  padding: 18px 0;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 1.5rem; color: var(--accent); font-weight: 400; transition: transform 0.2s; flex: none; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-soft); padding: 0 0 20px; max-width: 62ch; }
details p + p { margin-top: -8px; }
.faq-wrap { max-width: 720px; margin: 0 auto; }

/* ---------- CTA + footer ---------- */
.final { text-align: center; }
.final h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; }
.final h2 em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent); }
footer { background: var(--navy-deep); color: var(--on-navy-soft); margin-top: 40px; }
footer .container { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 44px; padding-bottom: 44px; flex-wrap: wrap; }
footer .brand span { color: var(--on-navy); }
footer .flinks { display: flex; gap: 24px; font-size: 0.93rem; flex-wrap: wrap; }
footer a { color: var(--on-navy-soft); text-decoration: none; }
footer a:hover { color: var(--on-navy); }
footer .fine { font-size: 0.85rem; max-width: 460px; }
footer .fine span { font-size: 0.78rem; opacity: 0.75; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

@media (max-width: 760px) { .nav-links { display: none; } section { padding: 64px 0; } }

/* ---------- Compare page ---------- */
.page-head { padding: 64px 0 8px; max-width: 800px; }
.page-head h1 { font-size: clamp(2.1rem, 4.8vw, 3.3rem); font-weight: 800; letter-spacing: -0.015em; }
.page-head .lede { color: var(--muted); font-size: 1.12rem; margin-top: 18px; max-width: 64ch; }
.updated { color: var(--muted); font-size: 0.9rem; margin-top: 16px; max-width: 64ch; }
.crumbs { font-size: 0.9rem; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
main.cmp-page > section { padding: 0 0 64px; }
.picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
@media (max-width: 860px) { .picks { grid-template-columns: 1fr; } }
.pick { border: 1px solid var(--line); background: var(--wash); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.pick.me { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--tint-soft); }
.pick .who { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.pick h3 { font-size: 1.25rem; }
.pick p { color: var(--ink-soft); font-size: 0.98rem; }
.pick .more { color: var(--accent-ink); font-weight: 600; text-decoration: none; font-size: 0.94rem; margin-top: auto; padding-top: 8px; }
.cmp-card { background: var(--ground); border: 1px solid var(--line); border-radius: var(--card-r); padding: 10px 0 16px; overflow-x: auto; }
/* Side padding lives on the edge cells, not the card: the sticky label column
   pins to the scrollport's edge, so card padding would leave a gap beside it. */
.cmp th:first-child, .cmp td:first-child { padding-inline-start: 26px; }
.cmp th:last-child, .cmp td:last-child { padding-inline-end: 26px; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 760px; }
.cmp th, .cmp td { padding: 14px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp tr:last-child td { border-bottom: none; }
.cmp th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.cmp th.me, .cmp td.me { background: color-mix(in srgb, var(--tint-soft) 70%, transparent); }
.cmp td:first-child { font-weight: 600; width: 21%; }
.cmp .yes { color: var(--good); font-weight: 700; }
.cmp .no { color: var(--muted); }
.cmp .part { color: var(--accent-ink); font-weight: 600; }
.cmp small { display: block; color: var(--muted); font-weight: 400; margin-top: 3px; font-size: 0.86rem; line-height: 1.45; }
.footnote { color: var(--muted); font-size: 0.86rem; margin-top: 16px; max-width: 72ch; }
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; margin-bottom: 16px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-inline-start: 22px; margin: 12px 0 0; display: grid; gap: 8px; }
.prose a { color: var(--accent-ink); }
.sources { font-size: 0.9rem; color: var(--muted); padding-inline-start: 20px; display: grid; gap: 6px; }
.sources a { color: var(--accent-ink); }

/* ---------- Arabic (RTL) ---------- */
[dir="rtl"] body,
[dir="rtl"] .display, [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] .btn, [dir="rtl"] details summary, [dir="rtl"] .island, [dir="rtl"] .step .num, [dir="rtl"] .chip {
  font-family: "IBM Plex Sans Arabic", "Figtree", "Segoe UI", system-ui, sans-serif; font-stretch: normal;
}
[dir="rtl"] body { line-height: 1.8; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.32; letter-spacing: 0; }
[dir="rtl"] .hero h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); }
[dir="rtl"] .hero h1 em { font-family: inherit; font-style: normal; font-weight: 500; }
[dir="rtl"] .final h2 em { font-family: inherit; font-style: normal; font-weight: 500; }
[dir="rtl"] .eyebrow, [dir="rtl"] .matrix th, [dir="rtl"] .cmp th, [dir="rtl"] .pick .who { letter-spacing: 0; text-transform: none; font-size: 0.86rem; }
[dir="rtl"] .brand span, [dir="rtl"] .claim .n, [dir="rtl"] .island .amount { font-family: "Mona Sans", "IBM Plex Sans Arabic", sans-serif; }
[dir="rtl"] .chip { padding: 7px 8px 7px 16px; }
[dir="rtl"] .lang { font-family: "Figtree", system-ui, sans-serif; }
[dir="rtl"] details summary { font-size: 1.08rem; }
[dir="rtl"] .step .num { font-family: "Mona Sans", sans-serif; }

/* ---------- Small screens ---------- */
/* The App Store pill must never break into two lines, and under 480px the
   icon carries the brand on its own so the language switch still fits. */
nav .btn { white-space: nowrap; }
@media (max-width: 760px) {
  nav { padding: 8px 8px 8px 12px; }
  nav .btn { padding: 9px 14px; }
  .lang { padding: 7px 10px; }
}
@media (max-width: 480px) {
  .brand span { display: none; }
}
/* Row labels stay put while the comparison table scrolls sideways. */
.cmp th:first-child, .cmp td:first-child {
  position: sticky; inset-inline-start: 0; z-index: 1;
  background: var(--ground);
  box-shadow: 1px 0 0 var(--line);
}
[dir="rtl"] .cmp th:first-child, [dir="rtl"] .cmp td:first-child { box-shadow: -1px 0 0 var(--line); }
