@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    /* Fallback / Winter */
    --theme-bg-light: #F5F7FA;
    --theme-bg-dark: #090E17;
    --theme-nav-light: rgba(245, 247, 250, 0.8);
    --theme-nav-dark: rgba(9, 14, 23, 0.8);
    --theme-accent-light: #6366F1; /* Indigo */
    --theme-accent-dark: #818CF8;
}
html[data-season="spring"] {
    --theme-bg-light: #F6FBF7;
    --theme-bg-dark: #0A1612;
    --theme-nav-light: rgba(246, 251, 247, 0.8);
    --theme-nav-dark: rgba(10, 22, 18, 0.8);
    --theme-accent-light: #10B981; /* Emerald */
    --theme-accent-dark: #34D399;
}
html[data-season="summer"] {
    --theme-bg-light: #FFFAF0;
    --theme-bg-dark: #0B111A;
    --theme-nav-light: rgba(255, 250, 240, 0.8);
    --theme-nav-dark: rgba(11, 17, 26, 0.8);
    --theme-accent-light: #F59E0B; /* Amber */
    --theme-accent-dark: #FCD34D;
}
html[data-season="autumn"] {
    --theme-bg-light: #FCF8F5;
    --theme-bg-dark: #1A120E;
    --theme-nav-light: rgba(252, 248, 245, 0.8);
    --theme-nav-dark: rgba(26, 18, 14, 0.8);
    --theme-accent-light: #EA580C; /* Orange */
    --theme-accent-dark: #FB923C;
}

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

.gallery-item {
    position: relative;
    border-radius: 0.5rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease, opacity 0.8s ease, background-color 0.5s ease;
    width: 100%;
}

.gallery-item.loaded {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item.loaded:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(28, 25, 23, 0.15); /* Warm shadow */
}

.dark .gallery-item.loaded:hover {
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.8); /* Cool dark shadow */
}

.gallery-item img {
    width: 100%;
    height: auto; 
    display: block;
    transition: filter 0.3s ease, transform 0.5s ease;
}

.gallery-item:hover img {
    filter: brightness(0.6);
    transform: scale(1.03);
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(11, 18, 33, 0.9)); /* Cool dark gradient */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.spinner {
    border: 3px solid rgba(150, 150, 150, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: currentColor;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 18, 33, 0.98); /* Deep midnight blue */
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    backdrop-blur: 10px;
}

/* Lock lightbox scroll when a child modal (print/pairing) is open */
#lightbox.scroll-locked {
    overflow: hidden !important;
    touch-action: none;
}

/* Print Modal scroll isolation - prevent ALL scroll bleed to lightbox */
#print-modal {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

#print-modal > div {
    overscroll-behavior: contain;
}

/* Pairing Preview scroll isolation */
#pairing-preview-modal {
    overscroll-behavior: contain;
    touch-action: pan-y;
}

/* Custom Scrollbar for Lightbox Description */
#lightbox::-webkit-scrollbar {
    width: 6px;
}
#lightbox::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
#lightbox::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.page-section {
    display: none;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-section.active {
    display: block;
}

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

.nav-link.active {
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
}

/* Flickr Authentic Hover Colors */
.flickr-dot-blue { fill: currentColor; transition: fill 0.3s ease; }
.flickr-dot-pink { fill: currentColor; transition: fill 0.3s ease; }
.group:hover .flickr-dot-blue, a:hover .flickr-dot-blue { fill: #0063dc !important; }
.group:hover .flickr-dot-pink, a:hover .flickr-dot-pink { fill: #ff0084 !important; }

/* Explore Glow Physics */
.explore-outer-glow {
    position: absolute;
    inset: 0;
    border-radius: 0.5rem;
    pointer-events: none;
    z-index: 19;
    animation: pulse-glow 3s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% { box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.3), 0 0 10px rgba(250, 204, 21, 0.2); }
    100% { box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.5), 0 0 25px rgba(250, 204, 21, 0.6); }
}

.explore-glow-wrapper {
    position: absolute;
    inset: 0;
    border-radius: 0.5rem;
    padding: 2px; /* Thickness of the glimmering border */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 20;
    overflow: hidden;
}

.explore-glow-bg {
    position: absolute;
    inset: 0;
    background: rgba(250, 204, 21, 0.15); /* Static base gold color */
}

.explore-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        rgba(250, 204, 21, 0) 10%,
        rgba(250, 204, 21, 1) 25%,
        rgba(250, 204, 21, 0) 40%,
        transparent 50%,
        transparent 60%,
        rgba(250, 204, 21, 1) 75%,
        rgba(250, 204, 21, 0) 90%,
        transparent 100%
    );
    animation: rotate-glimmer 3s linear infinite;
}

/* Fave Heart Glimmer Physics */
.fave-outer-glow {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    pointer-events: none;
    z-index: 19;
    animation: pulse-fave 3s ease-in-out infinite alternate;
}

@keyframes pulse-fave {
    0% { box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.3), 0 0 8px rgba(236, 72, 153, 0.2); }
    100% { box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.6), 0 0 16px rgba(236, 72, 153, 0.7); }
}

.fave-glow-wrapper {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    padding: 1.5px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 20;
    overflow: hidden;
}

.fave-glow-bg {
    position: absolute;
    inset: 0;
    background: rgba(236, 72, 153, 0.15);
}

