/* thefirst.quest - Quest Proclamation */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --parchment: #F0E0D0;
    --burgundy-black: #2A1018;
    --wine: #8A2030;
    --crimson: #C04050;
    --aged-cream: #E8D0B8;
    --candle: #F0C060;
    --text-primary: #2A1018;
    --text-body: #3A2028;
    --text-stamp: #8A4048;
}
body {
    background: var(--parchment);
    color: var(--text-primary);
    font-family: 'Bitter', serif;
    font-size: 1.0625rem;
    line-height: 1.8;
    font-weight: 400;
    overflow-x: hidden;
    position: relative;
}

/* Noise Grain */
.noise-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Hero */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--burgundy-black);
    position: relative;
    overflow: hidden;
}

/* Candle Glows */
.candle-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--candle), transparent 70%);
    opacity: 0;
    animation: candleFadeIn 1s ease forwards, candlePulse 4s ease-in-out 1s infinite;
}
.glow-left { top: 20%; left: 10%; animation-delay: 0s, 1s; }
.glow-center { top: 40%; left: 50%; transform: translateX(-50%); animation-delay: 0.3s, 1.3s; }
.glow-right { top: 25%; right: 10%; animation-delay: 0.6s, 1.6s; }
@keyframes candleFadeIn {
    to { opacity: 0.12; }
}
@keyframes candlePulse {
    0%, 100% { opacity: 0.08; }
    50% { opacity: 0.15; }
}

/* Scroll Container */
.scroll-container {
    background: var(--parchment);
    padding: 3rem 4rem;
    position: relative;
    z-index: 1;
    text-align: center;
    overflow: hidden;
    animation: scrollUnroll 1.5s ease forwards;
    max-width: 90vw;
}
@keyframes scrollUnroll {
    from { max-width: 80px; opacity: 0.3; }
    to { max-width: 90vw; opacity: 1; }
}
.quest-title-top {
    font-family: 'Anton', sans-serif;
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 0.9;
    white-space: nowrap;
}
.quest-title-bottom {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3rem, 9vw, 8rem);
    font-weight: 400;
    color: var(--wine);
    line-height: 0.9;
    white-space: nowrap;
}

/* Wax Seal */
.wax-seal {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--wine);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
    background: var(--burgundy-black);
    animation: sealBounce 0.3s ease 2s both;
    transform: scale(0);
}
@keyframes sealBounce {
    0% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.seal-text {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    color: var(--parchment);
}

/* Thick Rules */
.thick-rule {
    height: 8px;
    background: var(--burgundy-black);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.flame-icon {
    width: 20px;
    height: 30px;
    position: absolute;
    top: -15px;
}

/* Quest Sections */
.quest-section {
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(3rem, 5vw, 5rem) 2rem;
    position: relative;
    border: 4px solid var(--burgundy-black);
    box-shadow: 6px 6px 0 var(--burgundy-black);
    background: var(--parchment);
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* Stamps */
.stamp {
    width: 80px;
    height: 80px;
    border: 2px solid var(--wine);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -20px;
    right: 20px;
    background: var(--parchment);
    transform: rotate(-8deg);
}
.stamp-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-stamp);
    text-align: center;
}

.section-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}
.section-body {
    font-size: 1.0625rem;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Section Animation */
.section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
#footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 4px solid var(--burgundy-black);
}
.footer-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-stamp);
}

/* Responsive */
@media (max-width: 700px) {
    .quest-section {
        margin-left: 1rem;
        margin-right: 1rem;
        box-shadow: 4px 4px 0 var(--burgundy-black);
    }
    .scroll-container { padding: 2rem; }
}
