/* mystical.quest - Glitch Mysticism */
/* Colors: #B8A06A, #5A7A60, #1A1710, #00B4D8, #2A2318, #8A8570, #E8DCC8, #A0522D */
/* Fonts: Playfair Display, Work Sans, Space Mono */

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

body {
    font-family: 'Work Sans', sans-serif;
    color: #E8DCC8;
    background: #1A1710;
    overflow-x: hidden;
}

/* Glitch Bands */
.glitch-bands {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.glitch-band {
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    opacity: 0;
    animation: bandFlicker 4s ease-in-out infinite;
}

/* Layers */
.layer {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    z-index: 5;
    background: #1A1710;
}

.layer--alt {
    background: #2A2318;
}

.layer--footer {
    min-height: 40vh;
    background: #1A1710;
}

.layer__content {
    max-width: 800px;
    width: 100%;
}

.layer__content--center {
    text-align: center;
}

/* Headlines with dual-layer glitch */
.headline {
    position: relative;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 700;
    margin-bottom: 24px;
}

.headline--hero {
    font-size: clamp(3rem, 8vw, 7rem);
}

.headline__clean {
    position: relative;
    z-index: 2;
    color: #E8DCC8;
}

.headline__glitch {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 1;
    color: #00B4D8;
    opacity: 0.15;
    clip-path: inset(0);
    animation: glitchShift 6s ease-in-out infinite;
}

/* Oracle Text */
.oracle-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: #8A8570;
    letter-spacing: 0.05em;
    margin-top: 20px;
    opacity: 0;
    animation: fadeIn 1.5s ease 2s forwards;
}

/* Body Text */
.body-text {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.85;
    color: #E8DCC8;
    margin-bottom: 32px;
}

/* Prophecy Cards */
.prophecy-card {
    position: relative;
}

.prophecy-number {
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    color: #B8A06A;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 12px;
}

/* Ema Tablets */
.ema-tablet {
    background: rgba(184, 160, 106, 0.08);
    border-left: 3px solid #B8A06A;
    padding: 20px 24px;
    position: relative;
}

.ema-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #B8A06A;
}

/* Footer */
.footer-text {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #8A8570;
    opacity: 0.4;
    margin-top: 16px;
}

/* Scroll Reveal */
.prophecy-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes glitchShift {
    0%, 90%, 100% { transform: translate(0, 0); clip-path: inset(0); }
    92% { transform: translate(-3px, 1px); clip-path: inset(20% 0 40% 0); }
    94% { transform: translate(2px, -2px); clip-path: inset(60% 0 10% 0); }
    96% { transform: translate(-1px, 2px); clip-path: inset(30% 0 50% 0); }
    98% { transform: translate(3px, 0); clip-path: inset(0); }
}

@keyframes bandFlicker {
    0%, 85%, 100% { opacity: 0; transform: translateX(0); }
    88% { opacity: 0.12; transform: translateX(-20px); }
    90% { opacity: 0; transform: translateX(10px); }
    93% { opacity: 0.08; transform: translateX(30px); }
    95% { opacity: 0; }
}

/* Responsive */
@media (max-width: 600px) {
    .layer {
        padding: 60px 20px;
    }

    .ema-tablet {
        padding: 16px 18px;
    }
}
