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

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

::selection {
    background: #B85C38;
    color: #FDF8F3;
}

/* ── Navbar ── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(79, 39, 25, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

/* ── Hero Animations ── */
.hero-sub {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-headline {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-body {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-sub, .hero-headline, .hero-body {
    will-change: opacity, transform;
}

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

/* ── Scroll Indicator ── */
.scroll-dot {
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
    0%, 100% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ── Buttons ── */
.btn-primary {
    box-shadow: 0 4px 20px rgba(184, 92, 56, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(184, 92, 56, 0.4);
    transform: translateY(-1px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

/* ── Scroll Reveal ── */
.reveal-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default state visible (no-JS safe) */
.reveal-section {
    opacity: 1;
    transform: none;
}

/* Progressive enhancement: hidden by default when JS is enabled */
@media (prefers-reduced-motion: no-preference) {
    .reveal-section:not(.revealed) {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
}

/* ── Mobile Menu ── */
.mobile-link {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

#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; }

/* ── Menu Toggle ── */
.menu-line {
    transform-origin: center;
}

body.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ── Product Card Hover ── */
.group:hover img {
    filter: brightness(1.02);
}

/* ── Form Focus States ── */
input:focus, textarea:focus {
    border-color: #B85C38 !important;
}

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

/* ── 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-section:not(.revealed) {
        opacity: 1;
        transform: none;
    }
}

/* ── Responsive ── */
@media (max-width: 767px) {
    section[id] {
        scroll-margin-top: 60px;
    }
}
