/* ============================================================
   Bhasha — motion layer
   Warm, printed-page feel: masked lines, soft lifts, the arch
   settling as you scroll. Only runs after html.mo is set, so the
   page is fully readable without JS or with reduced motion.
   ============================================================ */

:root {
  --mo-accent: var(--orange);
  --mo-accent-2: #e0a35a;
  --mo-bg: var(--cream);
}

/* ---------- progress ---------- */
.mo-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 80;
  pointer-events: none;
}

.mo-progress i {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--orange), #e7a458);
  will-change: transform;
}

/* ---------- masked lines ---------- */
.mo [data-split] .mo-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.09em;
  margin-bottom: -0.09em;
}

.mo [data-split] .mo-line-in {
  display: block;
  transform: translate3d(0, 112%, 0);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.19, 0.78, 0.18, 1), opacity 0.6s ease;
  transition-delay: calc(var(--i, 0) * 110ms + var(--mo-delay, 0ms));
  will-change: transform;
}

.mo [data-split].mo-in .mo-line-in {
  transform: none;
  opacity: 1;
}

/* ---------- entrances ---------- */
.mo .mo-reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.85s cubic-bezier(0.22, 0.7, 0.2, 1),
    transform 0.95s cubic-bezier(0.22, 0.7, 0.2, 1);
  transition-delay: var(--d, 0ms);
  will-change: transform, opacity;
}

.mo .mo-reveal.mo-in { opacity: 1; transform: none; }

.mo [data-reveal="left"].mo-reveal { transform: translate3d(-24px, 0, 0); }
.mo [data-reveal="right"].mo-reveal { transform: translate3d(24px, 0, 0); }
.mo [data-reveal="clip"].mo-reveal {
  opacity: 1;
  transform: none;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.2s cubic-bezier(0.19, 0.78, 0.18, 1) var(--d, 0ms);
}
.mo [data-reveal="clip"].mo-reveal.mo-in { clip-path: inset(0 0 0 0); }

/* ---------- the arch ---------- */
.mo [data-scrub] { --p: 0; }

.mo [data-scrub="arch"] {
  transform: translate3d(0, calc(var(--p) * -30px), 0) scale(calc(1.03 - var(--p) * 0.03));
  transform-origin: 50% 100%;
  will-change: transform;
}

.mo [data-scrub="arch"] .arch-art {
  transform: scale(calc(1.06 - var(--p) * 0.06));
  transform-origin: 50% 100%;
  transition: transform 0.1s linear;
}

/* the caption under the arch drifts the other way */
.mo .hero-art figcaption { will-change: transform; }

/* ---------- hover craft ---------- */
.mo .feature,
.mo .module-col,
.mo .plan,
.mo .teacher-card {
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s ease, border-color 0.25s ease;
}

.mo .feature:hover,
.mo .teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(88, 50, 20, 0.1);
}

.mo .plan:hover { transform: translateY(-5px); }

.mo .quote:hover { transform: translateY(-3px); }

/* the teacher photograph settles up as you reach it */
.teacher-photo img { will-change: transform; }

/* links keep a drawn underline on hover */
.mo .nav-links a {
  position: relative;
}

/* ---------- section rhythm ---------- */
.mo .section-title { padding-bottom: 0.04em; }

@media (prefers-reduced-motion: reduce) {
  .mo .mo-reveal,
  .mo [data-split] .mo-line-in {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  .mo [data-scrub] { transform: none !important; }
  .mo-progress { display: none; }
}
