/* ==========================================================
   Harbal — scroll-driven owl video background
   ========================================================== */

.owl-scroll {
  --os-ink: #173c32;
  --os-ink-soft: #456451;
  position: relative;
  height: 900vh;                       /* scroll distance for the whole clip */
  background: #2b3a22;
  font-family: "DM Sans", Arial, sans-serif;
  color: var(--os-ink);
}

.os-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.os-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.os-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(16, 32, 22, .30), transparent 20%, transparent 75%, rgba(16, 32, 22, .35));
  transition: opacity 1.2s ease;
}

/* ---------- intro: "scroll to wisdom" while the owl enters ---------- */
.os-intro {
  position: absolute; left: 50%; top: 62%;
  transform: translate(-50%, 14px);
  display: grid; justify-items: center; gap: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity 1s cubic-bezier(.22, 1, .36, 1), transform 1s cubic-bezier(.22, 1, .36, 1);
}
.os-intro.is-on { opacity: 1; transform: translate(-50%, 0); }
.os-intro-title {
  margin: 0;
  padding: 10px 26px;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(12, 26, 16, .45), rgba(12, 26, 16, 0));
  font: italic 400 clamp(24px, 2.6vw, 36px)/1.1 Georgia, serif;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
  letter-spacing: .01em;
}
.os-intro-line {
  width: 1px; height: 44px;
  background: linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
  animation: os-drip 1.8s ease-in-out infinite;
  transform-origin: top;
}
@keyframes os-drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- cards (position is set in JS so they avoid the owl) ---------- */
.os-card {
  box-sizing: border-box;
  position: absolute; top: 0; left: 0;
  width: min(360px, calc(100vw - 72px));
  padding: 24px 26px 22px;
  border-radius: 18px;
  background: rgba(244, 248, 240, .82);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 20px 60px rgba(10, 25, 15, .25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  filter: blur(6px);
  will-change: transform, opacity, filter;
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1), filter .8s cubic-bezier(.22, 1, .36, 1),
              visibility 0s linear .8s, transform 1.1s cubic-bezier(.22, 1, .36, 1);
}
.os-card.is-on {
  opacity: 1; visibility: visible; pointer-events: auto; filter: none;
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1) .12s, filter .8s cubic-bezier(.22, 1, .36, 1) .12s,
              visibility 0s, transform 1.1s cubic-bezier(.22, 1, .36, 1);
}
.os-card.is-on > * { animation: os-rise .9s cubic-bezier(.22, 1, .36, 1) both; }
.os-card.is-on > *:nth-child(1) { animation-delay: .12s; }
.os-card.is-on > *:nth-child(2) { animation-delay: .2s; }
.os-card.is-on > *:nth-child(3) { animation-delay: .28s; }
.os-card.is-on > *:nth-child(4) { animation-delay: .36s; }
@keyframes os-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.os-card--final { width: min(420px, calc(100vw - 72px)); }

.os-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--os-ink-soft);
}
.os-eyebrow i { display: block; width: 24px; height: 1px; background: currentColor; }
.os-title {
  margin: 10px 0 8px;
  font-family: Manrope, sans-serif; font-weight: 500;
  font-size: clamp(22px, 2.1vw, 30px); line-height: 1.12;
}
.os-title--lg { font-size: clamp(24px, 2.6vw, 36px); }
.os-title em { font-family: Georgia, serif; font-weight: 400; color: var(--os-ink-soft); }
.os-body { margin: 0; font-size: 15px; line-height: 1.6; color: #3d5a4b; }
.os-link { display: inline-block; margin-top: 12px; color: var(--os-ink); font-weight: 500; font-size: 14px; }
.os-cta {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border: 0; border-radius: 999px;
  background: var(--os-ink); color: #f3f6ef;
  font: 500 14px "DM Sans", Arial, sans-serif; cursor: pointer;
}

/* ---------- progress rail ---------- */
.os-rail {
  position: absolute; right: clamp(14px, 2.4vw, 32px); top: 50%;
  width: 1px; height: 160px; transform: translateY(-50%);
  background: rgba(255, 255, 255, .35);
}
.os-rail b { position: absolute; left: -3px; top: 0; width: 7px; height: 7px; border-radius: 50%; background: #fff; }

@media (max-width: 700px) {
  .os-card, .os-card--final { width: calc(100vw - 40px); padding: 18px 20px; }
  .os-body { font-size: 14px; }
  .os-rail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .os-card, .os-card.is-on { transition: opacity .2s linear, visibility 0s; }
  .os-card.is-on > * { animation: none; }
  .os-intro-line { animation: none; }
}

/* ---------- small outline illustration on each service card (alternates right / left) ---------- */
.os-ill {
  position: absolute; top: -21px; width: 44px; height: 44px; box-sizing: border-box;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(244, 248, 240, .96); border: 1px solid rgba(23, 60, 50, .14);
  color: var(--os-ink); box-shadow: 0 8px 20px rgba(10, 25, 15, .18);
}
.os-ill svg { width: 24px; height: 24px; display: block; }
.os-ill--r { right: 22px; }
.os-ill--l { left: 22px; }
.os-card--ill-l .os-eyebrow { padding-left: 0; }
.os-card.is-on > .os-ill { animation: os-pop .7s cubic-bezier(.22, 1, .36, 1) .3s both; }
@keyframes os-pop { from { opacity: 0; transform: scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .os-ill { width: 38px; height: 38px; top: -18px; }
  .os-ill svg { width: 21px; height: 21px; }
  .os-ill--r { right: 16px; } .os-ill--l { left: 16px; }
}
@media (prefers-reduced-motion: reduce) { .os-card.is-on > .os-ill { animation: none; } }
