/* ============================================
   The Wright House of Connecticut
   Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

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

/* --- Navbar --- */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

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

.nav-link {
    position: relative;
}

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

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

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

/* --- Mobile Menu --- */
.mobile-nav-link {
    position: relative;
}

/* --- Hero --- */
.hero-badge {
    animation: fadeInDown 0.8s ease forwards;
    opacity: 0;
}

.hero-headline {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-subtext {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

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

/* Hero Orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: #A5D6A7;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: #C5E1A5;
    bottom: -50px;
    left: -50px;
    animation-delay: -3s;
}

.hero-orb-3 {
    width: 250px;
    height: 250px;
    background: #DCEDC8;
    top: 40%;
    left: 15%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Scroll Indicator */
.scroll-indicator {
    animation: fadeInUp 0.8s ease 1s forwards;
    opacity: 0;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(253, 252, 248, 0.5);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: rgba(253, 252, 248, 0.7);
    border-radius: 2px;
    animation: scrollWheel 1.5s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}

/* --- Room Cards --- */
.room-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(27, 67, 50, 0.12);
}

.room-amenity {
    display: inline-block;
    background: #E8F5E9;
    color: #1B4332;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* --- Amenity Cards --- */
.amenity-card {
    transition: transform 0.3s ease, background 0.3s ease;
}

.amenity-card:hover {
    transform: translateY(-4px);
}

/* --- Bounce Slow --- */
@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-bounce-slow {
    animation: bounceSlow 2.5s ease-in-out infinite;
}

/* --- Reveal Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }

    .reveal-up {
        animation: revealUp 0.7s ease forwards;
    }

    .reveal-left {
        animation: revealLeft 0.7s ease forwards;
    }

    .reveal-right {
        animation: revealRight 0.7s ease forwards;
    }

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

    @keyframes revealLeft {
        from { opacity: 0; transform: translateX(-40px); }
        to { opacity: 1; transform: translateX(0); }
    }

    @keyframes revealRight {
        from { opacity: 0; transform: translateX(40px); }
        to { opacity: 1; transform: translateX(0); }
    }
}

/* Reduced motion: keep everything visible */
@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-up, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* --- Image hover effects --- */
img {
    transition: transform 0.5s ease;
}

/* --- Focus styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2E7D32;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Selection --- */
::selection {
    background: #C8E6C9;
    color: #1B4332;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #66BB6A;
}
