/* ============================================================
   FlowSmart — Landing page styles
   هوية بصرية مستمدة من المنصة: Fluent 2 · الأزرق #0F6CBD
   خصائص منطقية (logical properties) => RTL/LTR تلقائيًا
   ============================================================ */

/* ---------- 1. Variables ---------- */
:root {
  /* Brand (extracted from the platform design system) */
  --brand:        #0F6CBD;
  --brand-strong: #115EA3;
  --brand-dark:   #0C3B5E;
  --brand-tint:   #E8F1FA;
  --brand-tint-2: #F0F6FC;
  --brand-line:   #D6E6F5;

  /* Neutrals */
  --ink:      #1B1A19;
  --ink-2:    #5D6B7A;
  --line:     #E5EAF1;
  --bg:       #FFFFFF;
  --bg-soft:  #F7FAFD;

  --success:      #107C10;
  --success-tint: #E7F4E7;

  /* Shape & depth */
  --radius:    14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(12, 59, 94, .07);
  --shadow-md: 0 10px 28px rgba(12, 59, 94, .11);
  --shadow-lg: 0 18px 44px rgba(12, 59, 94, .15);

  /* Typography & rhythm */
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  --container: 1160px;
  --header-h: 72px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--brand); }
button { font-family: inherit; }

::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* Skip link (accessibility) */
.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease,
              color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.btn--sm { padding: 7px 16px; font-size: .88rem; border-radius: 10px; }
.btn--lg { padding: 13px 28px; font-size: 1.02rem; border-radius: 14px; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 108, 189, .32);
}

.btn--ghost { background: var(--bg); color: var(--ink); border-color: #D3DEEA; }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

.btn--inverse { background: #fff; color: var(--brand-dark); }
.btn--inverse:hover { background: var(--brand-tint); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(4, 24, 40, .3); }

.btn:active { transform: translateY(0); }

/* ---------- 4. Header / Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 18px rgba(12, 59, 94, .06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: 38px; height: 38px; border-radius: 9px; display: block; }
.brand-name {
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: .2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: auto;
}
.nav-link {
  position: relative;
  padding: 8px 13px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: .95rem;
  text-decoration: none;
  border-radius: 8px;
  transition: color .18s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 13px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s ease;
}
.nav-link:hover { color: var(--brand); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-cta { margin-inline-start: 10px; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  border: 0;
  background: transparent;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.lang-btn:hover { color: var(--brand); }
.lang-btn.active {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* Burger (mobile) */
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  place-items: center;
}
.nav-toggle .bars { display: block; width: 20px; }
.nav-toggle .bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  margin-block: 4px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #F2F8FD 0%, #FFFFFF 78%);
  padding-block: clamp(52px, 7vw, 92px);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(180, 214, 245, .5), transparent 68%);
  inset-inline-end: -140px;
  top: -160px;
}
.hero::after {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(222, 236, 249, .8), transparent 70%);
  inset-inline-start: -120px;
  bottom: -140px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: clamp(32px, 5vw, 60px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-line);
  color: var(--brand-strong);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: .85rem;
  font-weight: 600;
}
.hero-badge svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.05rem, 4.4vw, 3.25rem);
  line-height: 1.4;
  font-weight: 700;
  text-wrap: balance;
}

