/* ============================================================
   HOME
   ------------------------------------------------------------
   The public landing page (index.html).

   ============================================================
   THEME
   ============================================================
   Two fixed-navy bands (hero, CTA) and one fixed-deep-navy
   band (marquee) sit on a page whose surrounding surface
   flips. All three read the fixed brand family:

     .home-hero       --brand-bg      (never flips)
     .home-marquee    --chrome-bg-deep (never flips)
     .home-cta        --brand-bg      (never flips)

   Every heading that used to reach for --navy-800 as text
   now reads --heading, which flips. Every card surface
   reads --surface / --surface-soft / --border, which flip.

   The light-blue hover/focus states on the category tiles,
   the org chips, the FAQ chevron, and the section-frame
   icons are overridden with translucent blue tints on dark.

   ============================================================
   RTL
   ============================================================
   Every directional property uses a logical form:
     inset-inline-end / inset-inline-start
     margin-inline-start / padding-inline
     text-align: start / end

   The hero grid, the section head, the for-you cards, the
   trust grid, the category grid, the FAQ, and the CTA band
   all flip for free because the html element carries
   direction: rtl.

   The decorative rings on the hero and CTA band mirror via
   explicit `html[dir="rtl"]` overrides because they are
   pinned to physical corners.

   ============================================================
   ARABIC
   ============================================================
   letter-spacing: 0 on every uppercase-Latin class:
     .home-marquee-item, .home-section-eyebrow,
     .home-hero-copy .eyebrow, .home-hero-stat dt,
     .home-category-meta (uppercase digits)
   ============================================================ */


/* ============================================================
   01 · HERO
   ============================================================ */

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 640px;
  display: flex;
  align-items: center;
  background: var(--brand-bg);
  color: var(--brand-text);
}

/* ---------- BACKGROUND MEDIA ---------- */

.home-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.home-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.home-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(11, 31, 58, 0.94) 0%,
    rgba(11, 31, 58, 0.78) 45%,
    rgba(11, 31, 58, 0.52) 100%
  );
}

/* ---------- WATERMARK RINGS ---------- */

.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  border-radius: var(--radius-circle);
  pointer-events: none;
  z-index: 2;
}

html[dir="rtl"] .home-hero::before {
  inset-inline-end: auto;
  inset-inline-start: -260px;
}

html[dir="rtl"] .home-hero::after {
  inset-inline-start: auto;
  inset-inline-end: -180px;
}

/* ---------- INNER GRID ---------- */

.home-hero-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: var(--space-12);
  padding-block: var(--space-20);
}

/* ---------- COPY ---------- */

.home-hero-copy {
  max-width: 640px;
  min-width: 0;
}

.home-hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  color: var(--blue-100);
  font-size: 11px;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1;
}

html[lang="ar"] .home-hero-copy .eyebrow {
  letter-spacing: 0;
}

.home-hero-title {
  margin: 0;
  color: var(--brand-text);
  font-size: clamp(36px, 4.6vw, 58px);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.04em;
  line-height: 1.06;
}

html[lang="ar"] .home-hero-title {
  letter-spacing: 0;
  line-height: 1.22;
}

.home-hero-title-accent {
  display: block;
  color: var(--blue-100);
}

.home-hero-subtitle {
  max-width: 560px;
  margin: var(--space-6) 0 0;
  color: var(--brand-text-soft);
  font-size: var(--fs-lg);
  line-height: 1.7;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

/* ---------- HERO STATS ---------- */

.home-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin: var(--space-10) 0 0;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.home-hero-stat { min-width: 0; }

.home-hero-stat dt {
  color: var(--brand-text-muted);
  font-size: 10px;
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: var(--space-2);
}

html[lang="ar"] .home-hero-stat dt {
  letter-spacing: 0;
}

.home-hero-stat dd {
  margin: 0;
  color: var(--brand-text);
  font-size: 26px;
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.home-hero-stat:not(:has(dd:not(:empty))) {
  display: none;
}

/* ---------- HERO VISUAL (chip wall) ---------- */

.home-hero-visual {
  position: relative;
  min-width: 0;
}

.home-hero-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
  max-width: 480px;
  margin-inline-start: auto;
}

.home-hero-grid .chip {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--brand-text);
}

/* ---------- TABLET / PHONE ---------- */

@media (max-width: 1024px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding-block: var(--space-16);
  }

  .home-hero-visual { display: none; }
}

