/* سَبْق — sabqsteps.com
   Tokens mirror the current app design (apps/mobile/src/ui/theme.ts and
   docs/design/onboarding-prototype.html): Readex Pro, navy/yellow/cream,
   raised pill buttons, 2px outlined cards with a hard drop edge.
   Logical properties only, so one stylesheet serves RTL (ar) and LTR (en). */

:root {
  --navy: #102a43;
  --navy2: #1b3a5c;
  --deep: #0a1b2c;
  --page-dark: #0b1e31;
  --yellow: #f7c948;
  --yellow-edge: #c99a1e;
  --yellow-edge-dark: #b8912a;
  --cream: #fff8df;
  --cream-alt: #fff0c2;
  --white: #ffffff;
  --muted: #3e5368;
  --mist: #c9d3dd;
  --line: #d5dce3;
  --border-dark: #24496f;
  --eyebrow-dark: #e9c766;
  --eyebrow-light: #6e5300;
  --success: #1e7a55;
  --success-dark: #5fd39b;
  --danger-dark: #ff8a80;
  --flame: #e0592a;
  --ring-track: #eadfbf;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 36px;
  --max: 1140px;
  --font: "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--cream);
  color: var(--navy);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { line-height: 1.6; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100;
  background: var(--yellow); color: var(--navy); padding: 0.5rem 1rem; border-radius: var(--r-sm); font-weight: 700;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }
.on-light :focus-visible { outline-color: var(--navy); }

/* ---------- Brand: owner's logo (footprints mark + «سبق» wordmark) ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font-weight: 700; font-size: 1.75rem; line-height: 1; color: var(--cream); }
.brand img { width: 44px; height: auto; }

/* ---------- Buttons (Button.tsx: raised pills) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 56px; padding: 0.7rem 1.75rem; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1.0625rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; border-bottom-width: 5px;
  transition: transform 0.08s ease, border-bottom-width 0.08s ease;
}
.btn:active { transform: translateY(3px); border-bottom-width: 2px; }
.btn--yellow { background: var(--yellow); border-color: var(--yellow); border-bottom-color: var(--yellow-edge); color: var(--navy); }
.btn--navy { background: var(--navy); border-color: var(--navy); border-bottom-color: var(--deep); color: var(--yellow); }
.btn--outline-dark { background: transparent; border-color: var(--border-dark); border-bottom-width: 2px; color: var(--cream); }
.btn--outline-dark:hover { border-color: var(--mist); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 30, 49, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--navy2); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.nav { display: flex; align-items: center; gap: 1.5rem; color: var(--mist); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--cream); }
.nav .lang { border: 2px solid var(--border-dark); border-radius: 999px; padding: 0.2rem 1rem; color: var(--cream); font-weight: 600; }
.nav .lang:hover { border-color: var(--yellow); }
@media (max-width: 800px) { .nav .nav__section { display: none; } }

/* ---------- Hero (dark, like the Welcome screen) ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--cream);
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(247, 201, 72, 0.20), transparent 60%),
    linear-gradient(180deg, var(--page-dark), var(--deep));
  padding-block: 3.5rem 6rem;
}
html[dir="rtl"] .hero { background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(247, 201, 72, 0.20), transparent 60%),
    linear-gradient(180deg, var(--page-dark), var(--deep)); }
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
@media (max-width: 920px) { .hero .container { grid-template-columns: 1fr; } }
.eyebrow { display: inline-block; color: var(--eyebrow-dark); font-weight: 600; letter-spacing: 0; margin-bottom: 1rem; }
html[lang="en"] .eyebrow { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); line-height: 1.2; margin-bottom: 1.25rem; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero__lead { font-size: 1.2rem; color: var(--mist); max-width: 33em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-block: 2rem 2.25rem; }

.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; max-width: 34rem; }
.values li {
  display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.1rem;
  background: rgba(27, 58, 92, 0.55); border: 1px solid var(--border-dark); border-radius: var(--r-md);
}
.values .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: var(--yellow); display: grid; place-items: center; }
.values .ico svg { width: 22px; height: 22px; }

/* ---------- Phone mockup: current Today screen (yellow Hero band + navy ring) ---------- */
.phone-wrap { position: relative; display: grid; place-items: center; }
.phone-wrap::before { content: ""; position: absolute; width: 115%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(247,201,72,0.28), transparent 62%); }
.phone {
  position: relative; width: min(330px, 84vw); border-radius: 46px; overflow: hidden;
  background: var(--cream); color: var(--navy); border: 10px solid #050f19;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}
.ph-hero { background: var(--yellow); border-end-start-radius: var(--r-xl); border-end-end-radius: var(--r-xl); padding: 1.1rem 1.1rem 1.3rem; }
.ph-status { display: flex; justify-content: space-between; font-size: 0.72rem; font-weight: 700; margin-bottom: 0.6rem; direction: ltr; }
.ph-head { display: flex; align-items: center; gap: 0.6rem; }
.ph-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--yellow); display: grid; place-items: center; font-weight: 700; flex: none; }
.ph-head div { flex: 1; line-height: 1.35; }
.ph-head small { display: block; font-size: 0.68rem; }
.ph-head b { font-size: 0.98rem; }
.ph-pill { background: var(--navy); color: var(--yellow); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.7rem; font-weight: 700; direction: ltr; }
.ring { position: relative; width: 196px; margin: 0.9rem auto 0.5rem; }
.ring svg { transform: rotate(-90deg); }
html[dir="rtl"] .ring svg { transform: rotate(-90deg) scaleY(-1); }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; line-height: 1.2; }
.ring__label svg { width: 22px; height: 22px; transform: none !important; margin-bottom: 2px; }
.ring__steps { font-size: 2.35rem; font-weight: 700; direction: ltr; }
.ring__goal { font-size: 0.72rem; }
.ph-chip { width: fit-content; margin: 0 auto 0.8rem; background: var(--navy); color: var(--cream); border-radius: 999px; padding: 0.2rem 0.9rem; font-size: 0.74rem; font-weight: 600; }
.ph-earn { background: var(--navy); color: var(--cream); border-radius: var(--r-md); padding: 0.65rem 0.8rem; font-size: 0.7rem; }
.ph-earn__row { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.ph-earn__row b { color: var(--yellow); direction: ltr; }
.ph-bar { height: 8px; border-radius: 999px; background: rgba(255,248,223,0.2); overflow: hidden; }
.ph-bar span { display: block; height: 100%; width: 68%; background: var(--yellow); border-radius: inherit; }
.ph-body { padding: 0.9rem 1rem 0.6rem; display: grid; gap: 0.7rem; }
.ph-btn {
  background: var(--navy); color: var(--yellow); border-radius: 999px; text-align: center; font-weight: 700;
  padding: 0.55rem; font-size: 0.88rem; border-bottom: 4px solid var(--deep);
}
.ph-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.ph-tile { background: var(--white); border: 2px solid var(--navy); box-shadow: 0 3px 0 var(--navy); border-radius: var(--r-md); padding: 0.45rem 0.65rem; font-size: 0.66rem; line-height: 1.35; }
.ph-tile b { display: block; font-size: 1rem; }
.ph-tile .flame { color: var(--flame); }
.ph-tabs {
  margin: 0.3rem 0.8rem 0.9rem; background: var(--navy); border-radius: 999px; padding: 0.45rem 0.6rem;
  display: flex; justify-content: space-around; align-items: center;
}
.ph-tabs span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--mist); }
.ph-tabs span.on { background: var(--yellow); color: var(--navy); }
.ph-tabs svg { width: 17px; height: 17px; }

