/* --- VARIABLES & GLOBAL STYLES --- */
:root {
    --ocean-blue-dark: #0B2D58;
    --ocean-blue-light: #4A90E2;
    --bg-light: #FDFDFD;
    --text-dark: #121212;
    --text-light: #FFFFFF;
    --grey: #6c757d;
    --border-light: #e9ecef;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;

    --shadow: 0 15px 40px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.no-scroll {
    overflow: hidden;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(3rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.25rem); }
.section-title { text-align: center; margin-bottom: 1rem; }
.section-tagline { display: block; text-align: center; color: var(--ocean-blue-light); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.page-main { padding-top: 90px; }

/* --- FIX FOR BLURRY ANIMATION --- */
/* This new rule forces the browser to render text more crisply during transforms. */
.anim-reveal {
  transform: translateZ(0);
}

/* --- PRELOADER --- */
.preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--ocean-blue-dark); z-index: 9999; display: flex; justify-content: center; align-items: center; }
.preloader-icon { width: 50px; height: 50px; border: 3px solid rgba(255,255,255,0.2); border-top-color: var(--text-light); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- HEADER & NAVIGATION --- */
.header { position: absolute; top: 0; left: 0; width: 100%; z-index: 1000; padding: 25px 0; transition: all 0.4s ease; }
.header.is-page { position: sticky; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.header.is-page .logo, .header.is-page .main-nav a { color: var(--text-dark); }
.header.is-page .mobile-nav-toggle span { background: var(--text-dark); }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; text-decoration: none; color: var(--text-light); }
.main-nav { display: none; } /* Hidden by default, shown on desktop */
.main-nav ul { display: flex; list-style: none; gap: 40px; }
.main-nav a { text-decoration: none; font-weight: 500; color: var(--text-light); transition: color 0.3s; }
.main-nav a:hover { color: var(--ocean-blue-light); }
.header.is-page .main-nav a:hover { color: var(--ocean-blue-dark); }
.mobile-nav-toggle { display: flex; flex-direction: column; justify-content: space-around; width: 28px; height: 24px; background: transparent; border: none; cursor: pointer; z-index: 1001; }
.mobile-nav-toggle span { width: 100%; height: 2px; background: var(--text-light); border-radius: 2px; transition: all 0.3s ease-in-out; transform-origin: center; }

/* --- BUTTONS & FORMS --- */
.btn { display: inline-block; padding: 14px 32px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: linear-gradient(45deg, var(--ocean-blue-light), var(--ocean-blue-dark)); color: var(--text-light); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(74, 144, 226, 0.3); }
.btn-secondary { background-color: transparent; color: var(--text-light); border-color: rgba(255,255,255,0.5); }
.btn-secondary:hover { background-color: var(--text-light); color: var(--ocean-blue-dark); }
.intro-section .btn-secondary, .featured-listings .btn-secondary { color: var(--text-dark); border-color: #ccc; }
.intro-section .btn-secondary:hover, .featured-listings .btn-secondary:hover { background-color: var(--text-dark); color: var(--text-light); }

/* --- HERO SECTION --- */
.hero { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--text-light); }
#constellation-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, var(--ocean-blue-dark) 0%, var(--ocean-blue-light) 100%); z-index: -1; }
.hero-content { position: relative; z-index: 2; }
.hero-headline { text-shadow: 0 2px 20px rgba(0,0,0,0.2); }
.hero-subheadline { font-size: 1.2rem; max-width: 600px; margin: 1.5rem auto 2.5rem; opacity: 0.9; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; }

/* --- INTRO & CTA SECTIONS --- */
.intro-section, .cta-section { padding: 120px 0; }
.intro-container { display: grid; grid-template-columns: 1fr 1.2fr; gap: 5rem; align-items: center; }
.intro-image img { width: 100%; border-radius: 8px; box-shadow: var(--shadow); }
.intro-content .section-title { text-align: left; }
.cta-section { background: linear-gradient(45deg, var(--ocean-blue-dark), var(--ocean-blue-light)); color: var(--text-light); }
.cta-container { text-align: center; max-width: 800px; margin: 0 auto; }
.cta-container .section-tagline { color: rgba(255,255,255,0.8); }
.cta-container p { max-width: 600px; margin: 1rem auto 2rem; opacity: 0.9; }
.cta-container .btn-primary { background: #fff; color: var(--ocean-blue-dark); }

/* --- PROPERTY CARDS --- */
.featured-listings { padding: 120px 0; background-color: #fff; }
.listings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }
.property-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); transition: all 0.4s ease; }
.property-card:hover { transform: translateY(-10px); box-shadow: 0 25px 50px rgba(0,0,0,0.12); }
.property-image { height: 280px; background-size: cover; background-position: center; position: relative; }
.property-price { position: absolute; bottom: 1rem; right: 1rem; background: rgba(11, 45, 88, 0.8); backdrop-filter: blur(5px); color: var(--text-light); padding: 0.5rem 1rem; border-radius: 50px; font-weight: 600; font-size: 1rem; }
.property-details { padding: 1.5rem; }
.property-details h3 a { font-size: 1.4rem; color: var(--text-dark); text-decoration: none; transition: color 0.3s; }
.property-details h3 a:hover { color: var(--ocean-blue-light); }
.property-details p { color: var(--grey); margin: 0.25rem 0 1rem; }
.property-specs { display: flex; gap: 1.5rem; font-size: 0.9rem; color: var(--grey); border-top: 1px solid var(--border-light); padding-top: 1rem; }
.view-all-btn { text-align: center; margin-top: 4rem; }

