/* =========================================================
   مركبتي أعمال — Design System
   Arabic-first RTL, B2B SaaS product landing page
   ========================================================= */

:root {
  /* Canvas & surfaces */
  --canvas: #faf8f4;
  --canvas-alt: #f2ede2;
  --surface: #ffffff;

  /* Ink */
  --ink: #171b1f;
  --body: #3f464d;
  --body-soft: #596168;

  /* Brand */
  --brand: #761f26;
  --brand-2: #9a2444;
  --brand-tint: rgba(118, 31, 38, 0.06);
  --brand-line: rgba(118, 31, 38, 0.2);

  /* Champagne */
  --champagne: #b8ab87;
  --champagne-dark: #8a7446;
  --champagne-deep: #6f5b2e;

  /* Solution green */
  --green: #2f7562;
  --green-tint: rgba(47, 117, 98, 0.07);
  --green-line: rgba(47, 117, 98, 0.28);

  /* Lines */
  --line: #e4ddd0;
  --line-strong: #d7d0c6;
  --line-cool: #aab3ba;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-device: 34px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(23, 27, 31, 0.05);
  --shadow-md: 0 20px 44px -22px rgba(23, 27, 31, 0.28);
  --shadow-brand: 0 18px 38px -18px rgba(118, 31, 38, 0.38);

  /* Layout */
  --container: 1180px;
  --gutter: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  direction: rtl;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  direction: rtl;
  text-align: right;
  font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul,
ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 30;
  transform: translateY(-160%);
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(184, 171, 135, 0.9);
  outline-offset: 3px;
}

/* ---------------------------------------------------------
   Typography
   --------------------------------------------------------- */

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-inline-end: auto;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 640px;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 3.2vw + 1rem, 3.4rem);
  font-weight: 700;
}

h2 {
  max-width: 640px;
  margin-bottom: 16px;
  font-size: clamp(1.7rem, 1.1vw + 1.3rem, 2.15rem);
}

h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

h3 svg {
  flex: none;
  width: 22px;
  height: 22px;
}

p {
  max-width: 560px;
  color: var(--body);
  line-height: 1.85;
  font-size: 1.145rem;
  font-weight: 600;
}

p + p {
  margin-top: 14px;
}

.lead {
  max-width: 580px;
  color: var(--body);
  font-size: clamp(1.175rem, 0.3vw + 1.125rem, 1.305rem);
  line-height: 1.8;
}

.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  margin: 0 0 16px;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.eyebrow-brand {
  background: var(--brand-tint);
  color: var(--brand);
}

.eyebrow-unified {
  background: #8a7446;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.eyebrow-inverse {
  background: rgba(250, 248, 244, 0.14);
  color: #f1ead9;
}

.required-tag {
  display: none;
}

.trial-note {
  max-width: 300px;
  color: var(--body-soft);
  font-size: 0.985rem;
  font-weight: 600;
  line-height: 1.6;
}

.text-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(118, 31, 38, 0.4);
  padding-bottom: 2px;
  transition: border-color 180ms ease;
}

