/* === Custom Styles for Fink's Milling and Distilling === */

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

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

body {
    background-color: #060a18;
}

/* Selection color */
::selection {
    background-color: rgba(212, 168, 67, 0.3);
    color: #f0f0f0;
}

/* === Scroll Reveal (progressive enhancement) === */
@media (prefers-reduced-motion: no-preference) {
    .process-card,
    .product-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, box-shadow 0.5s ease;
    }
}

/* Reduced motion: keep everything visible */
@media (prefers-reduced-motion: reduce) {
    .process-card,
    .product-card {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* === Navbar scroll state === */
nav.scrolled {
    background: rgba(6, 10, 24, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.1);
}

nav.scrolled .logo-text {
    color: #f0f0f0;
}

/* === Mobile menu === */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* === Hero geometric shapes animation === */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

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

.hero-shape-1 {
    animation: float 6s ease-in-out infinite;
}

.hero-shape-2 {
    animation: float-circle 8s ease-in-out infinite;
}

.hero-shape-3 {
    animation: float 7s ease-in-out infinite;
    animation-delay: 1s;
}

/* === Button focus styles === */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d4a843;
    outline-offset: 2px;
}

/* === Custom scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #060a18;
}

::-webkit-scrollbar-thumb {
    background: #1e3f9e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4a843;
}

/* === Subtle grain texture overlay === */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 9999;
}

/* === Card hover glow effect === */
.process-card:hover,
.product-card:hover {
    box-shadow: 0 0 60px -15px rgba(212, 168, 67, 0.15);
}

/* === Product card image container === */
.product-card .aspect-square {
    position: relative;
}

.product-card .aspect-square::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 10, 24, 0.6) 0%, transparent 50%);
    pointer-events: none;
}

/* === Smooth image loading === */
img {
    image-rendering: auto;
}

img[loading="lazy"] {
    opacity: 1;
}

/* === Mobile menu transitions === */
#mobileMenu {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                pointer-events 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Form select arrow === */
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='%23d4a843' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* === Ensure all text sections have proper contrast === */
.text-white\/50 {
    color: rgba(240, 243, 255, 0.5);
}

.text-white\/40 {
    color: rgba(240, 243, 255, 0.4);
}

.text-white\/30 {
    color: rgba(240, 243, 255, 0.3);
}
