/* ============================================
   The Corner Mansion — Custom Styles
   Classic & Elegant | Emerald + Cream Palette
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #D4A843;
    color: #0f241c;
}

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal[data-reveal-id] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal[data-reveal-id] {
        opacity: 0;
        transform: translateY(30px);
    }

    .scroll-reveal.revealed[data-reveal-id] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children */
.scroll-reveal[data-reveal-id] ~ .scroll-reveal[data-reveal-id] {
    transition-delay: 0.1s;
}

/* --- Navbar --- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #1b4332;
}

#navbar.scrolled .nav-link {
    color: #1b4332;
}

/* --- Mobile Menu --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

#mobile-menu .mobile-link {
    opacity: 0;
}

#mobile-menu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu .mobile-link:nth-child(6) { animation-delay: 0.3s; }

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

/* Mobile menu button animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* --- Form Styles --- */
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='%231b4332' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Decorative Elements --- */
.divider-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.divider-ornament::before,
.divider-ornament::after {
    content: '';
    flex: 1;
    max-width: 200px;
    height: 1px;
    background: linear-gradient(to right, transparent, #D4A843, transparent);
}

/* --- Image hover effects --- */
.group img {
    will-change: transform;
}

/* --- Smooth focus styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #D4A843;
    outline-offset: 2px;
}

/* --- Print styles --- */
@media print {
    #navbar,
    .scroll-reveal[data-reveal-id],
    #menu-btn {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .bg-emerald-700,
    .bg-emerald-900 {
        background: #1b4332 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
