/* ============================================
   ARCHIVE PAGE STYLES - TRUE 10/10 QUALITY
   Vintage Archival Desk Aesthetic - Scattered Documents
   ============================================ */

/* ============================================
   ARCHIVE HERO SECTION
   ============================================ */

.archive-hero-section {
    padding: 6rem 2rem 4rem;
    background: linear-gradient(135deg,
        var(--bg-primary) 0%,
        var(--bg-highlight) 100%);
    border-bottom: 3px solid var(--border-medium);
    position: relative;
    overflow: hidden;
}


.archive-hero-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.archive-hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.75rem, 7vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.1;
}


.archive-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-style: italic;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}


.archive-hero-intro {
    margin-top: 3rem;
}

.archive-intro-quote {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-style: italic;
    font-weight: 600;
    color: var(--accent-sepia);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.archive-intro-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   FILTER BAR - STICKY NAVIGATION
   ============================================ */

.archive-filter-bar {
    position: sticky;
    top: 80px;
    z-index: 99;
    background-color: var(--bg-secondary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-medium);
    box-shadow: 0 4px 12px var(--shadow-vintage);
    transition: all 0.3s ease;
    margin-top: 0;
}

.archive-filter-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--bg-secondary);
    opacity: 0.95;
    z-index: -1;
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.archive-filter-btn {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    background: transparent;
    border: 1px solid var(--border-light);
    padding: 0.625rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
}

.archive-filter-btn::before {
    content: '';
    position: absolute;
    inset: -1px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.archive-filter-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-accent);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-vintage);
}

.archive-filter-btn:hover::before {
    border-color: var(--accent-gold);
}

.archive-filter-btn.active {
    color: var(--text-primary);
    background-color: var(--bg-accent);
    border-color: var(--accent-gold);
    font-weight: 700;
    box-shadow: 
        0 4px 12px var(--shadow-vintage),
        inset 0 -2px 0 var(--accent-gold);
}

.archive-filter-btn:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Mobile filter adjustments */


/* ============================================
   ARCHIVE DESK INTRO
   ============================================ */

.archive-desk-intro {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    position: relative;
}

.handwritten-note {
    display: block;
    font-family: 'Mrs Saint Delafield', cursive;
    font-size: 2rem;
    color: var(--accent-sepia);
    opacity: 0.8;
    margin-bottom: 1rem;
    animation: fadeInScale 1s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    animation-delay: 0.3s;
}

.desk-caption {
    display: block;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    color: var(--text-tertiary);
    line-height: 1.65;
}

/* ============================================
   ARCHIVE GRID - SCATTERED DESK LAYOUT
   ============================================ */

.archive-grid-section {
    padding: 4rem 2rem 6rem;
    background-color: var(--bg-primary);
    position: relative;
    min-height: 800px;
}

.archive-grid {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 3rem 2rem;
    padding: 2rem 0;
}

@media (min-width: 1024px) {
    .archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4rem 2.5rem;
    }
}

/* ============================================
   ARCHIVE CARD - SCATTERED PAPER AESTHETIC
   ============================================ */

/* CRITICAL: Force hidden cards to actually hide */
.archive-card[style*="display: none"],
.archive-card.initially-hidden {
    display: none !important;
}

.archive-card {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-light);
    padding: 1.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow:
        0 4px 16px var(--shadow-vintage),
        inset 0 0 50px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    transform-origin: center center;
}

/* Scattered rotation effect - subtle variations */
.archive-card[data-scatter="1"] { transform: rotate(-0.8deg); }
.archive-card[data-scatter="2"] { transform: rotate(1.2deg); }
.archive-card[data-scatter="3"] { transform: rotate(-0.5deg); }
.archive-card[data-scatter="4"] { transform: rotate(0.9deg); }
.archive-card[data-scatter="5"] { transform: rotate(-1.1deg); }
.archive-card[data-scatter="6"] { transform: rotate(0.6deg); }
.archive-card[data-scatter="7"] { transform: rotate(-0.9deg); }
.archive-card[data-scatter="8"] { transform: rotate(1deg); }
.archive-card[data-scatter="9"] { transform: rotate(-0.7deg); }

