/* ============================================================
   Fonts
   ============================================================ */
@font-face {
  font-family: "ExpoArabic";
  src: url("../fonts/ExpoArabic/ExpoArabic-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ExpoArabic";
  src: url("../fonts/ExpoArabic/alfont_com_AlFont_com_ExpoArabic-Book.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ExpoArabic";
  src: url("../fonts/ExpoArabic/ExpoArabic-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ExpoArabic";
  src: url("../fonts/ExpoArabic/ExpoArabic-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   Tokens
   ============================================================ */
:root {
  --font-family-base:
    "ExpoArabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --color-primary: #4568cc;
  --color-secondary: #71c182;
  --color-secondary-dimmed: #1a5450;
  --color-accent: #9edcd1;
  --color-background: #0f1828;
  --color-background-elevated: #182238;
  --color-foreground: #efe9df;
  --color-muted: #9aa3b2;
  --color-border: rgba(158, 220, 209, 0.12);
  --color-border-strong: rgba(158, 220, 209, 0.22);

  --gradient-aurora:
    radial-gradient(
      1200px 600px at 85% -10%,
      rgba(69, 104, 204, 0.22),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 0% 30%,
      rgba(113, 193, 130, 0.14),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 50% 110%,
      rgba(158, 220, 209, 0.12),
      transparent 60%
    );
  --gradient-section: linear-gradient(
    180deg,
    transparent,
    rgba(26, 84, 80, 0.12),
    transparent
  );
  --gradient-cta: linear-gradient(
    135deg,
    #1a5450 0%,
    #2c6c63 50%,
    #3b8a73 100%
  );

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 18px 48px rgba(0, 0, 0, 0.35);

  --container-max: 1200px;
  --section-padding-y: clamp(60px, 8vw, 110px);
  --section-padding-x: clamp(16px, 4vw, 40px);
}

/* ============================================================
   Reset / Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-base);
  background-color: var(--color-background);
  color: var(--color-foreground);
  direction: rtl;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  background-image: var(--gradient-aurora);
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: clip;
}
html {
  overflow-x: clip;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
}
p {
  margin: 0;
}

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}
.section {
  padding-block: var(--section-padding-y);
  position: relative;
  scroll-margin-top: 96px;
}
/* Visual separation between stacked sections */
.section + .section {
  border-top: 1px solid var(--color-border);
}
/* Alternate subtle elevated background for rhythm */
.section:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.015);
}
.section:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.18);
}
/* Sections that already define their own gradient keep it on top */
.about,
.journey {
  background-image: var(--gradient-section);
}
.section-title {
  text-align: center;
  font-size: clamp(28px, 3.4vw, 44px);
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  font-size: 1rem;
  margin-bottom: 4px;
}
.section-title-underline {
  width: 64px;
  height: 4px;
  background: var(--color-secondary);
  border-radius: var(--radius-pill);
  margin: 12px auto 48px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 500;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--color-secondary);
  color: #0b2a14;
  box-shadow: 0 8px 24px rgba(113, 193, 130, 0.28);
}
.btn-primary:hover {
  background: #82cd92;
  box-shadow: 0 12px 32px rgba(113, 193, 130, 0.4);
}
.btn-outline {
  background: transparent;
  color: var(--color-foreground);
  border: 1px solid var(--color-border-strong);
}
.btn-outline:hover {
  border-color: var(--color-accent);
  background: rgba(158, 220, 209, 0.06);
}
.btn .arrow {
  width: 18px;
  height: 18px;
}

.whatsapp-fab {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #128c4a 100%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.whatsapp-fab:hover {
  transform: translateY(-3px) scale(1.03);
  filter: saturate(1.05);
}

.whatsapp-fab:focus-visible {
  outline: 3px solid rgba(239, 233, 223, 0.9);
  outline-offset: 4px;
}

.whatsapp-fab img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

