/* =====================================================================
   OFFER STAGE (2026-11-28) — الباقة المتقدمة للكافيهات 2,300 مع تابلت مجاني.
   The first scene of the page, in the page's own language: deep void, mint text,
   blue→teal light, glowing nodes on thin wires (as in «كل شيء يتجمع بمكان واحد»),
   mono labels. A cashier terminal showing the real MARASIPOS screen stands on a
   lit floor, with the free tablet and a receipt printing the price.
   Motion is transform/opacity only and switches off with prefers-reduced-motion.
   ===================================================================== */
.of {
  --of-mint: #5eead4;
  --of-mint-2: #99f6e4;
  --of-blue: #3b82f6;
  --of-line: rgba(94, 234, 212, 0.35);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(40px, 5vw, 64px) 0 clamp(56px, 7vw, 96px);
  background: var(--lp-void);
  color: var(--lp-on-dark);
}

/* ---------- sky: a stage light from above + two slow orbs ---------- */
.of__sky { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.of__beam {
  position: absolute;
  top: -20%;
  left: 50%;
  width: min(1100px, 120vw);
  height: 120%;
  transform: translateX(-50%);
  background:
    radial-gradient(50% 42% at 50% 30%, rgba(59, 130, 246, 0.30), transparent 70%),
    conic-gradient(from 180deg at 50% 0%, transparent 160deg, rgba(94, 234, 212, 0.10) 172deg, rgba(147, 197, 253, 0.16) 180deg, rgba(94, 234, 212, 0.10) 188deg, transparent 200deg);
  filter: blur(6px);
}
.of__orb {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}
.of__orb--a { top: 18%; inset-inline-start: -120px; background: rgba(20, 184, 166, 0.35); }
.of__orb--b { bottom: 4%; inset-inline-end: -140px; background: rgba(27, 99, 224, 0.4); }

/* ---------- floor: a perspective grid fading into the horizon ---------- */
.of__floor {
  position: absolute;
  left: 50%;
  bottom: -2%;
  z-index: -1;
  width: 220%;
  height: 52%;
  transform: translateX(-50%) perspective(600px) rotateX(62deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(94, 234, 212, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.22) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  pointer-events: none;
}

.of__inner { position: relative; }

/* ---------- headline ---------- */
.of__head { text-align: center; max-width: 860px; margin: 0 auto; }
.of__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: var(--lp-r-pill);
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.14), rgba(20, 184, 166, 0.04));
  box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.05), 0 10px 30px rgba(2, 6, 20, 0.5);
  font-size: 13.5px;
  color: var(--lp-on-dark);
}
.of__eyebrow b { font-weight: 800; color: #fff; }
.of__live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--of-mint);
  box-shadow: 0 0 12px var(--of-mint);
}
.of__sep { width: 1px; height: 14px; background: var(--lp-hair-strong); }
.of__mono {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--lp-on-dark-dim);
}

.of__title {
  margin: 20px 0 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}
.of__l1 { font-size: clamp(24px, 3vw, 38px); color: var(--lp-on-dark); font-weight: 700; }
.of__l2 {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 16px;
}
.of__price {
  font-size: clamp(72px, 10vw, 128px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  background: linear-gradient(180deg, #ffffff 0%, var(--of-mint-2) 45%, var(--of-mint) 70%, #2dd4bf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(94, 234, 212, 0.35)) drop-shadow(0 18px 40px rgba(2, 6, 20, 0.8));
}
.of__cur { font-size: clamp(28px, 3.6vw, 46px); color: #fff; }
.of__was {
  align-self: center;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--lp-hair-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: clamp(13px, 1.3vw, 16px);
  font-weight: 600;
  color: var(--lp-on-dark-faint);
}
.of__was s { text-decoration-color: #f87171; text-decoration-thickness: 2px; color: var(--lp-on-dark-dim); }
.of__l3 { margin-top: 14px; }
.of__gift {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--lp-r-pill);
  font-size: clamp(18px, 2.1vw, 26px);
  font-weight: 800;
  color: #04201c;
  background: linear-gradient(135deg, #a7f3d0, var(--of-mint) 50%, #22d3ee);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 14px 40px rgba(20, 184, 166, 0.45), 0 0 60px rgba(94, 234, 212, 0.25);
  overflow: hidden;
}
.of__gift::after { /* a light that passes over the gift */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.7) 50%, transparent 70%);
  transform: translateX(-120%);
}
.of__sub {
  margin: 22px auto 0;
  max-width: 60ch;
  font-size: clamp(15px, 1.5vw, 17.5px);
  line-height: 1.9;
  color: var(--lp-on-dark-dim);
}

/* ---------- stage: features | device | features ---------- */
.of__stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 34px;
  margin-top: clamp(30px, 3.5vw, 44px);
}
@media (min-width: 1100px) {
  .of__stage { grid-template-columns: 1fr minmax(0, 560px) 1fr; gap: 0; }
}

.of-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.of-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 14px 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--lp-hair);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(6px);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--lp-on-dark);
  transition: border-color 0.3s var(--lp-ease), transform 0.3s var(--lp-ease), background 0.3s;
}
.of-node:hover { border-color: rgba(94, 234, 212, 0.5); transform: translateY(-2px); background: rgba(20, 184, 166, 0.08); }
.of-node__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--of-mint);
  border: 1px solid rgba(94, 234, 212, 0.45);
  background: radial-gradient(circle at 50% 30%, rgba(94, 234, 212, 0.25), rgba(10, 22, 51, 0.6));
  box-shadow: 0 0 18px rgba(94, 234, 212, 0.22), inset 0 0 10px rgba(94, 234, 212, 0.12);
}
.of-node__wire { display: none; }

