/* mysterious.day - Retro-Futuristic Cabinet of Curiosities */

:root {
    --gallery-dark: #0c0e1a;
    --marble-white: #f0ece4;
    --twilight-mist: #e4e0ec;
    --crimson-deep: #be123c;
    --violet-neon: #7c3aed;
    --antique-gold: #c9a94e;
    --rose-blush: #e879a8;
    --muted-plum: #8a82a0;
    --deep-navy: #181A2E;
    --electric-blue: #2563EB;
    --font-display: 'Archivo Black', sans-serif;
    --font-body: 'Literata', serif;
    --font-mono: 'Space Mono', monospace;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--gallery-dark);
    color: var(--marble-white);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.7;
}

/* CSS Marble Texture */
.marble-texture {
    background-color: var(--marble-white);
    background-image:
        linear-gradient(15deg, rgba(201, 169, 78, 0.05) 0%, transparent 50%),
        linear-gradient(75deg, rgba(138, 130, 160, 0.06) 0%, transparent 40%),
        linear-gradient(135deg, rgba(190, 18, 60, 0.03) 0%, transparent 60%),
        linear-gradient(195deg, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
}

/* ============================================
   Section 1: The Grand Foyer
   ============================================ */

.section-foyer {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.foyer-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(124, 58, 237, 0.08);
    top: 10%;
    left: 10%;
    animation: orbFloat 12s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(190, 18, 60, 0.06);
    bottom: 15%;
    right: 10%;
    animation: orbFloat 15s ease-in-out infinite reverse;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

.exhibit-panel {
    position: relative;
    width: 70vw;
    max-width: 900px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 1;
    opacity: 0;
    transform: scale(0.95);
    animation: panelReveal 1s ease-out 0.3s forwards;
}

@keyframes panelReveal {
    to { opacity: 1; transform: scale(1); }
}

.gold-frame {
    border: 1px solid var(--antique-gold);
    padding: 60px 50px;
    width: 100%;
    text-align: center;
}

.exhibit-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    color: var(--gallery-dark);
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.exhibit-statement {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--muted-plum);
    font-style: italic;
    margin-bottom: 30px;
    line-height: 1.6;
}

.exhibit-meta {
    margin-top: 20px;
}

.catalog-code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--antique-gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ============================================
   Section 2: Cabinet of Curiosities
   ============================================ */

.section-cabinet {
    padding: 100px 5%;
    background: linear-gradient(180deg, var(--gallery-dark) 0%, var(--deep-navy) 100%);
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    color: var(--marble-white);
    text-align: center;
    margin-bottom: 60px;
}

.masonry-grid {
    max-width: 1100px;
    margin: 0 auto;
    columns: 2;
    column-gap: 24px;
}

/* Exhibit Card */
.exhibit-card {
    break-inside: avoid;
    margin-bottom: 24px;
    perspective: 1000px;
    min-height: 280px;
}

.exhibit-card.tall {
    min-height: 400px;
}

.flippable {
    cursor: pointer;
    position: relative;
}

.card-face {
    backface-visibility: hidden;
    transition: transform 0.6s ease;
    border-radius: 4px;
    border: 1px solid rgba(201, 169, 78, 0.2);
    padding: 30px 28px;
}

.card-front {
    position: relative;
    z-index: 1;
}

.card-back {
    position: absolute;
    inset: 0;
    transform: rotateY(180deg);
    background: var(--gallery-dark);
    border: 1px solid var(--electric-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 28px;
    border-radius: 4px;
}

.flippable.flipped .card-front {
    transform: rotateY(180deg);
}

.flippable.flipped .card-back {
    transform: rotateY(0deg);
}

.exhibit-number {
    font-family: var(--font-mono);
    font-size: 36px;
    font-weight: 700;
    color: rgba(12, 14, 26, 0.08);
    position: absolute;
    top: 16px;
    right: 20px;
    line-height: 1;
}

.exhibit-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.3));
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--gallery-dark);
    margin-bottom: 10px;
}

.card-excerpt {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--muted-plum);
    line-height: 1.65;
}

.exhibit-quote {
    margin-top: 20px;
    padding: 16px 20px;
    border-left: 2px solid var(--antique-gold);
    font-family: var(--font-body);
    font-size: 14px;
    font-style: italic;
    color: var(--gallery-dark);
    opacity: 0.7;
}

.card-detail {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--twilight-mist);
    line-height: 1.8;
    text-align: center;
}

/* ============================================
   Section 3: Exit Gallery
   ============================================ */

.section-exit {
    padding: 80px 5%;
    display: flex;
    justify-content: center;
}

.exit-exhibit {
    max-width: 700px;
    width: 100%;
    border-radius: 4px;
}

.exit-exhibit .gold-frame {
    padding: 40px 36px;
}

.exit-text {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--gallery-dark);
    line-height: 1.8;
    margin-bottom: 20px;
}

.exit-catalog {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--antique-gold);
    letter-spacing: 0.12em;
}

/* ============================================
   Footer
   ============================================ */

.section-footer {
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid rgba(201, 169, 78, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--antique-gold);
}

.footer-divider {
    color: rgba(201, 169, 78, 0.3);
}

.footer-tagline {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--muted-plum);
    font-style: italic;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .masonry-grid {
        columns: 1;
    }

    .exhibit-panel {
        width: 90vw;
        min-height: 50vh;
    }

    .gold-frame {
        padding: 40px 30px;
    }

    .section-cabinet {
        padding: 60px 4%;
    }

    .footer-brand,
    .footer-tagline {
        display: block;
    }

    .footer-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .gold-frame {
        padding: 30px 20px;
    }

    .exhibit-card {
        min-height: 240px;
    }

    .exhibit-card.tall {
        min-height: 320px;
    }
}
