diff --git a/src/components/About.tsx b/src/components/About.tsx index 88fa433..541ddf0 100644 --- a/src/components/About.tsx +++ b/src/components/About.tsx @@ -2,21 +2,10 @@ import Link from "next/link"; import { FloatingHouse, RotatingKey, GrowingBuilding } from "./PropertyAnimations"; -import { motion, useScroll, useTransform } from "framer-motion"; -import { useRef } from "react"; +import { motion } from "framer-motion"; +import styles from "@/styles/aboutSection.module.css"; export default function About() { - const containerRef = useRef(null); - const { scrollYProgress } = useScroll({ - target: containerRef, - offset: ["start end", "end start"] - }); - - // Parallax effect: Moving the image vertically as the user scrolls - // The image height is significantly larger than the container - // We move from 0% (top aligned) to a negative percentage to reveal the bottom - const y = useTransform(scrollYProgress, [0, 1], ["0%", "-30%"]); - return (
@@ -63,33 +52,12 @@ export default function About() { - {/* Parallax Image Container - Takes 7 columns */} -
- - Where Sky Meets Soil - + {/* Parallax Image Container - Takes 7 columns - MODIFIED for Fixed Effect */} +
+
-
+ ); } diff --git a/src/styles/aboutSection.module.css b/src/styles/aboutSection.module.css new file mode 100644 index 0000000..0279c9d --- /dev/null +++ b/src/styles/aboutSection.module.css @@ -0,0 +1,143 @@ +.aboutSection { + display: flex; + flex-direction: column; + width: 100%; + overflow: hidden; + padding: 6rem 0; + background-color: #fff; +} + +@media (min-width: 1024px) { + .aboutSection { + flex-direction: row; + padding: 0; + min-height: 80vh; + /* Adjust as needed */ + } +} + +/* Left Side - Content */ +.leftContent { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + padding: 3rem 2rem; + z-index: 10; + background-color: #fff; + /* Ensure bg is solid */ +} + +@media (min-width: 1024px) { + .leftContent { + padding: 4rem 5rem; + max-width: 50%; + } +} + +.storyContent { + max-width: 600px; +} + +.storyLabel { + display: block; + margin-bottom: 1.5rem; +} + +.smallHeading3 { + display: flex; + align-items: center; + justify-content: flex-start; + /* Left aligned for About */ + gap: 10px; + font-size: 0.9rem; + letter-spacing: 0.1em; + color: #333; + text-transform: uppercase; + font-weight: 600; +} + +.storyTitle { + font-size: 2.5rem; + line-height: 1.2; + color: #1a1a1a; + font-weight: 700; + /* Bold/Serif depending on font availability */ + margin-bottom: 2rem; + font-family: serif; + /* Fallback to serif */ +} + +@media (min-width: 768px) { + .storyTitle { + font-size: 3rem; + } +} + +.storydesc { + display: inline-block; + padding: 12px 28px; + border: 1px solid #d3cab3; + color: #1a1a1a; + text-decoration: none; + font-size: 1rem; + letter-spacing: 0.05em; + transition: all 0.3s ease; + text-transform: uppercase; + margin-top: 1.5rem; +} + +.storydesc:hover { + background-color: #d3cab3; + color: #fff; +} + +.description { + font-size: 1.1rem; + color: #555; + line-height: 1.7; + margin-bottom: 1.5rem; +} + +/* Right Side - Image */ +.rightImageContainer { + flex: 1; + position: relative; + min-height: 400px; + width: 100%; +} + +@media (min-width: 1024px) { + .rightImageContainer { + min-height: auto; + /* Let it fill the flex container */ + height: auto; + } +} + +.parallaxImage { + width: 100%; + height: 100%; + /* Use the requested image */ + background-image: url('/assets/images/home/where.webp'); + background-attachment: fixed; + background-position: center right; + /* Align right for the text-left layout */ + background-repeat: no-repeat; + background-size: cover; + + /* On larger screens, position center of image at 75% of viewport width (center of right half) */ + @media (min-width: 1024px) { + background-size: 38vw auto; + background-position: 73% center; + } +} + +/* Mobile fallback for fixed attachment */ +@media (max-width: 1024px) { + .parallaxImage { + background-attachment: scroll; + min-height: 400px; + background-position: center; + } +} \ No newline at end of file