:root {
    /* Premium Color Palette - Warm Minimalism & Deep Heritage */
    --clr-bg: #FDFBF7; /* Alabaster / Parchment */
    --clr-surface: #FFFFFF; /* Pure White */
    --clr-surface-alt: #F4F1E9; /* Warm Gray */
    
    /* Deep Crimson/Bordeaux for elegant historical authority */
    --clr-primary: #601A24; 
    --clr-primary-light: #8A2534;
    --clr-primary-dark: #3F1017;
    
    --clr-accent: #B28C4A; /* Aged Gold */
    
    --clr-text-main: #1A1A1A; /* Rich Charcoal */
    --clr-text-muted: #5C5C5A;
    --clr-border: #E8E5DF;

    /* Accessibility Theme Variables */
    --a11y-bg: #000000;
    --a11y-text: #ffffff;
    --a11y-primary: #ffff00;

    /* Typography */
    --font-ui: 'Plus Jakarta Sans', sans-serif; /* Clean, modern geometry */
    --font-heading: 'Cormorant Garamond', serif; /* Ultra-elegant classic serif */
    
    /* Spacing & Layout */
    --container-max: 1280px;
    --section-pad: 8rem; /* Excessive whitespace for gallery feel */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --trans-fast: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    --trans-normal: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    --trans-slow: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    
    /* Shadows - Soft, ambient deep shadows */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 12px 24px -4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.08);
}

/* Base Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-ui);
    color: var(--clr-text-main);
    background-color: var(--clr-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: filter 0.3s ease, background-color 0.3s ease;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--clr-text-main);
    font-weight: 500;
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 5%;
}

.mt-4 { margin-top: 2rem; }

/* Buttons - Premium execution */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: var(--trans-normal);
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--clr-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--clr-primary-dark);
    box-shadow: 0 12px 24px rgba(96, 26, 36, 0.2);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--clr-primary);
    border-color: var(--clr-primary);
}

.btn-secondary:hover {
    background-color: var(--clr-primary);
    color: white;
}

/* Accessibility Toolbar */
.accessibility-toolbar {
    background: #111;
    color: #eee;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    font-family: var(--font-ui);
    letter-spacing: 0.5px;
}

.a11y-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.a11y-label {
    margin-right: auto;
    color: #888;
}

.a11y-btn {
    background: none;
    border: 1px solid #333;
    color: #ddd;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--trans-fast);
}

.a11y-btn:hover, .a11y-btn.active {
    background: #333;
    border-color: #555;
    color: white;
}

/* Header - Glassmorphic Minimalism */
.header {
    background: rgba(253, 251, 247, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--trans-normal);
}

.header.scrolled {
    background: rgba(253, 251, 247, 0.95);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    transition: var(--trans-normal);
}

.header.scrolled .header-content {
    height: 70px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--clr-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-list {
    display: flex;
    gap: 3rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--clr-text-main);
    position: relative;
    padding: 0.5rem 0;
    transition: var(--trans-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--clr-primary);
    transition: var(--trans-normal);
}

.nav-link:hover { color: var(--clr-primary); }
.nav-link:hover::after { width: 100%; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--clr-text-main);
    cursor: pointer;
}

/* Hero Section - Immersive Cinematic */
.hero {
    position: relative;
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    animation: slowZoom 20s ease-out forwards;
}

@keyframes slowZoom {
    100% { transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.4) 0%, rgba(26, 26, 26, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    text-align: center;
    padding-top: 5rem;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--clr-accent);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(4rem, 8vw, 6.5rem);
    color: white;
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-text {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    max-width: 800px;
    margin: 0 auto 4rem;
}

/* Premium Search Bar */
.search-glass-container {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    padding: 0.5rem;
    box-shadow: 0 32px 64px rgba(0,0,0,0.2);
}

.search-form {
    display: flex;
    align-items: center;
}

.search-icon {
    padding: 0 1.5rem;
    color: white;
    font-size: 1.25rem;
}

.search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-family: var(--font-ui);
    font-size: 1rem;
    padding: 1rem 0;
}

.search-input::placeholder { color: rgba(255,255,255,0.7); }

.search-btn {
    border-radius: 100px;
    padding: 1rem 2.5rem;
}

.hero-scroll-indicator {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 5rem;
}

.scroll-text {
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: white;
    animation: scrollLine 2s infinite ease-in-out;
}

@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* Common Section */
section { padding: var(--section-pad) 0; }

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.section-subtitle {
    color: var(--clr-text-muted);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Feature Grid - Visual Bento/Gallery */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.collection-card {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-sm);
    transition: var(--trans-slow);
}

.card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(40%) contrast(110%);
    transition: var(--trans-slow);
    opacity: 0.8;
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
    transition: var(--trans-normal);
}

.collection-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.collection-card:hover .card-bg {
    transform: scale(1.05);
    filter: sepia(0%) contrast(100%);
    opacity: 1;
}

.collection-card:hover .card-overlay {
    background: linear-gradient(to top, rgba(96, 26, 36, 0.8) 0%, rgba(96, 26, 36, 0.2) 100%);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 2rem;
    color: #FDFBF7; /* Kremowy kolor tekstu */
    transform: translateY(0);
    transition: var(--trans-normal);
    z-index: 5;
}

.collection-card:hover .card-content {
    transform: translateY(-10px);
}

