/* ==========================================================================
   DESIGN TOKENS & CORE ENGINE
   ========================================================================== */

:root {
    /* Color Palette */
    --clr-bg: #faf8f5;
    --clr-surface: #ffffff;
    --clr-text-main: #1a1a1a;
    --clr-text-muted: #666666;
    --clr-primary: #b89d6e; /* Warm Gold/Champagne */
    --clr-primary-dark: #967f55;
    --clr-accent: #3d5a45; /* Deep Emerald */
    --clr-success: #2e7d32;
    --clr-error: #c62828;
    --clr-overlay: rgba(0, 0, 0, 0.4);

    /* Typography (Fluid Range via Clamp) */
    --fs-h1: clamp(2rem, 4vw + 1rem, 3.5rem);
    --fs-h2: clamp(1.5rem, 3vw + 1rem, 2.25rem);
    --fs-body: clamp(1rem, 1vw + 0.5rem, 1.125rem);
    --fs-sm: 0.875rem;

    /* Layout & Animation */
    --radius-lg: 16px;
    --radius-md: 8px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fade: opacity 1.5s ease-in-out;
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--clr-text-main);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus States for Accessibility */
button:focus-visible, input:focus-visible {
    outline: 3px solid var(--clr-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   COMPONENT STYLES
   ========================================================================== */

/* Layout Grids & Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Card & Forms (Upload Portal) */
.upload-card {
    background: var(--clr-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin: 2rem auto;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    font-size: var(--fs-body);
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: var(--clr-primary);
    outline: none;
}

/* Dropzone Styles */
.dropzone {
    border: 2px dashed var(--clr-primary);
    background: rgba(184, 157, 110, 0.05);
    padding: 2rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-bottom: 1.5rem;
}

.dropzone:hover {
    background: rgba(184, 157, 110, 0.1);
}

/* Custom Button */
.btn-submit {
    display: inline-block;
    width: 100%;
    background: var(--clr-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: var(--fs-body);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-submit:hover {
    background: var(--clr-primary-dark);
}

/* Real-time Progress Bar */
.progress-container {
    margin-top: 1.5rem;
    display: none;
}

.progress-bar-wrapper {
    background: #e0e0e0;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 12px;
    width: 100%;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--clr-accent);
    transition: width 0.2s ease-out;
}

.status-message {
    margin-top: 0.75rem;
    font-weight: 600;
    font-size: var(--fs-sm);
}

/* Live Slideshow View */
.slideshow-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
    cursor: none;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: var(--transition-fade);
}

.slide.active {
    opacity: 1;
}

/* Interactive Gallery Grid & Thumbnails */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Interactive Lightbox / Modal with Thumbnail Strip */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-main {
    max-width: 85%;
    max-height: 65vh;
    object-fit: contain;
}

.lightbox-controls {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
}

.btn-nav {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--fs-body);
    transition: var(--transition-smooth);
}

.btn-nav:hover {
    background: var(--clr-primary);
}

.thumbnail-tray {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    width: 90%;
    padding: 1rem 0;
    justify-content: center;
}

.tray-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.5;
    cursor: pointer;
    border: 2px solid transparent;
}

.tray-thumb.active {
    opacity: 1;
    border-color: var(--clr-primary);
}

/* Compliance Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--clr-surface);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    z-index: 2000;
}