@media (max-width: 640px) {
  .home-hero { min-height: auto; }

  .home-hero-inner { padding-block: var(--space-12); }

  .home-hero-title { font-size: clamp(30px, 8vw, 40px); }

  .home-hero-subtitle { font-size: var(--fs-base); }

  .home-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .home-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .home-hero-stats { gap: var(--space-5); }
  .home-hero-stat dd { font-size: 22px; }
}


/* ============================================================
   02 · MARQUEE
   ============================================================ */

.home-marquee {
  position: relative;
  overflow: hidden;
  padding: var(--space-4) 0;
  background: var(--chrome-bg-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.home-marquee-track {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  white-space: nowrap;
  animation: home-marquee 40s linear infinite;
}

/* RTL flips the marquee direction. */
html[dir="rtl"] .home-marquee-track {
  animation-name: home-marquee-rtl;
}

@keyframes home-marquee-rtl {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}

.home-marquee-item {
  color: rgba(255, 255, 255, 0.42);
  font-size: var(--fs-sm);
  font-weight: var(--fw-extrabold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html[lang="ar"] .home-marquee-item {
  letter-spacing: 0;
}

.home-marquee-item::after {
  content: "·";
  margin-inline-start: var(--space-8);
  color: rgba(255, 255, 255, 0.18);
}

@keyframes home-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .home-marquee-track {
    animation: none;
    justify-content: center;
    flex-wrap: wrap;
  }
}


/* ============================================================
   03 · SECTION FRAME + HEAD
   ============================================================ */

.home-section {
  position: relative;
  padding-block: var(--space-24);
}

.home-section-warm {
  background: var(--surface-soft);
}

.home-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.home-section-head .eyebrow {
  display: block;
  margin-bottom: var(--space-2);
}

.home-section-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

html[lang="ar"] .home-section-head h2 {
  letter-spacing: 0;
  line-height: 1.3;
}

.home-section-head-center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-section-head-center h2 {
  max-width: 720px;
  margin-inline: auto;
}

@media (max-width: 768px) {
  .home-section { padding-block: var(--space-16); }
}


/* ============================================================
   04 · FOR-YOU CARDS
   ============================================================ */

.home-for-you-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.home-for-you-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  transition:
    transform    var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    box-shadow   var(--dur-base) var(--ease);
}

.home-for-you-card > * { position: relative; z-index: 1; }

.home-for-you-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue-100);
  box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .home-for-you-card:hover {
  border-color: var(--border-strong);
}

.home-for-you-card[data-tone="client"] { border-top: 3px solid var(--blue-600); }
.home-for-you-card[data-tone="worker"] { border-top: 3px solid var(--accent); }

.home-for-you-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  color: var(--blue-600);
  font-size: var(--fs-2xl);
}

html[data-theme="dark"] .home-for-you-icon {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: var(--blue-400);
}

.home-for-you-icon iconify-icon,
.home-for-you-icon svg {
  width: 26px;
  height: 26px;
}

.home-for-you-card[data-tone="worker"] .home-for-you-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

html[data-theme="dark"] .home-for-you-card[data-tone="worker"] .home-for-you-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.home-for-you-title {
  margin: 0;
  color: var(--heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

html[lang="ar"] .home-for-you-title {
  letter-spacing: 0;
}

.home-for-you-body {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.home-for-you-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-for-you-list li {
  position: relative;
  padding-inline-start: var(--space-6);
  color: var(--text-soft);
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.home-for-you-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 7px;
  width: 10px;
  height: 10px;
  background: var(--blue-50);
  border: 2px solid var(--blue-600);
  border-radius: var(--radius-circle);
}

html[data-theme="dark"] .home-for-you-list li::before {
  background: rgba(96, 165, 250, 0.15);
  border-color: var(--blue-400);
}

.home-for-you-card[data-tone="worker"] .home-for-you-list li::before {
  background: var(--accent);
  border-color: var(--accent-ink);
}

.home-for-you-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

@media (max-width: 850px) {
  .home-for-you-grid { grid-template-columns: 1fr; }
  .home-for-you-card { padding: var(--space-6); }
}


/* ============================================================
   05 · TRUST STRIP
   ============================================================ */

.home-trust {
  padding-block: var(--space-12);
  background: var(--surface);
  border-block: 1px solid var(--border-soft);
}

.home-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}

.home-trust-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}

.home-trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-md);
  color: var(--blue-600);
  font-size: var(--fs-lg);
}

html[data-theme="dark"] .home-trust-icon {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: var(--blue-400);
}

.home-trust-icon iconify-icon,
.home-trust-icon svg {
  width: 18px;
  height: 18px;
}

