/* His story (story.html): the journey from the original pawanmunjal.life homepage, an illustration played by
   scrolling. Shares the portrait's header (style.css); the rest follows the original page's Tailwind classes. */
@font-face { font-family: "ZT Neue Ralewe"; src: url(/fonts/ZTNeueRalewe-ExtraBoldItalic.otf) format("opentype"); font-weight: 800; font-style: italic; font-display: swap; }

.storypage { background: #1a1a1a; }
.storypage::before { display: none; }   /* the illustration has its own ground */

/* eleven screens of scrolling drive the whole animation (min-h-[1100vh]) */
.journey { position: relative; min-height: 1100vh; width: 100%; margin-top: 0; background: #1a1a1a; }   /* (style.css pulls main up under the portrait's splash; there is none here) */
.journey__lead { height: 50vh; }

/* the illustration: held in the middle while the page scrolls under it */
.journey__anim { position: fixed; top: 50%; left: 50%; z-index: 10; width: 100%; height: auto; transform: translate(-50%, -50%); transition: opacity .3s; }
.journey__anim svg { display: block; }
.journey.at-end .journey__anim { opacity: 0; }

/* loading: an estimate that creeps to 90% until the animation is ready (as on the original page) */
.journey__loading { position: fixed; top: 50%; left: 50%; z-index: 20; width: 256px; transform: translate(-50%, -50%); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; color: #9ca3af; font: 500 13px/1 var(--sans); transition: opacity .4s; }
.journey__loading.done { opacity: 0; pointer-events: none; }
.journey__bar { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.journey__bar i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--accent); border-radius: inherit; transition: width .2s; }

/* the end: the invitation, now into this site's flow */
.journey__end { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--hdr) 16px 24px; background: #F52A61; color: #fff; text-align: center; animation: storyIn .5s ease both; }
.journey__end[hidden] { display: none; }
.journey__end h1 { margin: 0 0 24px; max-width: 48rem; font: italic 800 clamp(36px, 7vw, 72px)/1.05 "ZT Neue Ralewe", var(--sans); letter-spacing: -.01em; }
.journey__end p { margin: 0 0 16px; max-width: 48rem; font-size: clamp(18px, 2.4vw, 24px); line-height: 1.4; }
.journey__end .journey__lede { margin-bottom: 40px; font-size: clamp(15px, 1.6vw, 17px); opacity: .9; }
.journey__ctas { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; }
.journey__cta { display: inline-flex; align-items: center; justify-content: center; min-width: 220px; height: 52px; padding: 0 32px; border-radius: 4px; background: #FDC500; color: #000; font: 600 14px/1 var(--sans); text-decoration: none; transition: transform .2s var(--ease), background .2s; }
.journey__cta:hover { background: #ffd43a; transform: translateY(-1px); }
.journey__alt { color: #fff; font: 500 14px/1.2 var(--sans); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .5); text-underline-offset: 5px; }
.journey__alt:hover { text-decoration-color: #fff; }
.journey__cta:focus-visible, .journey__alt:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes storyIn { from { opacity: 0; } to { opacity: 1; } }

/* film grain over everything (the original's noise overlay), drawn here rather than fetched from another site */
.journey__noise { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .5; mix-blend-mode: multiply; background-repeat: repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: storyNoise 100ms infinite; }
@keyframes storyNoise {
  0%, 100% { background-position: 0% 0%; }
  10% { background-position: -5% -10%; }
  20% { background-position: -15% 5%; }
  30% { background-position: 7% -25%; }
  40% { background-position: 20% 25%; }
  50% { background-position: -25% 10%; }
  60% { background-position: 15% 5%; }
  70% { background-position: 0% 15%; }
  80% { background-position: 25% 35%; }
  90% { background-position: -10% 10%; }
}
@media (prefers-reduced-motion: reduce) { .journey__noise { animation: none; } .journey__end { animation: none; } }
