/* ===== Custom Styles for Daily Dose Cedar Falls ===== */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(212, 160, 23, 0.3);
    color: #F9F0F7;
}

/* ===== Scroll Reveal Animations ===== */
/* Content is visible by default; JS adds animation state for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }

    .reveal.revealed {
        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);
    }
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(26, 11, 23, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(107, 47, 91, 0.2);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #D4A017, #B8860B);
    transition: width 0.3s ease;
}

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

/* ===== Mobile Menu ===== */
#mobileMenu {
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.3s ease;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

#mobileMenu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.mobile-link {
    position: relative;
    padding-left: 0;
}

/* Menu toggle animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuToggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menuToggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ===== Buttons ===== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

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

::-webkit-scrollbar-track {
    background: #1A0B17;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6B2F5B, #3E1A36);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #C06DB0, #6B2F5B);
}

/* ===== Select Dropdown ===== */
select option {
    background: #1A0B17;
    color: #F3E0EE;
    padding: 8px;
}

/* ===== Focus Styles ===== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* ===== Image Hover Effects ===== */
img {
    -webkit-user-drag: none;
}

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

/* ===== Responsive Adjustments ===== */
@media (max-width: 767px) {
    .font-serif {
        word-spacing: -0.02em;
    }

    #hero h1 {
        line-height: 1.1;
    }
}

@media (min-width: 768px) {
    /* Subtle parallax-like effect on hero image */
    #hero {
        perspective: 1000px;
    }
}
