/* ============================================
   Gray's Gunshop — Custom Styles
   ============================================ */

/* Base reset & smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

/* ============================================
   Geometric Background Shapes (fixed)
   ============================================ */
.geo-shape {
    position: fixed;
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

.geo-circle-1 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: #1b5e20;
    top: 10%;
    right: -100px;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 120px solid transparent;
    border-right: 120px solid transparent;
    border-bottom: 208px solid #2e7d32;
    top: 45%;
    left: -40px;
    transform: rotate(15deg);
}

.geo-square-1 {
    width: 160px;
    height: 160px;
    background: #4caf50;
    bottom: 20%;
    right: 5%;
    transform: rotate(45deg);
}

.geo-circle-2 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #7cb342;
    bottom: 5%;
    left: 10%;
}

/* ============================================
   Hero Geometric Elements
   ============================================ */
.hero-geo {
    position: absolute;
    opacity: 0.15;
    pointer-events: none;
}

.hero-geo-1 {
    width: 300px;
    height: 300px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 10%;
    left: 5%;
    animation: float 8s ease-in-out infinite;
}

.hero-geo-2 {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    top: 20%;
    right: 10%;
    transform: rotate(30deg);
    animation: float 6s ease-in-out infinite reverse;
}

.hero-geo-3 {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 139px solid rgba(255, 255, 255, 0.06);
    bottom: 25%;
    left: 15%;
    transform: rotate(-15deg);
    animation: float 10s ease-in-out infinite;
}

.hero-geo-4 {
    width: 200px;
    height: 200px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    bottom: 15%;
    right: 8%;
    transform: rotate(45deg);
    animation: float 7s ease-in-out infinite reverse;
}

.hero-geo-5 {
    width: 100px;
    height: 100px;
    background: rgba(167, 214, 160, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotation, 0deg)); }
    50% { transform: translateY(-20px) rotate(var(--rotation, 0deg)); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.25; transform: translate(-50%, -50%) scale(1.1); }
}

/* ============================================
   Hero Content Animation
   ============================================ */
.hero-content {
    animation: heroFadeIn 1s ease-out forwards;
}

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

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content is visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    perspective: 1000px;
}

.service-card > div {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .service-card:hover > div {
        transform: translateY(-4px);
    }
}

/* ============================================
   Navbar Scroll State
   ============================================ */
#navbar.scrolled {
    background: rgba(248, 246, 240, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* ============================================
   Utility & Accessibility
   ============================================ */
@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;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #1b5e20;
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .geo-shape,
    .hero-geo,
    [aria-hidden="true"] {
        display: none !important;
    }
}
