/* =========================================================
   Sanskarshala — Intro page (index.html)
   Scroll (or click the "o" in "Moral") to zoom into the home page.
   ========================================================= */

/* header stays on screen while the zoom plays */
.page-intro .site-header {
  position: fixed;
}

/* tall scroll track; the hero sticks while the zoom runs */
.intro-zoom {
  position: relative;
  height: 340vh;
}

.intro-zoom .hero {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
}

.intro-zoom .hero__content {
  position: relative;
  z-index: 1;
}

/* whole headline in the sans-serif font */
.page-intro .hero__title {
  color: var(--cream);
}

/* the whole headline zooms around the hole of the "o" in "Moral" (transform set by intro.js).
   It stays white all the way, like the rest of the headline. */
.page-intro .accent {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: inherit;
  font-variation-settings: normal;
  letter-spacing: inherit;
  color: var(--cream);           /* same white as the rest of the headline */
}

/* ---- the "o" in "Moral": the doorway into the home page ---- */

.portal-letter {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.portal-letter:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 0.25rem;
  border-radius: 0.375rem;
}

/* ---- pictures inside the "o" (the growing hole) ---- */

/* sits behind the headline; masked to the shape of the "o"'s hole by intro.js,
   so the orange letter frames it */
.portal {
  position: absolute;
  inset: 0;
  z-index: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.portal.is-ready {
  visibility: visible;
}

/* box the pictures fill: the hole's bounds, growing to the whole screen (set by intro.js) */
.portal__frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1e2b22;
}

/* the looping video; cropped exactly like .story__img on home.html, so the change of page can't be seen */
.portal__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;   /* must match .story__img on home.html */
}

/* same shade as the first screen of home.html, faded in at the end */
.portal__shade {
  position: absolute;
  inset: 0;
  opacity: var(--shade, 0);
  background: linear-gradient(180deg,
    rgba(10, 16, 12, 0.35) 0%,
    rgba(10, 16, 12, 0.12) 30%,
    rgba(10, 16, 12, 0.35) 60%,
    rgba(10, 16, 12, 0.72) 100%);
}

.intro-zoom .scroll-down {
  z-index: 1;
  opacity: var(--hint-o, 1);
}

/* very short screens (phones turned sideways): the first screen is exactly one screen tall, so the
   headline moves up under the header and the scroll arrow is left out (there is no room for it) */
@media (max-height: 480px) {
  .intro-zoom .hero {
    padding-top: 5.5rem;
    padding-bottom: 1.25rem;
  }

  .intro-zoom .scroll-down {
    display: none;
  }
}

/* while the click-zoom plays, block scrolling */
html.is-zooming,
html.is-zooming body {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .intro-zoom {
    height: auto;
  }
}

/* ---- look matched to practies.html ---- */

/* layout like the Our Programme hero: small green label, headline, short paragraph underneath */
.page-intro .hero__content {
  text-align: center;
}

.intro-eyebrow {
  margin: 0 0 clamp(1.125rem, 2vw, 1.625rem);
  font-size: clamp(0.8rem, 0.9vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}

.page-intro .hero__title {
  display: block;
  max-width: none;
  text-align: center;
  font-family: var(--font-sans);
  font-size: clamp(3rem, 7.2vw, 7.4rem);
  font-weight: 800;               /* "Shaping Morals" — Pulp Display ExtraBold */
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-shadow: 0 0.25rem 1.875rem rgba(0, 0, 0, 0.25);
}

.hero__line {
  display: block;
}

/* "Building Conscious Citizens." — Pulp Display Medium, smaller, with room above it */
.hero__line--sub {
  margin-top: 0.45em;
  font-size: 0.48em;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.intro-sub {
  max-width: 36em;
  margin: clamp(1.375rem, 2.6vw, 2.125rem) auto 0;
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.6;
  color: rgba(246, 241, 230, 0.8);
  text-wrap: balance;
}

/* while "Moral" zooms, the other words stay in place, grow dull, then disappear
   (--rest-o and --rest-blur set by intro.js) */
.page-intro .hero__word {
  opacity: var(--rest-o, 1);
  filter: blur(var(--rest-blur, 0px));
}