@media (max-width: 640px) {
  .whatsapp-fab {
    width: 60px;
    height: 60px;
  }

  .whatsapp-fab img {
    width: 26px;
    height: 26px;
  }
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  padding-inline: var(--section-padding-x);
}
.site-header .nav {
  max-width: var(--container-max);
  margin: 0 auto;
  background: rgba(15, 24, 40, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 10px 18px 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.brand {
  display: inline-flex;
  align-items: center;
}
.brand-logo {
  height: 40px;
  width: auto;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 32px);
  position: relative;
}
.nav-link {
  position: relative;
  font-size: 0.98rem;
  color: var(--color-foreground);
  padding: 6px 4px;
  transition: color 0.35s ease;
}
.nav-link:hover {
  color: var(--color-accent);
}
.nav-link.is-active {
  color: var(--color-secondary);
}
.nav-indicator {
  position: absolute;
  bottom: -17px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--color-secondary);
  border-radius: 2px;
  transform: translateX(0);
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
  pointer-events: none;
  opacity: 0;
}
.nav-indicator.is-ready {
  opacity: 1;
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  color: var(--color-foreground);
}
.nav-toggle .bar,
.nav-toggle .bar::before,
.nav-toggle .bar::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    top 0.25s ease,
    opacity 0.2s ease;
}
.nav-toggle .bar {
  position: relative;
}
.nav-toggle .bar::before,
.nav-toggle .bar::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
}
.nav-toggle .bar::before {
  top: -6px;
}
.nav-toggle .bar::after {
  top: 6px;
}
.site-header.is-open .nav-toggle .bar {
  background: transparent;
}
.site-header.is-open .nav-toggle .bar::before {
  top: 0;
  transform: rotate(45deg);
}
.site-header.is-open .nav-toggle .bar::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: clamp(560px, 92vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: -72px;
  padding-top: 120px;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      760px 420px at 78% 44%,
      rgba(113, 193, 130, 0.13),
      transparent 70%
    ),
    radial-gradient(
      920px 520px at 0% 68%,
      rgba(69, 104, 204, 0.18),
      transparent 66%
    ),
    linear-gradient(180deg, #07101d 0%, var(--color-background) 100%);
  z-index: -3;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 24, 40, 0.04), rgba(15, 24, 40, 0.88)),
    linear-gradient(180deg, transparent 62%, var(--color-background));
}
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  opacity: 0.78;
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0%,
    rgba(0, 0, 0, 0.72) 30%,
    rgba(0, 0, 0, 0.22) 49%,
    transparent 64%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    #000 0%,
    rgba(0, 0, 0, 0.72) 30%,
    rgba(0, 0, 0, 0.22) 49%,
    transparent 64%,
    transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(15, 24, 40, 0.08) 28%,
    rgba(15, 24, 40, 0.52) 47%,
    rgba(15, 24, 40, 0.9) 66%,
    transparent 100%
  );
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero-content {
  max-width: 600px;
}
.hero-title {
  font-size: clamp(36px, 5.6vw, 68px);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 24px;
}
.hero-title .accent {
  color: var(--color-secondary);
  display: block;
}
.hero-desc {
  color: #d6d2c8;
  font-size: clamp(15px, 1.4vw, 18px);
  margin-bottom: 36px;
  max-width: 520px;
}

/* ============================================================
   About
   ============================================================ */
.about-text {
  max-width: 920px;
  margin-inline: auto;
  text-align: center;
}
.about-text .eyebrow {
  display: inline-block;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  margin-bottom: 12px;
}
.about-text .underline {
  width: 56px;
  height: 3px;
  background: var(--color-secondary);
  margin: 0 auto 24px;
  border-radius: var(--radius-pill);
}
.about-text p {
  color: #cfd3da;
  font-size: 1.05rem;
  margin-bottom: 0;
  line-height: 1.95;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: clamp(36px, 5vw, 60px);
}
.about-card {
  background: linear-gradient(
    180deg,
    rgba(24, 34, 56, 0.6),
    rgba(15, 24, 40, 0.6)
  );
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px clamp(20px, 2.2vw, 30px);
  text-align: center;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}
.about-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-secondary);
}
.about-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
}
.about-card-icon img {
  width: 100%;
  height: 100%;
}
.about-card h3 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}
.about-card p {
  color: var(--color-muted);
  font-size: 0.98rem;
  line-height: 1.85;
  margin: 0;
}

/* ============================================================
   Why Us
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.why-card {
  text-align: center;
  padding: 24px clamp(16px, 2vw, 28px);
  border-inline-start: 1px solid var(--color-border);
}
.why-card:first-child {
  border-inline-start: none;
}
.why-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
}
.why-icon img {
  width: 100%;
  height: 100%;
}
.why-card h3 {
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.why-card p {
  color: var(--color-muted);
  font-size: 0.98rem;
  line-height: 1.85;
}

/* ============================================================
   Services
   ============================================================ */