@media (min-width: 1100px) {
  .of-feats { gap: 16px; }
  /* RTL: the first column sits on the right, its wires run left toward the device */
  .of-feats--r { padding-inline-end: 54px; justify-items: end; }
  .of-feats--l { padding-inline-start: 54px; justify-items: start; }
  .of-feats--r .of-node:nth-child(1), .of-feats--r .of-node:nth-child(6) { margin-inline-start: 34px; }
  .of-feats--l .of-node:nth-child(1), .of-feats--l .of-node:nth-child(6) { margin-inline-end: 34px; }
  .of-node { width: max-content; max-width: 100%; }
  .of-node__wire {
    display: block;
    position: absolute;
    top: 50%;
    width: 54px;
    height: 1px;
    background: linear-gradient(90deg, var(--of-line), rgba(94, 234, 212, 0.05));
    overflow: hidden;
  }
  .of-feats--r .of-node__wire { inset-inline-start: 100%; transform: scaleX(-1); }
  .of-feats--l .of-node__wire { inset-inline-end: 100%; }
  .of-feats--r .of-node:nth-child(1) .of-node__wire, .of-feats--r .of-node:nth-child(6) .of-node__wire { width: 88px; }
  .of-feats--l .of-node:nth-child(1) .of-node__wire, .of-feats--l .of-node:nth-child(6) .of-node__wire { width: 88px; }
  .of-node__wire::after { /* a pulse running along the wire toward the device */
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: var(--of-mint-2);
    box-shadow: 0 0 10px var(--of-mint);
    opacity: 0;
  }
}
@media (max-width: 1099px) {
  .of-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .of-feats--r { order: 2; }
  .of-feats--l { order: 3; margin-top: -20px; }
  .of__rig { order: 1; }
}
@media (max-width: 520px) {
  .of-node { font-size: 13px; gap: 9px; padding: 7px 9px; min-height: 48px; }
  .of-node__ico { width: 30px; height: 30px; }
  .of-node__ico svg { width: 15px; height: 15px; }
}

/* ---------- the rig: terminal + tablet + printer ---------- */
.of__rig {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 10px 0 60px;
  transform: perspective(1600px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--lp-out);
}
.of__halo {
  position: absolute;
  inset: -6% -10% 10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.55), rgba(20, 184, 166, 0.22) 55%, transparent 75%);
  filter: blur(24px);
}

