/* Active Digit — homepage sections v20261008 (tech stack strip + services) */

/* ---------- Tech stack strip ---------- */
.stack { background: var(--white); border-block: 1px solid var(--gray-200); padding-block: 1.35rem; }
.stack__in { display: flex; align-items: center; gap: 2.25rem; }
.stack__label {
  flex: none; display: flex; flex-direction: column; gap: 0.15rem;
  padding-inline-end: 2.25rem; border-inline-end: 1px solid var(--gray-200);
}
.stack__kicker {
  font-family: var(--font-num); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime-dark);
}
.stack__label strong { font-size: 0.95rem; font-weight: 800; color: var(--navy); white-space: nowrap; }
.stack__viewport {
  flex: 1; min-width: 0; overflow: hidden; direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.stack__track {
  display: flex; width: max-content; margin: 0; padding: 0; list-style: none;
  animation: stackScroll 42s linear infinite;
}
.stack__viewport:hover .stack__track { animation-play-state: paused; }
.stack__track li {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-right: 3rem;
  white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--gray-700);
}
.stack__track svg { width: 22px; height: 22px; fill: currentColor; color: var(--gray-400); transition: color 0.25s ease; }
.stack__track li:hover svg { color: var(--c, var(--navy)); }
@keyframes stackScroll { to { transform: translateX(-50%); } }

@media (max-width: 760px) {
  .stack { padding-block: 1.1rem; }
  .stack__in { flex-direction: column; align-items: stretch; gap: 0.85rem; }
  .stack__label { flex-direction: row; align-items: baseline; gap: 0.6rem; padding: 0; border: 0; }
  .stack__track li { font-size: 14px; margin-right: 2.25rem; }
}

/* ---------- Services ---------- */
.svx-sec { background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%); }
.svx-head {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: end;
  gap: 1.25rem 4rem; margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.svx-head .h2 { margin: 0.75rem 0 0; text-wrap: balance; }
.svx-head__side .lead { margin: 0 0 1rem; }
.svx-head__link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 800; color: var(--navy); text-decoration: none;
  border-bottom: 2px solid var(--lime); padding-bottom: 2px;
  transition: gap 0.25s var(--ease);
}
.svx-head__link:hover { gap: 0.7rem; }

.svx { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.svx__card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,41,0.04), 0 14px 34px -20px rgba(15,23,41,0.22);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s ease;
}
.svx__media {
  position: relative; display: block; height: 228px; overflow: hidden;
  background: radial-gradient(110% 80% at 50% 105%, #17304F 0%, #0A1426 55%, #060D1C 100%);
}
.svx__media::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197,218,44,0.55), transparent);
}
.svx__media img {
  position: absolute; left: 50%; top: 50%;
  width: 250px; height: 250px; max-width: none;
  transform: translate(-50%, -47%);
  -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
  transition: transform 0.6s var(--ease);
}
.svx__num {
  position: absolute; top: 1rem; inset-inline-start: 1.15rem;
  font-family: var(--font-num); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; color: var(--lime);
}
.svx__tag {
  position: absolute; top: 0.8rem; inset-inline-end: 0.9rem; unicode-bidi: isolate;
  padding: 0.3rem 0.65rem; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.85); font-family: var(--font-num); font-size: 11px; font-weight: 600;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.svx__body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem 1.5rem 1.35rem; }
