Initial commit from v0
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
"use client";
|
||||
|
||||
import { FadeImage } from "@/components/fade-image";
|
||||
|
||||
const accessories = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Compact Model",
|
||||
description: "120m² living space with optimal energy efficiency",
|
||||
price: "$285,000",
|
||||
image: "/images/hero-side-1.png",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Standard Model",
|
||||
description: "180m² perfect balance of space and sustainability",
|
||||
price: "$395,000",
|
||||
image: "/images/hero-side-2.png",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Premium Model",
|
||||
description: "250m² expansive design with maximum comfort",
|
||||
price: "$525,000",
|
||||
image: "/images/hero-side-4.png",
|
||||
},
|
||||
];
|
||||
|
||||
export function CollectionSection() {
|
||||
return (
|
||||
<section id="accessories" className="bg-background">
|
||||
{/* Section Title */}
|
||||
<div className="px-6 py-20 md:px-12 lg:px-20 md:py-10">
|
||||
<h2 className="text-3xl font-medium tracking-tight text-foreground md:text-4xl">
|
||||
Surface Options
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
{/* Accessories Grid/Carousel */}
|
||||
<div className="pb-24">
|
||||
{/* Mobile: Horizontal Carousel */}
|
||||
<div className="flex gap-6 overflow-x-auto px-6 pb-4 md:hidden snap-x snap-mandatory scrollbar-hide">
|
||||
{accessories.map((accessory) => (
|
||||
<div key={accessory.id} className="group flex-shrink-0 w-[75vw] snap-center">
|
||||
{/* Image */}
|
||||
<div className="relative aspect-[2/3] overflow-hidden rounded-2xl bg-secondary">
|
||||
<FadeImage
|
||||
src={accessory.image || "/placeholder.svg"}
|
||||
alt={accessory.name}
|
||||
fill
|
||||
className="object-cover group-hover:scale-105"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Content */}
|
||||
<div className="py-6">
|
||||
<div className="flex items-start justify-between gap-4">
|
||||
<div className="flex-1">
|
||||
<h3 className="text-lg font-medium leading-snug text-foreground">
|
||||
{accessory.name}
|
||||
</h3>
|
||||
<p className="mt-2 text-sm text-muted-foreground">
|
||||
{accessory.description}
|
||||
</p>
|
||||
</div>
|
||||
<span className="text-lg font-medium text-foreground">
|
||||
{accessory.price}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Desktop: Grid */}
|
||||
<div className="hidden md:grid md:grid-cols-3 gap-8 md:px-12 lg:px-20">
|
||||
{accessories.map((accessory) => (
|
||||
<div key={accessory.id} className="group">
|
||||
{/* Image */}
|
||||
<div className="relative aspect-[2/3] overflow-hidden rounded-2xl bg-secondary">
|
||||
<FadeImage
|
||||
src={accessory.image || "/placeholder.svg"}
|
||||
alt={accessory.name}
|
||||
fill
|
||||
className="object-cover group-hover:scale-105"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Content */}
|
||||
<div className="py-6">
|
||||
<div className="flex items-start justify-between gap-4">
|
||||
<div className="flex-1">
|
||||
<h3 className="text-lg font-medium leading-snug text-foreground">
|
||||
{accessory.name}
|
||||
</h3>
|
||||
<p className="mt-2 text-sm text-muted-foreground">
|
||||
{accessory.description}
|
||||
</p>
|
||||
</div>
|
||||
<span className="font-medium text-foreground text-2xl">
|
||||
{accessory.price}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
"use client";
|
||||
|
||||
import { useRef, useState, useEffect, useCallback } from "react";
|
||||
|
||||
const specs = [
|
||||
{ label: "Surface Area", value: "180m²" },
|
||||
{ label: "Energy Use", value: "15 kWh/m²" },
|
||||
{ label: "Solar Panels", value: "40 m²" },
|
||||
{ label: "Carbon Balance", value: "-20%" },
|
||||
];
|
||||
|
||||
export function EditorialSection() {
|
||||
const videoRef = useRef<HTMLDivElement>(null);
|
||||
const [scrollProgress, setScrollProgress] = useState(0);
|
||||
const rafRef = useRef<number | null>(null);
|
||||
|
||||
const updateParallax = useCallback(() => {
|
||||
if (!videoRef.current) return;
|
||||
|
||||
const rect = videoRef.current.getBoundingClientRect();
|
||||
const windowHeight = window.innerHeight;
|
||||
|
||||
// Calculate when video enters and exits viewport
|
||||
const videoTop = rect.top;
|
||||
const videoBottom = rect.bottom;
|
||||
|
||||
// Progress from 0 (entering viewport) to 1 (exiting viewport)
|
||||
if (videoBottom > 0 && videoTop < windowHeight) {
|
||||
const progress = 1 - (videoTop + rect.height / 2) / (windowHeight + rect.height);
|
||||
setScrollProgress(Math.max(0, Math.min(1, progress)));
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
if (rafRef.current) {
|
||||
cancelAnimationFrame(rafRef.current);
|
||||
}
|
||||
rafRef.current = requestAnimationFrame(updateParallax);
|
||||
};
|
||||
|
||||
window.addEventListener("scroll", handleScroll, { passive: true });
|
||||
updateParallax();
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("scroll", handleScroll);
|
||||
if (rafRef.current) {
|
||||
cancelAnimationFrame(rafRef.current);
|
||||
}
|
||||
};
|
||||
}, [updateParallax]);
|
||||
|
||||
// Parallax effect: video moves up as you scroll down
|
||||
const parallaxY = (scrollProgress - 0.5) * 30; // -15px to +15px range
|
||||
|
||||
return (
|
||||
<section className="bg-background">
|
||||
{/* Newsletter Banner */}
|
||||
|
||||
|
||||
{/* Decorative Icons */}
|
||||
<div className="flex items-center justify-center gap-6 pb-20">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{/* Full-width Video with Parallax */}
|
||||
<div ref={videoRef} className="relative aspect-[16/9] w-full md:aspect-[21/9] overflow-hidden">
|
||||
<video
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
playsInline
|
||||
className="absolute inset-0 h-full w-full object-cover"
|
||||
style={{
|
||||
transform: `scale(1.15) translate3d(0, ${parallaxY}px, 0) translateZ(0)`,
|
||||
WebkitTransform: `scale(1.15) translate3d(0, ${parallaxY}px, 0) translateZ(0)`,
|
||||
backfaceVisibility: 'hidden',
|
||||
WebkitBackfaceVisibility: 'hidden',
|
||||
willChange: 'transform',
|
||||
}}
|
||||
src="https://hebbkx1anhila5yf.public.blob.vercel-storage.com/27eb7fb4-0105-4010-ac9e-0ac977a31b05_1-FZ89nvBAAsR3caRJbhYv7T2mjBofth.mp4"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Specs Grid */}
|
||||
<div className="grid grid-cols-2 border-t border-border md:grid-cols-4">
|
||||
{specs.map((spec) => (
|
||||
<div
|
||||
key={spec.label}
|
||||
className="border-b border-r border-border p-8 text-center last:border-r-0 md:border-b-0"
|
||||
>
|
||||
<p className="mb-2 text-xs uppercase tracking-widest text-muted-foreground">
|
||||
{spec.label}
|
||||
</p>
|
||||
<p className="font-medium text-foreground text-5xl">
|
||||
{spec.value}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
"use client";
|
||||
|
||||
import { FadeImage } from "@/components/fade-image";
|
||||
|
||||
const features = [
|
||||
{
|
||||
image: "/images/4312e1bb-e030-4528-b6df-8a6ea69fe384.png",
|
||||
span: "col-span-2 row-span-2", // Large
|
||||
},
|
||||
{
|
||||
image: "/images/b2401fa5-4eac-465f-b1f9-014aadc182ee.png",
|
||||
span: "col-span-1 row-span-1", // Small
|
||||
},
|
||||
{
|
||||
image: "/images/dd1b32a8-3722-4ea2-8808-10d53532809d.png",
|
||||
span: "col-span-1 row-span-1", // Small
|
||||
},
|
||||
{
|
||||
image: "/images/61af06cc-84d0-4031-a0ed-76fc43b1c1e1.png",
|
||||
span: "col-span-1 row-span-2", // Tall
|
||||
},
|
||||
{
|
||||
image: "/images/249083d2-c49c-4c06-a125-376284d90c42.png",
|
||||
span: "col-span-1 row-span-1", // Small
|
||||
},
|
||||
{
|
||||
image: "/images/7638f650-8586-4403-8c13-141921a04f9d.png",
|
||||
span: "col-span-2 row-span-1", // Wide
|
||||
},
|
||||
{
|
||||
image: "/images/5b3bdb95-fac7-4d22-aa97-98b5d547b2db.png",
|
||||
span: "col-span-1 row-span-1", // Small
|
||||
},
|
||||
{
|
||||
image: "/images/634f7bae-77a5-49d0-a0ab-5271a6194e66.png",
|
||||
span: "col-span-1 row-span-2", // Tall
|
||||
},
|
||||
{
|
||||
image: "/images/09ffa8fd-cdd1-453f-9aa2-d6c702a1f4b5.png",
|
||||
span: "col-span-2 row-span-1", // Wide
|
||||
},
|
||||
{
|
||||
image: "/images/040e36b1-d16f-474b-a712-a9979e6ab479.png",
|
||||
span: "col-span-1 row-span-1", // Small
|
||||
},
|
||||
];
|
||||
|
||||
export function FeaturedProductsSection() {
|
||||
return (
|
||||
<section id="technology" className="relative bg-background py-20 md:py-32">
|
||||
<div className="px-4 md:px-12 lg:px-20">
|
||||
{/* Bento Grid */}
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 md:gap-4 w-full max-w-7xl mx-auto auto-rows-[180px] md:auto-rows-[220px]">
|
||||
{features.map((feature, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className={`relative overflow-hidden rounded-lg border border-gray-200 ${feature.span}`}
|
||||
>
|
||||
<FadeImage
|
||||
src={feature.image || "/placeholder.svg"}
|
||||
alt={`Architecture sketch ${index + 1}`}
|
||||
fill
|
||||
className="object-cover"
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
|
||||
const footerLinks = {
|
||||
explore: [
|
||||
{ label: "Products", href: "#products" },
|
||||
{ label: "Technology", href: "#technology" },
|
||||
{ label: "Gallery", href: "#gallery" },
|
||||
{ label: "Accessories", href: "#accessories" },
|
||||
],
|
||||
about: [
|
||||
{ label: "Our Story", href: "#" },
|
||||
{ label: "Team", href: "#" },
|
||||
{ label: "Careers", href: "#" },
|
||||
{ label: "Contact", href: "#" },
|
||||
],
|
||||
service: [
|
||||
{ label: "FAQ", href: "#" },
|
||||
{ label: "Shipping", href: "#" },
|
||||
{ label: "Returns", href: "#" },
|
||||
{ label: "Warranty", href: "#" },
|
||||
],
|
||||
};
|
||||
|
||||
export function FooterSection() {
|
||||
return (
|
||||
<footer className="bg-background">
|
||||
{/* Main Footer Content */}
|
||||
<div className="border-t border-border px-6 py-16 md:px-12 md:py-20 lg:px-20">
|
||||
<div className="grid grid-cols-2 gap-12 md:grid-cols-4 lg:grid-cols-5">
|
||||
{/* Brand */}
|
||||
<div className="col-span-2 md:col-span-1 lg:col-span-2">
|
||||
<Link href="#hero" className="text-lg font-medium text-foreground">
|
||||
MONO
|
||||
</Link>
|
||||
<p className="mt-4 max-w-xs text-sm leading-relaxed text-muted-foreground">
|
||||
Sustainable design homes combining contemporary aesthetics with energy efficiency and eco-friendly materials.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Explore */}
|
||||
<div>
|
||||
<h4 className="mb-4 text-sm font-medium text-foreground">Explore</h4>
|
||||
<ul className="space-y-3">
|
||||
{footerLinks.explore.map((link) => (
|
||||
<li key={link.label}>
|
||||
<Link
|
||||
href={link.href}
|
||||
className="text-sm text-muted-foreground transition-colors hover:text-foreground"
|
||||
>
|
||||
{link.label}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* About */}
|
||||
<div>
|
||||
<h4 className="mb-4 text-sm font-medium text-foreground">About</h4>
|
||||
<ul className="space-y-3">
|
||||
{footerLinks.about.map((link) => (
|
||||
<li key={link.label}>
|
||||
<Link
|
||||
href={link.href}
|
||||
className="text-sm text-muted-foreground transition-colors hover:text-foreground"
|
||||
>
|
||||
{link.label}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Service */}
|
||||
<div>
|
||||
<h4 className="mb-4 text-sm font-medium text-foreground">Service</h4>
|
||||
<ul className="space-y-3">
|
||||
{footerLinks.service.map((link) => (
|
||||
<li key={link.label}>
|
||||
<Link
|
||||
href={link.href}
|
||||
className="text-sm text-muted-foreground transition-colors hover:text-foreground"
|
||||
>
|
||||
{link.label}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Bottom Bar */}
|
||||
<div className="border-t border-border px-6 py-6 md:px-12 lg:px-20">
|
||||
<div className="flex flex-col items-center justify-between gap-4 md:flex-row">
|
||||
<p className="text-xs text-muted-foreground">
|
||||
2026 MONO. All rights reserved.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
{/* Social Links */}
|
||||
<div className="flex items-center gap-4">
|
||||
<Link
|
||||
href="#"
|
||||
className="text-xs text-muted-foreground transition-colors hover:text-foreground"
|
||||
>
|
||||
Instagram
|
||||
</Link>
|
||||
<Link
|
||||
href="#"
|
||||
className="text-xs text-muted-foreground transition-colors hover:text-foreground"
|
||||
>
|
||||
Twitter
|
||||
</Link>
|
||||
<Link
|
||||
href="#"
|
||||
className="text-xs text-muted-foreground transition-colors hover:text-foreground"
|
||||
>
|
||||
YouTube
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
import { useEffect, useRef, useState, useCallback } from "react";
|
||||
|
||||
export function GallerySection() {
|
||||
const galleryRef = useRef<HTMLDivElement>(null);
|
||||
const [scrollProgress, setScrollProgress] = useState(0);
|
||||
const rafRef = useRef<number | null>(null);
|
||||
|
||||
const images = [
|
||||
{ src: "/images/mono-1.png", alt: "Modern architecture at sunrise" },
|
||||
{ src: "/images/mono-2.png", alt: "Modern architecture in daylight" },
|
||||
{ src: "/images/mono-3.png", alt: "Modern architecture at dusk" },
|
||||
{ src: "/images/mono-4.png", alt: "Modern architecture at night" },
|
||||
];
|
||||
|
||||
const updateTransform = useCallback(() => {
|
||||
if (!galleryRef.current) return;
|
||||
|
||||
const rect = galleryRef.current.getBoundingClientRect();
|
||||
const windowHeight = window.innerHeight;
|
||||
const sectionHeight = galleryRef.current.offsetHeight;
|
||||
|
||||
// Calculate scroll progress through the section
|
||||
const scrollableRange = sectionHeight - windowHeight;
|
||||
const scrolled = -rect.top;
|
||||
const progress = Math.max(0, Math.min(1, scrolled / scrollableRange));
|
||||
|
||||
setScrollProgress(progress);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
if (rafRef.current) {
|
||||
cancelAnimationFrame(rafRef.current);
|
||||
}
|
||||
rafRef.current = requestAnimationFrame(updateTransform);
|
||||
};
|
||||
|
||||
window.addEventListener("scroll", handleScroll, { passive: true });
|
||||
updateTransform();
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("scroll", handleScroll);
|
||||
if (rafRef.current) {
|
||||
cancelAnimationFrame(rafRef.current);
|
||||
}
|
||||
};
|
||||
}, [updateTransform]);
|
||||
|
||||
const isLastImage = images.length - 1;
|
||||
|
||||
// Calculate fullscreen progress for the last image - more gradual
|
||||
// Start expanding when last image is 80% stacked, finish at end of section
|
||||
const fullscreenStartProgress = 0.6; // Start earlier for smoother transition
|
||||
const fullscreenProgress = Math.max(0, Math.min(1, (scrollProgress - fullscreenStartProgress) / (1 - fullscreenStartProgress)));
|
||||
|
||||
// Ease out cubic for smoother animation
|
||||
const easedFullscreenProgress = 1 - Math.pow(1 - fullscreenProgress, 3);
|
||||
|
||||
return (
|
||||
<section
|
||||
id="gallery"
|
||||
ref={galleryRef}
|
||||
className="relative bg-black"
|
||||
style={{ minHeight: `${(images.length + 1) * 100}vh` }}
|
||||
>
|
||||
{/* Sticky container */}
|
||||
<div className="sticky top-0 h-screen overflow-hidden flex items-center justify-center px-4">
|
||||
<div className="relative w-full max-w-5xl h-[70vh] md:h-[80vh]">
|
||||
{images.map((image, index) => {
|
||||
const isLast = index === isLastImage;
|
||||
|
||||
// Calculate stacking progress for each image
|
||||
const imageProgress = (scrollProgress * images.length) - index;
|
||||
const stackProgress = Math.max(0, Math.min(1, imageProgress));
|
||||
|
||||
// Images start below and move up to stack
|
||||
let translateY = (1 - stackProgress) * 100; // 100% to 0%
|
||||
let scale = 0.8 + (stackProgress * 0.2); // 0.8 to 1
|
||||
let opacity = stackProgress;
|
||||
|
||||
// Last image expands to fullscreen smoothly
|
||||
if (isLast) {
|
||||
// Blend between normal scale and expanded scale
|
||||
const normalScale = 0.8 + (stackProgress * 0.2);
|
||||
const expandedScale = 1 + (easedFullscreenProgress * 0.8); // 1 to 1.8
|
||||
scale = normalScale + (Math.max(0, stackProgress - 0.8) * 5) * (expandedScale - normalScale);
|
||||
}
|
||||
|
||||
// Calculate z-index so later images appear on top
|
||||
const zIndex = index;
|
||||
|
||||
// Remove border radius on last image when expanding - gradual transition
|
||||
const borderRadius = isLast && easedFullscreenProgress > 0.3 ? (1 - easedFullscreenProgress) * 16 : undefined;
|
||||
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className="absolute inset-0 flex items-center justify-center"
|
||||
style={{
|
||||
zIndex,
|
||||
transform: `translate3d(0, ${translateY}%, 0) scale(${scale}) translateZ(0)`,
|
||||
WebkitTransform: `translate3d(0, ${translateY}%, 0) scale(${scale}) translateZ(0)`,
|
||||
opacity,
|
||||
backfaceVisibility: 'hidden',
|
||||
WebkitBackfaceVisibility: 'hidden',
|
||||
willChange: 'transform, opacity',
|
||||
WebkitFontSmoothing: 'antialiased',
|
||||
}}
|
||||
>
|
||||
<div
|
||||
className="relative w-full h-full overflow-hidden rounded-xl md:rounded-2xl"
|
||||
style={{
|
||||
borderRadius: borderRadius !== undefined ? `${borderRadius}px` : undefined,
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
src={image.src || "/placeholder.svg"}
|
||||
alt={image.alt}
|
||||
fill
|
||||
className="object-cover"
|
||||
priority={index < 3}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
||||
const word = "MONO";
|
||||
|
||||
const sideImages = [
|
||||
{
|
||||
src: "/images/hero-side-1.png",
|
||||
alt: "Modern architecture with corten steel",
|
||||
position: "left",
|
||||
span: 1,
|
||||
},
|
||||
{
|
||||
src: "/images/hero-side-2.png",
|
||||
alt: "Aerial view of modern home",
|
||||
position: "left",
|
||||
span: 1,
|
||||
},
|
||||
{
|
||||
src: "/images/hero-side-3.png",
|
||||
alt: "Interior view with landscape",
|
||||
position: "right",
|
||||
span: 1,
|
||||
},
|
||||
{
|
||||
src: "/images/hero-side-4.png",
|
||||
alt: "Modern architecture at night",
|
||||
position: "right",
|
||||
span: 1,
|
||||
},
|
||||
];
|
||||
|
||||
export function HeroSection() {
|
||||
const sectionRef = useRef<HTMLElement>(null);
|
||||
const [scrollProgress, setScrollProgress] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
if (!sectionRef.current) return;
|
||||
|
||||
const rect = sectionRef.current.getBoundingClientRect();
|
||||
const scrollableHeight = window.innerHeight * 2;
|
||||
const scrolled = -rect.top;
|
||||
const progress = Math.max(0, Math.min(1, scrolled / scrollableHeight));
|
||||
|
||||
setScrollProgress(progress);
|
||||
};
|
||||
|
||||
window.addEventListener("scroll", handleScroll, { passive: true });
|
||||
handleScroll();
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("scroll", handleScroll);
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Text fades out first (0 to 0.2)
|
||||
const textOpacity = Math.max(0, 1 - (scrollProgress / 0.2));
|
||||
|
||||
// Image transforms start after text fades (0.2 to 1)
|
||||
const imageProgress = Math.max(0, Math.min(1, (scrollProgress - 0.2) / 0.8));
|
||||
|
||||
// Smooth interpolations - More balanced distribution
|
||||
const centerWidth = 100 - (imageProgress * 80); // 100% to 20% (same as each side image)
|
||||
const centerHeight = 100; // Always 100% height
|
||||
const sideWidth = imageProgress * 40; // 0% to 40% (20% per image, 2 images = 40%)
|
||||
const sideOpacity = imageProgress;
|
||||
const sideTranslateLeft = -100 + (imageProgress * 100); // -100% to 0%
|
||||
const sideTranslateRight = 100 - (imageProgress * 100); // 100% to 0%
|
||||
const borderRadius = 0; // No border radius
|
||||
const gap = imageProgress * 8; // 0px to 8px
|
||||
|
||||
// Vertical offset for side columns to move them up on mobile
|
||||
const sideTranslateY = -(imageProgress * 15); // Move up by 15% when fully expanded
|
||||
|
||||
return (
|
||||
<section ref={sectionRef} className="relative bg-background">
|
||||
{/* Sticky container for scroll animation */}
|
||||
<div className="sticky top-0 h-screen overflow-hidden">
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
{/* Bento Grid Container */}
|
||||
<div
|
||||
className="relative flex h-full w-full items-stretch justify-center"
|
||||
style={{ gap: `${gap}px` }}
|
||||
>
|
||||
|
||||
{/* Left Column */}
|
||||
<div
|
||||
className="flex h-full flex-row will-change-transform"
|
||||
style={{
|
||||
width: `${sideWidth}%`,
|
||||
gap: `${gap}px`,
|
||||
transform: `translateX(${sideTranslateLeft}%) translateY(${sideTranslateY}%)`,
|
||||
opacity: sideOpacity,
|
||||
}}
|
||||
>
|
||||
{sideImages.filter(img => img.position === "left").map((img, idx) => (
|
||||
<div
|
||||
key={idx}
|
||||
className="relative h-full overflow-hidden will-change-transform"
|
||||
style={{
|
||||
flex: img.span,
|
||||
borderRadius: `${borderRadius}px`,
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
src={img.src || "/placeholder.svg"}
|
||||
alt={img.alt}
|
||||
fill
|
||||
className="object-cover"
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Main Hero Image - Center */}
|
||||
<div
|
||||
className="relative overflow-hidden will-change-transform"
|
||||
style={{
|
||||
width: `${centerWidth}%`,
|
||||
height: `${centerHeight}%`,
|
||||
flex: "0 0 auto",
|
||||
borderRadius: `${borderRadius}px`,
|
||||
}}
|
||||
>
|
||||
{/* Text Behind - Fades out first */}
|
||||
<div
|
||||
className="absolute inset-0 z-0 flex items-center justify-center"
|
||||
style={{ opacity: textOpacity, transform: 'translateY(-200px)' }}
|
||||
>
|
||||
<h1 className="whitespace-nowrap text-[35vw] font-bold leading-[0.8] tracking-tighter text-black">
|
||||
{word.split("").map((letter, index) => (
|
||||
<span
|
||||
key={index}
|
||||
className="inline-block animate-[slideUp_0.8s_ease-out_forwards] opacity-0"
|
||||
style={{
|
||||
animationDelay: `${index * 0.08}s`,
|
||||
transition: 'all 1.5s',
|
||||
transitionTimingFunction: 'cubic-bezier(0.86, 0, 0.07, 1)',
|
||||
}}
|
||||
>
|
||||
{letter}
|
||||
</span>
|
||||
))}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<Image
|
||||
src="/images/hero-mono.png"
|
||||
alt="Modern architectural structure with reflection"
|
||||
fill
|
||||
className="absolute inset-0 z-10 object-cover"
|
||||
priority
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Right Column */}
|
||||
<div
|
||||
className="flex h-full flex-row will-change-transform"
|
||||
style={{
|
||||
width: `${sideWidth}%`,
|
||||
gap: `${gap}px`,
|
||||
transform: `translateX(${sideTranslateRight}%) translateY(${sideTranslateY}%)`,
|
||||
opacity: sideOpacity,
|
||||
}}
|
||||
>
|
||||
{sideImages.filter(img => img.position === "right").map((img, idx) => (
|
||||
<div
|
||||
key={idx}
|
||||
className="relative h-full overflow-hidden will-change-transform"
|
||||
style={{
|
||||
flex: img.span,
|
||||
borderRadius: `${borderRadius}px`,
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
src={img.src || "/placeholder.svg"}
|
||||
alt={img.alt}
|
||||
fill
|
||||
className="object-cover"
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Tagline Section - Fixed at bottom */}
|
||||
<div
|
||||
className="pointer-events-none fixed bottom-0 left-0 right-0 z-10 px-6 pb-12 md:px-12 md:pb-16 lg:px-20 lg:pb-20"
|
||||
style={{ opacity: textOpacity }}
|
||||
>
|
||||
<p className="mx-auto max-w-2xl text-center text-2xl leading-relaxed text-white md:text-3xl lg:text-[2.5rem] lg:leading-snug">
|
||||
Lightweight, durable
|
||||
<br />
|
||||
and adventure-ready.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Scroll space to enable animation */}
|
||||
<div className="h-[200vh]" />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
import { useEffect, useRef, useState, useCallback } from "react";
|
||||
|
||||
const titles = [
|
||||
"Sustainable Architecture.",
|
||||
"Built for Tomorrow.",
|
||||
"Eco-Responsible.",
|
||||
];
|
||||
|
||||
export function PhilosophySection() {
|
||||
const sectionRef = useRef<HTMLDivElement>(null);
|
||||
const descriptionRef = useRef<HTMLDivElement>(null);
|
||||
const [titleOpacity, setTitleOpacity] = useState(0);
|
||||
const [descriptionProgress, setDescriptionProgress] = useState(0);
|
||||
const rafRef = useRef<number | null>(null);
|
||||
|
||||
const updateTransforms = useCallback(() => {
|
||||
if (!sectionRef.current) return;
|
||||
|
||||
const rect = sectionRef.current.getBoundingClientRect();
|
||||
const windowHeight = window.innerHeight;
|
||||
const sectionHeight = sectionRef.current.offsetHeight;
|
||||
|
||||
// Calculate progress based on scroll position
|
||||
const scrollableRange = sectionHeight - windowHeight;
|
||||
const scrolled = -rect.top;
|
||||
const progress = Math.max(0, Math.min(1, scrolled / scrollableRange));
|
||||
|
||||
// Title rotates through 3 texts based on scroll progress
|
||||
setTitleOpacity(progress);
|
||||
|
||||
// Description word animation
|
||||
if (descriptionRef.current) {
|
||||
const descRect = descriptionRef.current.getBoundingClientRect();
|
||||
const descTop = descRect.top;
|
||||
const descHeight = descRect.height;
|
||||
|
||||
// Start animation when element enters viewport
|
||||
const startTrigger = windowHeight * 0.8;
|
||||
const endTrigger = windowHeight * 0.2;
|
||||
|
||||
if (descTop < startTrigger && descTop > endTrigger - descHeight) {
|
||||
const descProgress = Math.max(0, Math.min(1, (startTrigger - descTop) / (startTrigger - endTrigger)));
|
||||
setDescriptionProgress(descProgress);
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
// Cancel any pending animation frame
|
||||
if (rafRef.current) {
|
||||
cancelAnimationFrame(rafRef.current);
|
||||
}
|
||||
|
||||
// Use requestAnimationFrame for smooth updates
|
||||
rafRef.current = requestAnimationFrame(updateTransforms);
|
||||
};
|
||||
|
||||
window.addEventListener("scroll", handleScroll, { passive: true });
|
||||
updateTransforms();
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("scroll", handleScroll);
|
||||
if (rafRef.current) {
|
||||
cancelAnimationFrame(rafRef.current);
|
||||
}
|
||||
};
|
||||
}, [updateTransforms]);
|
||||
|
||||
return (
|
||||
<section id="products" className="bg-background">
|
||||
{/* Scroll-Animated Product Grid */}
|
||||
<div ref={sectionRef} className="relative" style={{ height: "200vh" }}>
|
||||
<div className="sticky top-0 h-screen flex items-center justify-center overflow-hidden">
|
||||
<div className="relative w-full max-w-7xl px-4">
|
||||
{/* Title - centered with 3D rotation */}
|
||||
<div
|
||||
className="flex items-center justify-center pointer-events-none"
|
||||
style={{
|
||||
perspective: '1000px',
|
||||
}}
|
||||
>
|
||||
<div className="relative w-full" style={{ transformStyle: 'preserve-3d', minHeight: '150px' }}>
|
||||
{titles.map((title, index) => {
|
||||
// Last text "Built to last" stays visible at the end
|
||||
const isLastText = index === titles.length - 1;
|
||||
|
||||
// Calculate which text should be visible based on scroll progress
|
||||
const segmentSize = 1 / titles.length;
|
||||
const startProgress = index * segmentSize;
|
||||
const endProgress = (index + 1) * segmentSize;
|
||||
|
||||
let rotateX = 0;
|
||||
let opacity = 0;
|
||||
|
||||
if (titleOpacity >= startProgress && titleOpacity < endProgress) {
|
||||
// Active text - rotating in
|
||||
const localProgress = (titleOpacity - startProgress) / segmentSize;
|
||||
rotateX = (1 - localProgress) * 90;
|
||||
opacity = localProgress;
|
||||
} else if (titleOpacity >= endProgress) {
|
||||
// Text that has passed - last text stays visible
|
||||
if (isLastText) {
|
||||
rotateX = 0;
|
||||
opacity = 1;
|
||||
} else {
|
||||
rotateX = -90;
|
||||
opacity = 0;
|
||||
}
|
||||
} else {
|
||||
// Text that hasn't appeared yet
|
||||
rotateX = 90;
|
||||
opacity = 0;
|
||||
}
|
||||
|
||||
return (
|
||||
<h2
|
||||
key={index}
|
||||
className="absolute inset-0 flex items-center justify-center text-[8vw] sm:text-[7vw] font-medium leading-tight tracking-tighter text-foreground md:text-[6vw] lg:text-[5vw] text-center px-4"
|
||||
style={{
|
||||
transform: `rotateX(${rotateX}deg) translateZ(0)`,
|
||||
opacity,
|
||||
transformStyle: 'preserve-3d',
|
||||
backfaceVisibility: 'hidden',
|
||||
WebkitBackfaceVisibility: 'hidden',
|
||||
willChange: 'transform, opacity',
|
||||
WebkitFontSmoothing: 'antialiased',
|
||||
}}
|
||||
>
|
||||
{title}
|
||||
</h2>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Description */}
|
||||
<div ref={descriptionRef} className="px-6 pt-8 pb-20 md:px-12 md:pt-12 md:pb-28 lg:px-20 lg:pt-16 lg:pb-36">
|
||||
<div className="text-center">
|
||||
|
||||
<p className="mt-8 leading-relaxed text-muted-foreground text-3xl text-center">
|
||||
{("A design home that combines contemporary aesthetics and energy performance. Built with eco-friendly materials, it minimizes carbon footprint while offering optimal comfort.").split(" ").map((word, index, array) => {
|
||||
const wordProgress = Math.max(0, Math.min(1, (descriptionProgress * array.length) - index));
|
||||
const opacity = wordProgress;
|
||||
const blur = (1 - wordProgress) * 40;
|
||||
|
||||
return (
|
||||
<span
|
||||
key={index}
|
||||
style={{
|
||||
opacity,
|
||||
filter: `blur(${blur}px)`,
|
||||
transition: 'opacity 0.3s ease, filter 0.3s ease',
|
||||
}}
|
||||
>
|
||||
{word}{index < array.length - 1 ? " " : ""}
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,348 @@
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
||||
function ScrollRevealText({ text }: { text: string }) {
|
||||
const containerRef = useRef<HTMLParagraphElement>(null);
|
||||
const [progress, setProgress] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
if (!containerRef.current) return;
|
||||
|
||||
const rect = containerRef.current.getBoundingClientRect();
|
||||
const windowHeight = window.innerHeight;
|
||||
|
||||
// Slower animation - more viewport range
|
||||
const startOffset = windowHeight * 0.9;
|
||||
const endOffset = windowHeight * 0.1;
|
||||
|
||||
const totalDistance = startOffset - endOffset;
|
||||
const currentPosition = startOffset - rect.top;
|
||||
|
||||
const newProgress = Math.max(0, Math.min(1, currentPosition / totalDistance));
|
||||
setProgress(newProgress);
|
||||
};
|
||||
|
||||
window.addEventListener("scroll", handleScroll, { passive: true });
|
||||
handleScroll(); // Initial check
|
||||
|
||||
return () => window.removeEventListener("scroll", handleScroll);
|
||||
}, []);
|
||||
|
||||
const words = text.split(" ");
|
||||
|
||||
return (
|
||||
<p
|
||||
ref={containerRef}
|
||||
className="text-3xl font-semibold leading-snug text-white md:text-4xl lg:text-5xl"
|
||||
>
|
||||
{words.map((word, index) => {
|
||||
// Calculate blur and opacity based on scroll progress
|
||||
const appearProgress = progress * (words.length + 1);
|
||||
const wordAppearProgress = Math.max(0, Math.min(1, appearProgress - index));
|
||||
const wordOpacity = wordAppearProgress;
|
||||
const wordBlur = (1 - wordAppearProgress) * 40;
|
||||
|
||||
return (
|
||||
<span
|
||||
key={index}
|
||||
className="inline-block"
|
||||
style={{
|
||||
opacity: wordOpacity,
|
||||
filter: `blur(${wordBlur}px)`,
|
||||
transition: 'opacity 0.1s linear, filter 0.1s linear',
|
||||
marginRight: '0.3em',
|
||||
}}
|
||||
>
|
||||
{word}
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
||||
const sideImages = [
|
||||
{
|
||||
src: "/images/interior-view.png",
|
||||
alt: "Interior view with landscape",
|
||||
position: "left",
|
||||
},
|
||||
{
|
||||
src: "/images/rusted-metal.png",
|
||||
alt: "Rusted metal texture",
|
||||
position: "right",
|
||||
},
|
||||
];
|
||||
|
||||
const textCycles = [
|
||||
"Design & Sustainability.",
|
||||
"Passive Energy.",
|
||||
"Bio-sourced Construction.",
|
||||
];
|
||||
|
||||
export function TechnologySection() {
|
||||
const sectionRef = useRef<HTMLElement>(null);
|
||||
const textSectionRef = useRef<HTMLDivElement>(null);
|
||||
const [scrollProgress, setScrollProgress] = useState(0);
|
||||
const [textProgress, setTextProgress] = useState(0);
|
||||
|
||||
const descriptionText = "Passive architecture reimagining modern living. Triple glazing, reinforced insulation and natural ventilation combine with solar panels to create an energy-autonomous home. Bio-sourced materials like solid wood and hemp wool ensure healthy indoor air and minimal ecological footprint.";
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
if (!sectionRef.current) return;
|
||||
|
||||
const rect = sectionRef.current.getBoundingClientRect();
|
||||
const scrollableHeight = window.innerHeight * 4; // Increased for 3 text cycles
|
||||
const scrolled = -rect.top;
|
||||
const progress = Math.max(0, Math.min(1, scrolled / scrollableHeight));
|
||||
|
||||
setScrollProgress(progress);
|
||||
|
||||
// Text scroll progress
|
||||
if (textSectionRef.current) {
|
||||
const textRect = textSectionRef.current.getBoundingClientRect();
|
||||
const windowHeight = window.innerHeight;
|
||||
|
||||
const startOffset = windowHeight * 0.9;
|
||||
const endOffset = windowHeight * 0.1;
|
||||
|
||||
const totalDistance = startOffset - endOffset;
|
||||
const currentPosition = startOffset - textRect.top;
|
||||
|
||||
const newTextProgress = Math.max(0, Math.min(1, currentPosition / totalDistance));
|
||||
setTextProgress(newTextProgress);
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener("scroll", handleScroll, { passive: true });
|
||||
handleScroll();
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("scroll", handleScroll);
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Title fades out first (0 to 0.2)
|
||||
const titleOpacity = Math.max(0, 1 - (scrollProgress / 0.2));
|
||||
|
||||
// Image transforms start after title fades (0.2 to 1)
|
||||
const imageProgress = Math.max(0, Math.min(1, (scrollProgress - 0.2) / 0.8));
|
||||
|
||||
// Smooth interpolations
|
||||
const centerWidth = 100 - (imageProgress * 58); // 100% to 42%
|
||||
const centerHeight = 100 - (imageProgress * 30); // 100% to 70%
|
||||
const sideWidth = imageProgress * 22; // 0% to 22%
|
||||
const sideOpacity = imageProgress;
|
||||
const sideTranslateLeft = -100 + (imageProgress * 100); // -100% to 0%
|
||||
const sideTranslateRight = 100 - (imageProgress * 100); // 100% to 0%
|
||||
const gap = imageProgress * 16; // 0px to 16px
|
||||
|
||||
// Calculate grayscale for text section based on textProgress
|
||||
const grayscaleAmount = Math.round((1 - textProgress) * 100);
|
||||
|
||||
return (
|
||||
<section ref={sectionRef} className="relative bg-foreground">
|
||||
{/* Sticky container for scroll animation */}
|
||||
<div className="sticky top-0 h-screen overflow-hidden">
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
{/* Bento Grid Container */}
|
||||
<div
|
||||
className="relative flex h-full w-full items-stretch justify-center"
|
||||
style={{ gap: `${gap}px`, padding: `${imageProgress * 16}px` }}
|
||||
>
|
||||
|
||||
{/* Left Column */}
|
||||
<div
|
||||
className="relative overflow-hidden will-change-transform"
|
||||
style={{
|
||||
width: `${sideWidth}%`,
|
||||
height: "100%",
|
||||
transform: `translateX(${sideTranslateLeft}%)`,
|
||||
opacity: sideOpacity,
|
||||
}}
|
||||
>
|
||||
{sideImages.filter(img => img.position === "left").map((img, idx) => (
|
||||
<Image
|
||||
key={idx}
|
||||
src={img.src || "/placeholder.svg"}
|
||||
alt={img.alt}
|
||||
fill
|
||||
className="object-cover"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Main Center Image */}
|
||||
<div
|
||||
className="relative overflow-hidden will-change-transform"
|
||||
style={{
|
||||
width: `${centerWidth}%`,
|
||||
height: "100%",
|
||||
flex: "0 0 auto",
|
||||
}}
|
||||
>
|
||||
{/* Layered Images - Progressive Fade In */}
|
||||
{/* Image 1 - Base layer - Sunrise/Sunset with sun rays */}
|
||||
<Image
|
||||
src="/images/mono-1.png"
|
||||
alt="Modern architecture at sunrise"
|
||||
fill
|
||||
className="object-cover"
|
||||
style={{
|
||||
opacity: scrollProgress < 0.25 ? 1 : 1,
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Image 2 - Daytime scene - Fades in during first text cycle */}
|
||||
<Image
|
||||
src="/images/mono-2.png"
|
||||
alt="Modern architecture in daylight"
|
||||
fill
|
||||
className="absolute inset-0 object-cover"
|
||||
style={{
|
||||
opacity: Math.max(0, Math.min(1, (scrollProgress - 0.1) / 0.2)),
|
||||
transition: 'opacity 0.3s ease',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Image 3 - Dusk/Evening - Fades in during second text cycle */}
|
||||
<Image
|
||||
src="/images/mono-3.png"
|
||||
alt="Modern architecture at dusk"
|
||||
fill
|
||||
className="absolute inset-0 object-cover"
|
||||
style={{
|
||||
opacity: Math.max(0, Math.min(1, (scrollProgress - 0.4) / 0.2)),
|
||||
transition: 'opacity 0.3s ease',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Image 4 - Night with stars - Fades in during third text cycle */}
|
||||
<Image
|
||||
src="/images/mono-4.png"
|
||||
alt="Modern architecture at night"
|
||||
fill
|
||||
className="absolute inset-0 object-cover"
|
||||
style={{
|
||||
opacity: Math.max(0, Math.min(1, (scrollProgress - 0.7) / 0.2)),
|
||||
transition: 'opacity 0.3s ease',
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="absolute inset-0 bg-foreground/40" />
|
||||
|
||||
{/* Title Text - Cycles through 3 texts with blur effect */}
|
||||
<div
|
||||
className="absolute inset-0 flex flex-col items-center justify-center px-6 text-center"
|
||||
>
|
||||
{textCycles.map((text, cycleIndex) => {
|
||||
// Each text cycle takes 1/3 of the scroll progress
|
||||
const cycleStart = cycleIndex / textCycles.length;
|
||||
const cycleEnd = (cycleIndex + 1) / textCycles.length;
|
||||
const cycleMid = (cycleStart + cycleEnd) / 2;
|
||||
|
||||
const words = text.split(" ");
|
||||
|
||||
return (
|
||||
<h2
|
||||
key={cycleIndex}
|
||||
className="absolute max-w-3xl font-medium leading-tight tracking-tight text-white md:text-5xl lg:text-7xl text-5xl"
|
||||
>
|
||||
{words.map((word, wordIndex) => {
|
||||
let wordOpacity = 0;
|
||||
let wordBlur = 40;
|
||||
|
||||
if (scrollProgress >= cycleStart && scrollProgress < cycleEnd) {
|
||||
const localProgress = (scrollProgress - cycleStart) / (cycleEnd - cycleStart);
|
||||
|
||||
// First half: appear (blur 40→0, opacity 0→1)
|
||||
if (localProgress < 0.5) {
|
||||
const appearProgress = (localProgress / 0.5) * (words.length + 1);
|
||||
const wordAppearProgress = Math.max(0, Math.min(1, appearProgress - wordIndex));
|
||||
wordOpacity = wordAppearProgress;
|
||||
wordBlur = (1 - wordAppearProgress) * 40;
|
||||
}
|
||||
// Second half: disappear (blur 0→40, opacity 1→0)
|
||||
else {
|
||||
const disappearProgress = ((localProgress - 0.5) / 0.5) * (words.length + 1);
|
||||
const wordDisappearProgress = Math.max(0, Math.min(1, disappearProgress - wordIndex));
|
||||
wordOpacity = 1 - wordDisappearProgress;
|
||||
wordBlur = wordDisappearProgress * 40;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<span
|
||||
key={wordIndex}
|
||||
className="inline-block"
|
||||
style={{
|
||||
opacity: wordOpacity,
|
||||
filter: `blur(${wordBlur}px)`,
|
||||
transition: 'opacity 0.1s linear, filter 0.1s linear',
|
||||
marginRight: '0.3em',
|
||||
}}
|
||||
>
|
||||
{word}
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
</h2>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Right Column */}
|
||||
<div
|
||||
className="relative overflow-hidden will-change-transform"
|
||||
style={{
|
||||
width: `${sideWidth}%`,
|
||||
height: "100%",
|
||||
transform: `translateX(${sideTranslateRight}%)`,
|
||||
opacity: sideOpacity,
|
||||
}}
|
||||
>
|
||||
{sideImages.filter(img => img.position === "right").map((img, idx) => (
|
||||
<Image
|
||||
key={idx}
|
||||
src={img.src || "/placeholder.svg"}
|
||||
alt={img.alt}
|
||||
fill
|
||||
className="object-cover"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Scroll space to enable animation - increased for 3 text cycles */}
|
||||
<div className="h-[400vh]" />
|
||||
|
||||
{/* Description Section with Background Image and Scroll Reveal */}
|
||||
<div
|
||||
ref={textSectionRef}
|
||||
className="relative overflow-hidden px-6 py-24 md:px-12 md:py-32 lg:px-20 lg:py-40 bg-black"
|
||||
>
|
||||
{/* Gradient Overlay - Top to transparent */}
|
||||
<div
|
||||
className="absolute top-0 left-0 right-0 z-0 pointer-events-none"
|
||||
style={{
|
||||
height: '150px',
|
||||
background: 'linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%)'
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Text Content */}
|
||||
<div className="relative z-10 mx-auto max-w-4xl">
|
||||
<ScrollRevealText text={descriptionText} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
|
||||
export function TestimonialsSection() {
|
||||
return (
|
||||
<section id="about" className="bg-background">
|
||||
{/* About Image with Text Overlay */}
|
||||
<div className="relative aspect-[16/9] w-full">
|
||||
<Image
|
||||
src="/images/testimonial-house.png"
|
||||
alt="Modern corten steel architecture in natural landscape"
|
||||
fill
|
||||
className="object-cover"
|
||||
/>
|
||||
{/* Fade gradient overlay - dark at bottom fading to transparent at top */}
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/70 via-black/30 to-transparent" />
|
||||
|
||||
{/* Text Overlay */}
|
||||
<div className="absolute inset-0 flex items-end justify-center px-6 pb-16 md:px-12 md:pb-24 lg:px-20 lg:pb-32">
|
||||
<p className="mx-auto max-w-5xl text-2xl leading-relaxed text-white md:text-3xl lg:text-[2.5rem] lg:leading-snug text-center">
|
||||
A passive house that combines contemporary design with environmental respect —
|
||||
built for those who refuse to choose between modern comfort and ecological responsibility.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user