:root {
  --pink: #f64986;
  --purple: #8b45d6;
  --blue: #029ef6;
  --grad: linear-gradient(120deg, var(--pink), var(--purple) 50%, var(--blue));
  --bg: #ffffff;
  --bg-alt: #f5f6fb;
  --card: #ffffff;
  --text: #1c1d2b;
  --muted: #5d6075;
  --border: #e4e6f0;
  --shadow: 0 10px 30px rgba(40, 30, 90, 0.08);
  --font: Vazirmatn, "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", system-ui, sans-serif;
  /* Payasafar's own colours, for its half of the page */
  --sf-purple: #6739cd;
  --sf-pink: #d8569d;
  --sf-blue: #428eff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12131a;
    --bg-alt: #1a1c27;
    --card: #1d1f2b;
    --text: #eceef7;
    --muted: #a3a7bd;
    --border: #2d3040;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, p { margin: 0; }

/* The two halves: Payadesk on the right (first in RTL), Payasafar on the left. */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 100vh; }

/* Payadesk half */
.pane-app {
  display: flex; justify-content: center; align-items: center;
  padding: 40px clamp(20px, 4vw, 64px);
  background:
    radial-gradient(600px 300px at 100% 0, color-mix(in srgb, var(--purple) 10%, transparent), transparent),
    var(--bg);
}
.pane-inner { width: min(560px, 100%); display: flex; flex-direction: column; gap: 18px; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-head img { height: 40px; width: auto; border-radius: 9px; }
.pill {
  padding: 3px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, transparent);
}
.pane-app h1 { font-size: clamp(1.7rem, 2.6vw, 2.45rem); font-weight: 800; line-height: 1.45; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 1.04rem; }
.release { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; }
.release::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
}

.dl-card {
  position: relative; overflow: hidden; display: grid; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 18px 20px; box-shadow: var(--shadow);
}
.dl-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--grad); }
.dl-head { display: flex; align-items: center; gap: 14px; }
.os-badge { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); }
.os-badge svg { width: 26px; height: 26px; fill: #fff; }
.dl-head h2 { font-size: 1.15rem; font-weight: 800; line-height: 1.4; }
.dl-head p { color: var(--muted); font-size: .9rem; }
.dl-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-actions.single { grid-template-columns: 1fr; }
.note { color: var(--muted); font-size: .85rem; }

.btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 14px; border: 1px solid transparent;
  font: inherit; font-weight: 700; line-height: 1.5; text-align: center; text-decoration: none;
  transition: transform .15s, box-shadow .2s, border-color .2s, color .2s;
}
.btn-label { display: inline-flex; align-items: center; gap: 8px; }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn .size { font-size: .8rem; font-weight: 400; opacity: .85; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(139, 69, 214, .3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(139, 69, 214, .42); }
.btn-ghost { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }

.soon-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.soon {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px;
  border: 1px dashed var(--border); border-radius: 16px; color: var(--muted); font-size: .9rem; text-align: center;
}
.soon svg { width: 24px; height: 24px; fill: var(--muted); }
.soon svg.stroke { fill: none; stroke: var(--muted); stroke-width: 1.7; }
.soon em {
  font-style: normal; font-size: .75rem; font-weight: 600; padding: 0 10px; border-radius: 999px;
  color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, transparent);
}
.tip {
  font-size: .88rem; padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--blue) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--blue) 28%, transparent);
}
.app-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem;
}
.app-foot a { color: var(--purple); text-decoration: none; }

