/* ============================================
   Up From The Roote's Bed and Breakfast
   Custom Styles
   ============================================ */

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

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

body {
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* --- Selection --- */
::selection {
    background: #0d9488;
    color: white;
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* --- Hero Animations --- */
.hero-content {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-content:nth-child(1) { animation-delay: 0.1s; }
.hero-content:nth-child(2) { animation-delay: 0.2s; }
.hero-content:nth-child(3) { animation-delay: 0.3s; }
.hero-content:nth-child(4) { animation-delay: 0.4s; }
.hero-content:nth-child(5) { animation-delay: 0.5s; }
.hero-content:nth-child(6) { animation-delay: 0.6s; }

.hero-image {
    opacity: 0;
    animation: fadeInRight 1s ease 0.3s forwards;
}

.hero-shape {
    opacity: 0;
    animation: scaleIn 0.8s ease forwards;
}

.hero-shape:nth-child(1) { animation-delay: 0.5s; }
.hero-shape:nth-child(2) { animation-delay: 0.7s; }
.hero-shape:nth-child(3) { animation-delay: 0.9s; }
.hero-shape:nth-child(4) { animation-delay: 1.1s; }
.hero-shape:nth-child(5) { animation-delay: 1.3s; }
.hero-shape:nth-child(6) { animation-delay: 1.5s; }
.hero-shape:nth-child(7) { animation-delay: 1.7s; }

/* --- Section Labels --- */
.section-label {
    letter-spacing: 0.1em;
}

/* --- Input Fields --- */
.input-field {
    transition: all 0.3s ease;
}

.input-field:focus {
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

/* --- Button Primary --- */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* --- Room Cards --- */
.room-card {
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* --- Tag Pills --- */
.tag-pill {
    display: inline-block;
    padding: 0.35rem 0.875rem;
    background: #f0fdfa;
    color: #0d9488;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #ccfbf1;
    transition: all 0.2s ease;
}

.tag-pill:hover {
    background: #ccfbf1;
    border-color: #5eead4;
}

/* --- Experience Images --- */
.experience-images > div > div {
    opacity: 0;
    transform: translateY(30px);
}

/* --- Location Cards --- */
.location-card {
    transition: all 0.3s ease;
}

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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* --- Mobile Menu Button --- */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-content {
        animation-duration: 0.6s;
    }
    
    .hero-image {
        animation-duration: 0.8s;
    }
}

/* --- Focus visible for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    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;
        transform: none;
    }
}
