/* ═════════ ZERP · SECTION 1 · HERO + APP PREVIEW ═════════
   Centered headline, then a code-built ZERP window that cycles
   through its four modules (zerp.js). */
.ze-section1 {
  position: relative;
  padding: calc(var(--nav-h) + 70px) 0 60px;
  overflow: hidden;
}

.ze-section1::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 34%;
  width: 90vw;
  height: 70vh;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 99, 243, 0.24), transparent);
  filter: blur(50px);
  pointer-events: none;
}

.ze1-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ze1-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(20, 99, 243, 0.15);
  border: 1px solid rgba(77, 139, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-light);
}

.ze1-badge i,
.ze1-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-light);
  box-shadow: 0 0 8px var(--blue-light);
  animation: s10-blink 1.6s ease-in-out infinite;
}

.ze1-title {
  max-width: 17ch;
  margin: 26px 0 24px;
  font-size: clamp(2.5rem, 5.8vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.ze1-lead {
  max-width: 600px;
}

.ze1-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

/* ─── the app window ─── */
.ze1-stage {
  position: relative;
  margin-top: 70px;
  perspective: 1600px;
}

.ze1-app {
  position: relative;
  max-width: 1020px;
  margin-inline: auto;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(170deg, #0C1430, #060A17 70%);
  box-shadow:
    var(--highlight),
    0 60px 120px -40px rgba(0, 0, 0, 0.95),
    0 0 120px -40px var(--blue-glow);
  overflow: hidden;
  /* follows the page direction: in Arabic the sidebar sits on the right */
  text-align: start;
  transform-origin: 50% 0%;
  will-change: transform;
}

.ze1-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.ze1-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.ze1-bar span {
  margin-inline: auto;
  padding: 3px 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.ze1-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  aspect-ratio: 16 / 8.4;
}

.ze1-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px;
  border-inline-end: 1px solid var(--border);
  background: rgba(4, 7, 15, 0.35);
}

.ze1-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 18px;
}

.ze1-logo img {
  width: 22px;
  height: 22px;
}

.ze1-logo b {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.ze1-mod {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: background 0.5s var(--ease), color 0.5s;
}

.ze1-mod em {
  font-style: normal;
}

.ze1-mod svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ze1-mod.is-on {
  background: rgba(20, 99, 243, 0.2);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(91, 149, 255, 0.35);
}

.ze1-side-foot {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 0 8px;
}

.ze1-side-foot .mk-line:last-child {
  width: 60%;
}

.ze1-main {
  display: flex;
  flex-direction: column;
  padding: 18px 22px 22px;
  min-width: 0;
}

.ze1-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.ze1-head-t {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.05rem;
}

.ze1-search {
  flex: 0 1 34%;
  height: 26px;
  margin-inline-start: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.ze1-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(145deg, #4D8BFF, #1046B8);
}

/* the four screens sit on top of each other; one is shown at a time */
.ze1-screens {
  position: relative;
  flex: 1;
}

.ze1-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
  pointer-events: none;
}

.ze1-screen.is-on {
  opacity: 1;
  transform: none;
}

.ze1-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ze1-kpis--2 {
  grid-template-columns: repeat(2, 1fr);
}

.ze1-kpis > div {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.ze1-kpis .mk-line {
  width: 45%;
}

.ze1-kpis b {
  width: 70%;
  height: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.5);
}

.ze1-kpis > div:first-child b {
  background: var(--blue-light);
}

/* sales: bars grow in when the screen appears */
.ze1-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 3%;
  padding: 16px 16px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 100% 25%;
  /* time runs left to right in both languages, like the finance line */
  direction: ltr;
}

.ze1-bars i {
  flex: 1;
  height: calc(var(--h) * 100%);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #5B95FF, rgba(20, 99, 243, 0.25));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.9s var(--ease);
}

.ze1-screen.is-on .ze1-bars i {
  transform: scaleY(1);
}

.ze1-bars i:nth-child(2) { transition-delay: 0.04s; }
.ze1-bars i:nth-child(3) { transition-delay: 0.08s; }
.ze1-bars i:nth-child(4) { transition-delay: 0.12s; }
.ze1-bars i:nth-child(5) { transition-delay: 0.16s; }
.ze1-bars i:nth-child(6) { transition-delay: 0.2s; }
.ze1-bars i:nth-child(7) { transition-delay: 0.24s; }
.ze1-bars i:nth-child(8) { transition-delay: 0.28s; }
.ze1-bars i:nth-child(9) { transition-delay: 0.32s; }
.ze1-bars i:nth-child(10) { transition-delay: 0.36s; }

/* stock and teams: rows with a level bar */
.ze1-rows,
.ze1-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0;
}

