/* ===================================
   Priest Lake Ranger District
   Custom Styles
   =================================== */

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

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

body {
    min-height: 100vh;
}

/* Geometric Background Shapes */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle-1 {
    top: 15%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    bottom: 10%;
    left: -8%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(30, 41, 59, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-triangle {
    top: 30%;
    left: 5%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(13, 148, 136, 0.04);
    animation: rotate-slow 30s linear infinite;
}

.geo-dots {
    top: 60%;
    right: 10%;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(13, 148, 136, 0.15) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.6;
    animation: float-slow 18s ease-in-out infinite;
}

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

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Navigation */
.nav-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.nav-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0d9488;
    transform: translateX(-50%);
    transition: width 0.2s ease;
    border-radius: 1px;
}

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

/* Mobile Menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    max-height: 400px;
}

.mobile-nav-link {
    border-radius: 12px;
}

/* Hero Section */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, white, transparent);
    pointer-events: none;
}

/* Section Transitions */
section {
    position: relative;
}

/* Activity Cards */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #0d9488 !important;
    outline: none;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1) !important;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

/* Back to Top Button */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:not(.visible) {
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    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; }

/* Smooth anchor offset for fixed header */
section[id] {
    scroll-margin-top: 80px;
}

/* Image lazy loading placeholder */
img {
    background-color: #e2e8f0;
}

/* Selection color */
::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* 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 {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    .nav-header,
    .back-to-top,
    .geo-shape {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