.services-group-title {
  text-align: center;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 24px;
}
.services-grid + .services-group-title {
  margin-top: 56px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
/* Flex variant centers an incomplete last row (e.g. 5 cards in 3 columns). */
.services-grid--center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.services-grid--center > .service-card {
  flex: 0 1 calc((100% - 40px) / 3);
}
@media (max-width: 1024px) {
  .services-grid--center > .service-card {
    flex-basis: calc((100% - 20px) / 2);
  }
}
@media (max-width: 480px) {
  .services-grid--center > .service-card {
    flex-basis: 100%;
  }
}
.service-card {
  background: linear-gradient(
    180deg,
    rgba(24, 34, 56, 0.6),
    rgba(15, 24, 40, 0.6)
  );
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  min-height: 200px;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}
.service-icon {
  width: 52px;
  height: 52px;
  color: var(--color-primary);
}
.service-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-foreground);
}
.service-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   Works
   ============================================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.work-card {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  min-height: 0;
  align-self: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-background-elevated);
  transition: transform 0.3s ease;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  display: block;
  text-align: start;
  -webkit-appearance: none;
  appearance: none;
}
.work-card:hover {
  transform: translateY(-4px);
}
.work-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.work-card:hover img {
  transform: scale(1.05);
}
.work-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15, 24, 40, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  transition:
    transform 0.3s ease,
    background 0.3s ease;
  z-index: 2;
  pointer-events: none;
}
.work-card:hover .work-play,
.work-card:focus-visible .work-play {
  background: var(--color-accent, #e11d48);
  transform: translate(-50%, -50%) scale(1.08);
}
.work-play img {
  width: 28px;
  height: 28px;
  margin-inline-start: 4px;
}
.work-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(
    180deg,
    rgba(15, 24, 40, 0) 40%,
    rgba(15, 24, 40, 0.92) 100%
  );
  color: var(--color-foreground);
}
.work-card-overlay .eyebrow {
  font-size: 0.75rem;
  color: var(--color-accent);
  margin-bottom: 6px;
}
.work-card-overlay h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.work-card-overlay span {
  font-size: 0.85rem;
  color: var(--color-muted);
}
.works-actions {
  text-align: center;
}

/* ============================================================
   Clients (slider)
   ============================================================ */