/* --- FOOTER --- */
.footer { background-color: var(--text-dark); color: var(--text-light); padding: 80px 0 30px; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer a { color: var(--text-light); text-decoration: none; opacity: 0.7; transition: opacity 0.3s; }
.footer a:hover { opacity: 1; }
.footer h4 { margin-bottom: 1rem; opacity: 0.9; }
.footer ul { list-style: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); text-align: center; margin-top: 40px; padding-top: 30px; opacity: 0.7; }

/* --- INNER PAGE & FORM STYLES --- */
.page-header { padding: 100px 0; text-align: center; background: linear-gradient(45deg, var(--ocean-blue-dark), var(--ocean-blue-light)); color: var(--text-light); }
.page-subtitle { max-width: 600px; margin: 1rem auto 0; opacity: 0.9; }
.about-content-section { padding: 120px 0; }
.about-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: center; }
.about-image img { width: 100%; border-radius: 8px; }
.about-content .section-title { text-align: left; }
.listings-page-section, .form-section { padding: 120px 0; }
.narrow-container { max-width: 700px; margin: 0 auto; }
.contact-form .form-group { margin-bottom: 2rem; }
.contact-form label { display: block; font-weight: 500; margin-bottom: 0.5rem; color: var(--grey); }
.contact-form input, .contact-form textarea { width: 100%; padding: 1rem; border: 1px solid var(--border-light); border-radius: 5px; font-family: var(--font-body); font-size: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--ocean-blue-light); outline: none; box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2); }
.contact-form .form-row { display: flex; gap: 1.5rem; }
.contact-form button { width: 100%; margin-top: 1rem; padding: 18px; font-size: 1rem; }

/* --- RESPONSIVE & MOBILE MENU STYLES --- */
@media (min-width: 769px) {
    .main-nav { display: block; }
    .mobile-nav-toggle { display: none; }
}

@media (max-width: 768px) {
    .hero-content {
        margin-right:20px;
        margin-left:20px;
    }
    .hero-buttons {
        display: flex;
        flex-direction: column;
    }
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%; /* Start off-screen */
        width: 100%;
        height: 100vh;
        background-color: var(--ocean-blue-dark);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 999;
    }
    .main-nav.open {
        left: 0;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 2rem;
    }
    .main-nav a {
        font-size: 1.8rem;
        opacity: 1;
        color: var(--text-light);
    }
    .mobile-nav-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .mobile-nav-toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .intro-container, .about-container { grid-template-columns: 1fr; }
    .intro-image { order: -1; margin-bottom: 3rem; }
    .intro-content .section-title, .about-content .section-title { text-align: center; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-col { margin-bottom: 2rem; }
    .contact-form .form-row { flex-direction: column; gap: 2rem; }
}
