/* ========================================
   Morgan & Associates Realty
   Custom Styles
======================================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050e18;
}
::-webkit-scrollbar-thumb {
    background: #0d2338;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1a3d5c;
}

/* ========================================
   Geometric Background Shapes
======================================== */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.5;
}

.shape-circle-1 {
    top: 15%;
    left: -5%;
    width: 400px;
    height: 400px;
    border: 2px solid rgba(74, 222, 128, 0.08);
    border-radius: 50%;
    animation: float-slow 20s ease-in-out infinite;
}

.shape-circle-2 {
    bottom: 10%;
    right: -3%;
    width: 300px;
    height: 300px;
    border: 2px solid rgba(251, 191, 36, 0.06);
    border-radius: 50%;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.shape-triangle-1 {
    top: 40%;
    right: 5%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(74, 222, 128, 0.04);
    animation: rotate-slow 25s linear infinite;
}

.shape-rect-1 {
    top: 60%;
    left: 8%;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(251, 191, 36, 0.06);
    transform: rotate(45deg);
    animation: float-slow 18s ease-in-out infinite;
}

.shape-dots {
    top: 25%;
    right: 15%;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(74, 222, 128, 0.15) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.6;
}

/* ========================================
   Hero Gradients
======================================== */
.hero-gradient-1 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(74, 222, 128, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(251, 191, 36, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(45, 212, 191, 0.05) 0%, transparent 50%);
}

.hero-gradient-2 {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234ade80' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* ========================================
   Animations
======================================== */
@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(2deg);
    }
    66% {
        transform: translateY(10px) rotate(-1deg);
    }
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(74, 222, 128, 0.4);
    }
}

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   Content is visible by default; JS adds animation
======================================== */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Navigation
======================================== */
#navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    background: rgba(5, 14, 24, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4ade80;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========================================
   Mobile Menu
======================================== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    position: relative;
    padding-left: 0;
}

/* ========================================
   Form Styles
======================================== */
select option {
    background: #0d2338;
    color: #ffffff;
}

/* ========================================
   Responsive Adjustments
======================================== */
@media (max-width: 768px) {
    .shape-circle-1,
    .shape-circle-2,
    .shape-triangle-1,
    .shape-rect-1,
    .shape-dots {
        display: none;
    }
    
    .hero-gradient-2 {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .shape-circle-1 {
        width: 250px;
        height: 250px;
    }
}

/* ========================================
   Utility & Focus Styles
======================================== */
:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: rgba(74, 222, 128, 0.3);
    color: #ffffff;
}
