/* B2B Marketplace website. Colors and shapes follow the mobile app (lib/theme/brand.dart). */
:root {
  --primary: #00875f;
  --primary-dark: #006b4b;
  --primary-soft: #e2f5ee;
  --vivid: #00b383;
  --mint-wash: #f0faf6;
  --coral: #d93d22;
  --coral-bright: #ff6a4d;
  --coral-soft: #ffede8;
  --sun: #ffb800;
  --sun-dark: #9a5b00;
  --sun-soft: #fff5d9;
  --sea: #2f80ed;
  --plum: #8b5cf6;
  --honey: #f08a00;
  --berry: #e5487c;
  --sky: #0ea5e9;
  --canvas: #f4f5f7;
  --surface: #ffffff;
  --fill: #f1f3f5;
  --line: #e6e9ed;
  --text: #14181f;
  --muted: #5b6472;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, 0.05), 0 1px 2px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 18px 40px rgba(16, 24, 40, 0.12);
  --glow: 0 10px 26px rgba(0, 135, 95, 0.32);
  --hero: linear-gradient(135deg, #00875f 0%, #00a777 100%);
  --font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html[lang="ar"] { --font: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { inset-inline-start: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(16, 24, 40, .05); }
.nav { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand svg { width: 36px; height: 36px; flex: none; }
.brand span { white-space: nowrap; }
.brand span b { color: var(--primary); }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--primary-dark); background: var(--primary-soft); }
.lang { display: inline-flex; background: var(--fill); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px 10px; border-radius: 999px; cursor: pointer; min-width: 40px; }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--primary-dark); box-shadow: var(--shadow-sm); }
.menu-toggle { display: none; border: 0; background: var(--fill); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: var(--radius-md);
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; border: 0;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-light { background: #fff; color: var(--primary-dark); box-shadow: 0 10px 24px rgba(0, 64, 44, .18); }
.btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background: #0f1720; color: #fff; padding: 9px 18px 9px 14px; border-radius: 14px; min-height: 56px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.store:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0, 0, 0, .22); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11px; opacity: .8; font-weight: 500; letter-spacing: .02em; }
.store strong { display: block; font-size: 17px; line-height: 1.15; }
.store.soon { position: relative; background: rgba(15, 23, 32, .55); cursor: default; }
.store.soon:hover { transform: none; box-shadow: none; }
.soon-tag {
  position: absolute; top: -11px; inset-inline-end: -8px; font-style: normal; font-size: 12px; font-weight: 800;
  background: var(--sun); color: #3d2c00; padding: 3px 10px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--hero); color: #fff; overflow: hidden; border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 520px; height: 520px; inset-inline-end: -140px; top: -180px; border: 70px solid rgba(255, 255, 255, .07); }
.hero::after { width: 300px; height: 300px; inset-inline-start: -90px; bottom: -120px; background: rgba(255, 255, 255, .06); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 56px 0 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); padding: 7px 14px; border-radius: 999px; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(255, 184, 0, .3); }
.hero h1 { font-size: clamp(34px, 5.4vw, 62px); margin: 18px 0 18px; font-weight: 800; }
.hero h1 em { font-style: normal; color: #fff3c4; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); color: rgba(255, 255, 255, .9); max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.phone-stage { position: relative; justify-self: center; width: min(100%, 340px); }
.phone {
  position: relative; border-radius: 44px; background: #0f1720; padding: 10px;
  box-shadow: 0 40px 80px rgba(0, 40, 26, .45), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.phone img { border-radius: 34px; width: 100%; height: auto; }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; background: #0f1720; border-radius: 999px; z-index: 2; }
.float {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--text); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-md);
  font-size: 14px; font-weight: 700; white-space: nowrap; animation: bob 5s ease-in-out infinite;
}
.float small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.float .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.float .dot svg { width: 18px; height: 18px; }
.float-a { inset-inline-start: -64px; top: 22%; }
.float-b { inset-inline-end: -54px; top: 54%; animation-delay: -2.2s; }
.float-c { inset-inline-start: -30px; bottom: 9%; animation-delay: -3.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Trust strip ---------- */
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: -30px auto 0; position: relative; z-index: 2; }
.trust li { list-style: none; display: inline-flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px; padding: 10px 18px; box-shadow: var(--shadow-md); font-weight: 700; font-size: 15px; }
.trust svg { width: 20px; height: 20px; color: var(--primary); }
.trust ul { display: contents; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: 96px 0; }
.section-alt { background: var(--canvas); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.kicker { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: 6px 12px; border-radius: 999px; }
html[lang="ar"] .kicker { letter-spacing: 0; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 14px 0 12px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; background: #fff; border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); border: 1px solid #eef0f3; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--hero); color: #fff; font-weight: 800; font-size: 18px; box-shadow: var(--glow); margin-bottom: 18px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-media { order: -1; }
.split h2 { font-size: clamp(30px, 3.4vw, 42px); margin: 14px 0 14px; font-weight: 800; }
.split > div > p { color: var(--muted); font-size: 18px; margin-bottom: 26px; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature { background: #fff; border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); border: 1px solid #eef0f3; }
.section-alt .feature { border-color: transparent; }
.feature .icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 12px; }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 16.5px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 15px; }
.tint-green { background: linear-gradient(135deg, #e5f7f0, #c9eedf); color: #00744f; }
.tint-coral { background: linear-gradient(135deg, #ffefe9, #ffd9cd); color: #c23a20; }
.tint-sun { background: linear-gradient(135deg, #fff6dc, #ffe8a6); color: #8a5300; }
.tint-sea { background: linear-gradient(135deg, #eaf2fe, #cfe1fc); color: #1f62c4; }
.tint-plum { background: linear-gradient(135deg, #f2edfe, #e0d4fd); color: #6b3fd6; }
.tint-sky { background: linear-gradient(135deg, #e6f6fd, #c6eafa); color: #0b7fb2; }

.split-media { position: relative; display: flex; justify-content: center; }
.split-media .phone { width: min(100%, 300px); }
.split-media .glow { position: absolute; inset: 10% 8%; background: radial-gradient(closest-side, rgba(0, 179, 131, .28), transparent); filter: blur(10px); z-index: -1; }
.pair { display: flex; gap: 18px; align-items: flex-end; }
.pair .phone { width: min(46vw, 250px); }
.pair .phone:nth-child(2) { transform: translateY(-36px); }


/* Driver highlight */
.driver-band { background: linear-gradient(135deg, #10243a, #0d3d33); color: #fff; border-radius: var(--radius-xl); padding: 56px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; overflow: hidden; position: relative; }
.driver-band::after { content: ""; position: absolute; width: 380px; height: 380px; inset-inline-end: -120px; top: -120px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .05); }
.driver-band h2 { font-size: clamp(28px, 3.2vw, 40px); margin: 14px 0; font-weight: 800; }
.driver-band p { color: rgba(255, 255, 255, .8); font-size: 18px; }
.driver-band .kicker { background: rgba(255, 184, 0, .16); color: var(--sun); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.ticks svg { width: 22px; height: 22px; flex: none; color: var(--vivid); margin-top: 2px; }
.code-card { justify-self: center; position: relative; z-index: 1; background: #fff; color: var(--text); border-radius: 22px; padding: 26px; width: min(100%, 340px); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); text-align: center; }
.code-card .code { font-size: clamp(24px, 7vw, 34px); white-space: nowrap; font-weight: 800; letter-spacing: clamp(2px, 1vw, 6px); color: var(--primary-dark); background: var(--primary-soft); border-radius: 16px; padding: 16px 0; margin: 14px 0; direction: ltr; }
.code-card small { color: var(--muted); font-size: 14px; }

/* Gallery */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 10px 4px 26px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.gallery .phone { width: 240px; border-radius: 36px; padding: 8px; }
.gallery .phone img { border-radius: 29px; }
.gallery .phone::before { width: 70px; height: 18px; top: 14px; }
.gallery figcaption { margin-top: 14px; font-weight: 700; color: var(--muted); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid #eef0f3; padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-size: 20px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; }

/* Final CTA */
.cta-band { background: var(--hero); color: #fff; border-radius: var(--radius-xl); padding: 64px 40px; text-align: center; position: relative; overflow: hidden; box-shadow: var(--glow); }
.cta-band::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; inset-inline-start: -140px; top: -200px; background: rgba(255, 255, 255, .08); }
.cta-band h2 { font-size: clamp(30px, 3.8vw, 46px); font-weight: 800; position: relative; }
.cta-band p { color: rgba(255, 255, 255, .9); font-size: 18px; margin: 12px auto 28px; max-width: 560px; position: relative; }
.cta-band .cta-row { justify-content: center; position: relative; margin-top: 0; }

/* Footer */
.site-footer { padding: 56px 0 40px; color: var(--muted); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--primary-dark); }

/* Legal pages */
.doc-hero { background: var(--hero); color: #fff; padding: 56px 0 64px; border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.doc-hero h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; }
.doc-hero p { color: rgba(255, 255, 255, .88); margin-top: 10px; }
.doc { max-width: 780px; margin: -28px auto 72px; background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding: 40px; position: relative; }
.doc h2 { font-size: 21px; margin: 30px 0 8px; }
.doc h2:first-child { margin-top: 0; }
.doc p { color: #3a4350; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .split, .driver-band { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .hero-grid { padding: 40px 0 76px; gap: 48px; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .float-a { inset-inline-start: -20px; }
  .float-b { inset-inline-end: -16px; }
  .float-c { inset-inline-start: -8px; }
  .driver-band { padding: 40px 28px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 68px; inset-inline: 12px; flex-direction: column; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 10px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .menu-toggle { display: inline-grid; place-items: center; margin-inline-start: auto; }
  .nav .btn-small { display: none; }
}
@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .steps, .features { grid-template-columns: 1fr; }
  .pair .phone { width: 44vw; }
  .doc { padding: 26px 20px; margin-inline: 16px; }
  .cta-band { padding: 48px 22px; }
  .float { font-size: 13px; padding: 8px 12px; }
  .float .dot { width: 28px; height: 28px; }
}
@media (max-width: 480px) {
  .brand .word { display: none; }
}
@media (max-width: 420px) {
  .float-a { inset-inline-start: -6px; top: 16%; }
  .float-b { inset-inline-end: -6px; }
  .float-c { display: none; }
  .store { flex: 1 1 100%; justify-content: center; }
}