/* Payasafar half: drawn scene behind, content on top */
.pane-promo {
  position: sticky; top: 0; align-self: start; min-height: 100vh;
  display: flex; justify-content: center; overflow: hidden; isolation: isolate;
  color: #fff; background: #2a1a6e;
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.promo {
  width: min(540px, 100% - 40px); display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: clamp(20px, 4vh, 56px) 0 clamp(170px, 24vh, 240px); text-align: center;
}
.promo-badge {
  padding: 4px 16px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(8px);
}
.promo-brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.brand-name {
  font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 900; line-height: 1.25;
  background: linear-gradient(180deg, #fff 40%, #ffd3ea); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(20, 8, 60, .5));
}
.brand-domain { font-family: "Segoe UI", system-ui, sans-serif; font-size: .95rem; letter-spacing: .06em; opacity: .85; }
.promo h2 { font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 800; line-height: 1.6; text-shadow: 0 2px 16px rgba(20, 8, 60, .45); }
.promo-sub { max-width: 440px; font-size: .98rem; opacity: .92; }

.ticket {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  width: min(400px, 100%); padding: 14px 20px; border-radius: 18px; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(20, 8, 60, .35);
  animation: float 5s ease-in-out infinite;
}
.city { display: flex; flex-direction: column; align-items: center; min-width: 64px; transition: opacity .3s, transform .3s; }
.city small { font-size: .75rem; opacity: .75; }
.city b { font-size: 1.25rem; font-weight: 800; line-height: 1.5; }
.ticket.swap .city { opacity: 0; transform: translateY(6px); }
.track { position: relative; height: 2px; background: repeating-linear-gradient(to left, rgba(255, 255, 255, .85) 0 8px, transparent 8px 15px); }
.rider {
  position: absolute; top: 50%; left: calc(100% - 30px); width: 30px; height: 30px; margin-top: -15px;
  display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(20, 8, 60, .35);
  animation: ride 3.5s ease-in-out infinite;
}
.rider svg { width: 18px; height: 18px; fill: var(--sf-purple); }

.cta-wrap { position: relative; display: inline-flex; margin-top: 4px; }
.cta-wrap::before {
  content: ""; position: absolute; inset: 0; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .7);
  animation: ring 2.4s ease-out infinite; pointer-events: none;
}
.promo-cta {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 16px; color: #fff; text-decoration: none; font-size: 1.08rem; font-weight: 800;
  background: linear-gradient(120deg, var(--sf-pink), var(--sf-purple) 60%, var(--sf-blue));
  box-shadow: 0 14px 34px rgba(216, 86, 157, .45); transition: transform .15s;
}
.promo-cta:hover { transform: translateY(-2px) scale(1.02); }
.promo-cta::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-130%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  animation: shimmer 3.2s ease-in-out infinite;
}
.promo-cta svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.promo-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.promo-chips li {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: .85rem;
  background: rgba(20, 10, 60, .3); border: 1px solid rgba(255, 255, 255, .2);
}
.promo-chips li::before { content: "✓"; color: #9df0c4; font-weight: 800; }
.promo-routes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 540px; }
.promo-routes a {
  padding: 1px 10px; border-radius: 999px; font-size: .78rem; text-decoration: none;
  background: rgba(20, 10, 60, .35); border: 1px solid rgba(255, 255, 255, .18); transition: background .2s;
}
.promo-routes a:hover { background: rgba(255, 255, 255, .22); }

/* Scene motion */
.star { animation: twinkle 3s ease-in-out infinite; }
.sun-glow { transform-box: fill-box; transform-origin: center; animation: glow 6s ease-in-out infinite; }
.cloud { animation: drift linear infinite; }
.route { stroke-dasharray: 3 11; animation: dash 1.4s linear infinite; }
.pin { transform-box: fill-box; transform-origin: bottom; animation: bob 2.4s ease-in-out infinite; }
.lane { stroke-dasharray: 34 26; animation: lane .55s linear infinite; }
.bus { animation: bounce .45s ease-in-out infinite alternate; }
.wheel { transform-box: fill-box; transform-origin: center; animation: spin .7s linear infinite; }
.beam { animation: beam 2.2s ease-in-out infinite; }

@keyframes twinkle { 50% { opacity: .25; } }
@keyframes glow { 50% { transform: scale(1.08); opacity: .8; } }
@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(900px); } }
@keyframes dash { to { stroke-dashoffset: -28; } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes lane { to { stroke-dashoffset: -60; } }
@keyframes bounce { to { transform: translateY(-2px); } }
@keyframes spin { to { transform: rotate(-360deg); } }
@keyframes beam { 50% { opacity: .55; } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes ride { 0%, 8% { left: calc(100% - 30px); } 78%, 100% { left: 0; } }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.18, 1.45); opacity: 0; } }
@keyframes shimmer { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }

@media (prefers-reduced-motion: reduce) {
  .pane-promo *, .pane-promo *::before, .pane-promo *::after { animation: none !important; }
}

/* One column: Payadesk first, Payasafar below */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .pane-promo { position: relative; min-height: 0; }
  .promo { padding-bottom: 210px; }
}
@media (max-width: 520px) {
  .pane-app { padding: 28px 16px; }
  .dl-actions { grid-template-columns: 1fr; }
  .soon-row { gap: 8px; }
  .soon { font-size: .82rem; }
  .ticket { gap: 10px; padding: 12px 14px; }
  .promo-cta { padding: 14px 24px; }
}
