/* Gilworth Courtyard Suites — Custom Styles */

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

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection */
::selection {
    background: #ccfbf1;
    color: #134e4a;
}

/* Hero Animations */
.hero-subtitle {
    animation: heroFadeUp 0.8s ease forwards 0.3s;
}
.hero-title {
    animation: heroFadeUp 0.8s ease forwards 0.5s;
}
.hero-desc {
    animation: heroFadeUp 0.8s ease forwards 0.7s;
}
.hero-ctas {
    animation: heroFadeUp 0.8s ease forwards 0.9s;
}

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

/* Scroll indicator */
.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* Reveal animations (below the fold only) */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* These are progressive enhancement — content is visible by default */
/* JS adds these classes to trigger the animation */
.reveal-up.animated {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-subtitle,
    .hero-title,
    .hero-desc,
    .hero-ctas {
        animation: none;
        opacity: 1;
    }
    .scroll-line {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Navbar transitions */
.nav-logo-text,
.nav-logo-sub {
    color: #f8fafc;
    transition: color 0.3s ease;
}

.navbar-scrolled .nav-logo-text,
.navbar-scrolled .nav-logo-sub {
    color: #1e293b;
}

.navbar-light .nav-logo-text,
.navbar-light .nav-logo-sub {
    color: #1e293b;
}

/* Nav links color handling */
.nav-link {
    color: rgba(248, 250, 252, 0.85);
    transition: color 0.3s ease;
}

.navbar-scrolled .nav-link,
.navbar-light .nav-link {
    color: #475569;
}

.navbar-scrolled .nav-link:hover,
.navbar-light .nav-link:hover {
    color: #0d9488;
}

/* Room cards */
.room-card {
    transition: transform 0.4s ease;
}

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

/* Amenity items */
.amenity-item {
    transition: transform 0.3s ease;
}

.amenity-item:hover {
    transform: translateX(4px);
}

/* Testimonial cards */
.testimonial-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Location items */
.location-item {
    transition: transform 0.3s ease;
}

.location-item:hover {
    transform: translateX(4px);
}

/* Mobile menu */
#mobile-menu {
    transition: opacity 0.3s ease;
}

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

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

/* Menu toggle animation */
#menu-line-1.open {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-line-2.open {
    opacity: 0;
}

#menu-line-3.open {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 24px;
}

/* Form focus states */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

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