.of-term {
  position: relative;
  width: 88%;
  margin: 0 auto;
  padding: 10px 10px 24px;
  border-radius: 22px;
  background: linear-gradient(160deg, #2a3446 0%, #0d1322 45%, #05080f 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10) inset,
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 50px 90px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(59, 130, 246, 0.25);
  transform: rotateX(4deg);
  transform-origin: 50% 100%;
}
.of-term__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1220;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8);
}
.of-term__screen img, .of-tab__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top right;
}
.of-shine {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 32%),
    linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.28) 50%, transparent 60%);
  background-size: 100% 100%, 250% 100%;
  background-position: 0 0, 150% 0;
  pointer-events: none;
}
.of-term__toast {
  position: absolute;
  top: 10%;
  left: 6%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(7, 14, 38, 0.92);
  border: 1px solid rgba(94, 234, 212, 0.45);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(94, 234, 212, 0.25);
}
.of-term__toast i { width: 7px; height: 7px; border-radius: 50%; background: var(--of-mint); box-shadow: 0 0 8px var(--of-mint); }
.of-term__chin {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-family: Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.4);
}
.of-term__neck {
  width: 12%;
  height: 58px;
  margin: -4px auto 0;
  background: linear-gradient(90deg, #1f2937 0%, #9ca3af 35%, #e5e7eb 48%, #6b7280 62%, #111827 100%);
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}
.of-term__foot {
  width: 48%;
  height: 22px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, #9ca3af, #374151 45%, #0b0f19 75%);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.8), 0 0 50px rgba(94, 234, 212, 0.25);
}
.of__reflect { /* the light pool on the floor under the rig */
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 16px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(94, 234, 212, 0.35), transparent);
  filter: blur(10px);
  z-index: -1;
}

