/*
 * Zahma landing (`/` of the site deployment). Tokens come from the page shell
 * (SITE_CSS in server/utils/marketingPage.ts), which mirrors the customer app.
 * Everything renders complete without JS; `html.gsap` (set by landing.js once
 * GSAP loaded) only adds the states GSAP animates, and `html.pre` hides the
 * hero intro for the instant before that, with a CSS fallback that reveals it
 * anyway if the scripts never come.
 */

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.btn--lg{min-height:56px;padding:0 28px;font-size:17px}
.btn--lime{background:var(--lime);color:var(--green)}
main{overflow-x:clip;padding-top:0}

/* ── Device ── */
/* A real iPhone 17 Pro (Apple's product bezel, Silver) over the screenshot.
   The frame PNG is transparent where the screen is, so the screenshot sits
   under it at the bezel's measured screen rect (x 72, y 69, 1206 x 2622 of
   1350 x 2760) and the frame's own corners clip it. */
.device{position:relative;width:min(290px,64vw);aspect-ratio:1350/2760}
.device::before{content:'';position:absolute;inset:1.5% 2.6%;border-radius:15%/7.3%;box-shadow:0 50px 80px -36px rgba(36,51,15,.5),0 18px 30px -20px rgba(0,0,0,.35);pointer-events:none}
.device::after{content:'';position:absolute;inset:0;background:url(/site/iphone17pro-silver-600.webp) center/100% 100% no-repeat;pointer-events:none;z-index:2}
@media (min-resolution:1.5dppx){.device::after{background-image:url(/site/iphone17pro-silver-900.webp)}}
.device img{position:absolute;left:5.333%;top:2.5%;width:89.333%;height:95%;object-fit:cover;object-position:top;border-radius:12%/5.6%;background:var(--shell);z-index:1}

/* ── Doodles: hand-drawn marks in the margins ── */
.dd{position:absolute;width:84px;height:84px;color:var(--tone-ink,var(--green));opacity:.5;pointer-events:none;z-index:0}
.dd .dd-fill{fill:var(--lime);stroke:var(--green);stroke-width:3}
.dd .dd-dash{stroke-dasharray:2 11}
html.gsap .dd [pathLength]{stroke-dasharray:1;stroke-dashoffset:1}
html.gsap .dd.drawn [pathLength]{stroke-dashoffset:0;transition:stroke-dashoffset 1.4s cubic-bezier(.65,0,.35,1)}
.dd--star{opacity:1}

