/* Flow ERP — Landing page styles */
:root {
  --brand: #2563EB;
  --brand-foreground: #FFFFFF;
  --brand-soft: #EFF4FF;
  --success: #22C55E;
  --bg: #FFFFFF;
  --section: #F8FAFC;
  --ink: #0F172A;
  --muted: #64748B;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --radius: 12px;
  --shadow-brand: 0 20px 40px -20px rgba(37, 99, 235, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", "Cairo", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }

.container { max-width: 1152px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; font-size: 14px; font-weight: 600;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: filter .15s ease, border-color .15s ease, color .15s ease, background .15s ease;
}
.btn-primary { background: var(--brand); color: var(--brand-foreground); box-shadow: 0 6px 16px -6px rgba(37,99,235,.5); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }

/* ---------- Image placeholder ---------- */
.img-slot {
  width: 100%; aspect-ratio: 16 / 10;
  border: 1px dashed rgba(37,99,235,.45);
  background: var(--brand-soft);
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--brand); text-align: center; padding: 16px;
}
.img-slot.ratio-16-9 { aspect-ratio: 16 / 9; }
.img-slot.ratio-4-5  { aspect-ratio: 4 / 5; }
.img-slot small { display: block; text-transform: uppercase; letter-spacing: .18em; font-size: 11px; opacity: .7; }
.img-slot strong { display: block; margin-top: 4px; font-size: 14px; }

/* Screenshot images are buttons that open a popup */
button.img-slot.lightbox-trigger {
  appearance: none; -webkit-appearance: none;
  font: inherit; cursor: pointer; position: relative;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
button.img-slot.lightbox-trigger:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 12px 28px -14px rgba(37,99,235,.45);
}
button.img-slot.lightbox-trigger:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
button.img-slot.lightbox-trigger::after {
  content: "🔍 Click to zoom";
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  font-size: 11px; font-weight: 600; color: var(--brand);
  background: #fff; border: 1px solid var(--border-strong);
  padding: 4px 10px; border-radius: 999px;
  opacity: 0; transition: opacity .15s ease;
  pointer-events: none; white-space: nowrap;
}
button.img-slot.lightbox-trigger:hover::after,
button.img-slot.lightbox-trigger:focus-visible::after {
  opacity: 1;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark .logo { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.brand-mark .muted { color: var(--muted); font-weight: 500; }
.site-nav { display: none; gap: 24px; font-size: 14px; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
@media (min-width: 768px) { .site-nav { display: flex; } }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background: #fff; border: 1px solid var(--border-strong); color: var(--ink);
  font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.lang-toggle:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 50% at 50% 0%, rgba(37,99,235,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { padding: 56px 0 64px; text-align: center; }
@media (min-width: 640px) { .hero-inner { padding: 80px 0 96px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(37,99,235,.25); background: var(--brand-soft);
  color: var(--brand); font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(32px, 5.5vw, 60px); font-weight: 800; line-height: 1.05;
  margin-top: 20px; max-width: 780px; margin-left: auto; margin-right: auto;
}
.hero h1 .accent { color: var(--brand); }
.hero p.lead {
  max-width: 640px; margin: 20px auto 0; color: var(--muted); font-size: 17px;
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.hero .tagline { margin-top: 20px; color: var(--muted); font-size: 14px; }
.hero-media {
  margin-top: 56px; background: #fff; padding: 8px;
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-brand);
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
@media (min-width: 640px) { .section { padding: 112px 0; } }
.section.alt { background: var(--section); }
.section-head { max-width: 640px; margin: 0 auto; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; }
.section-head p { margin-top: 12px; color: var(--muted); }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; } }
.mt-12 { margin-top: 48px; }
.mt-14 { margin-top: 56px; }
.mt-8  { margin-top: 32px; }
.mt-10 { margin-top: 40px; }
.center { display: flex; justify-content: center; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: rgba(37,99,235,.3); box-shadow: 0 10px 24px -12px rgba(37,99,235,.15); }
.icon-square {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 20px;
}
.icon-circle {
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 20px;
}
.card h3 { margin-top: 16px; font-size: 16px; font-weight: 600; }
.card p { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ---------- Screens ---------- */
.screen-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px;
  margin: 0;
}
.screen-card figcaption { padding: 12px 8px 4px; font-size: 14px; font-weight: 600; }

/* ---------- Checklist ---------- */
.checklist { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
@media (min-width: 640px) { .checklist { grid-template-columns: 1fr 1fr; } }
.checklist li {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--border); padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
}
.check {
  width: 20px; height: 20px; border-radius: 999px; background: var(--success); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: 24px; margin-top: 56px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: 18px; padding: 24px;
}
.step .num {
  width: 40px; height: 40px; border-radius: 999px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.step h3 { margin-top: 16px; font-size: 18px; font-weight: 600; }
.step p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.step .chev {
  display: none; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  color: var(--brand); font-size: 22px;
}
@media (min-width: 768px) { .step:not(:last-child) .chev { display: block; } }

/* ---------- About ---------- */
.about { max-width: 720px; margin: 0 auto; text-align: center; }
.about .eyebrow-text { color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.about h2 { margin-top: 12px; font-size: clamp(26px, 3.4vw, 38px); }
.about p { margin-top: 16px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-wrap {
  background: #fff; border: 1px solid var(--border); border-radius: 24px;
  padding: 32px; box-shadow: var(--shadow-brand);
}
@media (min-width: 640px) { .contact-wrap { padding: 48px; } }
.contact-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; }
.contact-info p.lead { color: var(--muted); margin-top: 12px; }
.contact-list { margin-top: 32px; display: grid; gap: 12px; font-size: 14px; }
.contact-list a { display: inline-flex; align-items: center; gap: 12px; }
.contact-list a:hover { color: var(--brand); }

.form { background: var(--section); border-radius: 16px; padding: 24px; display: grid; gap: 12px; }
.form label { font-size: 12px; font-weight: 600; color: var(--muted); }
.form input, .form textarea {
  width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: #fff; font-size: 14px; outline: none;
  transition: border-color .15s ease;
}
.form input:focus, .form textarea:focus { border-color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: #fff; padding: 48px 0; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-grid h4 { font-size: 14px; font-weight: 600; }
.footer-grid ul { margin-top: 12px; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom {
  max-width: 1152px; margin: 40px auto 0; padding: 24px 24px 0;
  border-top: 1px solid var(--border); font-size: 12px; color: var(--muted);
}
.tagline-small { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ---------- Arabic / RTL support ---------- */
html[lang="ar"] body {
  font-family: "Cairo", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

[dir="rtl"] .step .chev { right: auto; left: -14px; transform: translateY(-50%) rotate(180deg); }

[dir="rtl"] .social-float { right: auto; left: 20px; }

[dir="rtl"] .cta-row[style*="justify-content:flex-start"],
[dir="rtl"] .cta-row {
  /* flex-direction handled automatically by dir, no override needed */
}

[dir="rtl"] .form label { text-align: right; }

[dir="rtl"] .contact-list a,
[dir="rtl"] .footer-grid a {
  direction: rtl;
}

[dir="rtl"] .lightbox-close { right: auto; left: 12px; }

@media (max-width: 767px) {
  .header-actions { gap: 6px; }
  .lang-toggle { padding: 8px 10px; font-size: 12px; }
}

/* ---------- Floating social bar ---------- */
.social-float {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  padding: 10px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px -10px rgba(15, 23, 42, 0.2);
}
.social-float-btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: var(--ink);
  color: #fff;
  transition: transform .15s ease, background .15s ease;
}
.social-float-btn:hover { transform: translateY(-2px); background: var(--brand); }
.social-float-btn:nth-child(1) { background: #1877F2; }
.social-float-btn:nth-child(1):hover { background: #1466d2; }
.social-float-btn:nth-child(2) { background: #29A9EA; }
.social-float-btn:nth-child(2):hover { background: #1c93cf; }

@media (max-width: 640px) {
  .social-float { right: 12px; padding: 8px 6px; gap: 8px; }
  .social-float-btn { width: 34px; height: 34px; }
}

/* ---------- Lightbox (image popup) ---------- */
body.lightbox-lock { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.is-open { display: flex; }

.lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.lightbox-dialog {
  position: relative; z-index: 1;
  background: #fff; border-radius: 20px;
  padding: 20px; max-width: 720px; width: 100%;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.45);
  animation: lightbox-in .18s ease;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lightbox-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: #fff;
  display: grid; place-items: center; cursor: pointer;
  font-size: 14px; line-height: 1;
  transition: background .15s ease, border-color .15s ease;
}
.lightbox-close:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

.lightbox-image { margin: 0; }

.lightbox-caption { padding: 16px 4px 4px; }
.lightbox-caption h3 { font-size: 18px; font-weight: 700; }
.lightbox-caption p { margin-top: 6px; color: var(--muted); font-size: 14px; }