/* Hero (#hero). Prefix: hx- */

.hx {
  overflow-x: clip; /* the phone waits off to the side before it slides in */
  padding-block-start: calc(var(--nav-h) + clamp(36px, 4.4vw, 68px));
  padding-block-end: clamp(24px, 3vw, 40px);
}

/* ---------- Head ---------- */
.hx__head { display: grid; justify-items: center; text-align: center; }
.hx-chip { gap: 8px; padding-block: 5px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.hx-chip__coin { width: 22px; height: 22px; rotate: -8deg; }
.hx-title { margin-block-start: clamp(20px, 2.2vw, 28px); max-width: 11.5em; }
.hx-sub { margin-block-start: clamp(18px, 2vw, 26px); max-width: 39rem; text-wrap: balance; }
.hx-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-block-start: clamp(28px, 3vw, 40px); }
.hx-cta { min-height: 52px; padding-inline: 26px; font-size: 1.0625rem; }
.hx-cta__ico { width: 1em; height: 1em; transition: transform var(--t-base) var(--ease-out); }
.hx-cta:hover .hx-cta__ico { transform: translateY(2px); }
:lang(ar) .hx-title { max-width: 12em; }
:lang(ar) .hx-sub { max-width: 40rem; }

/* ---------- Stage ---------- */
.hx__stagewrap { margin-block-start: clamp(44px, 4.8vw, 72px); perspective: 2200px; perspective-origin: 50% 0%; }
.hx-stage {
  --hx-dh: calc(83cqw * 860 / 1224);  /* dashboard height */
  --hx-pt: calc(var(--hx-dh) * .53);  /* phone top: below the urgent items */
  position: relative;
  container-type: inline-size;
  transform-origin: 50% 0%;
}

/* The dashboard is designed at 1224 x 860 and scaled to the stage by --hx-k (set in s-hero.js). */
.hx-dash {
  --hx-k: .894;
  position: relative;
  z-index: 1;
  width: 83cqw;
  height: var(--hx-dh);
  margin-inline-start: 1.5cqw;
  margin-block-end: 14cqw; /* the phone overhangs the dashboard's bottom edge */
}
.hx-tilt { position: absolute; inset: 0; transform-origin: 50% 100%; }
.hx-win {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 1224px;
  height: 860px;
  transform: scale(var(--hx-k));
  transform-origin: 0 0;
  display: grid;
  grid-template-columns: 228px 1fr;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(10, 10, 30, .06), 0 2px 4px rgba(16, 24, 40, .04), 0 24px 48px -12px rgba(30, 44, 80, .14), 0 60px 120px -40px rgba(51, 92, 255, .12);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 99.5%);
  mask-image: linear-gradient(to bottom, #000 86%, transparent 99.5%);
  text-align: start;
  user-select: none;
}
[dir="rtl"] .hx-win { transform-origin: 100% 0; }
.hx-win p, .hx-win ul, .hx-win ol, .hx-win dl, .hx-win dd { margin: 0; }
.hx-win .ico { width: 18px; height: 18px; vertical-align: 0; }

/* Sidebar */
.hx-side { display: flex; flex-direction: column; padding: 14px 12px 12px; background: #F7F7F8; border-inline-end: 1px solid var(--g-150); min-width: 0; }
.hx-brand { display: flex; align-items: center; gap: 10px; padding: 2px 4px 14px; margin-block-end: 2px; border-block-end: 1px solid var(--g-150); }
.hx-brand__mark { width: 34px; height: 34px; }
.hx-brand__txt { display: grid; min-width: 0; line-height: 1.25; }
.hx-brand__txt b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.hx-brand__txt span { font-size: 12px; color: var(--g-500); }
.hx-brand__tog { display: grid; place-items: center; width: 26px; height: 26px; margin-inline-start: auto; border-radius: 7px; border: 1px solid var(--g-200); background: #fff; color: var(--g-600); }
.hx-brand__tog .ico { width: 14px; height: 14px; }
.hx-grp__h { display: flex; align-items: center; justify-content: space-between; padding: 11px 8px 4px; font-size: 10.5px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--g-500); }
.hx-grp__h .ico { width: 12px; height: 12px; }
:lang(ar) .hx-grp__h { font-size: 12px; letter-spacing: 0; text-transform: none; }
.hx-nav { display: flex; align-items: center; gap: 10px; height: 30px; padding-inline: 8px; border-radius: 8px; font-size: 13.5px; color: var(--g-800); white-space: nowrap; }
.hx-nav .ico { width: 17px; height: 17px; color: var(--g-700); }
.hx-nav.is-on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 1px 3px rgba(16, 24, 40, .06); }
.hx-nav.is-on .ico { color: var(--z-blue); }
.hx-nav--sub { padding-inline-start: 22px; height: 29px; }
.hx-nav__caret { margin-inline-start: auto; }
.hx-win .hx-nav__caret { width: 12px; height: 12px; }
.hx-av { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-style: normal; font-size: 10px; font-weight: 700; font-family: "Inter", sans-serif; }
.hx-av--q { background: var(--z-blue); }
.hx-av--m { background: #4F46E5; }
.hx-user { display: flex; align-items: center; gap: 10px; margin-block-start: 10px; padding: 12px 6px 0; border-block-start: 1px solid var(--g-150); }
.hx-user__av { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--b-peach); color: var(--b-plum); font-style: normal; font-weight: 700; font-size: 13px; }
.hx-user__txt { display: grid; line-height: 1.25; }
.hx-user__txt b { font-size: 13px; font-weight: 600; }
.hx-user__txt span { font-size: 11.5px; color: var(--g-500); }
.hx-win .hx-user__caret { width: 14px; height: 14px; margin-inline-start: auto; color: var(--g-500); }
[dir="rtl"] .hx-user__caret { transform: scaleX(-1); }