/* ---------- Sections ---------- */
.section { padding-block: 5.5rem; }
.section--white { background: var(--white); }
.section--dark { background: var(--page-dark); color: var(--cream); }
.section__head { max-width: 42rem; margin-bottom: 2.75rem; }
.section__head h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.section__head p { color: var(--muted); font-size: 1.12rem; margin: 0; }
.section--dark .section__head p { color: var(--mist); }
.kicker { display: block; color: var(--eyebrow-light); font-weight: 700; margin-bottom: 0.4rem; }
.section--dark .kicker { color: var(--eyebrow-dark); }

.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

/* Card.tsx "outlined": 2px navy border with a hard 4px drop edge */
.card {
  background: var(--white); border: 2px solid var(--navy); border-radius: var(--r-lg);
  box-shadow: 0 5px 0 var(--navy); padding: 1.75rem;
}
.card h3 { font-size: 1.22rem; }
.card p { color: var(--muted); margin: 0; }
.card--yellow { background: var(--yellow); }
.card--yellow p { color: var(--navy); }
.icon { width: 54px; height: 54px; border-radius: var(--r-md); background: var(--navy); color: var(--yellow); display: grid; place-items: center; margin-bottom: 1.1rem; }
.card--yellow .icon { background: var(--cream); color: var(--navy); }
.icon svg { width: 26px; height: 26px; }