.text-link:hover {
  border-color: var(--brand);
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.button,
.header-cta {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  padding: 12px 24px;
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.button-primary:hover {
  background: #691a20;
  transform: translateY(-1px);
}

.button-soft {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-soft:hover {
  border-color: var(--brand-line);
  color: var(--brand);
}

.header-cta {
  min-height: 40px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  padding: 9px 18px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.header-cta:hover {
  background: #691a20;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand img {
  width: min(172px, 40vw);
  height: auto;
}

.top-nav {
  display: inline-flex;
  justify-content: center;
  gap: clamp(20px, 2.6vw, 40px);
  color: #4d565f;
  font-size: 0.9rem;
  font-weight: 600;
}

.top-nav a {
  padding-block: 6px;
  text-decoration: none;
  transition: color 170ms ease;
}

.top-nav a:hover {
  color: var(--brand);
}

/* ---------------------------------------------------------
   Section rhythm helpers
   --------------------------------------------------------- */

.section-heading {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-heading h2 {
  margin-bottom: 12px;
}

.center-heading {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
}

.center-heading .eyebrow {
  margin-inline: auto;
}

.center-heading h2 {
  max-width: none;
  margin-inline: auto;
}

.center-heading p {
  max-width: 520px;
  margin-inline: auto;
}

/* ---------------------------------------------------------
   Device frame — reusable screenshot staging system
   --------------------------------------------------------- */

.device-frame {
  position: relative;
  width: min(100%, 272px);
  justify-self: center;
  border-radius: var(--r-device);
  border: 1px solid rgba(23, 27, 31, 0.1);
  background: linear-gradient(180deg, #22262b, #14171a);
  padding: 12px;
  box-shadow: var(--shadow-md);
}

.device-frame__notch {
  position: absolute;
  top: 22px;
  inset-inline: 0;
  margin-inline: auto;
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  z-index: 2;
}

.device-frame__screen {
  position: relative;
  aspect-ratio: 718 / 1600;
  display: block;
  border-radius: 24px;
  background: var(--canvas-alt);
  overflow: hidden;
}

.device-frame__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-frame--hero {
  width: min(100%, 300px);
}

.device-frame--compact {
  width: min(100%, 236px);
}

.report-frame {
  justify-self: start;
  width: min(100%, 320px);
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: var(--surface);
}

.report-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(52px, 6vw, 84px) 0;
  background: var(--canvas);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(48px, 6vw, 72px);
}

.hero-copy {
  max-width: 620px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 28px;
}

.hero-visual {
  position: relative;
  display: grid;
  justify-items: start;
  padding-inline-start: 20px;
}

.stage-backdrop {
  position: absolute;
  top: 8%;
  right: -6%;
  width: 88%;
  height: 84%;
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, var(--canvas-alt), #ece4d3 70%);
  z-index: 0;
}

.hero-visual .device-frame {
  z-index: 1;
}

/* ---------------------------------------------------------
   Trust rail
   --------------------------------------------------------- */

.trust-rail {
  border-top: 1px solid var(--line);
  background: linear-gradient(150deg, #241d13, #1c150f);
}

.trust-rail-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px clamp(20px, 4vw, 56px);
  padding-block: 20px;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.trust-item svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: #ffffff;
}

/* ---------------------------------------------------------
   Problem / Solution — editorial narrative
   --------------------------------------------------------- */

.story-row {
  padding-block: clamp(56px, 7vw, 92px);
}

.problem {
  background: var(--surface);
}

.editorial-block {
  max-width: 760px;
  padding-inline-start: clamp(20px, 3vw, 32px);
  border-inline-start: 3px solid var(--brand);
}

.editorial-block h2 {
  max-width: 720px;
}

.solution {
  background: var(--canvas-alt);
}

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.62fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.feature-copy {
  max-width: 560px;
}

.feature-copy .button-primary {
  margin-top: 18px;
}

/* ---------------------------------------------------------
   Getting started — connected process rail
   --------------------------------------------------------- */

.steps-section {
  padding-block: clamp(48px, 6vw, 72px);
  background: var(--canvas);
}

.steps-shell {
  display: grid;
  grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
}

.steps-heading {
  margin-bottom: 0;
  display: grid;
  gap: 18px;
  justify-items: start;
}

.steps-heading h2 {
  margin-bottom: 0;
}

.steps-heading .button {
  margin-top: 4px;
}

.process-rail {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.process-rail::before {
  content: "";
  position: absolute;
  top: 19px;
  inset-inline: 44px;
  height: 1px;
  background: var(--line-strong);
  z-index: 0;
}

.process-rail li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 150px;
  text-align: center;
}

.process-node {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}

.process-rail strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.5;
}

/* ---------------------------------------------------------
   Capabilities — alternating tonal chapters
   --------------------------------------------------------- */

.feature-row {
  padding-block: clamp(56px, 7vw, 92px);
}

.feature-row--light {
  background: var(--surface);
}

.feature-row--tint {
  background: var(--canvas-alt);
}

/* ---------------------------------------------------------
   No GPS — contrast band
   --------------------------------------------------------- */

.no-gps {
  padding-block: clamp(56px, 7vw, 92px);
  background: linear-gradient(150deg, #241d13, #1c150f);
  color: #f1ead9;
}

.no-gps-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 0.3fr);
  align-items: center;
  gap: clamp(28px, 4vw, 48px);
}

.no-gps h2 {
  color: #fbf8f2;
}

.no-gps p {
  max-width: 620px;
  color: rgba(241, 234, 217, 0.78);
}

.no-gps-mark {
  justify-self: center;
  color: rgba(241, 234, 217, 0.45);
}

.no-gps-mark svg {
  width: clamp(72px, 9vw, 108px);
  height: auto;
}

/* ---------------------------------------------------------
   Suitability
   --------------------------------------------------------- */

.fit-section {
  padding-block: clamp(56px, 7vw, 92px);
  background: var(--surface);
}

.qualification-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 28px);
}

.qualification-panel {
  border-radius: var(--r-md);
  padding: clamp(24px, 3vw, 32px);
}

.qualification-panel--positive {
  background: var(--green-tint);
  border: 1px solid var(--green-line);
}

.qualification-panel--positive h3 {
  color: var(--green);
}

.qualification-panel--positive svg {
  color: var(--green);
}

.qualification-panel--neutral {
  background: var(--canvas-alt);
  border: 1px solid var(--line-strong);
}

.qualification-panel--neutral h3 {
  color: #4d565f;
}

.qualification-panel--neutral svg {
  color: #6b7480;
}

.qualification-panel ul {
  display: grid;
  gap: 12px;
}

.qualification-panel li {
  position: relative;
  padding-inline-start: 18px;
  color: var(--body);
  line-height: 1.65;
  font-size: 1.105rem;
  font-weight: 600;
}

.qualification-panel li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}

/* ---------------------------------------------------------
   Pricing — conversion moment
   --------------------------------------------------------- */

.pricing-section {
  padding-block: clamp(56px, 7vw, 92px);
  background: var(--canvas);
}

.pricing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.4fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  padding: clamp(32px, 4vw, 48px);
}

