/* ============================================
   Buttermilk Farms Antique Market — Custom Styles
   ============================================ */

/* CSS Custom Properties */
:root {
    --color-emerald-900: #064e3b;
    --color-emerald-800: #065f46;
    --color-emerald-700: #047857;
    --color-emerald-600: #059669;
    --color-emerald-500: #10b981;
    --color-cream-50: #fefdf8;
    --color-cream-100: #fdf9f0;
    --color-cream-200: #f5f0e1;
    --color-cream-300: #e8dfc8;
}

/* Base & Typography */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ============================================
   Geometric Background Decorations
   ============================================ */
.geo-circle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 95, 70, 0.04) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float-slow 20s ease-in-out infinite;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 95, 70, 0.03) 0%, transparent 70%);
    bottom: 10%;
    left: -80px;
    animation: float-slow 25s ease-in-out infinite reverse;
}

.geo-triangle {
    position: fixed;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 60px 104px 60px;
    border-color: transparent transparent rgba(6, 95, 70, 0.03) transparent;
    top: 40%;
    left: 5%;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
    animation: float-slow 18s ease-in-out infinite;
}

.geo-square {
    position: fixed;
    width: 80px;
    height: 80px;
    background: rgba(6, 95, 70, 0.02);
    border: 2px solid rgba(6, 95, 70, 0.04);
    top: 60%;
    right: 8%;
    transform: rotate(45deg);
    pointer-events: none;
    z-index: 0;
    animation: float-slow 22s ease-in-out infinite reverse;
}

.geo-diamond {
    position: fixed;
    width: 60px;
    height: 60px;
    background: rgba(6, 95, 70, 0.025);
    border: 1px solid rgba(6, 95, 70, 0.05);
    bottom: 20%;
    right: 15%;
    transform: rotate(30deg);
    pointer-events: none;
    z-index: 0;
    animation: float-slow 15s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) rotate(var(--rotation, 0deg)); }
    25% { transform: translate(10px, -15px) rotate(var(--rotation, 0deg)); }
    50% { transform: translate(-5px, -25px) rotate(var(--rotation, 0deg)); }
    75% { transform: translate(15px, -10px) rotate(var(--rotation, 0deg)); }
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-emerald-600);
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
#mobile-menu.active {
    transform: translateX(0);
}

#mobile-menu:not(.active) {
    transform: translateX(100%);
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-emerald-600);
    transition: width 0.3s ease;
}

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

/* Menu button animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-emerald-700);
    color: #fefdf8;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    background: var(--color-emerald-600);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 95, 70, 0.3);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fefdf8;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(254, 253, 248, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(254, 253, 248, 0.1);
    border-color: rgba(254, 253, 248, 0.7);
    transform: translateY(-2px);
}

/* ============================================
   Scroll Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Back to Top
   ============================================ */
#back-to-top.visible {
    opacity: 1;
    translate: 0;
    pointer-events: auto;
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(6, 95, 70, 0.35);
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    .geo-circle, .geo-triangle, .geo-square, .geo-diamond {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .geo-circle {
        opacity: 0.5;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, #back-to-top, .geo-circle, .geo-triangle, .geo-square, .geo-diamond {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    section {
        page-break-inside: avoid;
    }
}
