:root {
  --green: #16c784;
  --green-deep: #0b8f5c;
  --green-soft: #e8fbf2;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --paper: #ffffff;
  --wash: #f4f7f5;
  --line: #e2e8f0;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --max: 1120px;
  --font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Manrope", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(22, 199, 132, 0.18), transparent 55%),
    radial-gradient(900px 420px at 0% 10%, rgba(14, 165, 233, 0.08), transparent 50%),
    linear-gradient(180deg, #f7fbf9 0%, var(--wash) 40%, #ffffff 100%);
  font-family: var(--font-en);
  line-height: 1.65;
}
html[lang="ar"] body { font-family: var(--font-ar); }
img { max-width: 100%; display: block; }
a { color: var(--green-deep); }
/* Visually hidden without extending scrollable overflow (critical for RTL).
   Do NOT use left:-999px — it expands scrollWidth and RTL dir flips scroll
   so the viewport parks on the skip link while main content sits off-screen. */
.skip {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  z-index: 100;
}
.skip:focus,
.skip:focus-visible {
  position: fixed;
  top: 12px;
  inset-inline-start: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 12px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.brand span { font-size: 1.05rem; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lang-btn, .nav-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
}
.lang-btn[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
@media (max-width: 860px) {
  .nav { min-height: 64px; }
  .nav-link { display: none; }
  .nav-actions .btn-primary {
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--green);
  color: #042f1c;
  box-shadow: 0 10px 28px rgba(22, 199, 132, 0.28);
}
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(15, 23, 42, 0.12);
}

.hero {
  padding: 1.25rem 0 1.75rem;
}
.hero-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero {
    padding: 1.75rem 0 2.25rem;
  }
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
  }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--green-deep);
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.hero .lead {
  margin: 1rem 0 1.5rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 36rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.trust-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.hero-visual {
  position: relative;
  min-height: 280px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(145deg, #0f172a 0%, #0b3d2e 55%, #16c784 140%);
  box-shadow: var(--shadow);
  color: #fff;
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
  align-content: space-between;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: auto -20% -30% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(22, 199, 132, 0.28);
  filter: blur(2px);
  pointer-events: none;
}
.hero-visual > * { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  width: fit-content;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.hero-visual h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.25;
  max-width: 14ch;
}
.hero-visual p {
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  max-width: 30ch;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.hero-chips span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.section {
  padding: 3.5rem 0;
}
.section-head {
  max-width: 40rem;
  margin-bottom: 1.8rem;
}
.section-head h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
}
.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

.feature-grid, .steps, .faq-list {
  display: grid;
  gap: 1rem;
}
@media (min-width: 760px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.showcase {
  display: grid;
  gap: 1rem;
}
@media (min-width: 860px) {
  .showcase {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: stretch;
  }
}
.showcase-main {
  background: linear-gradient(160deg, #0f172a, #134e4a);
  color: #fff;
  border-radius: 28px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}
.showcase-main h3 {
  margin: 0;
  font-size: 1.35rem;
}
.showcase-main p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}
.cat-tile {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.75rem 0.55rem;
  text-align: center;
}
.cat-tile img {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.45rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  padding: 5px;
}
.cat-tile span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.showcase-side {
  display: grid;
  gap: 1rem;
}
.tool-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.1rem 1.15rem;
}
.tool-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}
.tool-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}
.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
}
.icon-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}
.icon-row img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--green-soft);
  padding: 6px;
}

.step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.panel {
  background: linear-gradient(135deg, #0f172a, #0b3d2e 70%);
  color: #fff;
  border-radius: 28px;
  padding: 1.6rem;
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow);
}
@media (min-width: 800px) {
  .panel {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    padding: 2rem;
  }
}
.panel h2 { margin: 0 0 0.5rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.panel p { margin: 0; color: rgba(255, 255, 255, 0.84); }
.panel .btn-primary { justify-self: start; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p {
  margin: 0.7rem 0 0.2rem;
  color: var(--ink-soft);
}

.site-footer {
  margin-top: 2rem;
  padding: 2.2rem 0 2.8rem;
  border-top: 1px solid var(--line);
  background: #0f172a;
  color: rgba(255, 255, 255, 0.86);
}
.footer-grid {
  display: grid;
  gap: 1.4rem;
}
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.site-footer a { color: #9ef0c8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h3 {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.fine {
  margin-top: 1.6rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
}

/* Content stays visible by default. Motion is additive only when JS marks .is-in
   after a successful observer pass — never hide content if animation setup fails. */
[data-reveal] {
  opacity: 1;
  transform: none;
}
html.reveal-ready [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms ease;
}
html.reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
.hero [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.reveal-ready [data-reveal]:not(.is-in),
  [data-reveal],
  .btn { transition: none; opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}

/* Legal / support pages */
body.page-legal {
  background: linear-gradient(180deg, #f7fbf9 0%, #ffffff 45%);
}
.legal-shell {
  width: min(760px, calc(100% - 2rem));
  margin: 1.25rem auto 3rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.legal-shell h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.25;
}
.legal-shell h2 {
  margin: 1.4rem 0 0.55rem;
  font-size: 1.05rem;
}
.legal-shell p,
.legal-shell li {
  color: var(--ink-soft);
}
.legal-shell p { margin: 0 0 0.9rem; }
.legal-shell ul {
  margin: 0 0 1rem;
  padding-inline-start: 1.2rem;
}
.legal-shell li { margin: 0.35rem 0; }
.legal-shell a {
  color: var(--green-deep);
  font-weight: 700;
  text-decoration-thickness: 1px;
}
.legal-shell code {
  font-size: 0.9em;
  background: var(--wash);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}
.lang-panel[hidden] { display: none !important; }
.support-email {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.4rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 800;
  text-decoration: none;
  word-break: break-word;
}
.support-email:hover { text-decoration: underline; }