.pricing-copy h2 {
  max-width: 560px;
}

.pricing-action {
  display: grid;
  gap: 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 2px solid var(--champagne-dark);
  padding: 24px;
}

.pricing-action strong {
  color: var(--brand);
  font-size: clamp(1.5rem, 1.2vw + 1.2rem, 1.9rem);
  line-height: 1.25;
}

.pricing-action span {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}

.pricing-action .button {
  margin-top: 6px;
}

/* ---------------------------------------------------------
   Backup / trust
   --------------------------------------------------------- */

.trust-section {
  padding-block: clamp(48px, 6vw, 72px);
  background: var(--surface);
}

.ownership-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 16px;
  max-width: 620px;
  margin-inline: auto;
}

.ownership-flow div {
  display: grid;
  align-content: center;
  gap: 6px;
  border-radius: var(--r-md);
  background: #ffffff;
  border: 1.5px solid var(--champagne);
  padding: 20px;
  text-align: center;
}

.ownership-flow strong {
  color: var(--brand);
  font-weight: 700;
}

.ownership-flow span:not(.flow-arrow) {
  max-width: none;
  color: var(--body);
  font-size: 1.045rem;
  font-weight: 600;
}

.flow-arrow {
  display: grid;
  align-items: center;
  color: var(--champagne-deep);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ---------------------------------------------------------
   FAQ
   --------------------------------------------------------- */

.faq-section {
  padding-block: clamp(56px, 7vw, 92px);
  background: var(--canvas);
}

.faq-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.faq-list {
  border-top: 1px solid var(--line-strong);
}

details {
  border-bottom: 1px solid var(--line-strong);
  padding-block: 18px;
}

summary {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.01rem;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid var(--champagne-deep);
  border-bottom: 1.6px solid var(--champagne-deep);
  transform: rotate(45deg);
  transition: transform 200ms ease;
}

details[open] summary::after {
  transform: rotate(225deg);
}

details p {
  max-width: 640px;
  margin: 12px 0 0;
}

/* ---------------------------------------------------------
   Final CTA
   --------------------------------------------------------- */

.final-cta {
  padding-block: clamp(56px, 7vw, 88px);
  background: var(--brand);
  color: #fff;
}

.final-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.final-panel h2,
.final-panel p {
  color: #fff;
}

.final-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.final-panel h2 {
  margin-bottom: 8px;
}

.final-panel .button-primary {
  background: #fff;
  color: var(--brand);
  box-shadow: none;
}

.final-panel .button-primary:hover {
  background: #f3efe7;
}

.final-panel .secondary-cta {
  grid-column: 2;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
  font-weight: 600;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 1px;
  transition: border-color 180ms ease, opacity 180ms ease;
}

.whatsapp-link:hover,
.whatsapp-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.9);
}

.whatsapp-link svg {
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line-strong);
  background: var(--canvas);
  color: var(--body-soft);
}

.footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
}

.legal-placeholders {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--body-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

/* ===========================================================
   Responsive
   =========================================================== */

@media (max-width: 1080px) {
  .hero-grid,
  .showcase-grid,
  .pricing-panel {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  }

  .steps-shell {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .steps-heading {
    justify-items: start;
    text-align: right;
  }
}

@media (max-width: 860px) {
  :root {
    --gutter: 20px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand cta" "nav nav";
    gap: 10px 14px;
    padding-block: 12px;
  }

  .brand {
    grid-area: brand;
  }

  .header-cta {
    grid-area: cta;
    justify-self: start;
  }

  .top-nav {
    grid-area: nav;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    justify-items: center;
    padding-inline-start: 0;
  }

  .stage-backdrop {
    right: 6%;
    width: 76%;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .showcase-grid .device-frame,
  .showcase-grid .report-frame {
    justify-self: center;
  }

  .feature-copy {
    max-width: none;
  }

  .no-gps-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .no-gps p {
    margin-inline: auto;
  }

  .qualification-grid {
    grid-template-columns: 1fr;
  }

  .pricing-panel {
    grid-template-columns: 1fr;
  }

  .pricing-copy h2,
  .pricing-copy p {
    max-width: none;
  }

  .faq-shell {
    grid-template-columns: 1fr;
  }

  .final-panel {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .final-panel p {
    margin-inline: auto;
  }

  .final-panel .secondary-cta {
    grid-column: auto;
  }

  .ownership-flow {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    justify-content: center;
    transform: rotate(-90deg);
  }
}

@media (max-width: 540px) {
  h1 {
    font-size: 2.15rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .lead,
  p {
    font-size: 1.105rem;
  }

  .cta-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .trial-note {
    max-width: none;
  }

  .device-frame--hero,
  .device-frame--compact {
    width: min(78vw, 240px);
  }

  .process-rail {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .process-rail::before {
    inset-inline: 19px;
    top: 0;
    bottom: 0;
    height: auto;
    width: 1px;
  }

  .process-rail li {
    max-width: none;
    grid-auto-flow: column;
    justify-content: start;
    text-align: start;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-block: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.001ms !important;
  }
}