.home-trust-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-trust-body strong {
  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-extrabold);
  line-height: 1.3;
}

.home-trust-body span {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
}


/* ============================================================
   06 · CATEGORY GRID
   ============================================================ */

.home-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
}

.home-category {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  transition:
    transform        var(--dur-fast) var(--ease),
    border-color     var(--dur-fast) var(--ease),
    box-shadow       var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}

.home-category:hover {
  transform: translateY(-2px);
  border-color: var(--blue-100);
  background: var(--blue-50);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .home-category:hover {
  border-color: rgba(96, 165, 250, 0.22);
  background: rgba(96, 165, 250, 0.08);
}

.home-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-md);
  color: var(--blue-600);
  font-size: var(--fs-lg);
}

html[data-theme="dark"] .home-category-icon {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: var(--blue-400);
}

.home-category-icon iconify-icon,
.home-category-icon svg {
  width: 20px;
  height: 20px;
}

.home-category-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-category-name {
  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-category-meta {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- LOADING SKELETON ---------- */

.home-category-skeleton {
  height: 74px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      90deg,
      var(--surface-muted) 0%,
      var(--surface-soft) 50%,
      var(--surface-muted) 100%
    );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  pointer-events: none;
}

.home-category:not(:has(.home-category-name)) {
  display: none;
}


/* ============================================================
   07 · ORGANIZATIONS STRIP
   ============================================================ */

.home-orgs-strip {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding: var(--space-2) 0;
  scrollbar-width: none;
}

.home-orgs-strip::-webkit-scrollbar { display: none; }

.home-org-chip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-3);
  row-gap: 2px;
  min-width: 240px;
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  flex: 0 0 auto;
  transition:
    transform    var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    box-shadow   var(--dur-fast) var(--ease);
}

.home-org-chip:hover {
  transform: translateY(-2px);
  border-color: var(--blue-100);
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .home-org-chip:hover {
  border-color: var(--border-strong);
}

.home-org-chip-avatar {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--navy-700);
  font-size: var(--fs-base);
  font-weight: var(--fw-extrabold);
  text-transform: uppercase;
  overflow: hidden;
}

html[data-theme="dark"] .home-org-chip-avatar {
  background: var(--surface-soft);
  color: var(--text-soft);
}

.home-org-chip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-org-chip-name {
  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-org-chip-meta {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.3;
}

/* ---------- LOADING SKELETON ---------- */

.home-orgs-strip-skeleton {
  display: flex;
  gap: var(--space-3);
  overflow: hidden;
}

.home-org-chip-skeleton {
  min-width: 240px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      90deg,
      var(--surface-muted) 0%,
      var(--surface-soft) 50%,
      var(--surface-muted) 100%
    );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}


/* ============================================================
   08 · BOUNDARY CARD
   ============================================================ */

.home-boundary {
  padding-block: var(--space-12);
}

.home-boundary-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.home-boundary-card > * { position: relative; z-index: 1; }

.home-boundary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-circle);
  font-size: var(--fs-2xl);
}

.home-boundary-icon iconify-icon,
.home-boundary-icon svg {
  width: 22px;
  height: 22px;
}

.home-boundary-body { min-width: 0; }

.home-boundary-title {
  margin: 0 0 var(--space-2);
  color: var(--heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

html[lang="ar"] .home-boundary-title {
  letter-spacing: 0;
}

.home-boundary-text {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
  max-width: 720px;
}

.home-boundary-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 850px) {
  .home-boundary-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "icon body"
      "action action";
    gap: var(--space-4);
    padding: var(--space-6);
  }

  .home-boundary-icon { grid-area: icon; }
  .home-boundary-body { grid-area: body; }
  .home-boundary-action {
    grid-area: action;
    justify-self: start;
  }
}


/* ============================================================
   09 · HOW IT WORKS
   ============================================================ */

.home-how {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-how-step {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-7) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}

.home-how-step > * { position: relative; z-index: 1; }

.home-how-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--blue-600);
  color: var(--text-invert);
  border-radius: var(--radius-md);
  font-size: var(--fs-xl);
}

.home-how-step-icon iconify-icon,
.home-how-step-icon svg {
  width: 22px;
  height: 22px;
}