/* Rewards (rewards-first) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.rules { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.85rem; }
.rules li { display: flex; gap: 0.8rem; align-items: flex-start; }
.rules li::before {
  content: "✓"; flex: none; width: 28px; height: 28px; margin-top: 0.15rem; border-radius: 50%;
  background: var(--navy); color: var(--yellow); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}
.wallet { background: var(--navy); color: var(--cream); border-radius: var(--r-xl); padding: 2rem; border-bottom: 8px solid var(--deep); }
.wallet__label { color: var(--mist); font-size: 0.95rem; }
.wallet__balance { font-size: clamp(2.6rem, 6vw, 3.4rem); font-weight: 700; line-height: 1.1; color: var(--yellow); direction: ltr; text-align: start; }
html[dir="rtl"] .wallet__balance { text-align: end; }
.wallet__row { display: flex; justify-content: space-between; font-size: 0.92rem; color: var(--mist); margin-top: 1.5rem; }
.wallet__bar { height: 12px; background: rgba(255,248,223,0.18); border-radius: 999px; overflow: hidden; margin-top: 0.5rem; }
.wallet__bar span { display: block; height: 100%; width: 68%; background: var(--yellow); border-radius: inherit; }
.offers { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.5rem; }
.offer { background: var(--cream); color: var(--navy); border-radius: var(--r-md); padding: 0.9rem 1rem; line-height: 1.4; }
.offer small { display: block; color: var(--muted); font-size: 0.8rem; }
.offer b { display: block; font-size: 1.05rem; }
.offer .cost { display: inline-block; margin-top: 0.4rem; background: var(--yellow); border-radius: 999px; padding: 0.05rem 0.6rem; font-size: 0.78rem; font-weight: 700; }
.note { font-size: 0.9rem; color: var(--muted); margin-top: 1.25rem; }

.h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.lead { color: var(--muted); font-size: 1.12rem; }

/* How it works */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { background: var(--cream); border-radius: var(--r-lg); padding: 1.75rem; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--yellow); color: var(--navy); font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem;
  border-bottom: 4px solid var(--yellow-edge);
}
.steps h3 { font-size: 1.15rem; }
.steps p { color: var(--muted); margin: 0; }

/* Fair counting (dark band) */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.checks li { background: rgba(27, 58, 92, 0.55); border: 1px solid var(--border-dark); border-radius: var(--r-md); padding: 1.25rem 1.4rem; display: flex; gap: 0.9rem; }
.checks .mark { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; margin-top: 0.15rem; background: var(--yellow); color: var(--navy); }
.checks .mark--no { background: transparent; border: 2px solid var(--danger-dark); color: var(--danger-dark); }
.checks b { display: block; color: var(--cream); }
.checks p { margin: 0; color: var(--mist); font-size: 0.97rem; }

/* FAQ */
.faq { max-width: 52rem; }
.faq details { background: var(--white); border: 2px solid var(--line); border-radius: var(--r-md); padding: 0 1.5rem; margin-bottom: 0.8rem; }
.faq details[open] { border-color: var(--navy); }
.faq summary { cursor: pointer; font-weight: 600; padding-block: 1.1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--cream-alt); display: grid; place-items: center; font-size: 1.2rem; }
.faq details[open] summary::after { content: "−"; background: var(--yellow); }
.faq details p { color: var(--muted); padding-bottom: 1.2rem; margin: 0; }

/* Download CTA (yellow band, like Hero.tsx) */
.cta { background: var(--yellow); color: var(--navy); text-align: center; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.cta__icon { width: 96px; height: 96px; margin: 0 auto 1.25rem; border-radius: 22px; box-shadow: 0 6px 0 var(--deep); }
.cta h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); }
.cta p { font-size: 1.15rem; max-width: 36rem; margin-inline: auto; }
.stores { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.store {
  display: inline-flex; align-items: center; gap: 0.75rem; min-width: 220px; padding: 0.7rem 1.4rem;
  background: var(--navy); color: var(--cream); border-radius: var(--r-md); border-bottom: 5px solid var(--deep);
  text-align: start; text-decoration: none;
}
.store svg { width: 28px; height: 28px; flex: none; color: var(--yellow); }
.store small { display: block; font-size: 0.78rem; color: var(--mist); line-height: 1.2; }
.store b { display: block; font-size: 1.1rem; line-height: 1.35; }
.soon { display: inline-block; margin-top: 1.25rem; background: var(--navy); color: var(--yellow); border-radius: 999px; padding: 0.2rem 1rem; font-weight: 600; font-size: 0.95rem; }

/* Footer */
.site-footer { background: var(--deep); color: var(--mist); padding-block: 2.75rem; font-size: 0.95rem; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: center; }
.site-footer .brand { font-size: 1.35rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--cream); text-decoration: underline; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 1rem; padding: 3rem 1.25rem; background: var(--page-dark); color: var(--cream); }
.notfound h1 { font-size: 4.5rem; margin: 0; color: var(--yellow); }
.notfound p { color: var(--mist); }
