/* munju.club — The Gate of Written Wisdom */

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

:root {
    --burgundy-deep: #6b1d2e;
    --burgundy-mid: #8a2940;
    --burgundy-soft: #8c4a5a;
    --burgundy-light: #c7929e;
    --cream: #f5ece1;
    --cream-warm: #f0e5d8;
    --cream-white: #fffaf3;
    --ink: #2a1215;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Commissioner', sans-serif;
    background-color: var(--cream);
    color: var(--ink);
    overflow-x: hidden;
    /* Hanji paper texture */
    background-image:
        repeating-conic-gradient(rgba(107, 29, 46, 0.015) 0% 25%, transparent 0% 50%),
        radial-gradient(ellipse at 50% 50%, rgba(245, 236, 225, 0.8), var(--cream));
    background-size: 4px 4px, 100% 100%;
}

/* Navigation Monogram */
.nav-monogram {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 40px;
    height: 40px;
    border: 2px solid var(--burgundy-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-3deg);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 100;
    background: var(--cream-white);
}

.nav-monogram .seal-char {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--burgundy-deep);
}

.nav-monogram.visible {
    opacity: 1;
}

/* Navigation Dots */
.nav-dots {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--burgundy-light);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.dot.active {
    background: var(--burgundy-deep);
    transform: scale(1.5);
}

/* Chambers */
.chamber {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: clamp(3rem, 8vh, 6rem) clamp(1.5rem, 5vw, 4rem);
}

/* Ghost Characters */
.ghost-char {
    position: absolute;
    font-family: 'Commissioner', sans-serif;
    font-weight: 100;
    font-size: clamp(8rem, 20vw, 16rem);
    color: rgba(107, 29, 46, 0.04);
    pointer-events: none;
    user-select: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

/* Chamber 1: The Threshold */
.chamber-threshold {
    height: 100vh;
}

.threshold-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 2vh, 1.5rem);
    transition: transform 0.1s linear, opacity 0.3s ease;
}

.seal {
    width: clamp(80px, 12vw, 140px);
    height: clamp(80px, 12vw, 140px);
    border: 2px solid var(--burgundy-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-3deg);
}

.seal .seal-char {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--burgundy-deep);
}

.site-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 200;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 0.2em;
    color: var(--ink);
}

.site-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--burgundy-soft);
}

/* Chamber 2: The Reading Room */
.inflated-block {
    background: var(--cream-white);
    border-radius: 32px;
    padding: clamp(2.5rem, 5vw, 4rem);
    max-width: 640px;
    width: 100%;
    box-shadow:
        0 2px 4px rgba(107, 29, 46, 0.04),
        0 8px 16px rgba(107, 29, 46, 0.06),
        0 24px 48px rgba(107, 29, 46, 0.08),
        inset 0 -4px 8px rgba(107, 29, 46, 0.03);
    position: relative;
    z-index: 1;
}

.reading-block {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.reading-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.7;
    color: var(--ink);
}

/* Hwamun Divider */
.hwamun-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: clamp(3rem, 5vh, 5rem);
    width: 200px;
}

.hwamun-line {
    flex: 1;
    height: 1px;
    background: rgba(107, 29, 46, 0.15);
}

.hwamun-diamond {
    width: 8px;
    height: 8px;
    background: rgba(107, 29, 46, 0.2);
    transform: rotate(45deg);
}

/* Chamber 3: Archive */
.archive-cards {
    display: flex;
    flex-direction: column;
    gap: clamp(3rem, 5vh, 5rem);
    max-width: 640px;
    width: 100%;
}

.archive-card {
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.archive-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 8px 16px rgba(88, 24, 44, 0.08),
        0 32px 64px rgba(88, 24, 44, 0.12),
        inset 0 -4px 8px rgba(107, 29, 46, 0.03);
}

.card-ghost-char {
    position: absolute;
    font-family: 'Commissioner', sans-serif;
    font-weight: 100;
    font-size: clamp(6rem, 12vw, 10rem);
    color: rgba(107, 29, 46, 0.04);
    right: -0.5rem;
    bottom: -1.5rem;
    line-height: 1;
    pointer-events: none;
}

.card-label {
    font-family: 'Commissioner', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--burgundy-mid);
    margin-bottom: 0.8rem;
}

.card-description {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.6;
    color: var(--ink);
}

/* Chamber 4: Marginalia */
.chamber-marginalia {
    align-items: flex-start;
    padding-left: 15%;
}

.marginalia-quotes {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 4vh, 4rem);
    max-width: 600px;
}

.margin-quote {
    border: none;
}

.quote-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    line-height: 1.5;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.quote-attr {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.8rem;
    color: var(--burgundy-soft);
    font-style: normal;
}

/* Chamber 5: Colophon */
.chamber-colophon {
    background: linear-gradient(to bottom, var(--cream), var(--cream-warm));
    min-height: 60vh;
}

.colophon-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.seal-large {
    width: clamp(60px, 10vw, 100px);
    height: clamp(60px, 10vw, 100px);
}

.seal-large .seal-char {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.colophon-domain {
    font-family: 'Commissioner', sans-serif;
    font-weight: 200;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    letter-spacing: 0.15em;
    color: var(--ink);
}

.colophon-date {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--burgundy-soft);
}

/* Reveal animations */
.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.margin-quote.reveal-item {
    transform: translateX(-20px);
}

.margin-quote.reveal-item.visible {
    transform: translateX(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chamber-marginalia {
        padding-left: 8%;
    }

    .nav-dots {
        right: 12px;
    }
}
