/* ============================================
   Stacey's — Custom Styles
   Bold Editorial | Terracotta & Sand
   ============================================ */

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

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

::selection {
    background-color: #d64828;
    color: #ffffff;
}

/* ---- Smooth Scroll Offset for Fixed Nav ---- */
section[id] {
    scroll-margin-top: 80px;
}

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

#navbar.scrolled {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(44, 40, 37, 0.08);
}

/* ---- Hero Animations ---- */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-elem[data-delay="100"] { animation-delay: 0.1s; }
.hero-elem[data-delay="200"] { animation-delay: 0.2s; }
.hero-elem[data-delay="300"] { animation-delay: 0.3s; }
.hero-elem[data-delay="400"] { animation-delay: 0.4s; }
.hero-elem[data-delay="600"] { animation-delay: 0.6s; }

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

/* ---- Scroll Reveal ---- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 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; }

/* ---- Hamburger Animation ---- */
#menu-toggle.active #line1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.active #line2 {
    opacity: 0;
}

#menu-toggle.active #line3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 24px;
}

/* ---- Back to Top ---- */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:not(.visible) {
    opacity: 0;
    pointer-events: none;
}

/* ---- Image Hover Container ---- */
div[class*="aspect-"] > img {
    will-change: transform;
}

/* ---- Menu Border Hover ---- */
#menu .border-b {
    transition: border-color 0.3s ease;
}

#menu .border-b:hover {
    border-color: #e9917c;
}

#menu .border-b > div > span:first-child {
    transition: color 0.3s ease;
}

#menu .border-b:hover > div > span:first-child {
    color: #d64828;
}

/* ---- Form Focus Styles ---- */
input:focus,
textarea:focus {
    border-color: #e9917c !important;
    box-shadow: 0 0 0 4px rgba(233, 145, 124, 0.15) !important;
}

/* ---- 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;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }

    .hero-elem {
        opacity: 1;
        transform: none;
    }

    img {
        transition: none;
    }
}

/* ---- Print Styles ---- */
@media print {
    #navbar,
    #back-to-top,
    #mobile-menu {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .hero-elem,
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
