/* ===== Custom Styles for California Home Sales ===== */

/* 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;
}

/* ===== Geometric Background Shapes ===== */
.geo-shape-1 {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.geo-shape-2 {
    position: absolute;
    bottom: 10%;
    left: -8%;
    width: 400px;
    height: 400px;
    background: linear-gradient(225deg, rgba(212, 168, 67, 0.08) 0%, transparent 70%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: float 10s ease-in-out infinite reverse;
}

.geo-shape-3 {
    position: absolute;
    top: 30%;
    right: 10%;
    width: 200px;
    height: 200px;
    border: 2px solid rgba(212, 168, 67, 0.15);
    transform: rotate(45deg);
    animation: spin 20s linear infinite;
}

.geo-shape-4 {
    position: absolute;
    bottom: 20%;
    right: 25%;
    width: 120px;
    height: 120px;
    background: rgba(212, 168, 67, 0.06);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

.geo-shape-5 {
    position: absolute;
    top: 60%;
    left: 5%;
    width: 80px;
    height: 80px;
    background: rgba(212, 168, 67, 0.1);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}

@keyframes spin {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* ===== Navigation ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .menu-line {
    background: #1a2744;
}

#navbar.scrolled .font-display {
    color: #1a2744;
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4a843, #e0bc5e);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ===== Form Select Styling ===== */
select option {
    background: #1a2744;
    color: #fff;
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .geo-shape-1 {
        width: 300px;
        height: 300px;
    }
    
    .geo-shape-2 {
        width: 200px;
        height: 200px;
    }
    
    .geo-shape-3,
    .geo-shape-4,
    .geo-shape-5 {
        display: none;
    }
}

/* ===== Selection Color ===== */
::selection {
    background: #d4a843;
    color: #1a2744;
}

/* ===== Focus Visible ===== */
:focus-visible {
    outline: 2px solid #d4a843;
    outline-offset: 2px;
}

/* ===== Smooth image rendering ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