/* ── Hero ── */
.hx{position:relative;padding:112px 0 72px;min-height:min(100svh,980px);display:flex;align-items:center}
.hx-bg{position:absolute;inset:0;background:var(--sage);z-index:-1}
.hx-bg .edge{--tone:var(--sage)}
.hx-grid{display:grid;gap:36px;align-items:center}
@media (min-width:960px){.hx-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px}}
.hx-copy{position:relative}
.hx-title{font-size:clamp(44px,8.4vw,84px);font-weight:900;line-height:1.28;letter-spacing:-.02em;color:var(--green)}
.hx-title .mark{display:inline-block;padding:.14em .22em .16em;border-radius:.18em;background:var(--green);color:var(--lime);transform:rotate(-2deg);line-height:1.25}
.hx-lead{margin-top:18px;font-size:clamp(16px,2.2vw,19px);line-height:1.9;font-weight:500;color:#34451f;max-width:52ch}
.hx-cta{margin-top:28px}
.hx-proof{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin-top:22px;font-size:14px;font-weight:600;color:#34451f}
.hx-proof b{font-weight:900;color:var(--green);margin-inline:2px}
.proof-stars{display:inline-flex;color:#EDA33B;margin-inline-end:4px}
.proof-stars .ic{fill:currentColor;width:14px;height:14px}
.hx-dd--star{position:absolute;width:56px;height:56px;top:-34px;inset-inline-end:8%;transform:rotate(12deg)}
.hx-dd--arrow{display:none}
@media (min-width:960px){.hx-dd--arrow{display:block;top:52%;inset-inline-start:-34px;width:92px;height:92px;transform:rotate(200deg);opacity:.5}}

.hx-stage{position:relative;display:flex;flex-direction:column;align-items:center;gap:22px;padding-top:8px}
.island{position:relative;z-index:5;display:inline-flex;align-items:center;gap:10px;height:48px;padding:0 16px 0 8px;border-radius:999px;background:#0b0b0b;color:#fff;font-size:14px;font-weight:700;white-space:nowrap;box-shadow:0 18px 40px -18px rgba(0,0,0,.6);overflow:hidden;max-width:92vw}
.island-logo{width:32px;height:32px;border-radius:999px;overflow:hidden;background:#222;flex-shrink:0}
.island-logo img{width:100%;height:100%;object-fit:cover}
.island-text{overflow:hidden;text-overflow:ellipsis}
.island-wave{display:inline-flex;gap:3px;align-items:center;margin-inline-start:4px}
.island-wave i{width:3px;height:12px;border-radius:2px;background:var(--lime);animation:wave 1s ease-in-out infinite}
.island-wave i:nth-child(2){animation-delay:.15s}.island-wave i:nth-child(3){animation-delay:.3s}
@keyframes wave{50%{transform:scaleY(.35)}}
.fan{position:relative;width:min(520px,100%);height:min(600px,150vw);display:flex;justify-content:center}
.fan .device{width:min(250px,58vw)}
.fan-ph{position:absolute;top:0;left:50%;margin-left:calc(min(250px,58vw) / -2)}
.fan-ph--c{z-index:3}
.fan-ph--l{z-index:1;transform:translateX(-32%) translateY(40px) rotate(-8deg) scale(.86)}
.fan-ph--r{z-index:2;transform:translateX(32%) translateY(40px) rotate(8deg) scale(.86)}
@media (max-width:640px){
 .fan{height:auto;aspect-ratio:390/700}
 .fan-ph--l{transform:translateX(-34%) translateY(30px) rotate(-8deg) scale(.8)}
 .fan-ph--r{transform:translateX(34%) translateY(30px) rotate(8deg) scale(.8)}
}

/* ── «كل حاجة في إيدك»: a deck of feature cards that stack as you scroll ──
   One full-width card per feature, in a tone of the app's palette, with its
   real screen. The cards are sticky, each a little lower than the last, so
   the next one slides up over the card you just read; with GSAP the card
   underneath sinks back into the deck and dims (landing.js). CSS alone
   already stacks them, so without scripts the section still works. */
.bx{padding:64px 0 40px}
.bx-head{max-width:760px;margin-bottom:30px}
.ch-title,.bx-title{font-size:clamp(40px,7vw,72px);font-weight:900;line-height:1.35;letter-spacing:-.02em;color:var(--ink)}
.bx-title .mark{background:var(--green);color:var(--lime)}
.ch-text,.bx-sub{margin-top:12px;font-size:clamp(18px,2.4vw,24px);line-height:1.8;font-weight:600;max-width:40ch;color:var(--tone-ink,var(--ink-2))}

.bx-grid{display:flex;flex-direction:column;gap:24px;padding-bottom:8vh}
.bx-card{--tone:var(--paper);--tone-ink:var(--ink);position:sticky;top:calc(84px + var(--k,0) * 12px);display:flex;flex-direction:column;gap:18px;min-width:0;padding:26px 22px 22px;border-radius:34px;background:var(--tone);color:var(--tone-ink);overflow:hidden;isolation:isolate;transform-origin:50% 0;box-shadow:0 -20px 50px -30px rgba(36,40,15,.45)}
.bx-card::after{content:'';position:absolute;inset:0;border-radius:inherit;background:#161c0a;opacity:var(--dim,0);pointer-events:none;z-index:6}
.bx--sand{--tone:var(--sand);--tone-ink:var(--sand-ink)}
.bx--clay{--tone:var(--clay);--tone-ink:var(--clay-ink)}
.bx--lilac{--tone:var(--lilac);--tone-ink:var(--lilac-ink)}
.bx--sky{--tone:var(--sky);--tone-ink:var(--sky-ink)}
.bx--amber{--tone:var(--amber);--tone-ink:var(--amber-ink)}
.bx--lime{--tone:var(--lime);--tone-ink:var(--lime-ink)}
.bx-copy{position:relative;z-index:2;min-width:0}
.bx-n{display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:15px;background:var(--tone-ink);color:var(--tone);transform:rotate(-6deg);margin-bottom:14px}
.bx-h{font-size:clamp(32px,5vw,62px);font-weight:900;line-height:1.4;letter-spacing:-.01em;color:var(--ink)}
.bx-text{margin-top:8px;font-size:clamp(16px,1.7vw,19px);line-height:1.85;font-weight:500;max-width:42ch}
.bx-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.bx-tag{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 14px 0 12px;border-radius:999px;background:var(--paper);color:var(--ink);font-weight:800;font-size:14px;white-space:nowrap;box-shadow:0 10px 22px -16px rgba(30,30,10,.45)}
.bx-tag .ic{color:var(--tone-ink)}
.chip-live{width:10px;height:10px;border-radius:999px;background:#3AA35B;box-shadow:0 0 0 4px rgba(58,163,91,.2);animation:live 1.6s ease-in-out infinite}
@keyframes live{50%{box-shadow:0 0 0 7px rgba(58,163,91,.08)}}

/* The phone: the whole screen in a real frame */
.bx-shot{position:relative;z-index:1;display:flex;justify-content:center;margin:auto 0 0}
.bx-shot .device{width:min(180px,46vw);will-change:transform}

/* Restaurants in one line, not a wall of logos */
.ch-stack{display:inline-flex;align-items:center;gap:12px;max-width:100%;margin-top:18px;padding:6px 18px 6px 6px;border-radius:999px;background:var(--paper);text-decoration:none;font-weight:800;color:var(--ink);box-shadow:0 10px 26px -18px rgba(60,40,10,.5);transition:transform .3s cubic-bezier(.16,1,.3,1)}
.ch-stack:hover{transform:translateY(-2px)}
.ch-stack > span:last-child{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.ch-stack-logos{display:flex;min-width:0;overflow:hidden}
.ch-stack-logos .logo{width:40px;height:40px;border-radius:999px;box-shadow:0 0 0 3px var(--paper)}
.ch-stack-logos .logo + .logo{margin-inline-start:-12px}
.ch-cuisines{margin-top:44px}
.ch-cuisines h3{font-size:22px;font-weight:900;margin-bottom:12px;color:var(--ink)}

/* Delivery: the four states */
.ch-steps{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.ch-steps li{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 14px 0 10px;border-radius:999px;background:var(--paper);color:var(--ink);font-weight:800;font-size:14px}
.ch-steps span{width:22px;height:22px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:var(--green);color:var(--lime)}
.ch-steps li:last-child{background:var(--green);color:var(--lime)}
.ch-steps li:last-child span{background:var(--lime);color:var(--green)}

/* Wider screens: copy and phone side by side, alternating sides, each card
   about a screen tall so the deck reads one card at a time. */
@media (min-width:760px){
 .bx-card{flex-direction:row;align-items:center;gap:48px;padding:44px 52px;min-height:min(600px,calc(100svh - 140px))}
 .bx-card:nth-child(even){flex-direction:row-reverse}
 .bx-copy{flex:1 1 0}
 .bx-shot{flex:0 0 auto;margin:0}
 .bx-shot .device{width:min(250px,26vw)}
}
@media (min-width:760px) and (max-height:760px){.bx-shot .device{width:200px}.bx-card{min-height:0}}

/* ── Reviews wall ── */
.wx{margin-top:14px;padding:72px 0 56px;overflow:hidden}
.wx-dd{top:36px;inset-inline-end:6%;width:60px;height:60px}
.wx-head{display:grid;gap:24px;align-items:end}
.wx-phone{display:none}
@media (min-width:900px){.wx-head{grid-template-columns:1fr 240px}.wx-phone{display:block;height:300px;overflow:hidden;-webkit-mask-image:linear-gradient(#000 70%,transparent);mask-image:linear-gradient(#000 70%,transparent)}.wx-phone .device{width:240px;transform:rotate(-4deg);transform-origin:top center}}
.wx-rows{margin-top:30px;display:grid;gap:14px;-webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.wx-row{overflow:hidden;direction:ltr}
.wx-track{display:flex;align-items:flex-start;gap:14px;width:max-content;animation:mq 70s linear infinite}
.wx-row--rev .wx-track{animation-direction:reverse;animation-duration:80s}
.wx-rows:hover .wx-track{animation-play-state:paused}
.wx .review{width:330px;direction:rtl;flex-shrink:0;opacity:1!important;transform:none!important}
@keyframes mq{to{transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){.wx-track{animation:none}.wx-row{overflow-x:auto}}

/* ── The green footer, with the way in at its top ── */
.foot{margin-top:80px}
.cx-grid{position:relative;display:grid;gap:12px;align-items:center;padding-top:60px}
@media (min-width:900px){.cx-grid{grid-template-columns:1.1fr .9fr;gap:24px}}
.cx-copy{position:relative;z-index:2}
.cx-title{font-size:clamp(42px,7vw,80px);font-weight:900;line-height:1.3;color:#fff}
.cx-title .mark{display:inline-block;padding:.14em .22em .16em;line-height:1.25;border-radius:.16em;background:var(--lime);color:var(--green);transform:rotate(-2deg)}
.cx-copy > p{margin-top:12px;font-size:18px;max-width:44ch;color:#DCE6BD}
.cx-dl{display:flex;align-items:center;gap:18px;margin-top:26px}
.cx-qr{display:none}
@media (min-width:900px){
 .cx-qr{display:flex;flex-direction:column;align-items:center;gap:8px;flex-shrink:0;font-size:12px;font-weight:700;color:#C9D6A6;text-align:center;max-width:120px}
 .cx-qr svg{width:104px;height:104px;border-radius:14px;box-shadow:0 0 0 5px #fff}
}
.cx-phones{position:relative;height:340px;display:flex;justify-content:center;align-items:flex-start;overflow:hidden;margin-inline:-16px}
@media (min-width:900px){.cx-phones{height:470px;margin:0}}
.cx-ph{position:absolute;top:24px}
.cx-ph .device{width:min(250px,56vw)}
.cx-ph--a{transform:translateX(-30%) rotate(-8deg)}
.cx-ph--b{transform:translateX(30%) rotate(7deg) translateY(30px)}
.cx-dd{color:var(--lime);opacity:.45}
.cx-dd--a{top:18px;inset-inline-end:44%;width:70px;height:70px}
.cx-dd--b{bottom:30px;inset-inline-start:42%;width:110px;height:110px;opacity:.3}
.foot .foot-grid{border-top:1px solid rgba(203,226,106,.18)}

/* ── Intro ──
   The title and the front phone are the page's largest paint (LCP), so they are
   never hidden: a transform-only CSS entrance runs from the first frame, before
   any script. The rest of the intro waits for GSAP (html.pre), with a CSS
   fallback that reveals it anyway if the scripts never come. */
@media (prefers-reduced-motion:no-preference){
.hx-title{animation:hx-rise 1s cubic-bezier(.16,1,.3,1) both}
.hx-title .mark{animation:hx-stamp .9s cubic-bezier(.34,1.56,.64,1) .3s both}
.fan-ph--c{animation:hx-phone 1.3s cubic-bezier(.16,1,.3,1) .15s both}
}
@keyframes hx-rise{from{transform:translateY(28px)}}
@keyframes hx-stamp{from{transform:scale(1.45) rotate(-14deg)}to{transform:rotate(-2deg)}}
@keyframes hx-phone{from{transform:translateY(120px) rotate(5deg) scale(.92)}}
html.pre .hx .intro,html.pre .fan-ph--l,html.pre .fan-ph--r,html.pre .island{opacity:0;animation:prefail .01s linear 2.6s forwards}
@keyframes prefail{to{opacity:1}}
html.gsap .hx .intro,html.gsap .fan-ph--l,html.gsap .fan-ph--r,html.gsap .island{animation:none}
@media (prefers-reduced-motion:reduce){.chip,.chip-live{animation:none}}
