:root {
    --primary: #2E5C8A;
    --secondary: #4A90E2;
    --accent: #FF6B6B;
    --dark: #1a2a3a;
    --light: #f0f4f8;
    --glass: rgba(255, 255, 255, 0.85);
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    overflow-x: hidden; /* Prevent horizontal scroll from flying elements */
    opacity: 0; /* Handles fade-in on load via JS */
}

/* --- PARTICLE SYSTEM (The Dust Motes) --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Visually on top of everything */
    z-index: 9999; 
    /* Clicks pass through to buttons underneath */
    pointer-events: none; 
}

/* --- CUSTOM CURSOR --- */
/* Highest Z-Index to sit above particles */
.cursor-dot, .cursor-outline {
    position: fixed; top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%; 
    z-index: 10000; 
    pointer-events: none;
}
.cursor-dot { width: 8px; height: 8px; background: var(--accent); }
.cursor-outline { width: 40px; height: 40px; border: 1px solid var(--accent); transition: width 0.2s, height 0.2s, background 0.2s; }

/* --- NAVIGATION --- */
header {
    position: fixed; top: 0; width: 100%; padding: 1rem 3%;
    z-index: 4000; display: flex; justify-content: space-between; align-items: center;
    transition: 0.4s ease;
}
header.scrolled { background: var(--glass); backdrop-filter: blur(12px); box-shadow: 0 5px 20px rgba(0,0,0,0.05); }

.logo-img {
    height: 100px;      /* Fills the 50px container height */
    width: auto;       /* Maintains aspect ratio */
    object-fit: contain;
    display: block;
}

/* Optional: Adjust the container slightly if your logo is wide */
.logo { 
    display: flex; 
    align-items: center; 
    height: 60px; /* Increased from 50px to give the logo more room */
    cursor: pointer; 
}
.logo-text { font-weight: 900; font-size: 1.5rem; color: var(--primary); margin-left: 10px; }

.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-item { position: relative; }
.nav-link {
    text-decoration: none; color: var(--dark); font-weight: 700; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 1px; cursor: pointer;
    padding: 10px; display: block; position: relative;
}
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px;
    background: var(--accent); transition: width 0.3s ease;
}
.nav-item:hover .nav-link::after { width: 100%; }

/* --- TRANSITION OVERLAY --- */
.transition-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--primary); z-index: 5000;
    transform: scaleY(0); transform-origin: bottom;
}

/* --- HERO SECTION & PARALLAX LAYERS --- */
.hero-wrap {
    height: 100vh; width: 100%; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background-color: #87CEEB; 
}

.parallax-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; pointer-events: none; will-change: transform;
}

/* Depth Stacking */
.layer-sky { z-index: 1; }
.layer-sun { z-index: 2; width: 150px !important; height: auto !important; top: 10% !important; left: 70% !important; }
.layer-city-bg { z-index: 4; bottom: 0; top: auto; height: 50vh; object-fit: contain; object-position: bottom; }
.layer-hill { z-index: 5; bottom: -10%; top: auto; height: auto; width: 100%; }
.layer-trees { z-index: 6; }
.layer-chars { z-index: 7; }
.layer-lamp { z-index: 4; }

.hero-content {
    z-index: 10; text-align: center; position: relative; margin-top: -50px;
}
.hero-title {
    font-size: 5rem; line-height: 1; font-weight: 900; color: white;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3); margin-bottom: 1rem;
}

/* --- CLOUD FIXES --- */
/* Fix: Removed width:100% constraint so clouds maintain aspect ratio */
/* --- CLOUD FIXES --- */
.layer-clouds-front { 
    z-index: 20; 
    position: absolute; 
    pointer-events: none; 
    /* Removed !important so you can resize in HTML */
    width: auto; 
    height: auto; 
}
/* Exact positioning */
.cloud-left { left: -5% !important; right: auto !important; transform-origin: left center; }
.cloud-right { right: -5% !important; left: auto !important; transform-origin: right center; }

/* --- GENERAL CONTENT LAYOUT --- */
.page-section { 
    display: none; 
    min-height: 100vh; 
    padding-top: 120px; 
    padding-bottom: 80px; 
    position: relative; 
    z-index: 5; 
    overflow-x: hidden; /* Crucial for flying elements */
}
.page-section.active { display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; position: relative; z-index: 5; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

.text-box {
    background: rgba(255,255,255,0.95); padding: 3rem; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08); backdrop-filter: blur(10px);
    position: relative; z-index: 2;
}

