/* ============================
   DEMO 19: PARALLAX JOURNEY
   ============================ */

   :root {
    --bg-dark: #0a0a0a;
    --bg-light: #ffffff;
    --accent: #8b0000; /* Deep crimson/red */
    --text-dark: #111111;
    --text-light: #f5f5f5;
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-dark);
    color: var(--text-dark);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Utilities */
.serif-title { font-family: var(--font-serif); font-size: 3rem; font-weight: 700; margin-bottom: 20px; letter-spacing: 1px; }
.accent { color: var(--accent); }
.text-center { text-align: center; }
.text-white { color: #fff; }
.body-text { font-size: 1.1rem; line-height: 1.8; color: #555; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }

/* Preloader */
#preloader { position: fixed; inset: 0; background: var(--bg-dark); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.8s ease, visibility 0.8s; }
.brand-text { font-family: var(--font-serif); font-size: 2rem; color: #fff; letter-spacing: 5px; margin-bottom: 20px; }
.progress-bar { width: 200px; height: 2px; background: #333; position: relative; overflow: hidden; }
.progress { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: var(--accent); animation: loading 1.5s ease-in-out forwards; }
@keyframes loading { 100% { width: 100%; } }

/* Navigation */
.navbar { position: fixed; top: 0; width: 100%; padding: 25px 5%; display: flex; justify-content: space-between; align-items: center; z-index: 1000; transition: 0.4s; }
.navbar.scrolled { background: rgba(10, 10, 10, 0.95); padding: 15px 5%; box-shadow: 0 5px 20px rgba(0,0,0,0.5); backdrop-filter: blur(10px); }

.logo { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: 3px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn-outline) { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: #fff; font-weight: 600; }
.nav-links a:not(.btn-outline):hover { color: var(--accent); }

.btn-outline { border: 1px solid #fff; padding: 10px 20px; color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; transition: 0.3s; }
.btn-outline:hover { background: #fff; color: var(--bg-dark); }

.menu-toggle { display: none; font-size: 1.5rem; color: #fff; cursor: pointer; }

.demo-badge { position: fixed; top: 100px; right: 0; background: var(--accent); color: #fff; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 2px; padding: 5px 15px; border-radius: 20px 0 0 20px; z-index: 100; }

/* Parallax Sections Setup */
.parallax-section {
    position: relative;
    background-attachment: fixed; /* This creates the parallax effect */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-bg { background-image: url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80'); }
.mid-bg-1 { background-image: url('https://images.unsplash.com/photo-1605300287661-d7486e92b3c2?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80'); height: 80vh; }
.mid-bg-2 { background-image: url('https://images.unsplash.com/photo-1621800366657-3f8d380e9fcb?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80'); height: 60vh; }

.overlay-dark { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }

/* Hero Content */
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; }
.hero-content h1 { font-family: var(--font-serif); font-size: 6rem; line-height: 1; letter-spacing: 2px; margin-bottom: 20px; }
.hero-content p { font-size: 1.2rem; font-weight: 300; letter-spacing: 5px; text-transform: uppercase; }
.scroll-arrow { display: inline-block; margin-top: 50px; font-size: 2rem; color: #fff; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(15px); } }

/* Floating Content Boxes */
.content-section { padding: 100px 5%; display: flex; justify-content: center; background-color: transparent; position: relative; z-index: 5; margin-top: -100px; } /* Pulls over parallax */
.floating-box { background: var(--bg-light); padding: 80px; max-width: 800px; box-shadow: 0 30px 60px rgba(0,0,0,0.4); text-align: center; border-top: 5px solid var(--accent); }
.floating-box.wide { max-width: 1000px; }
.dark-content { background-color: var(--bg-dark); margin-top: 0; padding: 150px 5%; }

/* Blockquote Overlay */
.center-quote { position: relative; z-index: 2; text-align: center; max-width: 800px; padding: 0 5%; }
.center-quote blockquote { font-family: var(--font-serif); font-size: 3rem; color: #fff; font-style: italic; line-height: 1.3; text-shadow: 0 5px 15px rgba(0,0,0,0.8); }

/* Masonry Grid */
.masonry-grid { column-count: 3; column-gap: 30px; }
.m-item { break-inside: avoid; margin-bottom: 30px; position: relative; overflow: hidden; cursor: pointer; }
.m-item img { width: 100%; display: block; transition: 0.8s ease; filter: brightness(0.8); }
.m-item:hover img { transform: scale(1.05); filter: brightness(1); }

/* Contact Form */
.contact-form { margin-top: 40px; text-align: left; }
.form-row { display: flex; gap: 30px; margin-bottom: 30px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; border: 1px solid #ccc; background: #f9f9f9; font-family: var(--font-sans); font-size: 1rem; transition: 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.contact-form textarea { resize: vertical; }

.btn-solid { background: var(--accent); color: #fff; border: none; padding: 15px 40px; font-family: var(--font-sans); font-size: 1rem; text-transform: uppercase; letter-spacing: 2px; cursor: pointer; transition: 0.3s; }
.btn-solid:hover { background: var(--text-dark); }

/* Footer */
.footer { background: #050505; padding: 80px 5% 40px; border-top: 1px solid #222; }
.logo.large { font-size: 2.5rem; color: #fff; }
.socials a { color: #fff; font-size: 1.5rem; margin: 0 15px; transition: 0.3s; }
.socials a:hover { color: var(--accent); transform: translateY(-5px); display: inline-block; }
.copyright { font-size: 0.8rem; color: #666; text-transform: uppercase; letter-spacing: 1px; }
.copyright a { color: var(--accent); }

.back-to-master { position: fixed; bottom: 20px; left: 20px; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; padding: 10px 20px; z-index: 1000; border: 1px solid #333; transition: 0.3s; }
.back-to-master:hover { background: var(--accent); border-color: var(--accent); }

/* Animations & Utility */
.slide-up { opacity: 0; transform: translateY(40px); animation: slideUp 1s forwards cubic-bezier(0.2, 0.8, 0.2, 1); }
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }

.reveal { opacity: 0; transform: translateY(50px); transition: 1s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 992px) {
    .hero-content h1 { font-size: 4rem; }
    .masonry-grid { column-count: 2; }
    .floating-box { padding: 40px; margin-top: -50px; }
    .center-quote blockquote { font-size: 2rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .hero-content h1 { font-size: 3rem; }
    .hero-content p { font-size: 0.9rem; }
    .parallax-section { background-attachment: scroll; } /* Disable parallax on mobile for performance/UX */
    .form-row { flex-direction: column; gap: 30px; }
    .masonry-grid { column-count: 1; }
    .content-section { margin-top: 0; padding-top: 50px; padding-bottom: 50px; }
    .floating-box { border: none; box-shadow: none; padding: 20px; }
}
