/* ============================================
   historic.quest — Frutiger Aero Exhibition
   Interaction Interactions Interaction:** Interactions:** Interactive elements IntersectionObserver` detect triggers synchronization heavy libraries required. IntersectionObserver`. should user scrolls Lora" (Google Fonts
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --midnight-archive: #0b1e33;
    --deep-archive: #1a2a3a;
    --museum-cerulean: #2c5f8a;
    --aero-glass: #4a9cc7;
    --vitrine-frost: #8ecae6;
    --morning-haze: #c8e6f5;
    --exhibition-white: #e8f4fb;
    --pure-frost: #f7fbfe;
    --archival-gold: #d4a44c;
    --grid-line: #b8d4e8;
    --grid-bg: #f0f6fb;
    --scholarly-ink: #2c3e50;
    --archive-text: #34495e;
    --cerulean-steel: #4a7a9e;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    color: var(--archive-text);
    background-color: var(--grid-bg);
    line-height: 1.72;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    overflow-x: hidden;
}

/* Grid-Lines Background Motif */
.gallery-room {
    position: relative;
    min-height: 100vh;
    padding: 100px 5vw 80px;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 59px, #b8d4e830 59px, #b8d4e830 60px),
        repeating-linear-gradient(90deg, transparent, transparent 59px, #b8d4e820 59px, #b8d4e820 60px),
        linear-gradient(180deg, #f7fbfe 0%, #e8f4fb 100%);
}

.gallery-room + .gallery-room {
    border-top: 40px solid var(--grid-bg);
}

/* Corner Marks */
.corner-mark {
    position: absolute;
    width: 8px;
    height: 8px;
    pointer-events: none;
}
.corner-mark.top-left { top: 16px; left: 16px; border-top: 1px solid var(--vitrine-frost); border-left: 1px solid var(--vitrine-frost); }
.corner-mark.top-right { top: 16px; right: 16px; border-top: 1px solid var(--vitrine-frost); border-right: 1px solid var(--vitrine-frost); }
.corner-mark.bottom-left { bottom: 16px; left: 16px; border-bottom: 1px solid var(--vitrine-frost); border-left: 1px solid var(--vitrine-frost); }
.corner-mark.bottom-right { bottom: 16px; right: 16px; border-bottom: 1px solid var(--vitrine-frost); border-right: 1px solid var(--vitrine-frost); }

/* ============================================
   Timeline Ribbon
   ============================================ */
.timeline-ribbon {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
    background: rgba(232, 244, 251, 0.75);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(30, 80, 140, 0.08);
    overflow: hidden;
}

.ribbon-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.timeline-track {
    position: absolute;
    left: 6vw;
    right: 6vw;
    top: 50%;
    border-top: 1.5px dashed var(--aero-glass);
    opacity: 0.36;
    transform: translateY(-50%);
    pointer-events: none;
}

.ribbon-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
    animation: shimmer 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-33%); }
    50% { transform: translateX(33%); }
}

.era-node {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-family: 'DM Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--scholarly-ink);
    background: transparent;
    transition: all 0.35s ease;
    white-space: nowrap;
    position: relative;
    z-index: 3;
}

.era-node::after {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% + 2px);
    height: 34px;
    border-left: 1.5px dashed var(--aero-glass);
    opacity: 0.28;
    transform: translateX(-50%);
    transition: opacity 0.35s ease, border-color 0.35s ease;
}

.era-node:hover {
    background: rgba(74, 156, 199, 0.12);
}

.era-node.active {
    background: rgba(74, 156, 199, 0.2);
    transform: scale(1.3);
    color: var(--museum-cerulean);
}

.era-node.active::after {
    border-left-style: solid;
    opacity: 0.85;
}

.era-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-room {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(184, 212, 232, 0.19) 59px, rgba(184, 212, 232, 0.19) 60px),
        repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(184, 212, 232, 0.13) 59px, rgba(184, 212, 232, 0.13) 60px),
        radial-gradient(ellipse at 50% 30%, #c8e6f5, #e8f4fb 70%, #f7fbfe);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.logotype {
    font-family: 'Bungee Shade', Impact, Haettenschweiler, 'Arial Black', fantasy;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--deep-archive);
    display: inline-block;
}

.hero-subtitle {
    font-family: 'DM Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 400;
    color: var(--cerulean-steel);
    margin-top: 24px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease 3s, transform 0.8s ease 3s;
}

.hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Typewriter Animation
   ============================================ */
.typewrite {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--museum-cerulean);
    width: 0;
}

.typewrite.animate {
    animation: typing 2.8s steps(40, end) forwards, blink-caret 0.8s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    50% { border-color: transparent; }
}

.typewrite.done {
    border-color: transparent;
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    font-family: 'Bungee Shade', Impact, Haettenschweiler, 'Arial Black', fantasy;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--cerulean-steel);
    margin-bottom: 48px;
    display: inline-block;
}

/* ============================================
   Broken Grid Layout
   ============================================ */
.broken-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.glass-panel {
    background: rgba(232, 244, 251, 0.65);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 32px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 8px 32px rgba(30, 80, 140, 0.12);
    transition: all 0.35s ease;
    position: relative;
}

.glass-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--archival-gold);
    border-radius: 0 0 12px 12px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.glass-panel:hover {
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 12px 48px rgba(30, 80, 140, 0.18);
}

.glass-panel:hover::after {
    opacity: 1;
}

/* Panel Grid Positions */
.panel-a { grid-column: 1 / 6; grid-row: 1 / 3; z-index: 1; }
.panel-b { grid-column: 5 / 9; grid-row: 2 / 4; z-index: 2; }
.panel-c { grid-column: 8 / 13; grid-row: 1 / 2; z-index: 3; }
.panel-d { grid-column: 7 / 11; grid-row: 3 / 5; z-index: 2; }

/* Panel Entrance Animations */
.glass-panel {
    opacity: 0;
}

.glass-panel[data-enter="left"] { transform: translateX(-60px); }
.glass-panel[data-enter="right"] { transform: translateX(60px); }
.glass-panel[data-enter="top"] { transform: translateY(-40px); }

.glass-panel.revealed {
    opacity: 1;
    transform: translate(0, 0);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Panel Typography */
.panel-title {
    font-family: 'DM Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--scholarly-ink);
    line-height: 1.35;
    margin-bottom: 12px;
}

.glass-panel p {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    color: var(--archive-text);
    line-height: 1.72;
}

/* Era Badges */
.era-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 4px 12px;
    border-radius: 16px;
    font-family: 'DM Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--museum-cerulean);
    background: rgba(44, 95, 138, 0.08);
}

.era-badge.gold {
    color: var(--archival-gold);
    background: rgba(212, 164, 76, 0.1);
}

.era-badge svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Footer — Archive Drawer
   ============================================ */
.archive-drawer {
    background: var(--deep-archive);
    padding: 48px 5vw;
}

.drawer-cards {
    display: flex;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.drawer-card {
    flex: 1;
    min-width: 240px;
    padding: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.drawer-card h4 {
    font-family: 'DM Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--morning-haze);
    margin-bottom: 8px;
}

.drawer-card p {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    font-size: 0.9rem;
    color: var(--vitrine-frost);
    line-height: 1.6;
    opacity: 0.8;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .broken-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .glass-panel {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .era-node span {
        display: none;
    }

    .ribbon-inner {
        gap: 4px;
    }

    .era-node {
        padding: 6px 8px;
    }
}
