/* TECHGURU — Story layer: chapter title cards, hero scrub, staggered card entrances. All opt-in via html.js-story. */
main > section { isolation: isolate; }
.tg-chapter { position: absolute; top: clamp(1rem, 4vw, 3rem); right: var(--tg-gutter, 2rem); z-index: -1; pointer-events: none; text-align: right; user-select: none;
  translate: calc(var(--p, 0) * -6vw) 0; }
.tg-chapter-num { display: block; font-family: var(--tg-font-display, Poppins, sans-serif); font-weight: 700; line-height: .8; font-size: clamp(6rem, 17vw, 14rem);
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.12); letter-spacing: -.04em; }
.tg-chapter-name { display: inline-flex; align-items: center; gap: .75rem; margin-top: .6rem; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--tg-accent, #64dedf); opacity: .8; }
.tg-chapter-name::before { content: ""; width: 56px; height: 1px; background: currentColor; transform-origin: right; transform: scaleX(var(--in, 0)); transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
body.light-theme .tg-chapter-num { -webkit-text-stroke-color: rgba(10,12,26,.14); }

.js-story .hero-content { translate: 0 calc(var(--hp, 0) * 70px); scale: calc(1 - var(--hp, 0) * .06); opacity: calc(1 - var(--hp, 0) * .9); transform-origin: 50% 0; will-change: translate, scale; }
/* Scale the video frame once (not wrapper + frame, which compounded to ~1.17x) and keep it tiny so it never leaves its column. */
.js-story #hero-rotator { scale: calc(1 + var(--hp, 0) * .03); transform-origin: 50% 50%; }
.hero-image { min-width: 0; max-width: 100%; }
@media (max-width: 992px) { .js-story #hero-rotator { scale: none; } }

.js-story .tg-stag { opacity: 0; translate: 0 32px; scale: .985; transition: opacity .9s cubic-bezier(.2,.7,.2,1), translate 1s cubic-bezier(.2,.7,.2,1), scale 1s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
.js-story .tg-stag.tg-in { opacity: 1; translate: none; scale: none; }
@media (max-width: 700px) { .tg-chapter-num { font-size: 6rem; } }
@media (prefers-reduced-motion: reduce) { .tg-chapter { translate: none; } }
