// THE STORY — interactive CHAPTER EXPLORER (one screen, 2560×ADAPTIVE, no scroll).
//
// Layout matches the approved reference comp:
// · LEFT: editorial header (shared ScreenHeader) → CHAPTER label → the active
// chapter's spread → a glass PAGER PILL (← 05 / 05 →) pinned bottom-left.
// · RIGHT: a vertical CHAPTER TIMELINE RAIL (five numbered, clickable nodes on
// a gold spine; the active one glows + reads VIEWING →).
// · A giant faint chapter numeral floats in the gutter between the two.
// Every chapter is tappable and cross-fades the left spread — fully functional.
// Cream/gold editorial theme + shared ScreenHeader for cross-screen consistency.
// Root is inset:0 with TOP-anchored header and BOTTOM-anchored pager/rail so the
// spread fills the adaptive canvas (1600 → 1920) with no empty band.
const STORY_KEYS_ID = 'uni-story-chapters-keys';
function ensureStoryKeys() {
if (typeof document === 'undefined') return;
if (document.getElementById(STORY_KEYS_ID)) return;
const s = document.createElement('style');
s.id = STORY_KEYS_ID;
s.textContent = `
@keyframes uniStAurora { 0%{transform:translate3d(-3%,-2%,0) scale(1.05) rotate(0);opacity:.5}
50%{transform:translate3d(4%,3%,0) scale(1.18) rotate(8deg);opacity:.8}
100%{transform:translate3d(-3%,-2%,0) scale(1.05) rotate(0);opacity:.5} }
@keyframes uniStBreathe { 0%,100%{transform:scale(1);opacity:.30} 50%{transform:scale(1.14);opacity:.55} }
@keyframes uniStUnder { from{transform:scaleX(0)} to{transform:scaleX(1)} }
@keyframes uniStStage { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
@keyframes uniStNum { from{opacity:0;transform:translateY(34px) scale(0.965)} to{opacity:.05;transform:translateY(0) scale(1)} }
@keyframes uniStTicker{ from{transform:translateX(0)} to{transform:translateX(-50%)} }
@keyframes uniStPulse { 0%,100%{box-shadow:0 0 0 0 rgba(201,160,94,0.0)} 50%{box-shadow:0 0 0 7px rgba(201,160,94,0.16)} }
@keyframes uniStNudge { 0%,100%{transform:translateX(0)} 50%{transform:translateX(5px)} }
@keyframes uniStRise { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
`;
document.head.appendChild(s);
}
const ST_EASE = 'cubic-bezier(0.22,1,0.36,1)';
function storyReveal(t, start, span, dy) {
const e = ease.outQuart(clamp((t - start) / span, 0, 1));
return { opacity: e, transform: `translateY(${(1 - e) * (dy ?? 24)}px)` };
}
function StoryCount({ t, start, span, value }) {
const e = ease.outQuart(clamp((t - start) / span, 0, 1));
return <>{Math.round(value * e).toLocaleString('en-IN')}>;
}
// A spec card — mono label stacked OVER a large serif value, filling its cell.
// Replaces the old label-left / value-right row that left a wide empty gutter.
function StorySpec({ label, value, icon, i }) {
return (
{label}
{value}
);
}
// A project image that fills a flex cell. Subtle ease-out entrance (opacity +
// translateY, transform/opacity only). A soft ivory gradient sits behind it, so
// if the file ever 404s the onError hides the and the placeholder shows —
// no broken-image icon. Optional overlay children (scrim + caption) render above.
function StoryImg({ src, alt, radius = 18, delay = 0, pos = 'center', style, children }) {
return (
For over three-and-a-half decades, {P.developer} has crafted timeless
spaces across {P.city}. Phase 1, Stratum @ Venus Grounds, is already
operational: a commercial landmark home to global names. the Universe rises beside it as the residential crown.
{/* three proof pillars — fill the middle band */}
{PROOF.map((p,i)=>(
{p.cap}
{/* icon badge fills the middle void of the pillar */}
{p.k}{p.sup}
{p.u}
{p.d}
))}
{/* tenant proof marquee — anchored to the bottom */}
STRATUM · PHASE-1 TENANTS, ALREADY OPERATIONAL
{doubled.map((name,i)=>(
{name}
))}
);
}
if (key === 'design') {
return (
Five specialist studios, each a leader in its craft, brought together for one Ahmedabad address.
{/* full-width editorial roster — each studio a tall row that fills the column */}
Ten towers and {S.homes} exclusively 4 BHK homes on a {S.plotArea} plot, master-planned by {S.architect}.
{/* spec grid — 2 × 4 stacked-label cards that fill the full height evenly */}
{SPECS.map((d,i)=>())}
);
}
if (key === 'stratum') {
return (
Phase 1, Stratum @ Venus Grounds, is live and trading: proof of execution
before a single Universe home is sold. {tenants.length} marquee occupiers already call it home.
{/* tenant proof grid — stretches to fill the full vertical height */}
{/* real occupier logo on a clean white plate; monogram only if no logo */}
{m.logo
?
: {m.mono}}
{name}{m.cat}
);})}
);
}
return null;
}
// ── right chapter-rail width (no enclosing panel) ─────────────────────────
const RAIL_W = 672;
return (
{/* ambient backdrop */}
{/* giant faint chapter numeral — floats in the gutter behind the gap */}
{ch.num}
{/* shared header — left title block + right brand lockup (sits atop the panel) */}
{/* ════════════════ LEFT — the active chapter spread ════════════════ */}
{/* chapter label */}
CHAPTER {ch.num}
{ch.title}
{/* the cross-fading spread — fills the available height */}