/* ================================================
   opensource.bid — Swiss Auction Catalogue
   Colors: #0b1929 #0f2035 #1a2d42 #4a7c9b #8899aa #c8d6e5 #d4a853 #e8c870 #8b4049
   Fonts: Space Grotesk, Inter, IBM Plex Mono
   ================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #0b1929;
    color: #c8d6e5;
    font-family: 'Inter', 'Helvetica', sans-serif;
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Flare Canvas --- */
#flare-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* --- Anamorphic Streak --- */
#anamorphic-streak {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#anamorphic-streak.visible {
    opacity: 1;
}

/* --- Page Column --- */
.page-column {
    position: relative;
    z-index: 10;
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 24px 120px;
}

/* --- Masthead Rules --- */
.masthead-rule {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #4a7c9b 20%, #d4a853 50%, #4a7c9b 80%, transparent 100%);
    opacity: 0.6;
}

/* --- Masthead --- */
.masthead {
    padding: 0 0 60px;
}

.masthead-grid {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 20px 0 48px;
}

.masthead-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.catalogue-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: #8899aa;
}

.catalogue-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #4a7c9b;
}

.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(64px, 14vw, 140px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.92;
    color: #c8d6e5;
    text-transform: lowercase;
    margin-bottom: 20px;
}

.title-dot {
    color: #e8c870;
}

.site-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: #8899aa;
    letter-spacing: 0.02em;
    margin-bottom: 32px;
}

/* --- Preamble --- */
.preamble {
    padding: 48px 0 64px;
}

.preamble-grid {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 24px;
    align-items: start;
}

.mono-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: #d4a853;
    letter-spacing: 0.08em;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    color: #c8d6e5;
    margin-bottom: 12px;
}

.body-text.secondary {
    color: #8899aa;
    font-size: 14px;
    font-style: italic;
}

/* --- Lot Cards --- */
.lots {
    padding: 20px 0;
}

.lot-card {
    position: relative;
    margin-bottom: 8px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(74, 124, 155, 0.15);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lot-card.revealed {
    margin-bottom: 16px;
    padding-bottom: 32px;
}

.lot-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.lot-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #d4a853;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.lot-rule {
    flex: 1;
    height: 1px;
    background: rgba(74, 124, 155, 0.25);
    transition: background 0.6s ease;
}

.lot-card.revealed .lot-rule {
    background: rgba(212, 168, 83, 0.4);
}

.lot-estimate {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #4a7c9b;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.lot-card.revealed .lot-estimate {
    opacity: 1;
}

/* --- Lot Collapsed State --- */
.lot-collapsed {
    overflow: hidden;
}

.lot-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #8899aa;
    text-transform: lowercase;
    transition: color 0.6s ease, font-weight 0.3s ease;
}

.lot-card.revealed .lot-title {
    color: #c8d6e5;
    font-weight: 600;
}

/* --- Lot Expanded State --- */
.lot-expanded {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.6s ease 0.2s;
}

.lot-card.revealed .lot-expanded {
    max-height: 500px;
    opacity: 1;
}

.lot-description {
    padding: 20px 0 16px 60px;
}

.catalogue-text {
    font-family: 'Georgia', serif;
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.75;
    color: #c8d6e5;
    letter-spacing: 0.01em;
}

.lot-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 12px 0 12px 60px;
}

.meta-item {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.meta-key {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: #4a7c9b;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.meta-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    color: #d4a853;
    letter-spacing: 0.04em;
}

.lot-provenance {
    padding: 16px 0 4px 60px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    color: #8899aa;
    font-style: italic;
}

.provenance-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: #4a7c9b;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-style: normal;
    margin-right: 6px;
}

/* --- Colophon / Footer --- */
.colophon {
    padding: 80px 0 0;
}

.colophon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 32px 0;
}

.colophon-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #8899aa;
    letter-spacing: 0.06em;
    line-height: 1.8;
    text-transform: lowercase;
}

.colophon-text.secondary {
    color: #4a7c9b;
    font-size: 10px;
}

.colophon-counter {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 24px 0 32px;
}

.counter-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    color: #4a7c9b;
    letter-spacing: 0.08em;
}

.counter-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #e8c870;
    letter-spacing: -0.02em;
    line-height: 1;
    transition: color 0.3s ease;
}

.counter-total {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #8899aa;
    letter-spacing: 0.04em;
}

/* --- Hexagonal Ghost Reflections --- */
.hex-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hex-ghost.visible {
    opacity: 1;
}

/* --- Scroll Progress Indicator --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #d4a853, #e8c870);
    z-index: 100;
    width: 0%;
    transition: width 0.1s linear;
}


/* --- Light accent color --- */
.lot-card.revealed .lot-title::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border: 0 solid #f0f4ff;
}

.colophon-counter .counter-total {
    color: #f0f4ff;
    opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .page-column {
        padding: 48px 16px 80px;
    }

    .masthead-grid {
        flex-direction: column;
        gap: 8px;
        padding: 16px 0 32px;
    }

    .site-title {
        font-size: clamp(48px, 12vw, 80px);
    }

    .preamble-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lot-description,
    .lot-meta,
    .lot-provenance {
        padding-left: 0;
    }

    .lot-meta {
        flex-direction: column;
        gap: 8px;
    }

    .colophon-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .lot-title {
        font-size: clamp(20px, 5vw, 28px);
    }
}

/* --- Gold glow on revealed cards --- */
.lot-card.revealed::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -40px;
    right: -40px;
    bottom: -1px;
    background: radial-gradient(ellipse at 20% 50%, rgba(232, 200, 112, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* --- Fade-in animation for page load --- */
.page-column {
    animation: fadeInColumn 1.2s ease-out forwards;
}

@keyframes fadeInColumn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Selection color --- */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #c8d6e5;
}

/* --- Scrollbar styling --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0b1929;
}

::-webkit-scrollbar-thumb {
    background: #1a2d42;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a7c9b;
}