/* ===================================
   THAUMATURGY - MAIN STYLESHEET
   =================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    background: #0a0a0a;
    color: #d4c5a0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(139, 69, 19, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Blood Drip Effect */
.blood-drip {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(139, 0, 0, 0.3) 25%,
            rgba(139, 0, 0, 0.5) 50%,
            rgba(139, 0, 0, 0.3) 75%,
            transparent 100%);
    z-index: 100;
}

/* Home Button */
.home-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.8) 0%, rgba(60, 40, 30, 0.8) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
    color: #d4af37;
    font-size: 24px;
}

.home-button:hover {
    background: linear-gradient(135deg, rgba(139, 69, 19, 1) 0%, rgba(60, 40, 30, 1) 100%);
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    transform: scale(1.1);
}

.home-button::before {
    content: "⌂";
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Disclaimer */
.disclaimer {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(139, 69, 19, 0.3);
    border-left: 4px solid rgba(212, 175, 55, 0.5);
    padding: 15px 25px;
    margin: 20px auto;
    max-width: 1200px;
    text-align: center;
    font-size: 0.9em;
    color: #a0826d;
    border-radius: 5px;
}

.disclaimer strong {
    color: #d4af37;
}

/* Header Styles */
header {
    text-align: center;
    padding: 80px 20px 60px;
    background: linear-gradient(180deg, rgba(139, 69, 19, 0.15) 0%, transparent 50%, rgba(139, 0, 0, 0.1) 100%);
    border-bottom: 3px solid rgba(139, 69, 19, 0.4);
    margin-bottom: 60px;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

h1 {
    font-size: 4.5em;
    color: #d4af37;
    text-shadow:
        0 0 30px rgba(212, 175, 55, 0.6),
        0 0 60px rgba(212, 175, 55, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 15px;
    letter-spacing: 8px;
    font-weight: bold;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow:
            0 0 20px rgba(212, 175, 55, 0.4),
            0 0 40px rgba(212, 175, 55, 0.2),
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }

    to {
        text-shadow:
            0 0 30px rgba(212, 175, 55, 0.8),
            0 0 60px rgba(212, 175, 55, 0.4),
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
}

h2 {
    font-size: 2.5em;
    color: #d4af37;
    text-align: center;
    margin: 60px 0 40px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.subtitle {
    font-size: 1.5em;
    color: #c4915f;
    font-style: italic;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.tagline {
    font-size: 1.3em;
    color: #8b4513;
    margin-top: 25px;
    letter-spacing: 3px;
    font-weight: bold;
}

/* Navigation Cards Grid */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.nav-card {
    background: linear-gradient(135deg, rgba(40, 30, 20, 0.8) 0%, rgba(20, 15, 10, 0.8) 100%);
    border: 2px solid rgba(139, 69, 19, 0.4);
    border-radius: 10px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}
/* Improve scroll animation rendering to reduce stutter. */
.feature-item,
.npc-card,
.nav-card,
.philosophy-section {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Ensure a consistent baseline transform to avoid subpixel differences */
.feature-item,
.npc-card,
.nav-card {
    transform: translate3d(0, 0, 0);
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.6s ease;
}

.nav-card:hover::before {
    left: 100%;
}

.nav-card:hover {
    border-color: #d4af37;
    box-shadow:
        0 0 30px rgba(212, 175, 55, 0.4),
        inset 0 0 20px rgba(212, 175, 55, 0.1);
    transform: translateY(-8px) scale(1.02);
}

.nav-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
    transition: all 0.3s ease;
}

.nav-card:hover .nav-card-icon {
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.7));
    transform: scale(1.1);
}

.nav-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-card h3 {
    font-size: 1.8em;
    color: #d4af37;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.nav-card p {
    color: #a0826d;
    font-size: 1em;
    line-height: 1.6;
}

.nav-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nav-card.disabled:hover {
    transform: none;
    border-color: rgba(139, 69, 19, 0.4);
    box-shadow: none;
}

.coming-soon {
    display: inline-block;
    background: rgba(139, 0, 0, 0.3);
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-top: 10px;
    color: #ff6b6b;
    border: 1px solid rgba(139, 0, 0, 0.5);
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 20px;
    margin-top: 80px;
    background: linear-gradient(180deg, transparent 0%, rgba(20, 10, 10, 0.6) 100%);
    border-top: 2px solid rgba(139, 69, 19, 0.3);
}

.footer-quote {
    max-width: 700px;
    margin: 30px auto;
    font-size: 1.1em;
    color: #8b4513;
    font-style: italic;
    padding: 25px;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.8em;
        letter-spacing: 4px;
    }

    .nav-grid {
        grid-template-columns: 1fr;
    }

    .subtitle {
        font-size: 1.2em;
    }

    .tagline {
        font-size: 1.1em;
    }

    .home-button {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.scroll-indicator::after {
    content: '⌄';
    font-size: 2em;
    color: #d4af37;
    opacity: 0.6;
}

/* JS-controlled animation init class.
   We apply .animate-init only when JS enables scroll animations.
   If JS doesn't run or animations are disabled, items remain visible by default. */
html.js .animate-init {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
}