.clients-slider {
  --clients-per-view: 5;
  --clients-gap: 20px;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.clients-viewport {
  overflow: hidden;
  width: 100%;
}
.clients-track {
  display: flex;
  gap: var(--clients-gap);
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.clients-track > .client-card {
  flex: 0 0
    calc(
      (100% - (var(--clients-per-view) - 1) * var(--clients-gap)) /
        var(--clients-per-view)
    );
}
.client-card {
  background: var(--color-background-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 22px;
}
.client-card img {
  max-width: 80%;
  max-height: 70%;
  object-fit: contain;
}

.slider-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-foreground, #fff);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
  flex-shrink: 0;
}
.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}
.slider-arrow:active {
  transform: scale(0.94);
}
.slider-arrow:focus-visible {
  outline: 2px solid var(--color-accent, #4568cc);
  outline-offset: 2px;
}
.slider-arrow img {
  width: 20px;
  height: 20px;
}
/* Mirror chevrons in RTL so visual direction matches "prev/next" */
[dir="rtl"] .slider-arrow img {
  transform: scaleX(-1);
}

.slider-dots {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    width 0.3s ease;
}
.slider-dot:hover {
  background: rgba(255, 255, 255, 0.45);
}
.slider-dot.is-active {
  background: var(--color-primary, #4568cc);
  width: 26px;
  border-radius: 999px;
}
.slider-dot:focus-visible {
  outline: 2px solid var(--color-primary, #4568cc);
  outline-offset: 2px;
}

/* On small screens, dots become noisy when there are many slides.
   Hide them and rely on the arrows + swipe for navigation. */
@media (max-width: 640px) {
  .clients .slider-dots {
    display: none;
  }
}

/* ============================================================
   Stats
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.stat-card {
  background: linear-gradient(
    180deg,
    rgba(24, 34, 56, 0.6),
    rgba(15, 24, 40, 0.6)
  );
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-strong);
  background: linear-gradient(
    180deg,
    rgba(24, 34, 56, 0.78),
    rgba(15, 24, 40, 0.78)
  );
}
.stat-number {
  /* Latin digits + grouping read predictably; keep LTR so the
     "+" suffix sits after the number even on this RTL page. */
  direction: ltr;
  font-weight: 700;
  line-height: 1;
  font-size: clamp(34px, 4.4vw, 54px);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  background: linear-gradient(
    135deg,
    var(--color-secondary) 0%,
    var(--color-accent) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  color: var(--color-muted);
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Journey
   ============================================================ */
.journey-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}
.journey-track::before {
  content: "";
  position: absolute;
  top: 24px;
  /* JS sets --journey-rail-start / --journey-rail-end in px so
     the rail terminates exactly at the first/last circle
     centers. Falls back to a 10% inset before JS runs. */
  inset-inline-start: var(--journey-rail-start, 10%);
  inset-inline-end: var(--journey-rail-end, 10%);
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--color-secondary) 0%,
    var(--color-accent) 100%
  );
  opacity: 0.55;
  z-index: 0;
}
.journey-step {
  text-align: center;
  position: relative;
  z-index: 1;
  padding-inline: 8px;
}
.journey-num {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-background-elevated);
  border: 2px solid var(--color-secondary);
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  /* Latin digits render more predictably for centering than
     locale-default digits inside a fixed circle. */
  font-feature-settings: "tnum" 1;
  direction: ltr;
}
.journey-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 14px;
  color: var(--color-foreground);
}
.journey-step h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.journey-step p {
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ============================================================
   Contact CTA
   ============================================================ */
.contact-card {
  position: relative;
  background: var(--gradient-cta);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}
.contact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px 300px at 80% -20%,
    rgba(158, 220, 209, 0.25),
    transparent 60%
  );
  pointer-events: none;
}
.contact-info,
.contact-cta-side {
  position: relative;
  z-index: 1;
}
.contact-info h3 {
  font-size: clamp(20px, 2vw, 26px);
  margin-bottom: 24px;
}
.contact-socials {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}
.contact-socials a {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(15, 24, 40, 0.55);
  display: grid;
  place-items: center;
  color: var(--color-foreground);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.contact-socials a:hover {
  background: rgba(15, 24, 40, 0.85);
  transform: translateY(-2px);
}
.contact-socials img {
  width: 18px;
  height: 18px;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.98rem;
}
.contact-list img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.contact-list img[src*="whatsapp"] {
  filter: brightness(0) invert(1) sepia(1) brightness(0.94);
}
.contact-list a {
  color: inherit;
  text-decoration: none;
}
.contact-list a:hover {
  text-decoration: underline;
}
.footer-handle {
  font-size: 0.95rem;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.contact-cta-side h3 {
  font-size: clamp(24px, 2.6vw, 36px);
  margin-bottom: 16px;
}
.contact-cta-side p {
  color: rgba(239, 233, 223, 0.85);
  margin-bottom: 24px;
  max-width: 380px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding-block: 64px 24px;
  border-top: 1px solid var(--color-border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand .brand-logo {
  height: 56px;
  margin-bottom: 16px;
}
.footer-brand p {
  color: var(--color-muted);
  max-width: 320px;
  font-size: 0.95rem;
}
.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  color: var(--color-foreground);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}
.footer-socials a:hover {
  background: rgba(113, 193, 130, 0.12);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  transform: translateY(-2px);
}
.footer-socials img {
  width: 16px;
  height: 16px;
}
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 18px;
  color: var(--color-foreground);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: var(--color-muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: var(--color-secondary);
}
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.88rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-card {
    border-inline-start: none;
    border-top: 1px solid var(--color-border);
    padding-block: 32px;
  }
  .why-card:first-child,
  .why-card:nth-child(2) {
    border-top: none;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .work-card {
    aspect-ratio: 16 / 9;
  }
  .clients-slider {
    --clients-per-view: 3;
  }
  .journey-track {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px 12px;
  }
  .journey-track::before {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-list {
    position: absolute;
    top: calc(100% + 12px);
    inset-inline-end: 0;
    inset-inline-start: 0;
    flex-direction: column;
    background: rgba(15, 24, 40, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    gap: 14px;
    box-shadow: var(--shadow-elevated);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }
  .site-header.is-open .nav-list {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-indicator {
    display: none;
  }
  .nav-link.is-active::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -4px;
    height: 2px;
    background: var(--color-secondary);
    border-radius: 2px;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .site-header .nav {
    padding: 10px 14px;
  }
  .about-cards {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .works-grid {
    grid-template-columns: 1fr;
  }
  .work-card {
    aspect-ratio: 16 / 9;
  }
  .work-play {
    width: 56px;
    height: 56px;
  }
  .work-play img {
    width: 24px;
    height: 24px;
  }
  .clients-slider {
    --clients-per-view: 2;
    --clients-gap: 14px;
  }
  .journey-track {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .contact-socials,
  .contact-list li {
    justify-content: center;
  }
  .footer-socials {
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-brand p {
    margin-inline: auto;
  }
  .hero-media {
    width: 100%;
    /* overlay */
    opacity: 0.55;
  }
  .hero-media img {
    object-position: center;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero-media::after {
    background: linear-gradient(
      180deg,
      rgba(15, 24, 40, 0.78) 0%,
      rgba(15, 24, 40, 0.9) 100%
    );
  }
  .hero-content {
    margin-inline-start: 0;
    max-width: 100%;
    text-align: center;
  }
  .hero-desc {
    margin-inline: auto;
  }
  .hero .btn {
    margin-inline: auto;
  }
}

@media (max-width: 768px) {
  /* Why Us: single column on mobile */
  .why-grid {
    grid-template-columns: 1fr;
  }
  .why-card {
    border-inline-start: none;
    border-top: 1px solid var(--color-border);
    padding-block: 28px;
  }
  .why-card:first-child {
    border-top: none;
  }
  .why-card:nth-child(2) {
    border-top: 1px solid var(--color-border);
  }

  /* Clients: 3-column grid of cards on mobile (same card container as desktop) */
  .clients-slider {
    display: block;
  }
  .clients .slider-arrow,
  .clients .slider-dots {
    display: none;
  }
  .clients-viewport {
    overflow: visible;
    width: 100%;
    padding: 1rem;
  }
  .clients-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
    gap: 12px;
    width: 97%;
    transform: none !important;
    transition: none;
  }
  .clients-track > .client-card {
    flex: initial;
    width: auto;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    padding: 12px;
  }
  .clients-track > .client-card--wide {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
  }

  /* Journey: number, icon and title in one row on mobile;
     paragraph indents under the icon so the number column reads
     as a vertical timeline rail. */
  .journey-track {
    grid-template-columns: 1fr;
    gap: 28px;
    /* The vertical rail sits centered on the num circle. With
       .journey-step padding-inline of 8px and a 50px num, the
       circle center is at 8 + 25 = 33px from the start edge. */
    --journey-rail-offset: 33px;
    /* Default rail bounds; JS overrides these on layout/scroll
       so the rail starts at the first circle center and ends at
       the last circle center. */
    --journey-rail-top: 25px;
    --journey-rail-bottom: 25px;
  }
  /* Mobile vertical static rail. */
  .journey-track::before {
    display: block;
    top: var(--journey-rail-top);
    bottom: var(--journey-rail-bottom);
    inset-inline: auto;
    inset-inline-start: var(--journey-rail-offset);
    width: 2px;
    height: auto;
    background: var(--color-secondary);
    opacity: 0.18;
  }
  /* Mobile vertical animated rail driven by --journey-progress. */
  .journey-track::after {
    content: "";
    position: absolute;
    top: var(--journey-rail-top);
    bottom: var(--journey-rail-bottom);
    inset-inline: auto;
    inset-inline-start: var(--journey-rail-offset);
    width: 2px;
    height: auto;
    background: linear-gradient(
      180deg,
      var(--color-secondary) 0%,
      var(--color-accent) 100%
    );
    box-shadow: 0 0 12px rgba(69, 104, 204, 0.45);
    transform: scaleY(var(--journey-progress, 0));
    transform-origin: top center;
    transition: transform 180ms linear;
    z-index: 0;
    pointer-events: none;
  }

  .journey-step {
    text-align: start;
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "num  icon  title"
      ".    desc  desc";
    column-gap: 12px;
    row-gap: 8px;
    align-items: center;
  }
  .journey-num {
    grid-area: num;
    margin: 0;
    /* Lift the circle above the rail so the line tucks behind it. */
    position: relative;
    z-index: 1;
  }
  .journey-icon {
    grid-area: icon;
    margin: 0;
    width: 26px;
    height: 26px;
  }
  .journey-step h3 {
    grid-area: title;
    margin: 0;
  }
  .journey-step p {
    grid-area: desc;
    margin-top: 0.7rem;
  }
}

@media (max-width: 480px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .slider-arrow {
    width: 38px;
    height: 38px;
  }
  .journey-track {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Video Modal
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.video-modal.is-open {
  display: flex;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.82);
  backdrop-filter: blur(6px);
  cursor: pointer;
  animation: videoFadeIn 0.2s ease;
}
.video-modal-dialog {
  position: relative;
  width: min(1100px, 100%);
  animation: videoZoomIn 0.25s ease;
}
.video-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.video-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal-close {
  position: absolute;
  top: -48px;
  inset-inline-end: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.video-modal-close:hover {
  background: var(--color-accent, #e11d48);
  transform: rotate(90deg);
}
.video-modal-close img {
  width: 20px;
  height: 20px;
}
body.video-modal-open {
  overflow: hidden;
}
@keyframes videoFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes videoZoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (max-width: 640px) {
  .video-modal {
    padding: 16px;
  }
  .video-modal-close {
    top: -44px;
  }
}

/* ============================================================
   Entrance animations
   ============================================================
   Strategy:
   - HTML gets a `js` class before paint so initial-hidden styles only
     apply when JS is present (no flash for non-JS users).
   - `[data-reveal]` elements start hidden + transformed and settle
     when `.is-visible` is added by an IntersectionObserver in JS.
   - Variants: up (default), down, left, right, fade, scale, blur.
     In RTL, `left` / `right` are mirrored so motion always feels
     like it's coming from the inline-start / inline-end edge.
   - Stagger: parents marked with `data-stagger` cascade
     `--reveal-delay` onto child reveals.
   - Hero plays a load-time entrance independent of scroll.
   - `prefers-reduced-motion` disables transforms / transitions
     while keeping content visible.
   ============================================================ */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-duration: 900ms;
  --reveal-distance: 28px;
}

/* Initial hidden state (only when JS is enabled) */
html.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, var(--reveal-distance), 0);
  transition:
    opacity var(--reveal-duration) var(--ease-out-expo),
    transform var(--reveal-duration) var(--ease-out-expo),
    filter var(--reveal-duration) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
html.js [data-reveal="down"] {
  transform: translate3d(0, calc(var(--reveal-distance) * -1), 0);
}
/* Inline-start / inline-end aware (RTL-safe).
   `left` = comes from the inline-start edge, `right` = inline-end. */
html.js [data-reveal="left"] {
  transform: translate3d(calc(var(--reveal-distance) * -1), 0, 0);
}
html.js [data-reveal="right"] {
  transform: translate3d(var(--reveal-distance), 0, 0);
}
[dir="rtl"] html.js [data-reveal="left"],
html[dir="rtl"].js [data-reveal="left"] {
  transform: translate3d(var(--reveal-distance), 0, 0);
}
[dir="rtl"] html.js [data-reveal="right"],
html[dir="rtl"].js [data-reveal="right"] {
  transform: translate3d(calc(var(--reveal-distance) * -1), 0, 0);
}
html.js [data-reveal="fade"] {
  transform: none;
}
html.js [data-reveal="scale"] {
  transform: translate3d(0, 12px, 0) scale(0.96);
}
html.js [data-reveal="blur"] {
  transform: translate3d(0, 16px, 0);
  filter: blur(10px);
}

/* Settled state */
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Stagger: assign incremental delays to direct reveal children.
   Up to 16 items — covers the largest grids on the page. */
html.js [data-stagger] > [data-reveal] {
  --reveal-delay: calc(var(--stagger-step, 80ms) * var(--i, 0));
}
html.js [data-stagger] > [data-reveal]:nth-child(1) {
  --i: 0;
}
html.js [data-stagger] > [data-reveal]:nth-child(2) {
  --i: 1;
}
html.js [data-stagger] > [data-reveal]:nth-child(3) {
  --i: 2;
}
html.js [data-stagger] > [data-reveal]:nth-child(4) {
  --i: 3;
}
html.js [data-stagger] > [data-reveal]:nth-child(5) {
  --i: 4;
}
html.js [data-stagger] > [data-reveal]:nth-child(6) {
  --i: 5;
}
html.js [data-stagger] > [data-reveal]:nth-child(7) {
  --i: 6;
}
html.js [data-stagger] > [data-reveal]:nth-child(8) {
  --i: 7;
}
html.js [data-stagger] > [data-reveal]:nth-child(9) {
  --i: 8;
}
html.js [data-stagger] > [data-reveal]:nth-child(10) {
  --i: 9;
}
html.js [data-stagger] > [data-reveal]:nth-child(11) {
  --i: 10;
}
html.js [data-stagger] > [data-reveal]:nth-child(12) {
  --i: 11;
}
html.js [data-stagger] > [data-reveal]:nth-child(13) {
  --i: 12;
}
html.js [data-stagger] > [data-reveal]:nth-child(14) {
  --i: 13;
}
html.js [data-stagger] > [data-reveal]:nth-child(15) {
  --i: 14;
}
html.js [data-stagger] > [data-reveal]:nth-child(16) {
  --i: 15;
}

/* ---------- Header drop-in (load) ---------- */
html.js .site-header {
  opacity: 0;
  transform: translate3d(0, -18px, 0);
  transition:
    opacity 700ms var(--ease-out-expo),
    transform 700ms var(--ease-out-expo);
}
html.js.is-loaded .site-header {
  opacity: 1;
  transform: none;
}

/* ---------- Hero load-in (independent of scroll) ---------- */
html.js .hero-bg,
html.js .hero-media {
  opacity: 0;
  transition:
    opacity 1200ms var(--ease-out-expo),
    transform 1400ms var(--ease-out-expo);
}
html.js .hero-media {
  transform: scale(1.06);
}
html.js.is-loaded .hero-bg {
  opacity: 1;
}
html.js.is-loaded .hero-media {
  opacity: 1;
  transform: none;
}

html.js .hero-content > * {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 900ms var(--ease-out-expo),
    transform 900ms var(--ease-out-expo);
}
html.js .hero-content > *:nth-child(1) {
  transition-delay: 250ms;
}
html.js .hero-content > *:nth-child(2) {
  transition-delay: 400ms;
}
html.js .hero-content > *:nth-child(3) {
  transition-delay: 550ms;
}
html.js .hero-content > *:nth-child(4) {
  transition-delay: 700ms;
}

html.js .hero-title > span {
  display: block;
  opacity: 0;
  transform: translate3d(0, 100%, 0);
  transition:
    opacity 900ms var(--ease-out-expo),
    transform 1000ms var(--ease-out-expo);
}
html.js .hero-title {
  overflow: hidden;
  padding-block: 0.05em;
}
html.js .hero-title > span:nth-child(1) {
  transition-delay: 300ms;
}
html.js .hero-title > span:nth-child(2) {
  transition-delay: 480ms;
}

html.js.is-loaded .hero-content > *,
html.js.is-loaded .hero-title > span {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion: keep content visible, drop motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal],
  html.js .hero-content > *,
  html.js .hero-title > span,
  html.js .hero-bg,
  html.js .hero-media,
  html.js .site-header {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
html.reduce-motion [data-reveal],
html.reduce-motion .hero-content > *,
html.reduce-motion .hero-title > span,
html.reduce-motion .hero-bg,
html.reduce-motion .hero-media,
html.reduce-motion .site-header {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

/* ============================================================
   Enhanced section motion — Services & Journey
   Layered entrance: card lifts with a soft blur+scale, then the
   icon pops, then text settles. The journey timeline gets a
   scroll-tied gradient line that draws from start to end.
   ============================================================ */

/* ---------- Services: richer card reveal + icon pop ---------- */
html.js .services-grid {
  --stagger-step: 110ms;
}
html.js .services-grid > .service-card[data-reveal] {
  --reveal-duration: 1100ms;
  transform: translate3d(0, 36px, 0) scale(0.94);
  filter: blur(8px);
}
html.js .services-grid > .service-card[data-reveal].is-visible {
  transform: none;
  filter: none;
}
html.js .services-grid > .service-card .service-icon {
  opacity: 0;
  transform: scale(0.5) rotate(-10deg);
  transition:
    opacity 700ms var(--ease-out-expo),
    transform 750ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--reveal-delay, 0ms) + 260ms);
  will-change: transform, opacity;
}
html.js .services-grid > .service-card.is-visible .service-icon {
  opacity: 1;
  transform: none;
}
html.js .services-grid > .service-card h3,
html.js .services-grid > .service-card p {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 700ms var(--ease-out-expo),
    transform 700ms var(--ease-out-expo);
}
html.js .services-grid > .service-card h3 {
  transition-delay: calc(var(--reveal-delay, 0ms) + 380ms);
}
html.js .services-grid > .service-card p {
  transition-delay: calc(var(--reveal-delay, 0ms) + 480ms);
}
html.js .services-grid > .service-card.is-visible h3,
html.js .services-grid > .service-card.is-visible p {
  opacity: 1;
  transform: none;
}

/* ---------- Journey: layered step reveal + drawing line ---------- */
html.js .journey-track {
  --stagger-step: 150ms;
}

/* Scroll-tied gradient line drawn over the static track.
   --journey-progress is a 0..1 value set by JS as the section
   scrolls through the viewport. Desktop-only: on mobile the
   timeline switches to a vertical rail (see mobile media query). */
.journey-track {
  --journey-progress: 0;
}
@media (min-width: 769px) {
  .journey-track::before {
    /* Soften the static track so the drawing line stands out. */
    opacity: 0.18;
  }
  .journey-track::after {
    content: "";
    position: absolute;
    top: 24px;
    inset-inline-start: var(--journey-rail-start, 10%);
    inset-inline-end: var(--journey-rail-end, 10%);
    height: 2px;
    background: linear-gradient(
      90deg,
      var(--color-secondary) 0%,
      var(--color-accent) 100%
    );
    box-shadow: 0 0 12px rgba(69, 104, 204, 0.45);
    transform: scaleX(var(--journey-progress, 0));
    /* Page is dir=rtl, so the rail's start edge is the visual
       right; growing from there extends leftward as progress
       increases. */
    transform-origin: right center;
    transition: transform 180ms linear;
    z-index: 0;
    pointer-events: none;
  }
}
/* Note on RTL: `inset-inline-start` already anchors to the
   visual right edge in RTL, and `width` extends along the
   writing direction — so the line naturally draws from right
   to left without an explicit override. */

html.js .journey-track > .journey-step[data-reveal] {
  --reveal-duration: 1000ms;
  transform: translate3d(0, 32px, 0) scale(0.96);
  filter: blur(6px);
}
html.js .journey-track > .journey-step[data-reveal].is-visible {
  transform: none;
  filter: none;
}

/* Number circle pops in with a slight overshoot and a soft glow. */
html.js .journey-step .journey-num {
  opacity: 0;
  transform: scale(0.35);
  transition:
    opacity 600ms ease,
    transform 750ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 500ms ease,
    border-color 500ms ease;
  transition-delay: calc(var(--reveal-delay, 0ms) + 200ms);
  will-change: transform, opacity;
}
html.js .journey-step.is-visible .journey-num {
  opacity: 1;
  transform: none;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.04),
    0 0 24px rgba(69, 104, 204, 0.28);
}

html.js .journey-step .journey-icon {
  opacity: 0;
  transform: translate3d(0, 8px, 0) scale(0.8);
  transition:
    opacity 700ms var(--ease-out-expo),
    transform 700ms var(--ease-out-expo);
  transition-delay: calc(var(--reveal-delay, 0ms) + 380ms);
}
html.js .journey-step.is-visible .journey-icon {
  opacity: 1;
  transform: none;
}

html.js .journey-step h3,
html.js .journey-step p {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 700ms var(--ease-out-expo),
    transform 700ms var(--ease-out-expo);
}
html.js .journey-step h3 {
  transition-delay: calc(var(--reveal-delay, 0ms) + 460ms);
}
html.js .journey-step p {
  transition-delay: calc(var(--reveal-delay, 0ms) + 540ms);
}
html.js .journey-step.is-visible h3,
html.js .journey-step.is-visible p {
  opacity: 1;
  transform: none;
}

/* The horizontal track / drawing line only exist on wide layouts.
   On stacked mobile layouts the static `::before` is hidden — hide
   the drawing layer too so it can't render as a stray bar. */
@media (max-width: 1024px) {
  .journey-track::after {
    display: none;
  }
}

/* ---------- Reduced motion: keep all sub-element content visible ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js .services-grid > .service-card .service-icon,
  html.js .services-grid > .service-card h3,
  html.js .services-grid > .service-card p,
  html.js .journey-step .journey-num,
  html.js .journey-step .journey-icon,
  html.js .journey-step h3,
  html.js .journey-step p {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .journey-track::after {
    display: none;
  }
}
html.reduce-motion .services-grid > .service-card .service-icon,
html.reduce-motion .services-grid > .service-card h3,
html.reduce-motion .services-grid > .service-card p,
html.reduce-motion .journey-step .journey-num,
html.reduce-motion .journey-step .journey-icon,
html.reduce-motion .journey-step h3,
html.reduce-motion .journey-step p {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}
html.reduce-motion .journey-track::after {
  display: none;
}
