/* gabs.bar -- Art Deco Speakeasy */

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

:root {
    --vault-black: #0D0D0D;
    --oxblood: #3A0A0A;
    --brass: #C9A84C;
    --aged-gold: #8B6914;
    --hanji-cream: #F5ECD7;
    --ledger-ash: #A89A80;
    --red-seal: #C44536;
    --dark-bronze: #2A2520;
    --bg-color: #0D0D0D;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 1.75;
    color: var(--hanji-cream);
    background-color: var(--bg-color);
    transition: background-color 1.5s ease;
    overflow-x: hidden;
}

.section {
    min-height: 100vh;
    position: relative;
}

/* ===================== VAULT ENTRANCE ===================== */

#vault-entrance {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sunburst-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150vmax;
    height: 150vmax;
    transform: translate(-50%, -50%);
    background: conic-gradient(
        from 0deg,
        transparent 0deg, transparent 4deg,
        rgba(201, 168, 76, 0.08) 4deg, rgba(201, 168, 76, 0.08) 5deg,
        transparent 5deg, transparent 9deg,
        rgba(201, 168, 76, 0.08) 9deg, rgba(201, 168, 76, 0.08) 10deg,
        transparent 10deg
    );
    transition: transform 2s ease-out;
    border-radius: 50%;
}

.sunburst-bg.clicked {
    transform: translate(-50%, -50%) rotate(1deg);
}

.vault-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.wordmark {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--brass);
    opacity: 0;
    transition: opacity 0.8s ease 0.8s;
}

.wordmark.visible {
    opacity: 1;
}

.gabs-outline {
    margin-top: 20px;
}

.gabs-outline svg {
    width: clamp(120px, 30vw, 300px);
    height: auto;
}

.char-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s ease-out 1.5s;
}

.char-path.drawn {
    stroke-dashoffset: 0;
}

/* ===================== APPRAISAL COUNTER ===================== */

#appraisal-counter {
    padding: 80px 24px;
    min-height: 200vh;
    display: flex;
    align-items: center;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 2px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.bento-cell {
    padding: 40px 28px;
    border-top: 2px solid var(--brass);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-top-width 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 240px;
}

.bento-cell:hover {
    transform: translateY(-4px);
    border-top-width: 4px;
    box-shadow: 0 8px 32px rgba(201, 168, 76, 0.15);
}

.bento-cell.dark {
    background-color: var(--vault-black);
}

.bento-cell.burgundy {
    background-color: var(--oxblood);
}

.bento-cell.wide {
    grid-column: span 2;
}

.cell-thing {
    font-family: 'Poiret One', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--brass);
    display: block;
    margin-bottom: 12px;
}

.cell-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 6vw, 5rem);
    color: var(--hanji-cream);
    display: block;
    line-height: 1;
    margin-bottom: 12px;
}

.cell-number.contested {
    color: var(--red-seal);
}

.cell-why {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 1rem;
    color: var(--ledger-ash);
    line-height: 1.6;
}

/* ===================== THE SCALES ===================== */

#scales {
    min-height: 150vh;
    padding: 100px 40px;
}

.scales-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.scales-left {
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 120px;
}

#balance-scale {
    max-width: 100%;
    height: auto;
}

#scale-beam {
    transform-origin: 200px 120px;
    animation: none;
}

#scale-beam.oscillating {
    animation: scaleOscillate 4s ease-in-out 2;
}

@keyframes scaleOscillate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.timeline {
    position: relative;
    padding: 40px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--brass);
    transform: translateX(-50%);
}

.timeline-entry {
    position: relative;
    width: 45%;
    padding: 20px;
    margin-bottom: 40px;
}

.timeline-entry.left {
    margin-right: auto;
    text-align: right;
    padding-right: 30px;
}

.timeline-entry.right {
    margin-left: auto;
    text-align: left;
    padding-left: 30px;
}

.timeline-entry::after {
    content: '';
    position: absolute;
    top: 24px;
    width: 8px;
    height: 8px;
    background: var(--brass);
    transform: rotate(45deg);
}

.timeline-entry.left::after {
    right: -4px;
}

.timeline-entry.right::after {
    left: -4px;
}

.timeline-year {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--brass);
    display: block;
    margin-bottom: 4px;
}

.timeline-entry p {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 1rem;
    color: var(--hanji-cream);
    line-height: 1.6;
}

/* ===================== THE LEDGER ===================== */

#ledger {
    padding: 80px 0;
}

.section-header {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--brass);
    text-align: center;
    margin-bottom: 40px;
}

.ledger-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 20px 40px;
}

.ledger-page {
    flex: 0 0 200px;
    height: 70vh;
    min-height: 400px;
    max-height: 600px;
    scroll-snap-align: center;
    background-color: var(--hanji-cream);
    background-image:
        radial-gradient(ellipse at 30% 50%, #EDE0C8 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, #F5ECD7 0%, transparent 50%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    border: 1px solid var(--dark-bronze);
}

.ledger-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23EDE0C8'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23000' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.08;
    pointer-events: none;
}

.seal-stamp {
    width: 48px;
    height: 48px;
    border: 2px solid var(--red-seal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--red-seal);
    margin-bottom: 20px;
    transform: scale(0) rotate(-180deg);
    transition: transform 0.6s ease;
}

.seal-stamp.stamped {
    transform: scale(1) rotate(-5deg);
}

.vertical-text {
    writing-mode: vertical-rl;
    font-family: 'Noto Serif KR', serif;
    font-weight: 300;
    font-size: 1rem;
    color: var(--vault-black);
    line-height: 2;
    flex: 1;
    display: flex;
    align-items: center;
}

.page-note {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 0.75rem;
    color: var(--ledger-ash);
    text-align: center;
    margin-top: 16px;
}

/* ===================== THE EXIT ===================== */

#exit {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--vault-black);
}

.exit-content {
    text-align: center;
}

.exit-question {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--hanji-cream);
    margin-bottom: 12px;
}

.exit-translation {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--ledger-ash);
    margin-bottom: 60px;
}

.exit-wordmark {
    font-family: 'Poiret One', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.25em;
    color: var(--brass);
    display: block;
}

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

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bento-cell.wide {
        grid-column: span 1;
    }

    .scales-layout {
        grid-template-columns: 1fr;
    }

    .scales-left {
        position: relative;
        top: auto;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .ledger-page {
        flex: 0 0 160px;
        height: 60vh;
    }
}
