/* === jeongchi.boo - Political Phantasmagoria === */
/* Palette: #1a1428 #2a2235 #3d4a5e #c4453a #6b4a6e #b87a4a #e8d5c0 #d4a84b #8b6b4a #c4b8a8 #ffffff */

:root {
    --midnight-indigo: #1a1428;
    --plum-shadow: #2a2235;
    --assembly-gray: #3d4a5e;
    --candlelight-red: #c4453a;
    --bruised-purple: #6b4a6e;
    --oxidized-copper: #b87a4a;
    --aged-document: #e8d5c0;
    --gavel-gold: #d4a84b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--midnight-indigo);
    color: #c4b8a8;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.85;
    overflow-x: hidden;
}

/* === Section base === */
.section {
    min-height: 100vh;
    position: relative;
}

/* === Section 1: The Chamber === */
.chamber-section {
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.split-left, .split-right {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.split-left { background: var(--assembly-gray); }
.split-right { background: var(--plum-shadow); }

.sigil-bg {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: 20vw;
    color: rgba(255, 255, 255, 0.04);
    user-select: none;
    pointer-events: none;
}

.crack-svg {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 7rem);
    color: var(--aged-document);
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-shadow: 0 0 40px rgba(184, 122, 74, 0.3);
}

.title-left {
    display: inline-block;
    opacity: 0;
    transform: translateX(-40px);
    animation: slideRight 1s ease-out 0.5s forwards;
}

.title-right {
    display: inline-block;
    opacity: 0;
    transform: translateX(40px);
    animation: slideLeft 1s ease-out 0.7s forwards;
}

@keyframes slideRight {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideLeft {
    to { opacity: 1; transform: translateX(0); }
}

/* === Section 2: Honeycomb Archive === */
.archive-section {
    padding: 100px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.honeycomb-grid {
    max-width: 900px;
    width: 100%;
}

.hex-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: -30px;
}

.hex-row.offset {
    transform: translateX(calc(90px + 2px));
}

.hexagon {
    width: 180px;
    height: 200px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: var(--oxidized-copper);
    padding: 2px;
    cursor: pointer;
    transition: transform 0.3s ease-out;
    opacity: 0;
    transform: scale(0.8);
}

.hexagon.revealed {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hexagon:hover {
    transform: scale(1.1);
    z-index: 10;
}

.hex-inner {
    width: 100%;
    height: 100%;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: var(--plum-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s ease-out;
}

.hexagon:hover .hex-inner {
    background: var(--midnight-indigo);
}

.hex-hangul {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: 2rem;
    color: var(--aged-document);
}

.hex-label {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: #8b6b4a;
}

/* === Ink Dissolution Transition === */
.ink-dissolution {
    height: 30vh;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 50%, var(--bruised-purple) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, var(--oxidized-copper) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, var(--candlelight-red) 0%, transparent 45%);
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 1s ease-out;
    mix-blend-mode: multiply;
}

.ink-dissolution.revealed { opacity: 0.4; }

.ink-dissolution.dark {
    background:
        radial-gradient(ellipse at 30% 40%, var(--midnight-indigo) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, var(--assembly-gray) 0%, transparent 40%);
    mix-blend-mode: screen;
}

/* === Section 3: The Procession === */
.procession-section {
    min-height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    display: flex;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.procession-section::-webkit-scrollbar { display: none; }

.procession-track {
    display: flex;
    flex-wrap: nowrap;
    min-width: max-content;
}

.era-card {
    min-width: 85vw;
    height: 100vh;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: center;
    position: relative;
    overflow: hidden;
}

.era-card + .era-card {
    margin-left: -12vw;
}

.era-card:nth-child(1) { z-index: 1; }
.era-card:nth-child(2) { z-index: 2; }
.era-card:nth-child(3) { z-index: 3; }
.era-card:nth-child(4) { z-index: 4; }
.era-card:nth-child(5) { z-index: 5; }

.era-cold { background: var(--assembly-gray); }
.era-warm { background: linear-gradient(135deg, #5a2020, var(--candlelight-red)); }
.era-purple { background: var(--bruised-purple); }

.era-sigil {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    font-size: 20vw;
    color: rgba(255, 255, 255, 0.06);
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    pointer-events: none;
    user-select: none;
}

.era-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--aged-document);
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.era-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    color: #c4b8a8;
    max-width: 42rem;
    line-height: 1.85;
    position: relative;
    z-index: 2;
}

/* === Section 4: The Rite === */
.rite-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, var(--assembly-gray), #000000);
    padding: 100px 40px;
}

.rite-column {
    max-width: 700px;
    text-align: center;
}

.rite-question {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    color: #8b6b4a;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rite-question.revealed {
    opacity: 1;
    transform: translateY(0);
}

.q1 { font-size: clamp(2rem, 3.5vw, 3rem); }
.q2 { font-size: clamp(1.8rem, 3vw, 2.6rem); transition-delay: 0.2s; }
.q3 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); transition-delay: 0.4s; }
.q4 { font-size: clamp(1.3rem, 2.2vw, 1.9rem); transition-delay: 0.6s; }
.q5 { font-size: clamp(1.15rem, 1.8vw, 1.6rem); transition-delay: 0.8s; }
.q6 { font-size: clamp(1rem, 1.5vw, 1.35rem); transition-delay: 1s; }
.q7 { font-size: clamp(0.9rem, 1.3vw, 1.15rem); transition-delay: 1.2s; }

/* === Section 5: The Gavel Footer === */
.gavel-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    position: relative;
}

.footer-assembly {
    text-align: center;
    position: relative;
    z-index: 2;
}

.center-hex {
    width: 140px;
    height: 160px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: var(--gavel-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
}

.center-hex.rotating {
    animation: rotateHex 60s linear infinite;
}

@keyframes rotateHex {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hex-domain {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--midnight-indigo);
    letter-spacing: 0.02em;
    transform: rotate(0deg);
    animation: counterRotate 60s linear infinite;
}

@keyframes counterRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.footer-hex-ring {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}

.footer-hex {
    width: 100px;
    height: 80px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: var(--plum-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease-out;
}

.footer-hex:hover { background: var(--bruised-purple); }

.footer-hex span {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    color: #c4b8a8;
    letter-spacing: 0.05em;
}

.footer-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center, rgba(184, 122, 74, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* === Responsive === */
@media (max-width: 768px) {
    .hex-row { flex-wrap: wrap; }
    .hex-row.offset { transform: none; }
    .hexagon { width: 140px; height: 160px; }
    .era-card { min-width: 90vw; padding: 60px 30px; }
    .era-card + .era-card { margin-left: -8vw; }
    .rite-section { padding: 60px 24px; }
}