/* Torn paper edge effect - top */
.archive-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 6px;
    background-image:
        repeating-linear-gradient(
            90deg,
            var(--bg-primary) 0px,
            var(--bg-primary) 3px,
            transparent 3px,
            transparent 6px
        );
}

/* Paper texture overlay */
.archive-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px
        );
    pointer-events: none;
    opacity: 0.5;
}

.archive-card:hover {
    transform: translateY(-12px) scale(1.03) rotate(0deg) !important;
    box-shadow:
        0 20px 50px var(--shadow-deep),
        inset 0 0 50px rgba(0, 0, 0, 0.03);
    border-color: var(--accent-gold);
    z-index: 50;
}

/* Paper clip decoration */
.card-paper-clip {
    position: absolute;
    top: -8px;
    right: 20px;
    width: 24px;
    height: 40px;
    border: 2px solid var(--accent-sepia);
    border-radius: 12px 12px 0 0;
    z-index: 10;
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-paper-clip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 8px;
    border: 2px solid var(--accent-sepia);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.archive-card:hover .card-paper-clip {
    transform: translateY(-3px) rotate(-5deg);
    opacity: 0.8;
}

/* Card hidden state for filtering */
.archive-card.hidden {
    display: none;
}

/* ============================================
   ARCHIVE CARD IMAGE WITH VINTAGE CORNERS
   ============================================ */

.archive-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 4px solid var(--bg-tertiary);
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.1),
        0 4px 12px var(--shadow-vintage);
    background: var(--bg-tertiary);
}


.archive-card:hover .frame-corner {
    opacity: 0.8;
}

/* Sepia overlay on images */
.archive-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(155, 118, 83, 0.15) 0%,
        rgba(160, 82, 45, 0.1) 100%
    );
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 2;
}

.archive-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(0.3) sepia(0.2) contrast(1.05);
    position: relative;
    z-index: 1;
}

.archive-card:hover .archive-card-image img {
    transform: scale(1.08);
    filter: grayscale(0.2) sepia(0.25) contrast(1.1);
}

/* ============================================
   ARCHIVE CARD CONTENT
   ============================================ */

.archive-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    position: relative;
    z-index: 3;
}

.archive-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-family: 'EB Garamond', Georgia, serif;
    position: relative;
    z-index: 3;
}

.archive-card-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.archive-card:hover .archive-card-meta-item {
    transform: translateX(2px);
}

.meta-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.archive-card:hover .meta-icon {
    transform: scale(1.15);
}

.meta-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.archive-card-description {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    flex-grow: 1;
    position: relative;
    z-index: 3;
}

/* ============================================
   ARCHIVE VIEW LINK - ENHANCED
   ============================================ */

.archive-view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--link-color);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0.5rem 0;
    padding-bottom: 0.25rem;
    transition: color 0.3s ease;
    text-align: left;
    z-index: 3;
}

.archive-view-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.archive-view-link::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.archive-view-link:hover::after,
.archive-view-link:focus::after {
    width: 100%;
}

.archive-view-link:hover::before,
.archive-view-link:focus::before {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

.archive-view-link:hover,
.archive-view-link:focus {
    color: var(--link-hover);
}

.archive-view-link .arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.archive-view-link:hover .arrow,
.archive-view-link:focus .arrow {
    transform: translateX(6px);
}

/* ============================================
   LOAD MORE BUTTON
   ============================================ */

.archive-load-more-container {
    text-align: center;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-light);
}

.archive-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2.5rem;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-medium);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 4px 12px var(--shadow-vintage);
    position: relative;
    overflow: hidden;
}

.archive-load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(201, 169, 97, 0.2),
        transparent);
    transition: left 0.5s ease;
}

.archive-load-more-btn:hover::before {
    left: 100%;
}

