/*
  Riwaq landing page. Built on app.css (tokens, buttons, brand) and on the same identity rules:
  paper background, one pine green, hairlines on light surfaces. The dark surfaces (hero, closing band) are the
  only place for a gradient, and the floating screenshots / phone that sit ON them are the only things with a
  shadow (an object above a dark surface, like the floating cards of the portal).
*/

.landing { background: var(--bg); overflow-x: hidden; }
.landing h1, .landing h2, .landing h3 { letter-spacing: 0; }
.landing .ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; flex: none; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.lp-narrow { max-width: 820px; }
@media (max-width: 640px) { .lp-wrap { padding: 0 16px; } }

/* ---------------------------------------------------------------- header */
.lp-top { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease); }
.lp-top.scrolled { border-bottom-color: var(--border); }
.lp-top-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.lp-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.lp-nav a { color: var(--muted); font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: var(--r-field);
  transition: color .15s var(--ease), background-color .15s var(--ease); }
.lp-nav a:hover { color: var(--heading); background: var(--surface-3); text-decoration: none; }
.lp-top-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 900px) { .lp-nav { display: none; } .lp-top-actions { margin-inline-start: auto; } }
@media (max-width: 480px) { .lp-hide-sm { display: none; } }

/* ---------------------------------------------------------------- hero (dark surface from app.css) */
.lp-hero { padding: 72px 0 96px; position: relative; overflow: hidden; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); gap: 40px; align-items: center; }
.lp-hero h1 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.28; font-weight: 700; color: #FFFFFF; margin: 18px 0 18px; }
.lp-accent { color: var(--mint); }
.lp-lead { font-size: 17px; line-height: 1.9; color: rgb(244 243 239 / .78); max-width: 540px; }
.lp-chip { display: inline-block; padding: 4px 14px; border-radius: var(--r-badge); font-size: 13px; font-weight: 600;
  color: var(--mint); background: rgb(255 255 255 / .06); border: 1px solid rgb(143 203 169 / .3); }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.lp-btn-light, .lp-btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px;
  padding: 0 24px; border-radius: var(--r-field); font-size: 15px; font-weight: 700; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.lp-btn-light { background: var(--bg); color: var(--ink); border: 1px solid var(--bg); }