.hero-sub {
  margin-top: 16px;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 30px;
}
.hero-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: .92rem;
  font-weight: 500;
}
.hero-chips svg {
  width: 16px; height: 16px;
  fill: none; stroke: var(--success);
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

.hero-visual img { display: block; width: 100%; height: auto; }

/* ---------- 6. Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 104px); }
.section--soft { background: var(--bg-soft); }

.section-head {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 54px);
}
.kicker {
  display: inline-block;
  background: var(--brand-tint);
  color: var(--brand-strong);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: .8rem;
  font-weight: 700;
}
.section-head h2 {
  margin-top: 14px;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.5;
  font-weight: 700;
  text-wrap: balance;
}
.section-sub {
  margin-top: 12px;
  color: var(--ink-2);
}

/* ---------- 7. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(30px, 5vw, 56px);
  align-items: start;
}
.about-text p {
  color: var(--ink-2);
  margin-bottom: 16px;
  font-size: 1.02rem;
}
.about-text p:last-child { margin-bottom: 0; }

.about-roles {
  display: grid;
  gap: 16px;
}
.role-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.role-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-line);
}
.role-icon {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--brand-tint);
}
.role-icon svg {
  width: 24px; height: 24px;
  fill: none; stroke: var(--brand);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.role-card h3 { margin-top: 14px; font-size: 1.12rem; }
.role-card p { margin-top: 8px; color: var(--ink-2); font-size: .96rem; }

/* ---------- 8. Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: #B9D6EF;
}
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 15px;
  background: var(--brand-tint);
}
.feature-icon svg {
  width: 26px; height: 26px;
  fill: none; stroke: var(--brand);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.feature-card h3 { margin-top: 18px; font-size: 1.12rem; line-height: 1.6; }
.feature-card p { margin-top: 8px; color: var(--ink-2); font-size: .95rem; }

/* ---------- 9. Showcase ---------- */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.show-card {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.show-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: #B9D6EF;
}
.show-card img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.show-card figcaption { padding: 20px 24px 24px; }
.show-card h3 { font-size: 1.08rem; }
.show-card figcaption p { margin-top: 6px; color: var(--ink-2); font-size: .93rem; }

/* ---------- 10. Benefits ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
  max-width: 980px;
  margin-inline: auto;
}
.benefit {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-weight: 500;
  transition: transform .2s ease, box-shadow .2s ease;
}
.benefit:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.benefit-check {
  display: inline-grid;
  place-items: center;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: var(--success-tint);
  flex: none;
  margin-top: 4px;
}
.benefit-check svg {
  width: 14px; height: 14px;
  fill: none; stroke: var(--success);
  stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 11. CTA band ---------- */
.cta-band { padding-block: clamp(24px, 4vw, 48px) clamp(64px, 9vw, 104px); }
.cta-inner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1170C5 0%, var(--brand-dark) 100%);
  border-radius: 26px;
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 64px);
  text-align: center;
  color: #fff;
}
.cta-inner::before, .cta-inner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  pointer-events: none;
}
.cta-inner::before { width: 300px; height: 300px; inset-inline-start: -110px; top: -120px; }
.cta-inner::after  { width: 380px; height: 380px; inset-inline-end: -140px; bottom: -190px; }
.cta-inner h2 {
  position: relative; z-index: 1;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.55;
}
.cta-inner p {
  position: relative; z-index: 1;
  margin-top: 10px;
  color: rgba(255, 255, 255, .85);
}
.cta-inner .btn { position: relative; z-index: 1; margin-top: 26px; }

/* ---------- 12. Footer ---------- */
.site-footer {
  background: var(--brand-dark);
  color: #C9D8E8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: clamp(28px, 4vw, 44px);
  padding-block: 56px 44px;
}
.brand--footer .brand-name { color: #fff; }
.f-brand p {
  margin-top: 16px;
  font-size: .94rem;
  color: #AEC3D8;
  max-width: 40ch;
}
.f-col h3 {
  color: #fff;
  font-size: .98rem;
  margin-bottom: 14px;
  font-weight: 700;
}
.f-col a {
  display: block;
  color: #B9CBDD;
  text-decoration: none;
  padding-block: 5px;
  font-size: .93rem;
  transition: color .18s ease;
  width: fit-content;
}
.f-col a:hover { color: #fff; }
.f-contact a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.f-contact a span {
  direction: ltr;          /* phones / emails / page names always render LTR */
  unicode-bidi: isolate;
}
.f-contact svg {
  width: 17px; height: 17px;
  fill: none; stroke: #8FB8DF;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, .13);
  padding-block: 18px;
}
.footer-bar p {
  font-size: .88rem;
  color: #9FB4C9;
  text-align: center;
}

/* ---------- 13. Reveal on scroll (JS adds .js on <html>) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2, .65, .25, 1), transform .7s cubic-bezier(.2, .65, .25, 1);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 14. Responsive ---------- */
@media (max-width: 1080px) {
  .nav-link { padding: 8px 9px; }
}

@media (max-width: 960px) {
  .nav-toggle { display: grid; }
  .main-nav {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    inset-inline: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 14px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 11px 14px; font-size: 1rem; }
  .nav-link::after { content: none; }
  .nav-link:hover { background: var(--brand-tint-2); }
  .nav-cta { margin-inline-start: 0; margin-top: 8px; justify-content: center; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; max-width: 640px; margin-inline: auto; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .lang-btn { padding: 5px 9px; font-size: .8rem; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 1.06rem; }
}

/* ---------- 15. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 16. Print: content always visible ---------- */
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .site-header, .nav-toggle { position: static; }
}