.svx__title { font-size: 1.375rem; font-weight: 800; line-height: 1.25; margin: 0 0 0.5rem; }
.svx__title a { color: var(--navy); text-decoration: none; }
.svx__desc { color: var(--gray-500); font-size: 0.9375rem; line-height: 1.7; margin: 0 0 1.1rem; }
.svx__pts { list-style: none; margin: 0 0 1.35rem; padding: 0; display: grid; gap: 0.6rem; }
.svx__pts li { position: relative; padding-inline-start: 1.65rem; font-size: 0.9rem; line-height: 1.5; color: var(--gray-700); }
.svx__pts li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 0.15em;
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--lime-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B3A6E' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(168,189,34,0.35);
}
.svx__foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1.1rem; border-top: 1px dashed var(--gray-200);
}
.svx__price small { display: block; font-size: 0.75rem; color: var(--gray-500); margin-bottom: 0.1rem; }
.svx__price strong { font-family: var(--font-num); font-size: 1.35rem; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.svx__btn {
  display: inline-flex; align-items: center; gap: 0.4rem; flex: none;
  padding: 0.65rem 1.05rem; border-radius: 12px;
  background: var(--navy); color: var(--white); font-weight: 800; font-size: 0.875rem; text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, gap 0.25s var(--ease);
}
.svx__btn:focus-visible, .svx-head__link:focus-visible, .svx__title a:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

@media (hover: hover) {
  .svx__card:hover {
    transform: translateY(-6px); border-color: rgba(197,218,44,0.65);
    box-shadow: 0 2px 4px rgba(15,23,41,0.05), 0 30px 60px -26px rgba(15,23,41,0.4);
  }
  .svx__card:hover .svx__media img { transform: translate(-50%, -50%) scale(1.07); }
  .svx__card:hover .svx__btn, .svx__btn:hover { background: var(--lime); color: var(--navy); gap: 0.65rem; }
}

[lang="ar"] .svx__title { font-weight: 700; }
[lang="ar"] .svx__desc, [lang="ar"] .svx__pts li { line-height: 1.85; }

@media (max-width: 1100px) and (min-width: 961px) {
  .svx__body { padding: 1.25rem; }
  .svx__btn { padding: 0.6rem 0.85rem; }
}

/* Tablet: one column, media beside the content */
@media (max-width: 960px) and (min-width: 600px) {
  .svx-head { grid-template-columns: 1fr; align-items: start; }
  .svx { grid-template-columns: 1fr; }
  .svx__card { flex-direction: row; }
  .svx__media { flex: 0 0 38%; height: auto; min-height: 260px; }
}

/* Phone: swipeable cards with a peek of the next one */
@media (max-width: 599px) {
  .svx-head { grid-template-columns: 1fr; gap: 0.75rem; }
  .svx {
    display: flex; gap: 0.85rem; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1); padding: 0.25rem var(--pad) 1rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .svx::-webkit-scrollbar { display: none; }
  .svx__card { flex: 0 0 84%; scroll-snap-align: center; }
  .svx__media { height: 190px; }
  .svx__media img { width: 210px; height: 210px; }
  .svx__body { padding: 1.2rem 1.15rem 1.1rem; }
  .svx__title { font-size: 1.2rem; }
}

/* ---------- Work: case studies ---------- */
.wk-sec { background: var(--gray-50); }
.wk-stage {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 70% at 50% 100%, rgba(197,218,44,0.16), transparent 70%),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(120% 90% at 50% 100%, #17304F 0%, #0A1426 60%, #060D1C 100%);
}
.wk__tag {
  align-self: flex-start; display: inline-block; padding: 0.3rem 0.7rem; border-radius: var(--r-pill);
  background: var(--navy-soft); color: var(--navy); font-size: 0.75rem; font-weight: 700;
}
.wk__desc { color: var(--gray-500); font-size: 0.95rem; line-height: 1.7; margin: 0 0 1rem; }
.wk__cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 800; color: var(--navy); border-bottom: 2px solid var(--lime); padding-bottom: 2px;
  transition: gap 0.25s var(--ease);
}
.wk__domain { font-family: var(--font-num); font-size: 0.8rem; font-weight: 600; color: var(--gray-500); unicode-bidi: isolate; }

.wk-feature {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin-bottom: 1.5rem; border-radius: 28px; overflow: hidden;
  background: var(--white); border: 1px solid var(--gray-200); color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(15,23,41,0.04), 0 18px 44px -24px rgba(15,23,41,0.25);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s ease;
}
.wk-feature__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.75rem, 3.5vw, 3rem); }
.wk-feature__title { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 900; line-height: 1.1; color: var(--navy); margin: 0.85rem 0 0.6rem; }
.wk__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.6rem; padding: 0; }
.wk__chips li {
  padding: 0.35rem 0.75rem; border-radius: var(--r-pill); border: 1px solid var(--gray-200);
  background: var(--gray-50); color: var(--gray-700); font-size: 0.8rem; font-weight: 600;
}
.wk-feature .wk__cta { align-self: flex-start; }
.wk-feature__stage { min-height: 430px; }
.wk-ph {
  position: absolute; bottom: -14%; width: 29%; max-width: 205px; height: auto; aspect-ratio: 420 / 933;
  object-fit: cover; object-position: top; border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 30px 60px -18px rgba(0,0,0,0.65);
  transition: transform 0.6s var(--ease);
}
.wk-ph--l { left: 12%; transform: rotate(-8deg); }
.wk-ph--r { right: 12%; transform: rotate(8deg); }
.wk-ph--c { left: 50%; bottom: -7%; z-index: 2; width: 33%; max-width: 232px; transform: translateX(-50%); }