.lp-btn-light:hover { background: #FFFFFF; color: var(--ink); text-decoration: none; }
.lp-btn-light .ic { transition: transform .2s var(--ease); }
.lp-btn-light:hover .ic { transform: translateX(-3px); }
.lp-btn-outline { background: transparent; color: var(--bg); border: 1px solid rgb(244 243 239 / .32); }
.lp-btn-outline:hover { background: rgb(255 255 255 / .07); border-color: rgb(244 243 239 / .55); color: #FFFFFF; text-decoration: none; }
.lp-btn-light:focus-visible, .lp-btn-outline:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.lp-assure { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: 13.5px; color: rgb(244 243 239 / .7); }
.lp-assure li { display: inline-flex; align-items: center; gap: 6px; }
.lp-assure .ic { width: 15px; height: 15px; color: var(--mint); }

/* The floating screenshots: tilted in 3D, slowly floating, following the pointer (landing.js sets --mx/--my). */
.lp-stage { position: relative; height: 470px; --mx: 0; --my: 0; }
.lp-shot { position: absolute; margin: 0; background: var(--surface); border-radius: 12px; overflow: hidden;
  border: 1px solid rgb(255 255 255 / .14);
  box-shadow: 0 40px 70px -24px rgb(0 0 0 / .6), 0 12px 24px -12px rgb(0 0 0 / .4);
  transform: perspective(1600px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg))
             translate3d(calc(var(--mx) * var(--d, 10px)), calc(var(--my) * var(--d, 10px)), 0);
  transition: transform .5s var(--ease); animation: lp-float 9s ease-in-out infinite; }
.lp-shot img { display: block; width: 100%; height: auto; }
.lp-shot-main { width: 84%; top: 8px; right: 0; --ry: -9deg; --rx: 3deg; animation-delay: -1s; }
.lp-shot-side { width: 54%; top: 168px; left: 0; --ry: 10deg; --rx: 2deg; animation-delay: -4s; }
.lp-shot-front { width: 50%; bottom: -6px; right: 10%; --ry: -4deg; --rx: 5deg; animation-delay: -6.5s; }
@keyframes lp-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.lp-chrome { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; direction: ltr;
  background: var(--surface-2); border-bottom: 1px solid var(--border); }
.lp-chrome i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.lp-chrome span { margin-inline-start: auto; direction: rtl; font-size: 10.5px; color: var(--muted); font-weight: 600; }

.lp-note { position: absolute; display: flex; gap: 10px; align-items: center; padding: 10px 14px 10px 16px;
  border-radius: var(--r-item); background: var(--surface); border: 1px solid rgb(255 255 255 / .2); min-width: 220px;
  box-shadow: 0 24px 40px -16px rgb(0 0 0 / .55);
  transform: translate3d(calc(var(--mx) * var(--d, 10px)), calc(var(--my) * var(--d, 10px)), 0);
  transition: transform .5s var(--ease); animation: lp-float 7s ease-in-out infinite; }
.lp-note b { display: block; font-size: 13.5px; color: var(--heading); }
.lp-note small { font-size: 12px; color: var(--muted); }
.lp-note-ic { width: 32px; height: 32px; border-radius: var(--r-field); display: grid; place-items: center; flex: none; }
.lp-note-ic .ic { width: 16px; height: 16px; }
.lp-note-ic.ok { background: var(--ok-soft); color: var(--ok); }
.lp-note-ic.warn { background: var(--warn-soft); color: var(--warn); }
.lp-note-a { top: -14px; left: 4%; animation-delay: -2s; }
.lp-note-b { bottom: 70px; left: -10px; animation-delay: -5s; }

@media (max-width: 1000px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .lp-hero { padding: 48px 0 64px; }
  .lp-stage { height: auto; aspect-ratio: 1.45; max-width: 640px; width: 100%; margin: 12px auto 0; }
}
@media (max-width: 560px) {
  .lp-stage { aspect-ratio: 1.2; }
  .lp-shot-side { top: 46%; width: 62%; }
  .lp-shot-front { display: none; }
  .lp-note { min-width: 0; padding: 8px 10px; }
  .lp-note b { font-size: 12px; } .lp-note small { display: none; }
  .lp-note-b { bottom: 4%; left: 0; }
  .lp-btn-light, .lp-btn-outline { width: 100%; }
}

/* "watch the video" link in the hero. Play icons point right in RTL too: media controls are never mirrored. */
.lp-watch { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; color: var(--bg); font-weight: 700; font-size: 15px; }
.lp-watch:hover { text-decoration: none; color: #FFFFFF; }
.lp-watch small { display: block; font-weight: 500; font-size: 12.5px; color: rgb(244 243 239 / .6); }
.lp-watch-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgb(143 203 169 / .14); border: 1px solid rgb(143 203 169 / .4); color: var(--mint);
  transition: background-color .15s var(--ease); }
.lp-watch:hover .lp-watch-ic { background: rgb(143 203 169 / .24); }
.lp-watch-ic .ic { width: 16px; height: 16px; fill: currentColor; stroke: none; translate: 1px 0; }
.lp-watch:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; border-radius: var(--r-field); }

/* ---------------------------------------------------------------- facts band */
.lp-facts { background: var(--surface); border-bottom: 1px solid var(--border); }
.lp-facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lp-facts-grid > div { display: flex; gap: 14px; align-items: flex-start; padding: 26px 20px; }
.lp-facts-grid > div + div { border-inline-start: 1px solid var(--border); }
.lp-facts-grid b, .lp-feats b { display: block; color: var(--heading); font-size: 15px; }
.lp-facts-grid small, .lp-feats small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.7; margin-top: 2px; }
.lp-fact-ic { width: 40px; height: 40px; border-radius: var(--r-item); background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; flex: none; }
@media (max-width: 900px) {
  .lp-facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-facts-grid > div:nth-child(3) { border-inline-start: 0; }
  .lp-facts-grid > div:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 520px) {
  .lp-facts-grid { grid-template-columns: 1fr; }
  .lp-facts-grid > div + div { border-inline-start: 0; border-top: 1px solid var(--border); }
  .lp-facts-grid > div { padding: 18px 4px; }
}

/* ---------------------------------------------------------------- sections */
.lp-section { padding: 92px 0; }
.lp-alt { background: var(--surface); border-block: 1px solid var(--border); }
.lp-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.lp-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; color: var(--primary); background: var(--primary-soft);
  padding: 2px 12px; border-radius: var(--r-badge); }
.lp-head h2, .lp-split h2 { font-size: clamp(25px, 3vw, 36px); line-height: 1.35; font-weight: 700; margin: 14px 0 12px; }
.lp-head p, .lp-p { color: var(--muted); font-size: 16px; line-height: 1.9; }
@media (max-width: 640px) { .lp-section { padding: 64px 0; } .lp-head { margin-bottom: 30px; } }