/* Main */
.hx-main { display: grid; grid-template-rows: 60px 1fr; min-width: 0; }
.hx-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 20px; border-block-end: 1px solid var(--g-150); }
.hx-top__title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.hx-top__tools { display: flex; align-items: center; gap: 8px; }
.hx-pill, .hx-sq { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding-inline: 12px; border: 1px solid var(--g-200); border-radius: 9px; font-size: 13px; color: var(--g-800); background: #fff; white-space: nowrap; }
.hx-win .hx-pill .ico { width: 16px; height: 16px; color: var(--g-600); }
.hx-win .hx-pill__caret { width: 12px; height: 12px; }
.hx-sq { width: 34px; padding: 0; justify-content: center; position: relative; }
.hx-win .hx-sq .ico { width: 17px; height: 17px; color: var(--g-700); }
.hx-sq--dot::after { content: ""; position: absolute; top: 7px; inset-inline-end: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 2px #fff; }

.hx-body { display: grid; grid-template-columns: minmax(0, 1fr) 272px; min-height: 0; }
.hx-col { display: flex; flex-direction: column; gap: 12px; padding: 16px; min-width: 0; }

/* Upcoming event banner */
.hx-banner { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: #EEF3FF; border: 1px solid #DCE5FF; }
.hx-win .hx-banner__ico { width: 22px; height: 22px; color: var(--z-blue); }
.hx-banner__txt { display: grid; line-height: 1.35; min-width: 0; }
.hx-banner__txt b { font-size: 13.5px; font-weight: 600; color: #14213D; }
.hx-banner__txt span { font-size: 12.5px; color: var(--g-700); }
.hx-banner__links { margin-inline-start: auto; font-size: 12.5px; font-weight: 600; color: #14213D; white-space: nowrap; }
.hx-banner__links u { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hx-win .hx-banner__x { width: 15px; height: 15px; color: var(--g-500); }

/* Card shells (real Zimam: a grey frame around the white card, with the action strip inside it) */
.hx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hx-shell { display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 18px; background: var(--g-100); border: 1px solid #EEEEEE; min-width: 0; }
.hx-shell > .zcard { flex: 1; border-radius: 14px; border-color: #EDEDED; }
.hx-win .zcard__head { padding: 10px 12px 10px 14px; }
[dir="rtl"] .hx-win .zcard__head { padding: 10px 14px 10px 12px; }
.hx-win .zcard__title { font-size: 14px; }
.hx-win .zcard__title .ico { width: 17px; height: 17px; }
.hx-win .zcard__btn { font-size: 11.5px; padding: 4px 9px; }
.hx-sarico { display: grid; place-items: center; width: 17px; height: 17px; border: 1.5px solid var(--g-700); border-radius: 50%; color: var(--g-700); }
.hx-sarico .sar { width: 8px; height: 9px; }
.hx-strip { border-radius: 12px; padding: 11px 12px; font-size: 12.5px; }
.hx-win .hx-strip .ico { width: 17px; height: 17px; }
.hx-strip__txt { display: block; }
.hx-strip__link { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 6px; white-space: nowrap; }
.hx-win .hx-strip__link .ico { width: 13px; height: 13px; margin: 0; }
[dir="rtl"] .hx-win .ico--dir { transform: scaleX(-1); }

.hx-big { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: "Inter", sans-serif; font-weight: 500; font-size: 36px; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--ink); }
.hx-big .amt { gap: .08em; }
.hx-big .amt .sar { width: .6em; height: .68em; }
.hx-big .delta { letter-spacing: 0; }
.hx-cap { margin-block-start: 4px; }

/* Revenue */
.hx-rev__body { text-align: center; padding: 16px 16px 14px; }
.hx-chbar { margin-block: 14px 12px; height: 8px; }
.hx-chbar > i { transform-origin: 0 50%; }
[dir="rtl"] .hx-chbar > i { transform-origin: 100% 50%; }
.hx-legend { display: grid; row-gap: 5px; text-align: start; }
.hx-legend li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--g-700); white-space: nowrap; min-width: 0; }
.hx-legend .zdot { width: 7px; height: 7px; }
.hx-legend .amt { margin-inline-start: auto; color: var(--ink); font-weight: 500; }
.hx-legend .amt .sar { width: .66em; height: .74em; }

/* Satisfaction */
.hx-sat__body { padding: 12px 16px 14px; }
.hx-sat__score { display: flex; align-items: center; justify-content: center; gap: 12px; }
.hx-sat__ill { width: 74px; height: auto; margin-block: -4px -6px; rotate: -4deg; }
.hx-big--sat { direction: ltr; }
.hx-big--sat small { font-size: 18px; color: var(--g-600); letter-spacing: -.01em; margin-inline-start: 1px; align-self: flex-end; padding-block-end: 4px; }
.hx-satbar { margin-block: 12px 10px; }
.hx-thumbs { display: grid; gap: 3px; }
.hx-thumbs li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--g-700); }
.hx-thumbs b { color: var(--ink); font-weight: 600; }
.hx-thumbs .t-num { direction: ltr; unicode-bidi: isolate; }
.hx-win .hx-up { width: 15px; height: 15px; color: var(--up); }
.hx-win .hx-down { width: 15px; height: 15px; color: var(--down); }

/* Retention */
.hx-ret__body { padding: 14px 16px 12px; }
.hx-ret__top { display: grid; grid-template-columns: auto 1fr; align-items: center; padding-block-end: 12px; border-block-end: 1px solid var(--g-150); }
.hx-ret__main { padding-inline-end: 22px; margin-inline-end: 4px; border-inline-end: 1px solid var(--g-150); }
.hx-ret__main .hx-big { justify-content: flex-start; }
.hx-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.hx-stats > div { padding-inline: 14px; min-width: 0; }
.hx-stats > div + div { border-inline-start: 1px solid var(--g-150); }
.hx-stats dt { font-size: 11.5px; color: var(--g-500); white-space: nowrap; }
.hx-stats dd { display: flex; align-items: center; gap: 6px; margin-block-start: 2px; }
.hx-stats dd b { font-family: "Inter", sans-serif; font-size: 21px; font-weight: 500; letter-spacing: -.03em; }
.hx-chart { padding-block-start: 12px; }
.hx-chart__plot {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  height: 118px;
  padding-block-end: 20px;
  background-image: linear-gradient(to bottom, var(--g-150) 1px, transparent 1px);
  background-size: 100% 24.5px;
  background-repeat: repeat-y;
}
.hx-chart__target { position: absolute; inset-inline: 0; top: 22px; border-block-start: 1.5px dashed rgba(229, 72, 77, .45); z-index: 1; }
.hx-day { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.hx-day__bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 100%; }
.hx-day__bars > i { display: block; width: 38%; max-width: 26px; height: calc(var(--h) * 100%); border-radius: 5px 5px 2px 2px; background: var(--z-blue); transform-origin: 50% 100%; }
.hx-day__bars > i + i { background: var(--c-green); }
.hx-day > span { position: absolute; bottom: 0; font-size: 11px; color: var(--g-500); }
.hx-day { position: relative; padding-block-end: 0; }
.hx-day > span { bottom: -20px; }
.hx-chart__key { display: flex; gap: 14px; margin-block-start: 6px; font-size: 11.5px; color: var(--g-700); }
.hx-chart__key li { display: flex; align-items: center; gap: 6px; }

/* Registration (peeks and fades) */
.hx-reg__body { padding: 14px 16px; text-align: center; }

/* Urgent rail */
.hx-rail { display: flex; flex-direction: column; min-height: 0; border-inline-start: 1px solid var(--g-150); }
.hx-rail__head { padding: 16px 16px 12px; border-block-end: 1px solid var(--g-150); }
.hx-rail__title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.hx-rail__n { display: grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 6px; border-radius: 99px; background: var(--down); color: #fff; font-size: 11px; font-weight: 600; font-family: "Inter", sans-serif; }
.hx-rail__clip { position: relative; flex: 1; overflow: hidden; min-height: 0; }
.hx-rail__list { position: relative; padding: 2px 12px; }
.hx-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 12px 2px; border-block-end: 1px solid var(--g-150); }
.hx-item__ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--z-blue-50); color: var(--z-blue); }
.hx-win .hx-item__ico .ico { width: 15px; height: 15px; }
.hx-item--fraud .hx-item__ico { background: var(--down-bg); color: var(--down); }
.hx-item__txt { display: grid; line-height: 1.35; min-width: 0; }
.hx-item__txt b { font-size: 13px; font-weight: 600; }
.hx-item__txt span, .hx-item__txt em { font-size: 11.5px; color: var(--g-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: normal; }
.hx-item__txt em { color: var(--down); }
.hx-stars { display: flex; gap: 1px; margin-block-start: 3px; color: var(--g-300); }
.hx-win .hx-stars .ico { width: 13px; height: 13px; }
.hx-stars .on { color: #EF3E4A; }
.hx-item__end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.hx-item__end time { font-size: 10.5px; color: var(--g-500); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hx-resolve { padding: 5px 11px; font-size: 12px; border-radius: 7px; }

/* ---------- Phone, rope, stickers ---------- */
.hx-phonewrap {
  position: absolute;
  z-index: 3;
  inset-inline-end: 0;
  top: var(--hx-pt);
}
.hx-phone { --pw: 19cqw; }
.hx-rope { z-index: 2; }
.hx-rope .rope__line { stroke-width: 2; }
.hx-rope__knot { fill: #BDBDC4 !important; stroke: none !important; }
.hx-stk { position: absolute; z-index: 4; pointer-events: none; }
.hx-stk .sticker { --size: 100%; width: 100%; }
.hx-stk--coin { width: 6.6cqw; inset-inline-end: -3.2cqw; top: calc(var(--hx-pt) - 5.4cqw); rotate: 12deg; }
.hx-stk--back { width: 10cqw; inset-inline-start: -3.4cqw; top: 49cqw; rotate: -6deg; }
[dir="rtl"] .hx-stk--coin { rotate: -12deg; }
[dir="rtl"] .hx-stk--back { rotate: 6deg; }

/* Hidden until the load choreography runs (core removes js-motion if boot stalls). */
html.js-motion .hx-tilt,
html.js-motion .hx-phonewrap,
html.js-motion .hx-stk,
html.js-motion .hx-item { visibility: hidden; }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .hx-cta { min-height: 50px; }
}

/* ---------- Phone: a designed crop, the real Zimam mobile layout ---------- */
@media (max-width: 767px) {
  .hx { padding-block-start: calc(var(--nav-h) + 36px); }
  .hx-title { max-width: 9em; }
  .hx-chip { max-width: 100%; border-radius: 14px; font-size: .78rem; line-height: 1.35; text-align: start; padding-block: 6px; }
  .hx-ctas { width: 100%; max-width: 420px; }
  .hx-cta { flex: 1 1 100%; }
  .hx__stagewrap { margin-block-start: 44px; perspective: none; }

  .hx-dash { width: 100%; height: auto; margin: 0; }
  .hx-tilt { position: relative; inset: auto; }
  .hx-win {
    position: relative;
    width: 100%;
    height: 560px;
    transform: none;
    display: block;
    border-radius: 20px;
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 99%);
    mask-image: linear-gradient(to bottom, #000 80%, transparent 99%);
  }
  .hx-side, .hx-rail, .hx-banner, .hx-sat, .hx-reg, .hx-pill { display: none; }
  .hx-main, .hx-body { display: block; }
  .hx-top { height: 54px; padding-inline: 14px; }
  .hx-top__title { font-size: 16px; }
  .hx-col { padding: 12px; }
  .hx-row { display: block; order: 2; }
  .hx-ret { order: 1; }
  .hx-ret__top { grid-template-columns: 1fr; gap: 12px; }
  .hx-ret__main { padding: 0; margin: 0; border: 0; }
  .hx-stats > div { padding-inline: 10px; }
  .hx-stats > div:first-child { padding-inline-start: 0; }
  .hx-stats dt { font-size: 11px; white-space: normal; line-height: 1.3; min-height: 2.6em; }
  .hx-stats dd { flex-wrap: wrap; gap: 4px; }
  .hx-stats dd b { font-size: 18px; }
  .hx-chart__plot { gap: 6px; height: 108px; }
  .hx-chart__key { display: none; }
  .hx-strip__txt { line-height: 1.5; }
  .hx-strip__link { margin-inline-start: 0; display: flex; width: fit-content; margin-block-start: 2px; }

  .hx-phonewrap { top: 528px; inset-inline-end: 4%; }
  .hx-phone { --pw: clamp(132px, 38vw, 168px); }
  .hx-stage::after { content: ""; display: block; height: calc(clamp(132px, 38vw, 168px) * 812 / 375 - 24px); }
  .hx-stk--coin { width: 54px; top: 496px; inset-inline-end: -1%; }
  .hx-stk--back { width: 116px; top: 640px; inset-inline-start: 3%; }
}
.hx-nw { white-space: nowrap; }
