/* =============================================
   Becker Farms — Custom Styles
   Classic & Elegant | Charcoal + Coral
   ============================================= */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(224, 122, 95, 0.3);
    color: #f6f6f7;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1b2e;
}
::-webkit-scrollbar-thumb {
    background: #4a4c59;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e07a5f;
}

/* --- Navigation --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #e07a5f;
    transition: width 0.3s ease;
}

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

.nav-link::after {
    transition: width 0.3s ease;
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(13, 14, 23, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 76, 89, 0.3);
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s 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; }

/* Hamburger */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Hero Animations --- */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }

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

/* --- Menu Tabs --- */
.menu-tab {
    background: transparent;
    border: 1px solid transparent;
    color: #7b7d8c;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-tab:hover {
    color: #f47256;
}

.menu-tab.active {
    background-color: #e07a5f;
    border-color: #e07a5f;
    color: #ffffff;
}

.menu-tab:focus-visible {
    outline: 2px solid #e07a5f;
    outline-offset: 2px;
}

/* --- Menu Content --- */
.menu-content {
    animation: menuFadeIn 0.4s ease forwards;
}

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

/* --- Scroll Reveal (below fold only) --- */
.reveal {
    /* Default: visible — JS adds the animated state */
}

.reveal.fade-up {
    /* Progressive enhancement: hidden state only if JS runs */
}

@media (prefers-reduced-motion: no-preference) {
    .reveal.fade-up {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e07a5f;
    outline-offset: 2px;
}

/* --- Image hover container --- */
.overflow-hidden {
    position: relative;
}

.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 14, 23, 0.15), transparent);
    pointer-events: none;
}

/* --- Form Select Arrows --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b7d8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 1.5rem;
}

/* --- Date Input --- */
input[type="date"] {
    color: #f6f6f7;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .font-serif {
        word-break: keep-all;
    }
}