.archive-load-more-btn:hover,
.archive-load-more-btn:focus {
    background-color: var(--bg-accent);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px var(--shadow-deep),
        inset 0 -2px 0 var(--accent-gold);
}

.archive-load-more-btn .button-ornament {
    transition: transform 0.3s ease;
    font-size: 1.25rem;
}

.archive-load-more-btn:hover .button-ornament {
    transform: translateY(4px);
}

.archive-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.archive-load-more-btn:disabled:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-medium);
    box-shadow: 0 4px 12px var(--shadow-vintage);
}

.load-more-caption {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.9375rem;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 1rem;
    margin-bottom: 0;
}

.load-more-caption span {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Hide load more when all items shown */
.archive-load-more-container.hidden {
    display: none;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.archive-empty-state {
    text-align: center;
    padding: 6rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.empty-state-content {
    background-color: var(--bg-highlight);
    border: 2px solid var(--border-light);
    padding: 3rem 2rem;
    box-shadow: 0 4px 12px var(--shadow-vintage);
    position: relative;
}

.empty-state-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 6px;
    background-image:
        repeating-linear-gradient(
            90deg,
            var(--bg-primary) 0px,
            var(--bg-primary) 3px,
            transparent 3px,
            transparent 6px
        );
}

.empty-state-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state-text {
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ============================================
   ARCHIVE CONTEXT SECTION
   ============================================ */

.archive-context-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg,
        var(--bg-highlight) 0%,
        var(--bg-accent) 100%);
    border-top: 2px solid var(--border-medium);
    position: relative;
}

.archive-context-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent-gold) 50%,
        transparent 100%);
    opacity: 0.5;
}

.context-content {
    max-width: 900px;
    margin: 0 auto;
}


.narrative-text {
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-primary);
    font-family: 'EB Garamond', Georgia, serif;
}

.narrative-text p {
    margin-bottom: 1.5rem;
}


.cta-centered {
    text-align: center;
    margin-top: 3rem;
}


/* ============================================
   ARCHIVE MODAL - DOCUMENT UNFOLD ANIMATION
   ============================================ */

.archive-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.archive-modal.active {
    opacity: 1;
    pointer-events: all;
}

.archive-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(26, 20, 16, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.archive-modal-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    background-color: var(--bg-primary);
    padding: 2rem;
    box-shadow: 
        0 30px 80px var(--shadow-deep),
        inset 0 0 100px rgba(0, 0, 0, 0.03);
    border: 2px solid var(--border-medium);
    transform: scale(0.9) rotateX(10deg);
    transform-origin: center center;
    perspective: 1000px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.archive-modal.active .archive-modal-content {
    transform: scale(1) rotateX(0deg);
}

/* Torn edge on modal */
.archive-modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 8px;
    background-image:
        repeating-linear-gradient(
            90deg,
            var(--bg-primary) 0px,
            var(--bg-primary) 4px,
            transparent 4px,
            transparent 8px
        );
    z-index: 10;
}

/* Paper texture overlay */
.archive-modal-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px
        );
    pointer-events: none;
    opacity: 0.3;
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 5;
}

.modal-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-medium);
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.modal-close::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    background-color: var(--accent-rust);
    border-color: var(--accent-gold);
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

.modal-close:hover::before {
    border-color: var(--accent-gold);
}

/* Modal Body */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 4;
}

.modal-image-container {
    position: relative;
    width: fit-content;
    max-width: 600px;
    margin: 0 auto;
    border: 6px solid var(--bg-tertiary);
    box-shadow:
        0 8px 30px var(--shadow-vintage),
        inset 0 0 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Vintage corners on modal image */
.modal-image-container::before,
.modal-image-container::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--accent-gold);
    border-style: solid;
    opacity: 0.6;
    z-index: 2;
}

.modal-image-container::before {
    top: 10px;
    left: 10px;
    border-width: 2px 0 0 2px;
}

