"use client"; import { motion, useScroll, useTransform, AnimatePresence } from "framer-motion"; import { useRef, useState, useEffect } from "react"; import type { DemoData } from "@/data/demos"; import AnimatedCounter from "@/components/ui/AnimatedCounter"; const fadeUp = { hidden: { opacity: 0, y: 35 }, show: { opacity: 1, y: 0, transition: { duration: 0.75, ease: [0.25, 0.46, 0.45, 0.94] as [number, number, number, number] } }, }; const stagger = { hidden: {}, show: { transition: { staggerChildren: 0.1 } }, }; const translations = { tr: { navStory: "Hikayemiz", navMenu: "Makarna & Pizza", navOrchard: "Limon Bahçesi", navServices: "Hizmetlerimiz", navBook: "Rezervasyon", bookTable: "Masa Ayırt", discoverMenu: "Menüyü Keşfet", badge: "SİCİLYA ZANAATKAR MUTFAĞI", heroTitlePart1: "Keten, Limonlar", heroTitlePart2: "& Odun Ateşinde", heroDesc: "Karaköy limanında, Sicilya rüzgarları esiyor. El yapımı makarnalar, taze baharatlar ve odun ateşinde karamelize olan lezzetler.", storySubtitle: "Sicilya Fırıncılık Mirası", storyTitle: "Hikayemiz", storyDesc: "Odun ateşinin alevi ve zeytin ağacı közlerinin aroması. Sicilia Tavola, nesiller boyu aktarılan İtalyan tariflerini zanaatkar ellerle buluşturuyor. Her pizza taş fırınımızda 485 derecede saniyeler içinde mükemmelleşiyor.", menuSubtitle: "Taze Seçeneklerimiz", menuTitle: "Makarna & Pizza", lemonSubtitle: "Limon, Keten & Zeytinyağı", lemonTitle: "Limon Bahçesi", lemonDesc: "Bizim zeytinyağlarımız ve limonlarımız doğrudan Sicilya bahçelerimizden gelir. %100 soğuk sıkım, organik ve asit oranı sıfıra yakın. Her yemeğin can damarı.", lemonBadgeText: "ORGANİK NARENCİYE • SOĞUK SIKIM SIZMA ZEYTİNYAĞI •", lemonBottomText: "Siracusa'daki biyolojik tarım ortaklarımızdan elde edilen, elle toplanmış organik limonlar ve zeytinyağları kullanıyoruz.", servicesSubtitle: "Ayrıcalıklarımız", servicesTitle: "Hizmetlerimiz", testimonialsSubtitle: "Misafir Hikayeleri", testimonialsTitle: "Misafir Yorumları", bookingSubtitle: "Masa Rezervasyonu", bookingTitle: "Masa Rezervasyonu", bookingDesc: "Karaköy Trattoria'mızda unutulmaz bir akşam yemeği için yerinizi ayırtın.", formName: "Ad Soyad", formNamePlaceholder: "Adınız Soyadınız", formPhone: "Telefon", formPhonePlaceholder: "05xx xxx xx xx", formDate: "Tarih", formTime: "Saat", formGuests: "Kişi Sayısı", formNotes: "Özel Notlar", formNotesPlaceholder: "Diyet sınırlandırmaları veya özel kutlamalar...", formSubmit: "Masa Ayırt", footerDesc: "Siracusa bahçelerinden Karaköy limanına.", footerRights: "Tüm hakları saklıdır.", footerPrivacy: "Gizlilik Politikası · Çerez Ayarları", quickBookTitle: "Hızlı Rezervasyon", quickBookDesc: "Karaköy Trattoria Hattı", quickBookSubmit: "Rezervasyon Gönder", conceptBanner: "Bu web sitesi Ayris Tech tarafından hazırlanmış bir konsept çalışmasıdır." }, en: { navStory: "Our Story", navMenu: "Pasta & Pizza", navOrchard: "Lemon Orchard", navServices: "Services", navBook: "Book Table", bookTable: "Book Table", discoverMenu: "Discover Menu", badge: "SICILIAN ARTISANAL KITCHEN", heroTitlePart1: "Linen, Lemons", heroTitlePart2: "& Wood-fired", heroDesc: "Sicilian winds blow over the Istanbul port. Hand-rolled pastas, fresh aromatic herbs, and rich flavors caramelized in our wood-fired stone oven.", storySubtitle: "Sicilian Baking Heritage", storyTitle: "Our Story", storyDesc: "The flicker of wood fire and the warm aroma of olive branch embers. Sicilia Tavola blends generations of authentic Italian culinary secrets with modern artisanal hands. Each pizza reaches crispy perfection inside our 485-degree stone oven in seconds.", menuSubtitle: "Our Fresh Selections", menuTitle: "Pasta & Pizza", lemonSubtitle: "Lemons, Linen & Olives", lemonTitle: "Lemon Orchard", lemonDesc: "Our signature olive oils and organic lemons are sourced directly from our private biological orchards in Sicily. 100% cold-pressed, completely natural, and low acidity. The soul of every dish.", lemonBadgeText: "ORGANIC CITRUS • COLD PRESSED EXTRA VIRGIN •", lemonBottomText: "We use only hand-picked organic lemons and olive oils sourced from biological farming partners in Siracusa.", servicesSubtitle: "Our Offerings", servicesTitle: "Our Services", testimonialsSubtitle: "Guest Stories", testimonialsTitle: "Guest Reviews", bookingSubtitle: "Tavola Reservation", bookingTitle: "Table Reservation", bookingDesc: "Book your exclusive slot for an unforgettable dining experience in our Karaköy Trattoria.", formName: "Name & Surname", formNamePlaceholder: "Your full name", formPhone: "Phone Number", formPhonePlaceholder: "Phone number", formDate: "Date", formTime: "Time", formGuests: "Guests", formNotes: "Special Notes", formNotesPlaceholder: "Dietary restrictions or special celebrations...", formSubmit: "Book Table Now", footerDesc: "From Siracusa orchards directly to Karaköy port.", footerRights: "All rights reserved.", footerPrivacy: "Privacy Policy · Cookie Settings", quickBookTitle: "Quick Reservation", quickBookDesc: "Karaköy Trattoria Dispatch Line", quickBookSubmit: "Submit Details", conceptBanner: "This website is a premium concept prototype designed by Ayris Tech." } }; export default function RestoranTemplate2({ data }: { data: DemoData }) { const { firma, istatistikler, hizmetler, menu = [], yorumlar = [] } = data; const heroRef = useRef(null); const { scrollYProgress } = useScroll({ target: heroRef, offset: ["start start", "end start"] }); const heroY = useTransform(scrollYProgress, [0, 1], ["0%", "20%"]); const [aktifKategori, setAktifKategori] = useState(0); const [showBookingModal, setShowBookingModal] = useState(false); const [lang, setLang] = useState<"tr" | "en">("tr"); const [preloader, setPreloader] = useState(true); const t = translations[lang]; // 1. Lenis Smooth Scroll Setup useEffect(() => { let lenis: any; import("@studio-freight/lenis").then(({ default: Lenis }) => { lenis = new Lenis({ duration: 1.2, easing: (t: number) => Math.min(1, 1.001 - Math.pow(2, -10 * t)) }); function raf(time: number) { lenis.raf(time); requestAnimationFrame(raf); } requestAnimationFrame(raf); }); return () => lenis?.destroy(); }, []); // 2. Preloader curtain timer useEffect(() => { const timer = setTimeout(() => { setPreloader(false); }, 1500); return () => clearTimeout(timer); }, []); // Dynamic localization handlers const getLocalizedStat = (etiket: string) => { if (etiket.toLowerCase().includes("baking")) return lang === "tr" ? "Sicilya Fırıncılık Kökleri" : "Sicilian Baking Roots"; if (etiket.toLowerCase().includes("pressed")) return lang === "tr" ? "Organik Soğuk Sıkım Yağ" : "Organic Cold Pressed Oil"; if (etiket.toLowerCase().includes("gastronomy")) return lang === "tr" ? "Ortalama Gastronomi Puanı" : "Average Gastronomy Rating"; return lang === "tr" ? "Yıllık Mutlu Misafir" : "Happy Diners Annually"; }; const getLocalizedService = (baslik: string, aciklama: string) => { if (baslik.toLowerCase().includes("carte")) { return { title: lang === "tr" ? "À la Carte Gastronomi" : "À la Carte Gastronomy", desc: lang === "tr" ? "Odun ateşinde pişen taze makarnalar, taze deniz mahsulleri ve Sicilya klasikleri." : "Wood-fired fresh pasta, coastal seafood selections, and authentic Sicilian classics." }; } if (baslik.toLowerCase().includes("trattoria") || baslik.toLowerCase().includes("geceleri")) { return { title: lang === "tr" ? "Trattoria Geceleri" : "Trattoria Evenings", desc: lang === "tr" ? "Özel canlı akordeon dinletileri ve şefin tadım menüleri eşliğinde Sicilya akşamları." : "Accordion acoustic performances coupled with custom tasting menus for starry Sicilian nights." }; } if (baslik.toLowerCase().includes("zeytinyağı") || baslik.toLowerCase().includes("oil")) { return { title: lang === "tr" ? "Zeytinyağı Tadımı" : "Olive Oil Tastings", desc: lang === "tr" ? "Kendi bahçelerimizden gelen %100 soğuk sıkım sızma zeytinyağlarımızı keşfedin." : "Discover 100% biological cold-pressed extra virgin olive oils directly from our Siracusa orchards." }; } return { title: lang === "tr" ? "Tavola Evinizde" : "Tavola at Home", desc: lang === "tr" ? "Özel korumalı kuryelerimizle en taze gurme lezzetleri kapınıza getiriyoruz." : "Gourmet biological flavors safely packaged and dispatched directly to your doorstep." }; }; const getLocalizedMenuCategory = (kategori: string) => { if (kategori.toLowerCase().includes("primi")) return lang === "tr" ? "Primi Piatti (Başlangıç)" : "Primi Piatti"; if (kategori.toLowerCase().includes("secondi")) return lang === "tr" ? "Secondi (Ana Yemek)" : "Secondi"; return lang === "tr" ? "Dolci (Tatlı)" : "Dolci"; }; const getLocalizedMenuItem = (ad: string, aciklama: string) => { if (ad.toLowerCase().includes("caprese")) { return { ad: "Caprese di Burrata", desc: lang === "tr" ? "Manda burrata, pembe domates dilimleri, taze fesleğen ve sızma zeytinyağı" : "Buffalo burrata, heirloom tomato fillets, aromatic fresh basil, and cold-pressed olive oil" }; } if (ad.toLowerCase().includes("carpaccio")) { return { ad: "Carpaccio di Polpo", desc: lang === "tr" ? "İnce dilimlenmiş marine ahtapot, kapari, bebek roka ve limon emülsiyonu" : "Wafer-thin octopus slices, wild capers, organic baby arugula, and lemon emulsion" }; } if (ad.toLowerCase().includes("focaccia")) { return { ad: "Focaccia al Rosmarino", desc: lang === "tr" ? "Taş fırından yeni çıkmış deniz tuzu, taze biberiye ve sızma zeytinyağlı" : "Stone-oven fresh rosemary focaccia topped with coarse sea salt crystals and olive oil mist" }; } if (ad.toLowerCase().includes("tagliatelle")) { return { ad: "Tagliatelle al Ragu di Polpo", desc: lang === "tr" ? "Ağır ateşte pişmiş ahtapot ragu, taze el yapımı tagliatelle" : "Slow-braised octopus ragout layered over fresh hand-rolled organic egg tagliatelle" }; } if (ad.toLowerCase().includes("margherita")) { return { ad: "Pizza Margherita DOP", desc: lang === "tr" ? "Odun ateşinde taş fırın pizza, San Marzano domates, taze mozzarella di bufala" : "Authentic San Marzano tomato pulp, creamy mozzarella di bufala, and stone-oven charred crust" }; } if (ad.toLowerCase().includes("polpo alla griglia")) { return { ad: "Polpo alla Griglia", desc: lang === "tr" ? "Izgara ahtapot kolları, kapari, cherry domates ve ezilmiş sarımsaklı bebek patates" : "Tender charred octopus arms paired with capers, blistered cherry tomatoes, and garlic fingerlings" }; } if (ad.toLowerCase().includes("cannoli")) { return { ad: "Cannoli Siciliani", desc: lang === "tr" ? "Çıtır hamur tüpleri içinde tatlı ricotta kreması, çikolata parçacıkları ve Antep fıstığı" : "Crispy pastry tubes stuffed with sweet sheep's milk ricotta, dark chocolate curls, and Bronte pistachio" }; } if (ad.toLowerCase().includes("tiramisu")) { return { ad: "Tiramisu al Limone", desc: lang === "tr" ? "Limon likörlü hafif mascarpone kreması, taze limon kabuğu rendesi ile" : "Light lemon-liqueur soaked ladyfingers covered in delicate lemon-mascarpone whipped cream" }; } return { ad: "Gelato di Pistacchio", desc: lang === "tr" ? "Kendi imalatımız gerçek Bronte Antep fıstıklı İtalyan dondurması" : "House-churned organic Sicilian pistachio gelato made with 100% biological Bronte pistachios" }; }; const getLocalizedTestimonial = (yazar: string, yorum: string) => { if (yazar.toLowerCase().includes("ender")) { return lang === "tr" ? "Limon kokuları ve çalan müzikler eşliğinde kendimizi Sicilya'da hissettik. Ahtapot makarna tek kelimeyle kusursuzdu." : "We felt completely transported to Siracusa with the lemon breeze and acoustic accordion. The octopus pasta was sheer culinary perfection."; } return lang === "tr" ? "Focaccia ekmeği ve sızma zeytinyağının kalitesi buranın zanaatkarlığını kanıtlıyor. Mutlaka rezervasyon yaptırın." : "The sheer crumb of the rosemary focaccia paired with biological extra virgin olive oil speaks volumes. A must-visit Karaköy gem."; }; const css = ` @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700;800;900&display=swap'); :root { --color-cobalt: #0038A8; --color-cobalt-muted: rgba(0, 56, 168, 0.15); --color-linen: #FDFBF7; --color-linen-dark: #F5F2EB; --color-text-dark: #121C22; --color-leaf: #3C5A48; } .font-serif-sicilia { font-family: 'Playfair Display', Georgia, serif; } .font-sans-clean { font-family: 'Inter', sans-serif; } .spinning-lemon { animation: spin 20s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .dappled-sunlight { background-image: radial-gradient(circle at 80% 20%, rgba(253, 251, 247, 0.1) 0%, transparent 60%); opacity: 0.85; mix-blend-mode: multiply; } .hero-title-clamp { font-size: clamp(38px, 6.2vw, 92px); letter-spacing: -0.02em; line-height: 0.95; } `; const getIconSvg = (name: string) => { switch (name) { case "alacarte": return ( ); case "special": return ( ); case "catering": return ( ); case "delivery": return ( ); default: return ( ); } }; return ( <> {/* ── IMZA AN: CURTAIN REVEAL PRELOADER ── */} {preloader && (
{firma.adi.toUpperCase()}
interactive prototype
)}
{/* ── MANDATORY FLOATING DEMO BANNER ── */}
{t.conceptBanner}
{/* ── SUN-DRENCHED OLIVE BRANCH LEAF OVERLAYS (WILMA & SICILIA INSPIRED) ── */}
{/* Top-Left Olive Branch SVG Overlay */}
{/* Mid-Right Olive Branch */}
{/* ── HEADER ── */}
{/* Logo */} {firma.adi} {/* Navigation Links */} {/* Action button & Lang selector */}
{/* Language Switcher */}
setShowBookingModal(true)} className="text-[11px] font-sans-clean font-black tracking-[2px] uppercase text-white bg-[#0038A8] hover:bg-[#002266] px-6 py-3.5 rounded-xl transition-all cursor-pointer shadow-md shadow-[#0038A8]/20 hidden sm:block" whileHover={{ scale: 1.03 }} whileTap={{ scale: 0.98 }} > {t.bookTable}
{/* ── HERO SECTION ── */}
{/* Parallax sun-drenched backdrop container */}
{/* Left Content */} {t.badge} {t.heroTitlePart1}
{t.heroTitlePart2}
{t.heroDesc} {t.discoverMenu}
{/* Right Content: Hand-crafted Sun-Drenched Image in offset frame */}
{/* Main Generated High-Fidelity Table Image */} {/* eslint-disable-next-line @next/next/no-img-element */} Sicilia Tavola Fresh Tomato Pasta
{/* ── SECTION 2: OUR STORY / WOOD OVEN (DOUBLE SPLIT) ── */}
{/* Left Col: Stone Oven Photo */}
{/* eslint-disable-next-line @next/next/no-img-element */} Trattoria Stone Wood-Fired Oven
{/* Right Col: Story detail and chalkboard metrics */} {t.storySubtitle} {t.storyTitle} {t.storyDesc} {/* Grid Metrics - Chalkboard Styled */} {istatistikler.slice(0, 2).map((s, i) => (
{s.deger}
{getLocalizedStat(s.etiket)}
))}
{/* ── SECTION 3: PASTA & PIZZA MENU (EDITORIAL BLUE DOTTED connectors) ── */}
{/* Left Col: Dotted Menu List */} {t.menuSubtitle} {t.menuTitle}
{menu[aktifKategori]?.urunler.map((item) => { const locItem = getLocalizedMenuItem(item.ad, item.aciklama); return (
{locItem.ad} {/* Dotted lines connector */}
{item.fiyat}

{locItem.desc}

); })}
{/* Category Tab Buttons below the menu */} {menu.map((kat, idx) => ( ))}
{/* Right Col: Active Roasted Octopus Blue Plate image */}
{/* eslint-disable-next-line @next/next/no-img-element */} Roasted Octopus blue plate
{/* ── SECTION 4: LEMON ORCHARD STORY CARD (SICILIA LEMON & LINEN OVERLAYS) ── */}
{/* Left Col: Lemon Flatlay Image */}
{/* eslint-disable-next-line @next/next/no-img-element */} Organic lemons flatlay olive branches
{/* Right Col: Spinning lemon text badge and heritage content */} {t.lemonSubtitle} {t.lemonTitle} {t.lemonDesc} {/* Spinning Seal badge */}
{t.lemonBadgeText} 🍋
{t.lemonBottomText}
{/* ── SECTION 5: SERVICES (PURE SVGS - NO EMOJIS) ── */}
{t.servicesSubtitle}

