/* nfth.ing - A Retrospective */
/* Palette: Gallery Wall #F7F2EA, Warm Walnut #5C4A3A, Catalog Cream #EDE4D4,
   Neon Relic #00E5A0, Amber Display #E5A848, Patina Gray #9B8E7A, Exhibition Dark #2A2118 */

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    background-color: #F7F2EA;
    color: #5C4A3A;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Gallery Rooms */
.gallery-room {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    padding: 80px 24px;
}

.room-content {
    max-width: 560px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.room-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Margin Annotations */
.margin-annotation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1;
}

.margin-annotation.left {
    left: 40px;
    align-items: flex-start;
}

.margin-annotation.right {
    right: 40px;
    align-items: flex-end;
    text-align: right;
}

.catalog-number {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #9B8E7A;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.catalog-rule {
    display: block;
    width: 40px;
    height: 1px;
    background-color: #9B8E7A;
}

.catalog-note {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #9B8E7A;
}

.diamond-marker {
    width: 6px;
    height: 6px;
    border: 1px solid #9B8E7A;
    transform: rotate(45deg);
    margin-top: 8px;
}

/* Provenance Chain */
.provenance-chain {
    position: fixed;
    top: 0;
    left: 56px;
    width: 1px;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.chain-line {
    width: 1px;
    height: 100%;
    background-color: #9B8E7A;
    opacity: 0.3;
}

/* Foyer */
.foyer-title-wrap {
    position: relative;
    text-align: center;
}

.foyer-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 48px;
    color: #5C4A3A;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 2;
}

.foyer-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #9B8E7A;
    margin-top: 12px;
}

.title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(0, 229, 160, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 1;
}

.title-glow.active {
    opacity: 1;
}

/* Artifact Frames */
.artifact-frame {
    position: relative;
    perspective: 1200px;
}

.artifact-matting {
    border: 1px solid #9B8E7A;
    padding: 16px;
    background-color: #EDE4D4;
    transition: transform 0.1s ease;
}

.artifact-matting.small {
    padding: 10px;
}

.artifact-content {
    width: 280px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F7F2EA;
}

/* Neon Glow */
.neon-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    box-shadow: 0 0 40px 10px rgba(0, 229, 160, 0.15), 0 0 80px 20px rgba(0, 229, 160, 0.05);
    pointer-events: none;
    z-index: -1;
    animation: glowPulse 4s infinite alternate ease-in-out;
}

.neon-glow.dim {
    box-shadow: 0 0 20px 5px rgba(0, 229, 160, 0.08), 0 0 40px 10px rgba(0, 229, 160, 0.03);
}

@keyframes glowPulse {
    0% { opacity: 0.85; }
    100% { opacity: 1; }
}

/* Token Visual */
.token-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.token-id {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: #9B8E7A;
}

.token-grid {
    display: grid;
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 40px);
    gap: 4px;
}

.pixel {
    width: 40px;
    height: 40px;
}

/* Price Chart Visual */
.price-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding: 0 20px;
}

.chart-bar {
    flex: 1;
    background-color: #9B8E7A;
    min-width: 20px;
    transition: background-color 0.3s ease;
}

.chart-bar.peak {
    background-color: #E5A848;
}

/* Community Map Visual */
.community-map {
    position: relative;
    width: 200px;
    height: 150px;
}

.comm-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #9B8E7A;
    border-radius: 50%;
}

.comm-node.active {
    background-color: #00E5A0;
    box-shadow: 0 0 8px rgba(0, 229, 160, 0.5);
}

.comm-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Receipt Visual */
.receipt-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
}

.receipt-line {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: #5C4A3A;
}

.receipt-line.small {
    font-size: 11px;
    color: #9B8E7A;
}

.receipt-divider {
    width: 100%;
    height: 1px;
    border-top: 1px dashed #9B8E7A;
    margin: 4px 0;
}

/* Curatorial Text */
.curatorial-text {
    text-align: center;
    max-width: 480px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.room-content.visible .curatorial-text {
    opacity: 1;
    transform: translateY(0);
}

.room-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #2A2118;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
    line-height: 1.2;
}

.room-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #5C4A3A;
}

.room-body.italic {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    line-height: 1.5;
}

/* Archive Room */
.archive-room {
    background-color: #2A2118;
    flex-direction: column;
}

.archive-room .room-body {
    color: #9B8E7A;
}

.archive-room .room-title {
    color: #EDE4D4;
}

.margin-annotation.dark .catalog-number,
.margin-annotation.dark .catalog-note {
    color: #5C4A3A;
}

.margin-annotation.dark .catalog-rule {
    background-color: #5C4A3A;
}

.margin-annotation.dark .diamond-marker {
    border-color: #5C4A3A;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 480px;
}

.archive-item {
    position: relative;
    perspective: 1200px;
}

.archive-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background-color: #3A3028;
    min-height: 80px;
}

.archive-item .artifact-matting.small {
    border-color: #5C4A3A;
    background-color: #352C22;
}

.archive-note {
    margin-top: 20px;
}

/* Gift Shop */
.gift-shop {
    min-height: 50vh;
}

.closing-line {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #9B8E7A;
    text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
    .margin-annotation {
        display: none;
    }

    .provenance-chain {
        display: none;
    }

    .gallery-room {
        padding: 60px 20px;
    }

    .artifact-content {
        width: 240px;
        height: 170px;
    }

    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .foyer-title {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .artifact-content {
        width: 200px;
        height: 150px;
    }

    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .token-grid {
        grid-template-columns: repeat(3, 30px);
        grid-template-rows: repeat(3, 30px);
    }

    .pixel {
        width: 30px;
        height: 30px;
    }
}