.lp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.lp-list li { position: relative; padding-inline-start: 28px; color: var(--text); line-height: 1.75; }
.lp-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: 4px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--primary-soft); }
.lp-list li::after { content: ""; position: absolute; inset-inline-start: 6px; top: 8px; width: 5px; height: 8px;
  border: solid var(--primary); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------------------------------------------------------------- gallery */
.lp-tabs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.lp-tabs button { font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; cursor: pointer;
  transition: color .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease); }
.lp-tabs button:hover { color: var(--heading); border-color: var(--border-strong); }
.lp-tabs button[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.lp-tabs button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lp-gallery-body { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.6fr); gap: 48px; align-items: center; }
.lp-gallery-text h3 { font-size: 22px; margin-bottom: 18px; }
.lp-gallery-text article { animation: lp-fade .35s var(--ease); }
@keyframes lp-fade { from { opacity: 0; translate: 0 6px; } }
@media (max-width: 900px) {
  .lp-gallery-body { grid-template-columns: 1fr; gap: 28px; }
  .lp-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; scrollbar-width: none; }
  .lp-tabs button { flex: none; }
}

/* A window on a flat pine-tinted panel offset behind it: depth without a shadow. */
.lp-frame { position: relative; isolation: isolate; margin: 0 0 18px 18px; }
.lp-frame::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1; border-radius: 18px;
  background: var(--primary-soft); border: 1px solid var(--primary-soft-2); }
.lp-window { margin: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-card); overflow: hidden; }
.lp-window img { display: block; width: 100%; height: auto; transition: opacity .25s var(--ease); }
.lp-window img.swapping { opacity: 0; }
.lp-chrome.light { height: 30px; }
@media (max-width: 640px) { .lp-frame { margin: 0 0 12px 12px; } .lp-frame::before { inset: 12px -12px -12px 12px; } }

/* ---------------------------------------------------------------- video */
.lp-video-frame { max-width: 960px; margin-inline: auto; }
.lp-video { position: relative; }
.lp-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); }
.lp-video-play { position: absolute; inset: 30px 0 0; margin: auto; width: 84px; height: 84px; border-radius: 50%;
  border: 0; cursor: pointer; display: grid; place-items: center; background: var(--primary); color: var(--on-primary);
  transition: transform .2s var(--ease), background-color .15s var(--ease); }
.lp-video-play:hover { background: var(--primary-hover); transform: scale(1.06); }
.lp-video-play:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }
.lp-video-play .ic { width: 30px; height: 30px; fill: currentColor; stroke: none; translate: 2px 0; }
.lp-video.playing .lp-video-play { display: none; }
@media (max-width: 640px) { .lp-video-play { width: 64px; height: 64px; } .lp-video-play .ic { width: 24px; height: 24px; } }

/* ---------------------------------------------------------------- architecture */
.lp-flow { display: grid; grid-template-columns: 1fr minmax(70px, .45fr) 1.1fr minmax(70px, .45fr) 1fr; align-items: center; }
.lp-node { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px 18px;
  text-align: center; display: grid; gap: 6px; justify-items: center; }
.lp-node b { color: var(--heading); font-size: 16px; }
.lp-node small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.lp-node-ic { width: 46px; height: 46px; border-radius: var(--r-item); background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; margin-bottom: 4px; }
.lp-node-ic .ic { width: 22px; height: 22px; }
.lp-node-key { border-color: var(--primary); background: var(--primary-soft); }
.lp-node-key .lp-node-ic { background: var(--primary); color: var(--on-primary); }
.lp-link { position: relative; height: 0; margin: 0 6px; border-top: 2px dashed var(--border-strong); }
.lp-link span { position: absolute; top: -26px; inset-inline: 0; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 860px) {
  .lp-flow { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .lp-link { width: 0; height: 46px; margin: 6px auto; border-top: 0; border-inline-start: 2px dashed var(--border-strong); }
  .lp-link span { top: 50%; inset-inline: auto; inset-inline-start: 14px; transform: translateY(-50%); }
}

/* ---------------------------------------------------------------- platform */
.lp-split { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.lp-feats { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 20px; }
.lp-feats li { display: flex; gap: 14px; align-items: flex-start; }
.lp-platform-visual { position: relative; padding-bottom: 40px; padding-inline-end: 40px; }
.lp-phone { position: absolute; bottom: 0; left: -8px; width: 230px; padding: 16px 12px 18px; border-radius: 30px;
  background-color: var(--ink); color: #FFFFFF; border: 1px solid rgb(255 255 255 / .1);
  background-image: radial-gradient(rgb(255 255 255 / .05) 1px, transparent 1.4px), linear-gradient(170deg, var(--primary-press), var(--ink));
  background-size: 16px 16px, 100% 100%; box-shadow: 0 34px 60px -22px rgb(28 35 32 / .55); }
.lp-phone-time { text-align: center; font-size: 28px; font-weight: 300; margin: 2px 0 12px; }
.lp-push { display: grid; grid-template-columns: 26px 1fr; gap: 9px; background: rgb(255 255 255 / .95); color: var(--text);
  border-radius: 14px; padding: 9px 10px; font-size: 12px; line-height: 1.55; margin-top: 8px; }
.lp-push b { color: var(--heading); } .lp-push small { color: var(--muted); }
.lp-push-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--primary); display: grid; place-items: center; }
.lp-push-mark::before { content: ""; width: 16px; height: 16px; background: var(--on-primary);
  -webkit-mask: url("../brand/mark.svg") center / contain no-repeat; mask: url("../brand/mark.svg") center / contain no-repeat; }
