"use client"; import { useEffect, useRef } from "react"; import gsap from "gsap"; import { ScrollTrigger } from "gsap/ScrollTrigger"; import Image from "next/image"; gsap.registerPlugin(ScrollTrigger); export default function SpatialSanctuary() { const containerRef = useRef(null); const trackRef = useRef(null); useEffect(() => { const container = containerRef.current; const track = trackRef.current; if (!container || !track) return; const ctx = gsap.context(() => { // Calculate horizontal translation distance const trackWidth = track.scrollWidth; const scrollDistance = trackWidth - window.innerWidth; // Horizontal Scroll Trigger for track sliding const scrollTween = gsap.to(track, { x: -scrollDistance, ease: "none", scrollTrigger: { trigger: container, pin: true, start: "top top", end: `+=${scrollDistance}`, // scroll length matches translation scrub: 1, invalidateOnRefresh: true, }, }); // Parallax Zoom Effect on individual slide images const images = track.querySelectorAll(".gallery-img"); images.forEach((img) => { gsap.fromTo( img, { scale: 1.0 }, { scale: 1.12, ease: "none", scrollTrigger: { trigger: img, containerAnimation: scrollTween, // sync with horizontal tween start: "left right", end: "right left", scrub: true, }, } ); }); }, container); return () => ctx.revert(); }, []); const gallerySlides = [ { title: "The Teakwood Columns", subtitle: "T H E T E A K C O U R T", desc: "Supported by eighty grand hand-carved pillars sourced from Chettinad, framing a courtyard that captures cooling cross-breezes.", img: "/images/chettinad_interior.png", }, { title: "The Royal Banquet Court", subtitle: "I M P E R I A L D I N I N G", desc: "Our ceremonial feast hall features heavy teak tables, soft yellow lanterns, and floral motifs (Kolams) hand-drawn with rice flour daily.", img: "/images/royal_dining_experience.png", }, { title: "The Sanctuary Lobby", subtitle: "T H E W E L C O M E A N T E R O O M", desc: "Paved with rough-cut temple stone tiles, featuring bubbling brass vessels (urlis) filled with fresh jasmine buds and marigolds.", img: "/images/south_indian_welcome.png", }, ]; return (
{/* Horizontal Scroll Track container */}
{/* ==================== SLIDE 1: THE CULINARY HERITAGE MAIN COVER ==================== */}
{/* Parchment background image for Slide 1 */} Traditional South Indian Sanctuary Background {/* Traditional Temple Borders */}
{/* Slide Content layout */}
{/* Left Side details */}
{/* Pre-title with Gold star crest */}
— THE GASTRONOMY —
{/* Main Headline */}

Our Culinary
Heritage

{/* Traditional Gold Divider */}
{/* Description narrative */}

Swipe or scroll to explore the rich, traditional recipes of My Dosa Place, bringing stone-ground batters, fresh local spices, and traditional techniques to life.

{/* Scroll Down Slide Indicator */}
Scroll down to slide right
{/* Grid of 4 Sanctuary Features */}
{/* Card 1: Recipes */}
Heritage Recipes
Heritage Recipes

Timeless recipes rooted in tradition.

{/* Card 2: Ghee */}
Pure A2 Ghee
Pure A2 Ghee

Traditional ghee that enriches the flavor.

{/* Card 3: Dosa */}
Artisanal Dosa
Artisanal Dosa

Stone-ground batter fermented to perfection.

{/* Card 4: Feasts */}
Imperial Feasts
Imperial Feasts

Grand platters reflecting royal tastes.

{/* Right Side: Thali Archway photo overlap */}
My Dosa Place Spatial Dining Sanctuary
{/* ==================== BENTO GRID: HORIZONTAL SCROLLING GALLERY ==================== */}
{/* Parchment background image for Bento Grid */} Traditional South Indian Sanctuary Background {/* Traditional Temple Borders */}
{/* Grid Layout Container */}
{/* Card 1: Row 1, Col 1 - Cream Intro Card */}
— The Masterpieces —

Culinary Art

Every category is a chapter of South Indian gastronomy, curated to showcase heritage and flavor.

Slide to explore
{/* Card 2: Row 2, Col 1 - Breakfast Classics Image Card */}
Breakfast Classics
Breakfast Classics

Crispy Ghee Roasts

{/* Card 3: Row 1, Col 2 & 3 - Double-Width Thali Highlight (Dark Green Card) */}
{/* Left text section */}
— Heirloom Platter —

Royal Feast

Experience the grand Chola Samrat Thali, bringing twenty hand-turned heirloom dishes together on a banana leaf.

Imperial Banquet
{/* Right image section */}
Royal Feast Thali
{/* Card 4: Row 2, Col 2 - Rooted in Tradition Cream Card */}
— The Foundation —

Stone Batter

Batter fermented for 12 hours, stone-ground daily to achieve the perfect crispness and tang.

{/* Card 5: Row 2, Col 3 - South Indian Feast Image Card */}
South Indian Feast
Imperial Platter

20 Heirloom Delicacies

{/* Card 6: Row 1, Col 4 - Dark Green Madras Filter Coffee Card */}
— A Sip of Tradition —

Filter Coffee

Strong, aromatic brew of premium chicory-coffee, hand-frothed in traditional brass tumblers.

Frothed Brews
{/* Card 7: Row 2, Col 4 - Dosa Perfection Image Card */}
Dosa Perfection
Dosa Court

A2 Ghee Roast

{/* Card 8: Row 1, Col 5 - Chef's Specials Image Card */}
Chef's Specials
Chef's Specials

Seasonal Creations

{/* Card 9: Row 2, Col 5 - Pure Ingredients Cream Card */}
— Purity Checked —

Pure A2 Ghee

Enriched with hand-churned A2 cow ghee and cold-pressed coconut oil.

{/* Card 10: Row 1, Col 6 - Traditional Spices Cream Card */}
— Aromatic Notes —

Organic Spices

Hand-selected black pepper, cardamom, turmeric, and dry chilies sourced from local hills.

{/* Card 11: Row 2, Col 6 - Curry Court Image Card */}
Curry Court
Curry Court

Smoked Clay Pots

{/* Card 12: Row 1, Col 7 - Sweet Delights Dark Green Card */}
— Nectars of the South —

Sweet Delights

End your feast with traditional payasam, cardamomy kesari, and coconut sweets.

{/* Card 13: Row 2, Col 7 - Beverage Bar Image Card */}
Beverage Bar
Traditional Drinks

Froth Brews & Nectars

{/* ==================== PINNED BOTTOM BANNER BAR (OUTSIDE TRACK) ==================== */}
My Dosa Place ROOTED IN TRADITION • DRIVEN BY PASSION • SERVED WITH LOVE
); }