.card-count {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--clr-accent); /* Złoty kolor */
    margin-bottom: 0.6rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}



.cat-title {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 600;
    color: #FDFBF7; /* Kremowy */
    text-shadow: 0 3px 6px rgba(0,0,0,0.7);
    line-height: 1.1;
}

/* About Section - Editorial Overlap */
.about {
    background: var(--clr-surface-alt);
}

.editorial-layout {
    display: grid;
    grid-template-columns: 5fr 6fr;
    align-items: center;
    position: relative;
}

.editorial-image-wrapper {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 3/4;
}

.editorial-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.editorial-content {
    position: relative;
    z-index: 2;
    background: var(--clr-surface);
    padding: 5rem 4rem;
    margin-left: -5rem; /* The Overlap */
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
}

.section-tag {
    display: inline-block;
    color: var(--clr-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
}

.about-title {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.about-text {
    color: var(--clr-text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Practical Info - Minimalist Timeline */
.digitization {
    background: var(--clr-bg);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}

.timeline-item {
    position: relative;
    padding-top: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--clr-border);
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 30px;
    height: 7px;
    background: var(--clr-primary);
}

.timeline-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--clr-border);
    margin-bottom: 1rem;
    line-height: 1;
}

.timeline-title {
    font-family: var(--font-ui);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
}

.action-banner {
    background: var(--clr-primary);
    color: white;
    padding: 6rem 4rem;
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: none;
}

.action-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top right, rgba(178, 140, 74, 0.15), transparent 60%),
                radial-gradient(circle at bottom left, rgba(178, 140, 74, 0.1), transparent 60%);
    pointer-events: none;
}

.action-banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.action-banner h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
    color: white;
    font-family: var(--font-heading);
}

.action-banner p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.btn-gold {
    background-color: var(--clr-accent);
    color: white;
    border: 1px solid var(--clr-accent);
}

.btn-gold:hover {
    background-color: white;
    color: var(--clr-primary);
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Partners Section */
.partners {
    background: var(--clr-surface);
    padding: 6rem 0;
    border-top: 1px solid var(--clr-border);
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6rem;
    flex-wrap: wrap;
}

.partner-logo {
    max-height: 100px;
    max-width: 250px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.6);
    transition: var(--trans-normal);
}

.partner-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Footer - Clean Modern */
.footer {
    background: #111111;
    color: #FDFBF7;
    padding-top: 6rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8rem;
    margin-bottom: 5rem;
}

.footer-logo .logo-text {
    color: white;
    margin-bottom: 2rem;
    display: block;
}

.footer-desc {
    color: #999;
    font-size: 1rem;
    margin-bottom: 3rem;
    max-width: 400px;
}

.contact-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
}

.contact-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: white;
}

.contact-value.link {
    transition: var(--trans-fast);
}

.contact-value.link:hover { color: var(--clr-accent); }

.social-links { display: flex; gap: 1rem; }

.social-link {
    width: 48px;
    height: 48px;
    border: 1px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--trans-normal);
}

.social-link:hover {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
}

.form-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: #999;
    margin-bottom: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    position: relative;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    padding: 1rem 0;
    color: white;
    font-family: var(--font-ui);
    font-size: 1rem;
    outline: none;
    transition: var(--trans-fast);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: #666;
    transition: var(--trans-fast);
    pointer-events: none;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--clr-accent);
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -1rem;
    font-size: 0.75rem;
    color: var(--clr-accent);
}

.footer-bottom {
    border-top: 1px solid #222;
    padding: 2rem 0;
}

.bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a { transition: var(--trans-fast); }
.footer-legal a:hover { color: white; }


/* Animation Classes */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }


/* High Contrast Adjustments */
body.high-contrast .header { background: #000 !important; border-bottom: 1px solid yellow; }
body.high-contrast .editorial-content { background: #000 !important; border: 1px solid yellow; }
body.high-contrast .card-bg { display: none; }
body.high-contrast .collection-card { border: 1px solid yellow; padding: 2rem; display: flex; align-items: flex-end; }
body.high-contrast .search-glass-container { background: #000; border: 2px solid yellow; }


/* Responsive Design */
@media (max-width: 1200px) {
    .collection-grid { grid-template-columns: repeat(2, 1fr); }
    .editorial-layout { grid-template-columns: 1fr; gap: 4rem; }
    .editorial-content { margin-left: 0; margin-top: -4rem; padding: 3rem; }
    .timeline-grid { grid-template-columns: repeat(2, 1fr); gap: 4rem 2rem; }
}

@media (max-width: 992px) {
    .footer-content { grid-template-columns: 1fr; gap: 4rem; }
}

@media (max-width: 768px) {
    :root { --section-pad: 5rem; }
    .header-content { height: 70px; }
    
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--clr-surface);
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-md);
        padding: 1rem 0;
    }
    
    .nav-list.active { display: flex; }
    .nav-link { padding: 1rem 5%; display: block; }
    .mobile-menu-btn { display: block; }
    
    .search-form { flex-direction: column; gap: 1rem; }
    .search-input { width: 100%; text-align: center; }
    .search-glass-container { border-radius: 1rem; padding: 1rem; }
    .search-btn { width: 100%; }
    
    .collection-grid { grid-template-columns: 1fr; }
    .timeline-grid { grid-template-columns: 1fr; }
    .bottom-content { flex-direction: column; gap: 1rem; text-align: center; }
}