.modal-image-container::after {
    bottom: 10px;
    right: 10px;
    border-width: 0 2px 2px 0;
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(0.2) sepia(0.15);
    transition: filter 0.4s ease;
}

.modal-image:hover {
    filter: grayscale(0.1) sepia(0.2);
}

/* Modal Info */
.modal-info {
    display: flex;
    flex-direction: column;
}

.modal-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.modal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background-color: var(--bg-highlight);
    border-left: 3px solid var(--accent-gold);
    position: relative;
}

.modal-meta::before {
    content: '✦';
    position: absolute;
    top: 1.5rem;
    left: -10px;
    font-size: 0.75rem;
    color: var(--accent-gold);
}

.modal-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.modal-description {
    margin: 1.5rem 0;
}

.modal-description p,
#modal-description-text {
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text-primary);
}

/* Modal Transcription */
.modal-transcription {
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-light);
    position: relative;
}

.modal-transcription::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 6px;
    background-image:
        repeating-linear-gradient(
            90deg,
            var(--bg-primary) 0px,
            var(--bg-primary) 3px,
            transparent 3px,
            transparent 6px
        );
}

.transcription-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-sepia);
    margin-bottom: 1rem;
}

.transcription-text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}


/* ============================================
   ANIMATIONS
   ============================================ */

    to {
        opacity: 1;
        transform: scale(1);
    }
}

    50% {
        transform: translateY(-2px) rotate(0.5deg);
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1024px) {

    .archive-hero-section {
        padding: 4rem 1.5rem 3rem;
    }
    
    .archive-filter-bar {
        top: 70px;
    }
    
    .archive-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 3rem 2rem;
    }
}


@media (max-width: 480px) {
    .archive-filter-bar {
        top: 58px;
    }

    .archive-hero-section {
        padding: 2.5rem 1rem 2rem;
    }
    
    .archive-grid-section,
    .archive-context-section {
        padding: 2.5rem 1rem;
    }
    
    .archive-card {
        padding: 1.25rem;
    }
    
    .card-paper-clip {
        width: 20px;
        height: 34px;
    }
}

/* ============================================
   ACCESSIBILITY & MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
        .archive-card,
    .archive-card-image img,
    .archive-filter-btn,
    .archive-view-link,
    .archive-modal,
    .archive-modal-content,
    .modal-close {
        transition: none !important;
        animation: none !important;
    }
    
    .archive-card {
        transform: none !important;
    }
    
    .archive-card:hover {
        transform: none !important;
    }
    
    .archive-card:hover .archive-card-image img {
        transform: none !important;
    }
    
    .card-paper-clip {
        animation: none !important;
    }
}

/* Focus indicators for keyboard navigation */
.keyboard-nav .archive-card:focus-within {
    outline: 3px solid var(--accent-gold);
    outline-offset: 4px;
}

.keyboard-nav .archive-filter-btn:focus-visible,
.keyboard-nav .archive-view-link:focus-visible,
.keyboard-nav .modal-close:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

/* High contrast mode support */

@media (max-width: 768px) {

    .archive-filter-bar {
        top: 65px;
    }

    .filter-container {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    
    .archive-filter-btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

.archive-hero-section {
        padding: 3rem 1.5rem 2.5rem;
    }
    
    .archive-grid-section {
        padding: 3rem 1.5rem;
    }
    
    .archive-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    /* Remove scatter rotation on mobile for cleaner layout */
    .archive-card[data-scatter] {
        transform: rotate(0deg) !important;
    }
    
    .archive-card:hover {
        transform: translateY(-8px) scale(1.02) !important;
    }
    
    .archive-context-section {
        padding: 3rem 1.5rem;
    }
    
    .drop-cap-first::first-letter {
        font-size: 3.5rem;
    }
    
    .quote-mark-open,
    .quote-mark-close {
        font-size: 5rem;
    }
    
    .archive-modal {
        padding: 1rem;
    }
    
    .archive-modal-content {
        padding: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
    
    .handwritten-note {
        font-size: 1.75rem;
    }
}
