/* ============================================
   MAYBERRY FARMS — Custom Styles
   Premium dark luxury · Burgundy + Blush + Gold
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
    background-color: #0e0b09;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #fce7eb;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0e0b09;
}
::-webkit-scrollbar-thumb {
    background: #781f2e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C9A84C;
}

/* ---------- Navbar ---------- */
#navbar {
    background: rgba(14, 11, 9, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: rgba(14, 11, 9, 0.92);
    border-bottom-color: rgba(120, 31, 46, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu .mobile-link {
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

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

#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 animation */
#menu-toggle.active #bar1 {
    transform: translateY(5px) rotate(45deg);
}
#menu-toggle.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle.active #bar3 {
    transform: translateY(-5px) rotate(-45deg);
}

/* ---------- Hero Label ---------- */
.hero-label {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

/* ---------- Hero Headline ---------- */
#hero h1 {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.9s ease forwards;
    animation-delay: 0.5s;
}

/* ---------- Hero Subheadline ---------- */
#hero p {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

/* ---------- Hero CTAs ---------- */
#hero .flex-col > a,
#hero .flex-col > div > a {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}
#hero .flex-col > a:first-child { animation-delay: 0.9s; }
#hero .flex-col > a:last-child { animation-delay: 1.0s; }

/* ---------- Scroll indicator ---------- */
#hero .absolute.bottom-10 {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.4s;
}

/* ---------- Scroll Reveal (below fold) ---------- */
.reveal-text,
.reveal-card,
.reveal-image {
    /* Default: visible (progressive enhancement) */
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS is enabled and user prefers motion, hide initially */
.animate-enabled .reveal-text,
.animate-enabled .reveal-card,
.animate-enabled .reveal-image {
    opacity: 0;
    transform: translateY(40px);
}

.animate-enabled .reveal-image {
    transform: translateY(60px);
}

.animate-enabled .reveal-card {
    transform: translateY(30px);
}

.animate-enabled .reveal-card:nth-child(2) { transition-delay: 0.1s; }
.animate-enabled .reveal-card:nth-child(3) { transition-delay: 0.2s; }
.animate-enabled .reveal-card:nth-child(4) { transition-delay: 0.3s; }
.animate-enabled .reveal-card:nth-child(5) { transition-delay: 0.4s; }
.animate-enabled .reveal-card:nth-child(6) { transition-delay: 0.5s; }

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

/* ---------- Card hover glow ---------- */
.reveal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 2rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(201,168,76,0), rgba(201,168,76,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.5s ease;
}

.reveal-card:hover::before {
    background: linear-gradient(135deg, rgba(201,168,76,0.3), rgba(201,168,76,0.05));
}

/* ---------- Gold shimmer on hover ---------- */
.reveal-card:hover .aspect-\[4\/3\] img {
    filter: brightness(1.05);
}

/* ---------- Floating accent card ---------- */
.reveal-image .absolute {
    animation: float 4s ease-in-out infinite;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 0.5;
    }
}

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

/* ---------- 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-text,
    .reveal-card,
    .reveal-image {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
    #hero h1 {
        font-size: 2.75rem;
    }
    .reveal-image .absolute {
        position: relative;
        margin-top: 1rem;
        margin-left: 0;
        margin-right: auto;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    #hero h1 {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    #hero h1 {
        font-size: 5.5rem;
    }
}