/* free tablet, front corner */
.of-tab {
  position: absolute;
  bottom: 38px;
  inset-inline-end: -4%;
  width: 40%;
  padding: 7px;
  border-radius: 18px;
  background: linear-gradient(160deg, #1f2937, #030712);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 30px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(94, 234, 212, 0.25);
  transform: rotate(8deg) translateZ(40px);
}
.of-tab__screen { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; }
.of-tab__tag {
  position: absolute;
  top: -15px;
  inset-inline-start: -12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--lp-r-pill);
  font-size: 13.5px;
  font-weight: 900;
  color: #04201c;
  background: linear-gradient(135deg, #a7f3d0, var(--of-mint));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 24px rgba(94, 234, 212, 0.5);
  transform: rotate(-8deg);
}

/* receipt printer, other front corner: the price printed on paper */
.of-print {
  position: absolute;
  bottom: 40px;
  inset-inline-start: -2%;
  width: 26%;
  transform: rotate(-5deg) translateZ(30px);
}
.of-print__paper {
  position: relative;
  z-index: 0;
  display: grid;
  gap: 3px;
  width: 82%;
  margin: 0 auto -10px;
  padding: 10px 9px 18px;
  background: linear-gradient(180deg, #ffffff, #eef2f7);
  color: #0f172a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 9.5px;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 92% 97%, 84% 100%, 76% 97%, 68% 100%, 60% 97%, 52% 100%, 44% 97%, 36% 100%, 28% 97%, 20% 100%, 12% 97%, 4% 100%, 0 97%);
}
.of-print__paper b { font-size: 10px; letter-spacing: 0.12em; }
.of-print__paper span { font-family: inherit; }
.of-print__row, .of-print__tot { display: flex; justify-content: space-between; gap: 4px; }
.of-print__row em, .of-print__tot em { font-style: normal; }
.of-print__tot { margin-top: 3px; padding-top: 4px; border-top: 1px dashed #94a3b8; font-weight: 900; font-size: 11px; }
.of-print__qr {
  justify-self: center;
  width: 26px;
  height: 26px;
  margin-top: 4px;
  background:
    conic-gradient(#0f172a 25%, transparent 0 50%, #0f172a 0 75%, transparent 0) 0 0 / 6px 6px;
  outline: 3px solid #fff;
  box-shadow: 0 0 0 4px #0f172a;
}
.of-print__body {
  position: relative;
  z-index: 1;
  height: 46px;
  border-radius: 12px 12px 10px 10px;
  background: linear-gradient(180deg, #374151, #111827 60%, #030712);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset, 0 20px 40px rgba(0, 0, 0, 0.7);
}
.of-print__body::before { /* paper slot */
  content: "";
  position: absolute;
  top: 6px;
  left: 12%;
  right: 12%;
  height: 4px;
  border-radius: 4px;
  background: #000;
}
.of-print__led {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--of-mint);
  box-shadow: 0 0 8px var(--of-mint);
}

@media (max-width: 520px) {
  .of-print__paper { font-size: 7.5px; padding: 7px 6px 14px; }
  .of-print__paper b { font-size: 8px; }
  .of-print__tot { font-size: 8.5px; }
  .of-print__qr { width: 18px; height: 18px; background-size: 4.5px 4.5px; }
  .of-print__body { height: 34px; }
  .of-term__toast { font-size: 10px; padding: 5px 9px; }
  .of-tab__tag { font-size: 12px; padding: 5px 10px; }
}

/* ---------- calls to action ---------- */
.of__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(30px, 4vw, 48px);
}
.of__cta { min-width: 230px; justify-content: center; gap: 10px; }
.of__cta svg { transform: scaleX(-1); }
.of__ctas .btn-quiet svg { color: #25d366; }

/* =====================================================================
   MOTION — entrance (when .of.is-in is set by offer.js) and gentle loops.
   Without JS the scene is simply shown as it is.
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .of.of--js .of__head > *,
  .of.of--js .of__rig,
  .of.of--js .of-node,
  .of.of--js .of__ctas { opacity: 0; }

  .of.is-in .of__head > * { animation: of-rise 0.9s var(--lp-expo) both; }
  .of.is-in .of__eyebrow { animation-delay: 0.05s; }
  .of.is-in .of__title { animation-delay: 0.15s; }
  .of.is-in .of__sub { animation-delay: 0.35s; }
  .of.is-in .of__rig { animation: of-rig-in 1.4s var(--lp-expo) 0.3s both; }
  .of.is-in .of-node { animation: of-node-in 0.7s var(--lp-expo) both; animation-delay: calc(0.7s + var(--i) * 0.06s); }
  .of.is-in .of__ctas { animation: of-rise 0.9s var(--lp-expo) 1.1s both; }

  .of.is-in .of-node__wire::after { animation: of-pulse 3.2s ease-in-out infinite; animation-delay: calc(1.6s + var(--i) * 0.27s); }
  .of.is-in .of-shine { animation: of-shine 6s ease-in-out 2s infinite; }
  .of.is-in .of__gift::after { animation: of-gift 4.5s ease-in-out 1.8s infinite; }
  .of.is-in .of-tab { animation: of-float-tab 7s ease-in-out 1.8s infinite; }
  .of.is-in .of-print__paper { animation: of-print 1.6s var(--lp-out) 1.2s both; }
  .of.is-in .of-term__toast { animation: of-toast 6s ease-in-out 2.4s infinite; }
  .of.is-in .of__live { animation: of-blink 1.6s ease-in-out infinite; }
  .of__orb--a { animation: of-drift 18s ease-in-out infinite alternate; }
  .of__orb--b { animation: of-drift 22s ease-in-out infinite alternate-reverse; }
}
@keyframes of-rise { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
/* uses translate/scale (not transform) so the pointer tilt on transform keeps working after it */
@keyframes of-rig-in {
  from { opacity: 0; translate: 0 80px; scale: 0.92; filter: blur(10px); }
  to { opacity: 1; translate: 0 0; scale: 1; filter: none; }
}
@keyframes of-node-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes of-pulse { 0% { opacity: 0; left: -20px; } 15% { opacity: 1; } 55% { opacity: 1; left: calc(100% - 4px); } 65%, 100% { opacity: 0; left: calc(100% - 4px); } }
@keyframes of-shine { 0%, 70% { background-position: 0 0, 150% 0; } 100% { background-position: 0 0, -60% 0; } }
@keyframes of-gift { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes of-float-tab { 0%, 100% { transform: rotate(8deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-10px); } }
@keyframes of-print { from { transform: translateY(70%); } to { transform: none; } }
@keyframes of-toast { 0%, 8% { opacity: 0; transform: translateY(-8px); } 14%, 70% { opacity: 1; transform: none; } 78%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes of-blink { 50% { opacity: 0.35; } }
@keyframes of-drift { to { transform: translate(60px, -40px) scale(1.1); } }

/* receipt: Arabic labels in the page font, numbers in mono */
.of-print { width: 30%; }
.of-print__paper { direction: rtl; font-family: inherit; font-size: 10.5px; gap: 4px; }
.of-print__paper b { font-family: Consolas, monospace; text-align: center; }
.of-print__row em, .of-print__tot em { font-weight: 700; }
.of-print__paper bdi { font-family: Consolas, monospace; font-weight: 800; direction: ltr; }
.of-print__free { color: #0f766e; font-weight: 900 !important; }
@media (max-width: 520px) {
  .of-print__paper { font-size: 8.5px; }
}
