/* ======================================================================================
   landing-duo: the two-door band («بيت واحد، بابان»), per docs/design/landing-duo/DECISION.md.
   One mark, one palette, one button grammar. Only transform / opacity / background-color /
   border-color ever transition here. No layout property moves. No new motion token.
   ====================================================================================== */

/* Skip link: the first tab stop, visible on :focus-visible only, a navy pill above the fixed nav. */
.mh .skip-link { position: fixed; z-index: 90; inset-block-start: 12px; inset-inline-start: 50%; transform: translateX(50%);
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: #0c1e40; color: #fbfaf6;
  font-size: 14px; font-weight: 600; text-decoration: none; opacity: 0; pointer-events: none; }
.mh .skip-link:focus-visible { opacity: 1; pointer-events: auto; outline: 2px solid #0c1e40; outline-offset: 3px; }
[data-theme="dark"] .mh .skip-link { background: #e8edf7; color: #0c1e40; }
[data-theme="dark"] .mh .skip-link:focus-visible { outline-color: #fbfaf6; }

/* The band sits under today's fixed nav (82px desktop, 70px phone); 28px of air before its first line. */
.mh .duo { position: relative; z-index: 1; padding: calc(82px + 28px) 0 0; color: #0c1e40; }
.mh .duo:focus { outline: none; }
[data-theme="dark"] .mh .duo { color: var(--ink); }
.mh .duo-kicker { margin: 0; color: inherit; font-size: 13px; font-weight: 600; line-height: 1.5; text-align: center; }
.mh .duo-lead { margin: 2px 0 0; color: inherit; font-size: clamp(18px, 1.8vw, 24px); font-weight: 600; line-height: 1.5; text-align: center; text-wrap: balance; }

/* The diptych: two equal columns, gap 0, one hairline, the outer radius of today's .svc-card. */
/* Fold budget: band top is 188px (nav 82 + 28 air + kicker + lead + 20). The doors fill the first screen (up to 640px)
   and only the hero's ground peeks under them: no text, so no H1 glyph can ever straddle the fold line. */
.mh .doors { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 20px;
  min-height: clamp(480px, calc(100svh - 216px), 640px); border: 1px solid #d6e0e3; border-radius: 20px; overflow: hidden; }
[data-theme="dark"] .mh .doors { border-color: #1f2b45; }
/* The doors are the LCP and the choice: present and still from the first frame, no entrance. */
.mh .door { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 36px 44px 32px; isolation: isolate;
  transition: background-color 150ms var(--bu-colors), border-color 150ms var(--bu-colors); }
/* Whole-panel feedback without moving the panel: a currentColor wash above the background, below the content. */
.mh .door::before { content: ''; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0;
  transition: opacity 150ms var(--bu-colors); pointer-events: none; }

/* Door 1 (offices): paper, first in DOM, inline-start (right) in RTL. In dark it is the page ground itself. */
.mh .door-offices { z-index: 2; background: #f9faf8; color: #0c1e40; }
[data-theme="dark"] .mh .door-offices { background: #0a1224; color: var(--ink); }
.mh .door-body { position: static; display: flex; flex-direction: column; align-items: flex-start; }
.mh .door-eyebrow { margin: 0 0 12px; color: inherit; font-size: 13px; font-weight: 600; line-height: 1.5; }
.mh .door h2 { margin: 0; color: inherit; font-size: clamp(30px, 3.2vw, 44px); font-weight: 600; line-height: 1.22; text-wrap: balance; }
.mh .door-line { margin: 16px 0 0; max-width: 46ch; color: inherit; font-size: 16px; line-height: 1.9; }
/* The one control of door 1: a stretched anchor whose hit area is the WHOLE door (the article is its containing
   block); only the signup button sits above it. Same footprint as door 2, same focus ring. */
.mh .door-link { position: static; display: block; color: inherit; text-decoration: none; }
.mh .door-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 20px; }
.mh .door-link:focus-visible { outline: none; }
.mh .door-link:focus-visible::after { outline: 2px solid #0c1e40; outline-offset: -6px; }
[data-theme="dark"] .mh .door-link:focus-visible::after { outline-color: #dfb26c; }
.mh .door-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 10px; color: inherit; font-size: 15px; font-weight: 600;
  transition: transform 160ms var(--ease-out); }
.mh .door-cta .lucide { width: 18px; height: 18px; stroke-width: 2; transition: transform 200ms var(--ease-out); }
.mh .door-actions { position: relative; z-index: 2; display: flex; align-items: center; margin-top: 6px; }
.mh .door-art { margin-top: auto; padding-top: 20px; }
.mh .door-art svg { display: block; width: 100%; height: auto; }
/* Both illustrations share one floor band: door 1's rail is pinned to the bottom like door 2's map. */
.mh .door-offices .door-art { margin-block: auto 0; padding-block: 20px 0; }
.mh .rail { color: inherit; }
.mh .rail text { font-family: "Cairo", system-ui, sans-serif; font-size: 14px; font-weight: 500; fill: currentColor; }
.mh .rail .rail-line { stroke: #d6e0e3; }
[data-theme="dark"] .mh .rail .rail-line { stroke: #2a3857; }
.mh .rail .st { fill: #f9faf8; stroke: #0c1e40; stroke-width: 1.5; }
[data-theme="dark"] .mh .rail .st { fill: var(--surface); stroke: var(--ink); }
/* The one accent on paper marks the start of every case («تأهيل الطلب»), not a payment. */
.mh .rail .st-first { fill: #dfb26c; stroke: #0c1e40; stroke-width: 2; }
[data-theme="dark"] .mh .rail .st-first { fill: #e5bd7b; stroke: #0c1e40; }

/* Door 2 (مرصد): lit navy in BOTH themes, second in DOM, inline-end (left) in RTL, one link.
   In dark it is lifted two steps above the page ground so it never merges with door 1. */
.mh .door-place { align-items: flex-start; background: linear-gradient(160deg, #16305c, #0c1e40); color: #f6f7f3; border-inline-start: 1px solid #27406a; text-decoration: none; }
.mh .door-place .door-art { align-self: stretch; }
[data-theme="dark"] .mh .door-place { background: linear-gradient(160deg, #23447e, #132c57); border-inline-start-color: #2a3857; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.mh .door-place:focus-visible { outline: 2px solid #dfb26c; outline-offset: -6px; }
.mh .door-badge { position: absolute; inset-block-start: 22px; inset-inline-end: 22px; display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px;
  border: 1px solid rgba(246, 247, 243, .55); border-radius: 999px; color: inherit; font-size: 11px; font-weight: 600; line-height: 1; }
.mh .door-endorse { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: inherit; font-size: 12px; font-weight: 500; line-height: 1; }
.mh .door-endorse::before { content: ''; display: block; width: 28px; height: 1px; background: currentColor; opacity: .55; }
.mh .door-endorse svg { width: 18px; height: 14px; fill: currentColor; }
.mh .door-text { margin: 18px 0 0; max-width: 46ch; color: inherit; font-size: 16px; line-height: 1.9; }
/* The example: a label outside the quote, the visitor's own sentence inside the guillemets. */
.mh .door-example { display: block; margin: 14px 0 0; padding-inline-start: 12px; border-inline-start: 1px solid rgba(246, 247, 243, .5); max-width: 46ch;
  color: inherit; font-size: 14px; font-weight: 500; line-height: 1.8; text-wrap: pretty; }
.mh .door-example q { font-style: normal; quotes: "«" "»"; }
.mh .door-example q::before { content: open-quote; }
.mh .door-example q::after { content: close-quote; }
.mh .door-tag { margin: 18px 0 0; color: inherit; font-size: 18px; font-weight: 600; line-height: 1.5; }
/* Inverted primary: the same button grammar as .marhela-button, light fill on navy. It is a span; the door is the control.
   Depth on navy is an edge, not a drop shadow (the shadow carries depth on paper). */
.mh .door-cta-inv { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; margin-top: 20px; padding: 0 21px;
  border-radius: 12px; background: #fbfaf6; color: #0c1e40; font-size: 14px; font-weight: 500; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22);
  transition: background-color 150ms var(--bu-colors), transform 160ms var(--ease-out); }
.mh .door-cta-inv .lucide { width: 18px; height: 18px; stroke-width: 2; transition: transform 200ms var(--ease-out); }
[data-theme="dark"] .mh .door-cta-inv { background: #fbfaf6; color: #0c1e40; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 10px 22px rgba(0, 0, 0, .35); }
/* The catchment: the pin and rings sit at the viewBox's vertical centre so every crop keeps them; the streets rise out of the navy. */
.mh .door-place .door-art svg { height: clamp(90px, calc(100svh - 790px), 180px); width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 35%); mask-image: linear-gradient(to bottom, transparent 0, #000 35%); }
.mh .catch .street { stroke: rgba(255, 255, 255, .13); fill: none; stroke-width: 1; }
.mh .catch .block { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .13); stroke-width: 1; }
.mh .catch .ring { fill: none; stroke: #dfb26c; stroke-width: 1.25; stroke-dasharray: 3 5; }
.mh .catch .pin { fill: #dfb26c; stroke: #0c1e40; stroke-width: 1.2; }
.mh .catch .pin-dot { fill: #0c1e40; }

/* The seam: one mark, exactly on the hairline between the two products, one colour per theme. */
.mh .seam-disc { position: absolute; z-index: 3; top: 38%; inset-inline-end: -28px; width: 56px; height: 56px; display: grid; place-items: center;
  border: 1px solid #d6e0e3; border-radius: 50%; background: #f9faf8; pointer-events: none; }
.mh .seam-disc svg { width: 26px; height: 20px; fill: #0c1e40; }
[data-theme="dark"] .mh .seam-disc { background: #0a1224; border-color: #2a3857; }
[data-theme="dark"] .mh .seam-disc svg { fill: #e8edf7; }

/* Hover: colour only, plus the smallest moving thing (the arrow). Real pointers only, and only where a click acts:
   door 1's hover is gated on its stretched link, so the signup button never nudges the other arrow. */
@media (hover: hover) and (pointer: fine) {
  .mh .door-offices:has(.door-link:hover) { background-color: #f3f5f3; }
  [data-theme="dark"] .mh .door-offices:has(.door-link:hover) { background-color: #0e1730; }
  .mh .door-offices:has(.door-link:hover) .door-cta .lucide { transform: translateX(-4px); }
  .mh .door-place:hover { border-inline-start-color: #3d5a8a; }
  .mh .door-place:hover::before { opacity: .04; }
  .mh .door-place:hover .door-cta-inv { background-color: #ffffff; }
  .mh .door-place:hover .door-cta-inv .lucide { transform: translateX(-4px); }
}
/* Press: the control inside the door scales (.97, 120ms in / 160ms out) and the panel takes a 6% wash; the panel itself
   never moves, so nothing pulls away from the clipped frame. Pseudo-classes only, so nothing can stick after bfcache. */
.mh .door-place:active .door-cta-inv, .mh .door-offices:has(.door-link:active) .door-cta { transform: scale(.97); transition-duration: 150ms, 120ms; }
.mh .door-place:active::before, .mh .door-offices:has(.door-link:active)::before { opacity: .06; }

/* Door 1 landing: the hero is already there; after the jump it is settled, legible in the first frame. */
.mh #offices.is-settled .hero h1, .mh #offices.is-settled .hero-copy.visible h1, .mh #offices.is-settled .hero-copy.visible > p,
.mh #offices.is-settled .hero-copy.visible .hero-actions, .mh #offices.is-settled.hero .top-nav { animation: none; }
.mh #offices.is-settled .reveal, .mh #offices.is-settled [data-text-reveal] .tr-word { transition: none; }
.mh #offices.is-settled .hero h1:focus { outline: none; }
/* Today's hero follows the band directly. Its top padding (100px) is the room the condensed nav (64px) needs after the
   door-1 jump; scroll-margin-top cancels the page's 80px scroll-padding so the jump lands with the doors fully above the
   viewport (nothing navy under the translucent nav). Markup is untouched. */
.mh #offices.hero { padding-top: 100px; scroll-margin-top: -80px; }
/* Header at tablet and small-laptop widths: one line, always. The least important nav items step aside until 1120px. */
.mh .desktop-nav a, .mh .login-link, .mh .nav-cta { white-space: nowrap; }
@media (min-width: 768px) and (max-width: 1120px) {
  .mh .desktop-nav { gap: 0; }
  .mh .desktop-nav a { padding-inline: 10px; }
  .mh .login-link, .mh .desktop-nav a[href*="/rental/"], .mh .desktop-nav a[href="#integrations"] { display: none; }
}
/* Production keeps the hero copy at opacity 1 (LCP) but leaves the reveal's blur until it scrolls into view; with
   the hero now under the band, the peeking kicker would read blurred. The <h1> keeps its own rise animation. */
.js .mh .hero-copy.reveal { filter: none; }

/* Phone: the doors stack, door 1 first; art, seam disc, example and door 1's line are hidden. */
@media (max-width: 820px) {
  .mh .duo { padding-top: calc(70px + 16px); }
  .mh .duo-lead { font-size: 17px; }
  .mh .doors { grid-template-columns: 1fr; margin-top: 14px; min-height: 0; }
  .mh .door { padding: 22px 22px 22px; }
  .mh .door-offices { padding-bottom: 22px; }
  .mh .door-place { border-inline-start: 0; border-top: 1px solid #27406a; }
  .mh .door h2 { font-size: 30px; }
  .mh .door-line, .mh .door-example, .mh .door-art, .mh .seam-disc { display: none; }
  .mh .door-eyebrow { margin-bottom: 6px; }
  .mh .door-cta { margin-top: 6px; }
  .mh .door-actions { margin-top: 4px; }
  .mh .door-actions .marhela-button { width: 100%; }
  .mh .door-text { margin-top: 12px; font-size: 16px; line-height: 1.75; max-width: none; }
  .mh .door-tag { margin-top: 10px; font-size: 18px; }
  .mh .door-cta-inv { width: 100%; margin-top: 14px; }
  .mh .door-endorse { margin-top: 6px; }
  .mh .door-badge { inset-block-start: 18px; inset-inline-end: 18px; }
  /* 144px: production's own phone hero spacing under the nav, and at 390x844 the kicker sits inside the fold while the H1 starts below it. */
  .mh #offices.hero { padding-top: 144px; scroll-margin-top: -80px; }
}
/* Phone fold gate (390x660 visible, iOS toolbars): the first cut in the decided order is the kicker. */
@media (max-width: 820px) and (max-height: 760px) { .mh .duo-kicker { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .mh .door-cta .lucide, .mh .door-cta-inv .lucide { transition: none; }
  .mh .door-offices:has(.door-link:hover) .door-cta .lucide, .mh .door-place:hover .door-cta-inv .lucide { transform: none; }
}
@media (forced-colors: active) {
  .mh .door { border: 1px solid CanvasText; }
  .mh .seam-disc { border: 1px solid CanvasText; forced-color-adjust: none; }
  .mh .door-cta-inv, .mh .door-badge { border: 1px solid CanvasText; }
}
