*, *::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;
}

::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #FDF8F0;
}

/* ─── Hero Gradient ─── */
.hero-gradient {
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(4, 120, 87, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(212, 168, 67, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 80% 70% at 50% 50%, rgba(6, 79, 58, 0.6) 0%, transparent 70%),
        linear-gradient(160deg, #040504 0%, #064E3B 30%, #047857 50%, #B8860B 75%, #040504 100%);
}

/* ─── Scroll Line Animation ─── */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ─── Hero Animations ─── */
.hero-badge {
    animation: fadeSlideDown 0.8s ease-out both;
}

.hero-headline {
    animation: fadeSlideUp 1s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeSlideUp 1s ease-out 0.4s both;
}

.hero-ctas {
    animation: fadeSlideUp 1s ease-out 0.6s both;
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ─── Hero Shimmer ─── */
.hero-shimmer {
    animation: shimmerFloat 8s ease-in-out infinite;
}

.hero-shimmer:nth-child(2) {
    animation-delay: -4s;
    animation-duration: 10s;
}

@keyframes shimmerFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.1); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ─── Section Label ─── */
.section-label {
    position: relative;
    display: inline-block;
}

.section-label::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, #D4A843, transparent);
}

/* ─── Buttons ─── */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212,168,67,0.08), transparent);
    transition: left 0.5s ease;
}

.btn-secondary:hover::before {
    left: 100%;
}

/* ─── Product Cards ─── */
.product-card {
    position: relative;
}

.product-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4A843, transparent);
    transition: width 0.5s ease;
}

.product-card:hover::after {
    width: 80%;
}

/* ─── Craft Items ─── */
.craft-item {
    position: relative;
    padding-left: 0;
    border-left: 1px solid rgba(212, 168, 67, 0.1);
    padding-left: 2rem;
    margin-left: 0.5rem;
}

.craft-item:first-child {
    border-left-color: rgba(212, 168, 67, 0.4);
}

/* ─── Visit Items ─── */
.visit-item {
    transition: transform 0.3s ease;
}

.visit-item:hover {
    transform: translateX(8px);
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

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

#mobile-menu.open .mobile-link {
    animation: mobileLinkIn 0.4s ease-out both;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }

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

/* ─── Menu Toggle Animation ─── */
.menu-toggle.active .menu-line:first-child {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-toggle.active .menu-line:last-child {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* ─── Navbar Transition ─── */
.nav-scrolled {
    background: rgba(4, 5, 4, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.1);
}

/* ─── Scroll to Top ─── */
#scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* ─── Divider Gold Line ─── */
.gold-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #D4A843, transparent);
}

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

/* ─── Responsive ─── */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.75rem;
    }

    .hero-badge span:last-child {
        font-size: 0.65rem;
    }

    .reveal-left,
    .reveal-right {
        transform: none;
        opacity: 1;
    }

    .craft-item {
        margin-left: 0;
        padding-left: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .reveal-left,
    .reveal-right {
        transform: none;
        opacity: 1;
    }
}
