/* ============================================
   Karol's Mobile Estates — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Circles */
.shape-circle-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(27, 67, 50, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.shape-circle-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(27, 67, 50, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 10%;
    left: -50px;
}

.shape-circle-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    top: -150px;
    right: -150px;
}

.shape-circle-4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
}

/* Squares (rotated for geometric feel) */
.shape-square-1 {
    width: 120px;
    height: 120px;
    background: rgba(27, 67, 50, 0.04);
    border: 2px solid rgba(27, 67, 50, 0.08);
    border-radius: 20px;
    top: 25%;
    right: 5%;
    transform: rotate(15deg);
}

.shape-square-2 {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    bottom: 15%;
    left: 10%;
    transform: rotate(-10deg);
}

.shape-square-3 {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    top: 20%;
    left: 8%;
    transform: rotate(20deg);
}

/* Triangle (CSS polygon) */
.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(27, 67, 50, 0.05);
    top: 60%;
    right: 8%;
    transform: rotate(-15deg);
}

/* Dot pattern */
.shape-dots {
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, rgba(27, 67, 50, 0.1) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    top: 40%;
    left: 3%;
    opacity: 0.5;
}

/* ============================================
   Scroll Reveal Animations (progressive enhancement)
   ============================================ */
.js-enabled .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Default state is visible — JS adds the reveal class for animation */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Mobile Menu Animation
   ============================================ */
#mobileMenu.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobileMenu.open .menu-line:nth-child(2) {
    opacity: 0;
}
#mobileMenu.open .menu-line:nth-child(3) {
    width: 6rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF6EE;
}
::-webkit-scrollbar-thumb {
    background: #1B4332;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2a5c34;
}

/* ============================================
   Focus Styles
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .shape-circle-1 {
        width: 200px;
        height: 200px;
    }
    .shape-circle-2 {
        width: 150px;
        height: 150px;
    }
    .shape-square-1,
    .shape-square-2,
    .shape-square-3 {
        display: none;
    }
    .shape-triangle-1 {
        display: none;
    }
    .shape-dots {
        width: 100px;
        height: 100px;
    }
}
