/* ========================================
   PickFrame - Minimalist Photo Selection Platform
   Inspired by Pic-Time aesthetic
   ======================================== */

/* Custom Properties */
:root {
    --color-bg: #FFFFFF;
    --color-text: #292524;
    --color-text-muted: #78716C;
    --color-border: #E7E5E4;
    --color-accent: #1C1917;
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
}

/* Base Styles */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    background: #FFFFFF;
    color: #292524;
    line-height: 1.7;
    overflow-x: hidden;
}

.font-display {
    font-family: 'Cormorant Garamond', serif;
}

/* Scroll Reveal Animations - Subtle */
.reveal {
    opacity: 0;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal[data-animation="slide-up"] {
    transform: translateY(30px);
}

.reveal[data-animation="slide-down"] {
    transform: translateY(-30px);
}

.reveal[data-animation="slide-right"] {
    transform: translateX(-30px);
}

.reveal[data-animation="slide-left"] {
    transform: translateX(30px);
}

.reveal[data-animation="fade-in"] {
    transform: none;
}

.reveal[data-animation="scale-in"] {
    transform: scale(0.95);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: #D6D3D1;
    color: #1C1917;
}

/* Custom Scrollbar - Minimal */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D6D3D1;
    border-radius: 3px;
}

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

/* Navbar */
#navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-border);
}

/* Photo Selection Styles */
.demo-photo {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.demo-photo:hover::before {
    opacity: 1;
}

.demo-photo.selected {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.demo-photo.selected::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: #1C1917;
    border-radius: 50%;
    z-index: 2;
    animation: check-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes check-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.demo-photo .check-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.demo-photo.selected .check-icon {
    opacity: 1;
    transform: scale(1);
}

.demo-photo .photo-number {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text);
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.demo-photo:hover .photo-number {
    opacity: 1;
    transform: translateY(0);
}

/* Filter Buttons */
.demo-filter {
    background: transparent;
    color: var(--color-text-muted);
}

.demo-filter.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* Lightbox */
#lightbox {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightbox.active {
    opacity: 1;
}

/* Modal */
#demo-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#demo-modal.active {
    opacity: 1;
}

#demo-modal > div:last-child {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#demo-modal.active > div:last-child {
    transform: translateY(0);
}

/* Selection Counter Animation */
#selection-counter {
    transition: all 0.3s ease;
}

#selection-counter.has-selection {
    background: #1C1917;
    box-shadow: 0 10px 40px rgba(28, 25, 23, 0.2);
}

/* Image Placeholder Gradients */
.photo-placeholder {
    background: linear-gradient(135deg, #E7E5E4 0%, #D6D3D1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder.portrait {
    background: linear-gradient(135deg, #E7E5E4 0%, #D6D3D1 50%, #C4C0BB 100%);
}

.photo-placeholder.landscape {
    background: linear-gradient(135deg, #D6D3D1 0%, #C4C0BB 100%);
}

.photo-placeholder.event {
    background: linear-gradient(135deg, #C4C0BB 0%, #A8A29E 100%);
}

/* Focus States */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--color-accent);
    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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    nav, footer, #demo-modal, #lightbox, .demo-filter, #selection-counter {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Smooth Image Load */
img {
    transition: opacity 0.3s ease;
}

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

img.loaded {
    opacity: 1;
}