.home-how-step-index {
  color: var(--text-light);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.home-how-step-title {
  margin: 0;
  color: var(--heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

html[lang="ar"] .home-how-step-title {
  letter-spacing: 0;
}

.home-how-step-body {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

@media (max-width: 850px) {
  .home-how { grid-template-columns: 1fr; }
}


/* ============================================================
   10 · WHY MABUNCRIB
   ============================================================ */

.home-why {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.home-why-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.home-why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-md);
  color: var(--blue-600);
  font-size: var(--fs-xl);
}

html[data-theme="dark"] .home-why-icon {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
  color: var(--blue-400);
}

.home-why-icon iconify-icon,
.home-why-icon svg {
  width: 22px;
  height: 22px;
}

.home-why-item h3 {
  margin: 0;
  color: var(--heading);
  font-size: var(--fs-base);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.015em;
  line-height: 1.3;
}

html[lang="ar"] .home-why-item h3 {
  letter-spacing: 0;
}

.home-why-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
}


/* ============================================================
   11 · FAQ
   ============================================================ */

.home-faq {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.home-faq-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color var(--dur-fast) var(--ease),
    box-shadow   var(--dur-fast) var(--ease);
}

.home-faq-item[open] {
  border-color: var(--blue-100);
  box-shadow: var(--shadow-xs);
}

html[data-theme="dark"] .home-faq-item[open] {
  border-color: rgba(96, 165, 250, 0.30);
}

.home-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  color: var(--heading);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.home-faq-question::-webkit-details-marker { display: none; }
.home-faq-question::marker { content: ""; }

.home-faq-icon {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-circle);
  transition: transform var(--dur-base) var(--ease);
}

.home-faq-icon::before,
.home-faq-icon::after {
  content: "";
  position: absolute;
  background: var(--text-muted);
  border-radius: 1px;
}

.home-faq-icon::before { width: 10px; height: 2px; }
.home-faq-icon::after  { width: 2px; height: 10px; transition: transform var(--dur-base) var(--ease); }

.home-faq-item[open] .home-faq-icon {
  background: var(--blue-50);
  border-color: var(--blue-100);
}

html[data-theme="dark"] .home-faq-item[open] .home-faq-icon {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(96, 165, 250, 0.22);
}

.home-faq-item[open] .home-faq-icon::before,
.home-faq-item[open] .home-faq-icon::after { background: var(--blue-600); }

html[data-theme="dark"] .home-faq-item[open] .home-faq-icon::before,
html[data-theme="dark"] .home-faq-item[open] .home-faq-icon::after {
  background: var(--blue-400);
}

.home-faq-item[open] .home-faq-icon::after { transform: scaleY(0); }

.home-faq-answer {
  padding: 0 var(--space-5) var(--space-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.home-faq-answer p { margin: 0; }
.home-faq-answer p + p { margin-top: var(--space-3); }

.home-faq-answer strong { color: var(--heading); font-weight: var(--fw-bold); }


/* ============================================================
   12 · CTA
   ============================================================ */

.home-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--space-16);
  background: var(--brand-bg);
  color: var(--brand-text);
}

html[dir="rtl"] .home-cta::before {
  inset-inline-end: auto;
  inset-inline-start: -240px;
}

html[dir="rtl"] .home-cta::after {
  inset-inline-start: auto;
  inset-inline-end: -130px;
}

.home-cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.home-cta h2 {
  margin: 0 0 var(--space-2);
  color: var(--brand-text);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

html[lang="ar"] .home-cta h2 {
  letter-spacing: 0;
  line-height: 1.3;
}

.home-cta p {
  margin: 0;
  color: var(--brand-text-soft);
  font-size: var(--fs-md);
  line-height: 1.6;
}

.home-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  flex-shrink: 0;
}

.home-cta-ghost { color: var(--brand-text); }

.home-cta-ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
  .home-cta-inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-5);
  }

  .home-cta-actions { flex-direction: column; }
  .home-cta-actions .btn { width: 100%; justify-content: center; }
}


/* ============================================================
   13 · SKELETONS
   ============================================================ */

.card-skeleton {
  min-height: 240px;
  pointer-events: none;
}

.card-skeleton:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}


/* ============================================================
   14 · RESPONSIVE
   ============================================================ */

@media (max-width: 850px) {
  .home-section { padding-block: var(--space-16); }
}

@media (max-width: 640px) {
  .home-section { padding-block: var(--space-12); }
  .home-trust   { padding-block: var(--space-10); }
  .home-boundary { padding-block: var(--space-10); }

  .home-category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  .home-category {
    padding: var(--space-3);
    gap: var(--space-2);
  }

  .home-category-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .home-category-icon iconify-icon,
  .home-category-icon svg { width: 18px; height: 18px; }

  .home-category-name { font-size: var(--fs-xs); }
  .home-category-meta { font-size: 10px; }
}