{t.servicesTitle}

{hizmetler.map((h, i) => { const locServ = getLocalizedService(h.baslik, h.aciklama); return (
{getIconSvg(h.ikon)}

{locServ.title}

{locServ.desc}

); })}
{/* ── SECTION 6: TESTIMONIALS (YORUMLAR) ── */}
{t.testimonialsSubtitle}

{t.testimonialsTitle}

{yorumlar.map((y, i) => { const locComment = getLocalizedTestimonial(y.yazar, y.yorum); return ( {/* SVG Golden Stars */}
{[...Array(y.puan)].map((_, j) => ( ))}

“{locComment}”

{y.yazar.charAt(0)}

{y.yazar}

{y.tarih}
); })}
{/* ── SECTION 7: RANDEVU AL / RESERVATION ── */}
{t.bookingSubtitle}

{t.bookingTitle}

{t.bookingDesc}

{[ { label: t.formName, placeholder: t.formNamePlaceholder, type: "text", full: false }, { label: t.formPhone, placeholder: t.formPhonePlaceholder, type: "tel", full: false }, { label: t.formDate, placeholder: "", type: "date", full: false }, { label: t.formTime, placeholder: "", type: "time", full: false }, { label: t.formGuests, placeholder: "2", type: "number", full: false }, { label: t.formNotes, placeholder: t.formNotesPlaceholder, type: "text", full: true }, ].map((field, i) => (
))}
{t.formSubmit}
{/* ── FOOTER ── */}
{firma.adi}

{firma.slogan} — {t.footerDesc}

📍 {firma.adres}

📞 {firma.telefon}

Primi & Secondi

{menu.map(kat => ( {getLocalizedMenuCategory(kat.kategori)} ))}

Sicilia

{["Our Story", "Pizza & Pasta", "Lemon Orchard", "Reservation"].map(item => ( {item} ))}

© 2026 {firma.adi}. {t.footerRights}

{t.footerPrivacy}

{/* ── FAST BOOKING OVERLAY MODAL ── */} {showBookingModal && (

{t.quickBookTitle}

{t.quickBookDesc}

setShowBookingModal(false)} > {t.quickBookSubmit}
)}
); }