.wk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
@media (min-width: 961px) { .wk-grid .wk-card__stage { height: 300px; } }
.wk-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--r-lg); color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(15,23,41,0.04), 0 14px 34px -20px rgba(15,23,41,0.22);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s ease;
}
.wk-card__stage { height: 250px; }
.wk-browser {
  position: absolute; top: 26px; inset-inline-end: 20px; width: 82%;
  border-radius: 10px; overflow: hidden; background: var(--white);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 24px 50px -20px rgba(0,0,0,0.6);
  transition: transform 0.6s var(--ease);
}
.wk-browser__bar { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; background: #EEF1F4; direction: ltr; }
.wk-browser__bar i { width: 7px; height: 7px; border-radius: 50%; background: #FF5F57; }
.wk-browser__bar i:nth-child(2) { background: #FEBC2E; }
.wk-browser__bar i:nth-child(3) { background: #28C840; }
.wk-browser__bar span {
  margin-left: 8px; padding: 0 7px; max-width: 62%; height: 13px; border-radius: 6px;
  background: var(--white); color: var(--gray-500); font-family: var(--font-num); font-size: 8.5px; line-height: 13px;
  white-space: nowrap; overflow: hidden;
}
.wk-browser img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.wk-card__phone {
  position: absolute; bottom: -22px; inset-inline-start: 18px; width: 27%; height: auto; aspect-ratio: 300 / 548;
  object-fit: cover; object-position: top; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 22px 40px -14px rgba(0,0,0,0.7);
  transition: transform 0.6s var(--ease);
}
.wk-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.35rem 1.4rem 1.25rem; }
.wk-card__title { font-size: 1.25rem; font-weight: 800; color: var(--navy); margin: 0.75rem 0 0.4rem; }
.wk-card__foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1rem; border-top: 1px dashed var(--gray-200);
}
.wk-more { text-align: center; margin-top: 2.5rem; }
.wk-feature:focus-visible, .wk-card:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }

@media (hover: hover) {
  .wk-feature:hover, .wk-card:hover {
    transform: translateY(-6px); border-color: rgba(197,218,44,0.65);
    box-shadow: 0 2px 4px rgba(15,23,41,0.05), 0 30px 60px -26px rgba(15,23,41,0.4);
  }
  .wk-feature:hover .wk-ph--c { transform: translateX(-50%) translateY(-12px); }
  .wk-feature:hover .wk-ph--l { transform: rotate(-11deg) translate(-6px, -6px); }
  .wk-feature:hover .wk-ph--r { transform: rotate(11deg) translate(6px, -6px); }
  .wk-card:hover .wk-browser { transform: translateY(-6px); }
  .wk-card:hover .wk-card__phone { transform: translateY(-14px); }
  .wk-feature:hover .wk__cta, .wk-card:hover .wk__cta { gap: 0.7rem; }
}

[lang="ar"] .wk-feature__title, [lang="ar"] .wk-card__title { font-weight: 700; }
[lang="ar"] .wk__desc { line-height: 1.85; }

@media (max-width: 960px) {
  .wk-feature { grid-template-columns: 1fr; }
  .wk-feature__stage { order: -1; min-height: 340px; }
  .wk-grid {
    display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1); padding: 0.25rem var(--pad) 1rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .wk-grid::-webkit-scrollbar { display: none; }
  .wk-card { flex: 0 0 46%; scroll-snap-align: center; }
}
@media (max-width: 599px) {
  .wk-feature__stage { min-height: 290px; }
  .wk-ph { width: 31%; border-radius: 16px; }
  .wk-ph--c { width: 36%; }
  .wk-ph--l { left: 6%; }
  .wk-ph--r { right: 6%; }
  .wk-card { flex-basis: 84%; }
  .wk-card__stage { height: 220px; }
}

/* ---------- Why us: dark editorial band ---------- */
.why2 {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(45% 60% at 88% 8%, rgba(197,218,44,0.13), transparent 70%),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(160deg, #0B1A33 0%, #0F2447 55%, #142C53 100%);
}
.why2__in { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.why2__intro .eyebrow { color: var(--lime); }
.why2__intro .eyebrow::before { background: var(--lime); }
.why2__intro .h2 { color: var(--white); margin: 0.85rem 0 1.75rem; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.1; text-wrap: balance; }
.why2__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.why2__item {
  padding: 1.6rem 1.5rem 1.5rem; border-radius: 20px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.45s var(--ease);
}
.why2__num {
  display: block; margin-bottom: 1rem;
  font-family: var(--font-num); font-size: 3rem; font-weight: 700; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(197,218,44,0.75);
  transition: color 0.35s ease;
}
.why2__item h3 { color: var(--white); font-size: 1.15rem; font-weight: 800; margin: 0 0 0.45rem; }
.why2__item p { color: rgba(255,255,255,0.68); font-size: 0.92rem; line-height: 1.7; margin: 0; }
@media (hover: hover) {
  .why2__item:hover { background: rgba(255,255,255,0.07); border-color: rgba(197,218,44,0.45); transform: translateY(-4px); }
  .why2__item:hover .why2__num { color: rgba(197,218,44,0.18); }
}
[lang="ar"] .why2__item h3 { font-weight: 700; }
[lang="ar"] .why2__item p { line-height: 1.85; }
@media (max-width: 960px) { .why2__in { grid-template-columns: 1fr; } }
@media (max-width: 599px) {
  .why2__grid { grid-template-columns: 1fr; }
  .why2__item { padding: 1.3rem 1.2rem; }
  .why2__num { font-size: 2.4rem; margin-bottom: 0.75rem; }
}

/* ---------- Testimonials ---------- */
.tst-sec { background: var(--gray-50); }
.tst { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; padding-top: 0.75rem; }
.tst__card {
  position: relative; margin: 0; display: flex; flex-direction: column;
  padding: 2rem 1.75rem 1.5rem; border-radius: var(--r-lg);
  background: var(--white); border: 1px solid var(--gray-200);
  box-shadow: 0 1px 2px rgba(15,23,41,0.04), 0 14px 34px -22px rgba(15,23,41,0.2);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.tst__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.tst__stars { color: var(--lime-dark); font-size: 0.95rem; letter-spacing: 2px; }
.tst__q { width: 38px; height: 38px; color: var(--lime); }
[dir="rtl"] .tst__q { transform: scaleX(-1); }
.tst__quote { flex: 1; margin: 0 0 1.75rem; font-size: 1.05rem; font-weight: 500; line-height: 1.8; color: var(--gray-900); }
.tst__author { display: flex; align-items: center; gap: 0.85rem; padding-top: 1.25rem; border-top: 1px solid var(--gray-200); }
.tst__avatar {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--font-num); font-size: 0.95rem; font-weight: 700; color: var(--navy);
  background: linear-gradient(135deg, #E6F07A, var(--lime));
}
.tst__author strong { display: block; color: var(--navy); font-weight: 800; }
.tst__author small { color: var(--gray-500); font-size: 0.8125rem; }
.tst__card--feature {
  background: linear-gradient(160deg, #0F2447 0%, #1B3A6E 100%); border-color: transparent;
  box-shadow: 0 30px 60px -28px rgba(15,23,41,0.55);
}
.tst__card--feature .tst__stars { color: var(--lime); }
.tst__card--feature .tst__quote { color: rgba(255,255,255,0.92); }
.tst__card--feature .tst__author { border-top-color: rgba(255,255,255,0.14); }
.tst__card--feature .tst__author strong { color: var(--white); }
.tst__card--feature .tst__author small { color: rgba(255,255,255,0.6); }
.tst__card--feature .tst__avatar { background: rgba(255,255,255,0.1); color: var(--lime); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); }
@media (min-width: 961px) { .tst__card--feature { transform: translateY(-12px); } }
@media (hover: hover) and (min-width: 961px) {
  .tst__card:hover { transform: translateY(-6px); box-shadow: 0 2px 4px rgba(15,23,41,0.05), 0 30px 60px -26px rgba(15,23,41,0.35); }
  .tst__card--feature:hover { transform: translateY(-18px); }
}
@media (max-width: 960px) {
  .tst {
    display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1); padding: 0.25rem var(--pad) 1rem;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .tst::-webkit-scrollbar { display: none; }
  .tst__card { flex: 0 0 46%; scroll-snap-align: center; }
}
@media (max-width: 599px) {
  .tst__card { flex-basis: 86%; padding: 1.5rem 1.3rem 1.25rem; }
  .tst__quote { font-size: 0.98rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stack__track { animation: none; }
  .why2__item, .why2__num, .tst__card { transition: none; }
  .svx__card, .svx__media img, .svx__btn,
  .wk-feature, .wk-card, .wk-ph, .wk-browser, .wk-card__phone { transition: none; }
}