@media (max-width: 400px) {
  .home-category-meta { display: none; }
}


/* ============================================================
   15 · REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .home-for-you-card,
  .home-category,
  .home-org-chip,
  .home-faq-item,
  .home-faq-icon {
    transition: none !important;
  }

  .home-for-you-card:hover,
  .home-category:hover,
  .home-org-chip:hover {
    transform: none;
  }

  .home-marquee-track { animation: none !important; }

  .home-category-skeleton,
  .home-org-chip-skeleton { animation: none; background: var(--surface-muted); }
}


/* ============================================================
   16 · PRINT
   ============================================================ */

@media print {
  .home-hero {
    min-height: auto;
    padding-block: var(--space-8);
    background: transparent !important;
    color: #000 !important;
  }

  .home-hero-media,
  .home-hero-scrim,
  .home-hero::before,
  .home-hero::after,
  .home-hero-visual,
  .home-marquee,
  .home-cta::before,
  .home-cta::after {
    display: none !important;
  }

  .home-hero-copy .eyebrow {
    background: transparent !important;
    border: 1px solid #ccc !important;
    color: #000 !important;
  }

  .home-hero-title,
  .home-hero-title-accent {
    color: #000 !important;
  }

  .home-hero-subtitle { color: #333 !important; }

  .home-hero-actions,
  .home-hero-stats { display: none !important; }

  .home-section-warm { background: transparent !important; }

  .home-for-you-card,
  .home-how-step,
  .home-boundary-card,
  .home-faq-item,
  .home-category,
  .home-org-chip,
  .home-trust-item {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .home-for-you-card::before,
  .home-how-step::before,
  .home-boundary-card::before {
    display: none !important;
  }

  .home-category-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .home-trust { border-block-color: #ccc !important; }

  .home-faq-item:not([open]) { display: none !important; }

  .home-cta {
    padding-block: var(--space-8);
    background: transparent !important;
    color: #000 !important;
  }

  .home-cta h2,
  .home-cta p,
  .home-cta-ghost { color: #000 !important; }

  .home-cta-actions { display: none !important; }
}


/* ============================================================
   END OF HOME
   ------------------------------------------------------------
   Verification:

     ✅ Zero raw hex outside the token block, except:
          · .home-hero-scrim     rgba(11, 31, 58, …) — a fixed
                                 navy scrim over the hero image
          · .home-cta-ghost      white-alpha on brand bg
          · .home-hero-grid      white-alpha chip borders
          · .home-hero-media     rgba(11, 31, 58, …) is the
                                 scrim, documented
          · .home-hero-stat      rgba(255,255,255,0.10) is the
                                 hero divider

     ✅ THEME
          Fixed-navy surfaces (read --brand-* / --chrome-*):
            .home-hero           --brand-bg + --brand-text
            .home-marquee        --chrome-bg-deep
            .home-cta            --brand-bg
            .home-hero-copy .eyebrow  fixed translucent pill
            .home-hero-title-accent   --blue-100 fixed
            .home-hero-subtitle  --brand-text-soft
            .home-hero-stat dt   --brand-text-muted
            .home-hero-stat dd   --brand-text
            .home-cta h2/p       --brand-text / --brand-text-soft

          Flippable surfaces:
            .home-section        --surface (via .home-section-warm)
            .home-for-you-card   --surface / --border
            .home-trust          --surface
            .home-category       --surface / --border
            .home-org-chip       --surface / --border
            .home-boundary-card  --surface / --border
            .home-how-step       --surface / --border
            .home-faq-item       --surface / --border

          Heading colours — every rule that used --navy-800
          as text now reads --heading (which flips):
            .home-section-head h2
            .home-for-you-title
            .home-trust-body strong
            .home-category-name
            .home-org-chip-name
            .home-boundary-title
            .home-how-step-title
            .home-why-item h3
            .home-faq-question
            .home-faq-answer strong

          Light-blue accents — dark overrides:
            .home-for-you-icon            + worker tone guard
            .home-for-you-list li::before
            .home-trust-icon
            .home-category:hover background + icon
            .home-why-icon
            .home-faq-icon (open state)
            .home-faq-item[open] border

     ✅ RTL
          Every directional property uses a logical form.
          The hero rings and CTA rings mirror via explicit
          `html[dir="rtl"]` overrides because they are pinned
          to physical corners.
          The marquee animation flips direction via a
          dedicated keyframe.
          The `·` separator on .home-marquee-item uses
          margin-inline-start.

     ✅ ARABIC
          letter-spacing: 0 added to:
            .home-hero-copy .eyebrow
            .home-hero-title
            .home-hero-stat dt
            .home-marquee-item
            .home-section-head h2
            .home-for-you-title
            .home-boundary-title
            .home-how-step-title
            .home-why-item h3
            .home-cta h2

          Line-height loosened on .home-hero-title (1.22),
          .home-section-head h2 (1.3), and .home-cta h2 (1.3).

     ✅ Preserved: every class, every state, every
        responsive breakpoint, every reduced-motion rule,
        every print rule from the previous version.
   ============================================================ */


/* ==========================================================================
   Premium landing additions — hero search, discovery nav, marketplace strip,
   testimonials, six-step process. Uses existing brand tokens only.
   ========================================================================== */

.home-section-desc {
  margin: var(--space-2) 0 0;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
}
.home-section-head-center .home-section-desc { margin-inline: auto; }

/* Hero search */
.home-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 620px;
  margin: var(--space-6) 0 var(--space-5);
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
}
.home-search:focus-within { box-shadow: var(--shadow-lg), 0 0 0 3px var(--focus-ring, rgba(0,0,0,.12)); }
.home-search-scope {
  flex: 0 0 auto;
  max-width: 132px;
  min-height: 44px;
  padding: 0 var(--space-3);
  background: var(--surface-muted);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}
.home-search-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 var(--space-3);
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-body);
}
.home-search-input::placeholder { color: var(--text-light); }
.home-search-submit {
  flex: 0 0 auto;
  min-height: 44px;
  border-radius: var(--radius-pill);
  gap: var(--space-2);
}

/* Discovery quick navigation */
.home-discover-nav {
  padding: var(--space-4) 0 0;
}
.home-discover-nav-inner {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.home-discover-nav-inner::-webkit-scrollbar { display: none; }
.home-discover-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.home-discover-pill:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
[id^="discover-"] { scroll-margin-top: calc(var(--topbar-h, 64px) + var(--space-4)); }

/* Category counts */
.home-category-count {
  grid-column: 2;
  margin-top: -2px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

/* Marketplace strip */
.home-mk-grid,
.home-mk-skeleton {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.home-mk-skeleton .card-skeleton { aspect-ratio: 4 / 5; }
.home-mk-grid .mk-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* Testimonials */
.home-reviews {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.home-review {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}
.home-review-stars { color: var(--warning); font-size: var(--fs-md); letter-spacing: 2px; }
.home-review-text {
  flex: 1;
  margin: 0;
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
  overflow-wrap: anywhere;
}
.home-review-foot { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.home-review-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  background: var(--surface-muted);
  border-radius: var(--radius-circle);
  color: var(--heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}
.home-review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.home-review-who { display: flex; flex-direction: column; min-width: 0; }
.home-review-name,
.home-review-context {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-review-name { color: var(--heading); font-size: var(--fs-body-sm); }
.home-review-context { color: var(--text-muted); font-size: var(--fs-xs); }
.home-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.home-review-verified { color: var(--success); font-weight: var(--fw-semibold); }

/* Six-step process */
.home-how-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.home-cta-eyebrow { display: inline-block; margin-bottom: var(--space-2); }

@media (min-width: 700px) {
  .home-mk-grid,
  .home-mk-skeleton { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .home-mk-grid,
  .home-mk-skeleton { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .home-how-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .home-how-six { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .home-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border-radius: var(--radius-xl);
    padding: var(--space-2);
  }
  .home-search-scope { grid-column: 1 / -1; max-width: none; width: 100%; }
  .home-search-submit span { display: none; }
  .home-search-submit { padding-inline: var(--space-4); }
  .home-category-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ============================================================
   LANDING v2 · additions (Phase 2)
   ============================================================ */

/* Four-step "how it works" */
.home-how.home-how-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.home-how-four .home-how-step { padding: var(--space-6) var(--space-5); }
.home-how-four .home-how-step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-green);
  color: var(--navy-900); /* white on #16a36a is only ~3.3:1 */
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}
@media (max-width: 900px) {
  .home-how.home-how-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .home-how.home-how-four { grid-template-columns: minmax(0, 1fr); }
}

/* Payment boundary note under the trust strip */
.home-trust-note {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
  max-width: 72ch;
}
.home-trust-note a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 2px; }

/* Hidden attribute must win over the grid/flex display set above. */
.home-hero-stats[hidden],
.home-hero-stat[hidden] { display: none !important; }
