/* ===================================
   Eugene Dimov Real Estate Group
   Custom Styles
   =================================== */

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

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

body {
    overflow-x: hidden;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.75rem 1.5rem;
    background: #C4725A;
    color: white;
    border-radius: 0 0 0.5rem 0.5rem;
    z-index: 100;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* --- Navbar --- */
.nav-fixed {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav-fixed.scrolled {
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(196, 114, 90, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #C4725A;
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

/* --- Hero Badge --- */
.hero-badge {
    animation: fadeInDown 0.8s ease both;
}

/* --- Hero Headline --- */
#hero h1 {
    animation: fadeInUp 0.8s ease 0.2s both;
}

#hero p {
    animation: fadeInUp 0.8s ease 0.4s both;
}

#hero .flex-col,
#hero .flex-row {
    animation: fadeInUp 0.8s ease 0.6s both;
}

/* --- Scroll Indicator --- */
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger children */
.reveal-grid > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Mobile Menu --- */
.mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* --- Hamburger Animation --- */
#menu-btn[aria-expanded="true"] #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn[aria-expanded="true"] #bar3 {
    transform: translateY(-4px) rotate(-45deg);
}

/* --- Keyframes --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* --- 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,
    .reveal.revealed,
    .reveal-grid > * {
        opacity: 1;
        transform: none;
    }
}

/* --- Select Styling --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Input Autofill --- */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fdf8f2 inset !important;
    -webkit-text-fill-color: #1a1410 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #fdf8f2;
}

::-webkit-scrollbar-thumb {
    background: #e08564;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #C4725A;
}