.fave-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        rgba(236, 72, 153, 0) 10%,
        rgba(236, 72, 153, 1) 25%,
        rgba(236, 72, 153, 0) 40%,
        transparent 50%,
        transparent 60%,
        rgba(236, 72, 153, 1) 75%,
        rgba(236, 72, 153, 0) 90%,
        transparent 100%
    );
    animation: rotate-glimmer 3s linear infinite;
}

@keyframes rotate-glimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Gallery Image Cinematic Glow */
.gallery-item-glow {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
}
.gallery-item.loaded .gallery-item-glow {
    opacity: 0.35;
    transform: scale(1.1) translateY(4px); /* Pushes the light further outward */
}
.dark .gallery-item.loaded .gallery-item-glow {
    opacity: 0.45;
}
.gallery-item:hover .gallery-item-glow {
    opacity: 0.65;
    transform: scale(1.15) translateY(8px); /* Expands beautifully on hover */
}
.dark .gallery-item:hover .gallery-item-glow {
    opacity: 0.85;
}

/* Glimmer Falling Leaf Physics */
.flake {
    position: absolute;
    width: 1.5px;
    height: 1.5px;
    background-color: #fef08a;
    border-radius: 50%;
    box-shadow: 0 0 4px 1px rgba(234, 179, 8, 0.8);
    opacity: 0;
    animation: flake-fall var(--duration) ease-in-out infinite var(--delay);
}

@keyframes flake-fall {
    0% { 
        transform: translate(0, 0) scale(0); 
        opacity: 0; 
        background-color: #fef08a;
        box-shadow: 0 0 4px 1px rgba(234, 179, 8, 0.8);
    }
    15% { /* Apex Right: Bright Flash */
        transform: translate(calc(var(--drift) * 0.8), calc(var(--drop) * 0.15)) scale(1.5); 
        opacity: 1; 
        background-color: #ffffff;
        box-shadow: 0 0 12px 3px rgba(253, 224, 71, 1);
    }
    25% { /* Mid-swing: Dim */
        background-color: #fef08a;
        box-shadow: 0 0 4px 1px rgba(234, 179, 8, 0.8);
    }
    35% { /* Apex Left: Bright Flash */
        transform: translate(calc(var(--drift) * -0.6), calc(var(--drop) * 0.35)) scale(0.5); 
        opacity: 0.6; 
        background-color: #ffffff;
        box-shadow: 0 0 10px 2px rgba(253, 224, 71, 1);
    }
    45% { /* Mid-swing: Dim */
        background-color: #fef08a;
        box-shadow: 0 0 4px 1px rgba(234, 179, 8, 0.8);
    }
    55% { /* Apex Right: Bright Flash */
        transform: translate(calc(var(--drift) * 1.2), calc(var(--drop) * 0.55)) scale(1.5); 
        opacity: 1; 
        background-color: #ffffff;
        box-shadow: 0 0 12px 3px rgba(253, 224, 71, 1);
    }
    65% { /* Mid-swing: Dim */
        background-color: #fef08a;
        box-shadow: 0 0 4px 1px rgba(234, 179, 8, 0.8);
    }
    75% { /* Apex Left: Bright Flash */
        transform: translate(calc(var(--drift) * -0.4), calc(var(--drop) * 0.75)) scale(0.5); 
        opacity: 0.6; 
        background-color: #ffffff;
        box-shadow: 0 0 10px 2px rgba(253, 224, 71, 1);
    }
    85% { /* Mid-swing: Dim */
        background-color: #fef08a;
        box-shadow: 0 0 4px 1px rgba(234, 179, 8, 0.8);
    }
    100% { 
        transform: translate(var(--drift), var(--drop)) scale(0); 
        opacity: 0; 
        background-color: #fef08a;
        box-shadow: 0 0 4px 1px rgba(234, 179, 8, 0.8);
    }
}

/* Vector Landscape Layers */
.season-art {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
html[data-season="winter"] .winter-art { opacity: 1; }
html[data-season="spring"] .spring-art { opacity: 1; }
html[data-season="summer"] .summer-art { opacity: 1; }
html[data-season="autumn"] .autumn-art { opacity: 1; }

/* Screen Reader Only (Accessibility) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Shot Map Popup Styling */
.shot-map-popup .leaflet-popup-content-wrapper {
    background: #0f1218;
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    font-family: 'Inter', sans-serif;
}
.shot-map-popup .leaflet-popup-tip {
    background: #0f1218;
    border: 1px solid rgba(255,255,255,0.1);
}
.shot-map-popup .leaflet-popup-content {
    margin: 10px;
}
.shot-map-popup .leaflet-popup-close-button {
    color: #94a3b8 !important;
}
.shot-map-popup .leaflet-popup-close-button:hover {
    color: #fff !important;
}

/* Leaflet Dark Theme Attribution */
.dark .leaflet-control-attribution {
    background: rgba(15, 18, 24, 0.8) !important;
    color: #64748b !important;
}
.dark .leaflet-control-attribution a {
    color: #818cf8 !important;
}
.dark .leaflet-control-zoom a {
    background: #0f1218 !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.1) !important;
}
.dark .leaflet-control-zoom a:hover {
    background: #1e293b !important;
}

/* Hide scrollbar utility */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