@media (max-width: 900px) {
  .lp-split { grid-template-columns: 1fr; gap: 36px; }
  .lp-platform-visual { padding-inline-end: 0; }
}
@media (max-width: 520px) { .lp-phone { width: 200px; left: -4px; } .lp-platform-visual { padding-bottom: 70px; } }

/* ---------------------------------------------------------------- steps */
.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  counter-reset: step; }
.lp-steps li { counter-increment: step; position: relative; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 26px 22px; display: grid; gap: 8px; align-content: start; }
.lp-steps li::after { content: counter(step); position: absolute; top: 18px; inset-inline-end: 20px; font-size: 40px; font-weight: 700;
  line-height: 1; color: var(--primary-soft-2); }
.lp-steps b { font-size: 17px; color: var(--heading); }
.lp-steps small { color: var(--muted); font-size: 14px; line-height: 1.8; }
.lp-step-ic { width: 44px; height: 44px; border-radius: var(--r-item); background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; margin-bottom: 6px; }
@media (max-width: 860px) { .lp-steps { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- pricing */
.lp-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 22px; justify-content: center; align-items: stretch; }
.lp-plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 30px 26px; display: flex; flex-direction: column; gap: 20px; }
.lp-plan h3 { font-size: 19px; }
.lp-plan .lp-list { flex: 1; }
.lp-plan-main { border: 1.5px solid var(--primary); }
.lp-plan-tag { position: absolute; top: -12px; inset-inline-start: 24px; background: var(--primary); color: var(--on-primary);
  font-size: 12px; font-weight: 700; padding: 2px 12px; border-radius: var(--r-badge); }
.lp-price { font-size: 28px; font-weight: 700; color: var(--heading); line-height: 1.3; }
.lp-price small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 4px; }
@media (max-width: 760px) { .lp-plans { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- FAQ */
.lp-faq { display: grid; gap: 10px; }
.lp-faq details { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-item); }
.lp-faq details[open] { background: var(--surface); border-color: var(--border-strong); }
.lp-faq summary { cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 700; color: var(--heading);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--primary); line-height: 1; transition: transform .2s var(--ease); }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--r-item); }
.lp-faq p { padding: 0 20px 20px; color: var(--text); line-height: 1.9; }

/* ---------------------------------------------------------------- closing band + footer */
.lp-final { padding: 80px 0; text-align: center; }
.lp-final h2 { color: #FFFFFF; font-size: clamp(25px, 3vw, 36px); line-height: 1.35; }
.lp-final p { color: rgb(244 243 239 / .75); margin: 14px auto 0; max-width: 560px; line-height: 1.9; }
.lp-final .lp-cta { justify-content: center; }
.lp-foot { background: var(--surface); border-top: 1px solid var(--border); padding: 28px 0; }
.lp-foot-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.lp-foot nav { display: flex; gap: 18px; margin-inline-start: auto; font-size: 14px; }
.lp-foot nav a { color: var(--muted); }
.lp-foot small { color: var(--faint); font-size: 13px; }

/* ---------------------------------------------------------------- motion */
.js [data-reveal] { opacity: 0; translate: 0 16px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .lp-shot, .lp-note { animation: none; transition: none; }
  .js [data-reveal] { opacity: 1; translate: none; transition: none; }
  .lp-gallery-text article { animation: none; }
}