.ze1-row,
.ze1-member {
  display: grid;
  grid-template-columns: 30px 1fr 34%;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.ze1-row > b {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(91, 149, 255, 0.18);
}

.ze1-member > b {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(157, 187, 255, 0.5), rgba(20, 99, 243, 0.4));
}

.ze1-row .mk-line,
.ze1-member .mk-line {
  width: 70%;
}

.ze1-row > span,
.ze1-member > span {
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.ze1-row > span i,
.ze1-member > span i {
  display: block;
  width: calc(var(--v) * 100%);
  height: 100%;
  border-radius: 8px;
  background: var(--blue-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease) 0.15s;
}

[dir="rtl"] .ze1-row > span i,
[dir="rtl"] .ze1-member > span i {
  transform-origin: right;
}

.ze1-screen.is-on span i {
  transform: scaleX(1);
}

.ze1-row.is-low > span i {
  background: #FFB454;
}

.ze1-row.is-low {
  border-color: rgba(255, 180, 84, 0.3);
}

/* finance: the line draws itself */
.ze1-line {
  flex: 1;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.ze1-line-area {
  fill: url(#zeGrad);
  opacity: 0;
  transition: opacity 1s 0.4s;
}

.ze1-line-path {
  fill: none;
  stroke: #5B95FF;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.6s var(--ease);
}

.ze1-screen.is-on .ze1-line-area { opacity: 1; }
.ze1-screen.is-on .ze1-line-path { stroke-dashoffset: 0; }

/* ─── facts under the window ─── */
.ze1-meta {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 44px;
}

.ze1-meta > div {
  padding: 0 34px;
  border-inline-start: 1px solid var(--border);
  text-align: center;
}

.ze1-meta > div:first-child {
  border-inline-start: 0;
}

.ze1-meta dt {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.ze1-meta dd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .ze-section1 { padding: calc(var(--nav-h) + 36px) 0 40px; }
  .ze1-stage { margin-top: 48px; }
  .ze1-app { border-radius: 14px; }
  .ze1-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; aspect-ratio: 4 / 3.6; }
  .ze1-side { flex-direction: row; gap: 4px; padding: 10px; border-inline-end: 0; border-bottom: 1px solid var(--border); overflow: hidden; }
  .ze1-logo,
  .ze1-side-foot { display: none; }
  .ze1-mod { padding: 7px 9px; font-size: 0.72rem; gap: 6px; }
  .ze1-mod svg { width: 13px; height: 13px; }
  .ze1-main { padding: 14px; }
  .ze1-head { margin-bottom: 12px; }
  .ze1-kpis { gap: 8px; }
  .ze1-kpis > div { padding: 10px; }
  .ze1-row,
  .ze1-member { gap: 10px; padding: 8px 10px; grid-template-columns: 24px 1fr 34%; }
  .ze1-row > b,
  .ze1-member > b { width: 24px; height: 24px; }
  .ze1-meta { margin-top: 32px; }
  .ze1-meta > div { padding: 0 16px; }
}

@media (max-width: 480px) {
  .ze1-mod em { display: none; }
  .ze1-mod.is-on em { display: inline; }
  .ze1-meta { flex-wrap: wrap; gap: 18px 0; }
}
