/* ========================================
   The Front Porch — Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

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

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(45, 45, 45, 0.06);
}

/* --- Hero Animations --- */
.hero-subtitle {
    opacity: 0;
    transform: translateY(16px);
    animation: heroFadeUp 0.8s ease forwards 0.3s;
}

.hero-title {
    opacity: 0;
    transform: translateY(24px);
    animation: heroFadeUp 0.8s ease forwards 0.5s;
}

.hero-tagline {
    opacity: 0;
    transform: translateY(16px);
    animation: heroFadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(16px);
    animation: heroFadeUp 0.8s ease forwards 0.9s;
}

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

/* --- Scroll Line --- */
@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.scroll-line {
    animation: scrollLine 1.6s ease-in-out infinite;
}

/* --- Scroll Reveal --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-up {
    transform: translateY(32px);
}

.reveal-left {
    transform: translateX(-32px);
}

.reveal-right {
    transform: translateX(32px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Menu Items --- */
.menu-item {
    border-bottom: 1px solid rgba(45, 45, 45, 0.06);
    padding-bottom: 6px;
    transition: padding-left 0.3s ease;
}

.menu-item:hover {
    padding-left: 8px;
}

.menu-item:last-child {
    border-bottom: none;
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    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.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* --- Mobile Menu Button --- */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(2px, 2px);
}

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

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

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

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 2px;
}

/* --- Selection --- */
::selection {
    background: rgba(196, 66, 66, 0.15);
}
