/* political.quest — Dark-Academia Political Simulation */
:root {
    --bg: #1C1610;
    --primary: #C4A35A;
    --text: #D4C5A0;
    --surface: #2A2118;
    --accent: #2D5A3D;
    --muted: #8A7D65;
    --border: #4A3A28;
    --seal: #8B2500;
}

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

body {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

/* Wood-grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background:
        repeating-linear-gradient(90deg, transparent, transparent 11px, rgba(196,163,90,0.015) 11px, rgba(196,163,90,0.015) 12px),
        repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(138,125,101,0.01) 23px, rgba(138,125,101,0.01) 24px),
        repeating-linear-gradient(90deg, transparent, transparent 37px, rgba(196,163,90,0.008) 37px, rgba(196,163,90,0.008) 38px);
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
#nav-bar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: linear-gradient(180deg, #2A2118 0%, #221C14 100%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.nav-inner {
    max-width: 1000px; margin: 0 auto; padding: 14px 32px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500; font-size: 14px; letter-spacing: 0.1em;
    color: var(--primary);
    text-transform: uppercase;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500; font-size: 12px; letter-spacing: 0.1em;
    color: var(--muted); text-decoration: none;
    text-transform: uppercase; transition: color 0.3s, text-shadow 0.3s;
}
.nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(196,163,90,0.3);
}

/* Hero */
#hero {
    position: relative;
    height: 100vh; display: flex; align-items: center; justify-content: center;
}
.ornate-frame {
    position: relative; width: 90%; max-width: 800px; height: 500px;
    display: flex; align-items: center; justify-content: center;
}
.frame-border {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.frame-rect {
    stroke-dasharray: 2520; stroke-dashoffset: 2520;
    transition: stroke-dashoffset 2s ease-out;
}
.frame-rect.drawn { stroke-dashoffset: 0; }

.compass-rose {
    position: absolute; width: 160px; height: 160px;
    opacity: 0; transition: opacity 0.8s ease-out;
    animation: spin 120s linear infinite;
    animation-play-state: paused;
}
.compass-rose.visible {
    opacity: 1;
    animation-play-state: running;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.hero-text {
    position: relative; z-index: 2; text-align: center;
    margin-top: 100px;
}
.hero-title {
    font-family: 'EB Garamond', serif;
    font-weight: 400; font-size: 44px; letter-spacing: 0.03em;
    color: var(--primary); opacity: 0;
    transform: scale(0.95); transition: opacity 0.5s, transform 0.5s;
}
.hero-title.visible { opacity: 1; transform: scale(1); }
.hero-subtitle {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500; font-size: 18px; letter-spacing: 0.1em;
    color: var(--muted); opacity: 0; transition: opacity 0.3s;
}
.hero-subtitle.visible { opacity: 1; }
.wax-seal {
    display: block; margin: 20px auto 0; width: 48px; height: 48px;
    opacity: 0; transform: scale(0);
    transition: opacity 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wax-seal.visible { opacity: 1; transform: scale(1); }

/* Section Heading */
.section-heading {
    font-family: 'EB Garamond', serif;
    font-weight: 400; font-size: 28px; letter-spacing: 0.03em;
    color: var(--primary); text-align: center; margin-bottom: 48px;
}

/* Scenario Cards */
#scenarios {
    padding: 80px 32px; position: relative; z-index: 1;
}
.scenario-strip {
    display: flex; gap: 24px; overflow-x: auto; padding: 20px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.scenario-strip::-webkit-scrollbar { height: 4px; }
.scenario-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.scenario-card {
    position: relative; flex: 0 0 280px; height: 400px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 4px; padding: 40px 28px; scroll-snap-align: start;
    display: flex; flex-direction: column; justify-content: center;
    transform: translateX(100px); opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out, box-shadow 0.3s;
    perspective: 800px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.scenario-card.visible { transform: translateX(0); opacity: 1; }
.scenario-card:hover {
    transform: translateX(0) rotateY(3deg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset -2px 0 0 var(--primary);
}
.card-border {
    position: absolute; top: 12px; left: 12px; right: 12px; bottom: 12px;
    border: 1px solid var(--border); border-radius: 2px; pointer-events: none;
}
.card-title {
    font-family: 'EB Garamond', serif;
    font-weight: 400; font-size: 22px; color: var(--primary);
    margin-bottom: 16px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5), 0 0 1px rgba(196,163,90,0.2);
}
.card-desc {
    font-size: 15px; line-height: 1.7; color: var(--text); margin-bottom: 20px;
}
.card-label {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500; font-size: 12px; letter-spacing: 0.1em;
    color: var(--muted); text-transform: uppercase;
    margin-top: auto;
}

/* Decision Tree */
#decisions {
    padding: 80px 32px; position: relative; z-index: 1;
}
.decision-panel {
    max-width: 700px; margin: 0 auto; text-align: center;
}
.decision-tree { width: 100%; height: auto; margin-bottom: 32px; }
.branch {
    stroke-dasharray: 200; stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.6s ease-out;
}
.branch.drawn { stroke-dashoffset: 0; }
.node { transition: filter 0.3s; }
.node:hover { filter: drop-shadow(0 0 6px rgba(196,163,90,0.5)); }
.seal { transition: filter 0.3s; }
.seal:hover { filter: drop-shadow(0 0 6px rgba(139,37,0,0.5)); }
.decision-text p {
    font-style: italic; font-weight: 500; font-size: 17px;
    color: var(--text); line-height: 1.75;
}

/* Chamber */
#chamber {
    padding: 80px 32px; position: relative; z-index: 1;
}
.chamber-panel {
    max-width: 900px; margin: 0 auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 4px; padding: 60px 48px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.depth-bg { transform: scale(0.97); }
.chamber-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.chamber-item {
    text-align: center; opacity: 0; transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}
.chamber-item.visible { opacity: 1; transform: translateY(0); }
.seal-icon { width: 48px; height: 48px; margin-bottom: 16px; }
.chamber-item h3 {
    font-family: 'EB Garamond', serif;
    font-weight: 400; font-size: 20px; color: var(--primary);
    margin-bottom: 8px;
}
.chamber-item p { font-size: 15px; color: var(--muted); line-height: 1.65; }

/* About */
#about {
    padding: 80px 32px; position: relative; z-index: 1;
}
.about-panel {
    max-width: 700px; margin: 0 auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 4px; padding: 48px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.depth-fg { transform: scale(1.0); }
.about-body {
    font-size: 17px; line-height: 1.75; color: var(--text);
    margin-bottom: 16px;
}
.about-italic { font-style: italic; font-weight: 500; color: var(--muted); }

/* Footer */
#footer {
    padding: 40px 32px; border-top: 1px solid var(--border);
    position: relative; z-index: 1;
}
.footer-inner {
    max-width: 900px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
}
.footer-brand {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500; font-size: 13px; letter-spacing: 0.1em;
    color: var(--primary); text-transform: uppercase;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500; font-size: 11px; letter-spacing: 0.1em;
    color: var(--muted); text-decoration: none; text-transform: uppercase;
}
.footer-copy {
    font-family: 'Alegreya Sans SC', sans-serif;
    font-weight: 500; font-size: 11px; letter-spacing: 0.1em;
    color: var(--muted);
}

/* Mobile */
@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
    .ornate-frame { height: 400px; }
    .compass-rose { width: 120px; height: 120px; }
    .chamber-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .chamber-panel, .about-panel { padding: 32px 24px; }
    .scenario-card { flex: 0 0 240px; height: 360px; }
}