h2 { font-size: 3rem; color: var(--primary); margin-bottom: 1.5rem; }
p { margin-bottom: 1.5rem; font-size: 1.05rem; line-height: 1.7; color: #555; }

/* --- UI ELEMENTS (Buttons & Cards) --- */
.btn {
    display: inline-block; padding: 14px 35px; background: var(--accent);
    color: white; text-decoration: none; border-radius: 50px; font-weight: 700;
    border: none; cursor: pointer; overflow: hidden; position: relative; z-index: 1;
    transition: transform 0.3s; text-transform: uppercase; letter-spacing: 1px;
    transform-style: preserve-3d;
}
.btn::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0%; height: 100%;
    background: var(--primary); transition: width 0.3s ease; z-index: -1;
}
.btn span {
    display: inline-block;
    position: relative;
    pointer-events: none; /* Let the button handle the events */
}
.btn:hover { transform: scale(1.05); }
.btn:hover::before { width: 100%; }
.btn-secondary { background: var(--secondary); }

.card-grid { perspective: 1000px; position: relative; z-index: 20; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; }
.card {
    transform-style: preserve-3d;
    will-change: transform;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95); padding: 2rem; border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: 0.4s;
    transform-style: preserve-3d; border-bottom: 5px solid transparent;
    position: relative; /* For z-indexing if needed */
}
.card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-bottom-color: var(--accent); }

/* --- MARQUEE --- */
.city-marquee {
    width: 100%; overflow: hidden; position: relative; height: 350px;
    background: white; border-top: 1px solid #eee; border-bottom: 1px solid #eee;
    display: flex; align-items: flex-end; margin: 4rem 0;
}
.city-track { display: flex; width: max-content; align-items: flex-end; }
.city-obj { height: 200px; width: auto; margin-right: -2px; object-fit: contain; }

/* --- FORMS & TABLES --- */
.breadcrumb { color: #888; margin-bottom: 2rem; font-size: 0.9rem; }
.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 600; cursor: pointer; }

.input-group { margin-bottom: 1.5rem; }
.input-field { width: 100%; padding: 12px; border: 2px solid #eee; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid #eee; }
th { background: var(--primary); color: white; }

/* --- FOOTER --- */
footer { background: var(--dark); color: white; padding: 4rem 5%; margin-top: 5rem; position: relative; z-index: 20; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-content a { color: #ccc; text-decoration: none; transition: 0.3s; cursor: pointer; }
.footer-content a:hover { color: white; padding-left: 5px; }

/* --- ANIMATION UTILITIES --- */

/* Base class for decorative elements */
.deco-float { 
    position: absolute; 
    pointer-events: none; 
    transition: filter 0.3s; 
    /* Ensure images don't get too blurry during transforms */
    backface-visibility: hidden;
}
.deco-float:hover { filter: brightness(1.1); }

/* Horizontal Slide-In Start State */
[data-slide-from="right"] { 
    transform: translateX(100px); 
    opacity: 0; 
}
[data-slide-from="left"] { 
    transform: translateX(-100px); 
    opacity: 0; 
}

/* Flying Elements */
.fly-across { 
    will-change: transform; 
    z-index: 10; 
}

/* Background Elements Container */
.bg-elements {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    pointer-events: none; 
    z-index: -1; /* Behind content */
    overflow: hidden;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}

/* NEW EFFECTS
/* Update .btn to allow independent movement of text */
.wind-sway {
    transform-origin: bottom center; /* Pivot from the ground */
}

.char-reveal {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotate(10deg);
    transform-origin: top left;
}

.reveal-holder {
    position: relative;
    overflow: hidden;
    display: inline-block; /* Wraps image tightly */
    opacity: 0; /* Handled by JS */
}
.reveal-block {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--accent);
    z-index: 2;
    transform: scaleX(1);
    transform-origin: left;
}
.reveal-img {
    opacity: 0;
    transform: scale(1.2);
    transition: transform 1.5s ease;
}
.reveal-holder.is-visible .reveal-img {
    transform: scale(1);
}

.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 4px;
    background: var(--accent);
    width: 0%;
    z-index: 9999;
}

.distort-text {
    display: inline-block;
    transition: filter 0.3s;
}
.distort-text:hover {
    filter: url(#turbulence);
}