:root {
    --bg-color: #0b0c10;
    --text-main: #c5c6c7;
    --accent-color: #d18f5c;
    --accent-glow: rgba(209, 143, 92, 0.5);
    --gold: #d4af37;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    touch-action: none;
    /* Prevents mobile scroll so the touch-drag torch works */
}

.wyrm-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle var(--torch-size, 800px) at var(--mouse-x, 50vw) var(--mouse-y, 50vh),
            rgba(5, 2, 1, 0.95) 0%,
            rgba(8, 5, 4, 0.98) 20%,
            rgba(11, 12, 16, 1) 60%),
        url('Dreadthorn%20Dragon.jpg');
    background-size: cover, cover;
    background-position: center, center;
}

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.wyrm-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 10;
}

.ch03-logo {
    width: 60px;
    opacity: 0.3;
    transition: opacity 0.5s ease;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

/* Base utility for toggling ARG views */
.hidden {
    display: none !important;
}

/* ARG Cryptic Landing Page */
.arg-landing {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.cryptic-text {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: #4a2511;
    /* Very dark rusty red/brown */
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 2;
    animation: crypticPulse 6s infinite alternate;
}

@keyframes crypticPulse {
    0% {
        opacity: 0.3;
        text-shadow: 0 0 2px rgba(138, 51, 36, 0.2);
    }

    100% {
        opacity: 0.8;
        text-shadow: 0 0 8px rgba(138, 51, 36, 0.6);
    }
}

.ch03-logo:hover {
    opacity: 0.8;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.title {
    font-family: var(--font-heading);
    font-size: 5rem;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 2rem;
    font-weight: 400;
}

.title .highlight {
    color: #4a210d;
    /* Much deeper, almost burnt orange/brown */
    font-weight: 700;
    text-shadow: 0 0 10px rgba(209, 143, 92, 0.1);
    animation: textEmberPulse 40s infinite alternate;
    /* Slowed down 10x */
    /* Add subtle ember/ash texture using background clip */
    background: linear-gradient(to bottom, #733215 0%, #301407 100%),
        radial-gradient(circle at 50% 50%, #d18f5c 0%, transparent 50%);
    background-blend-mode: color-dodge;
    background-size: 100% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

@keyframes textEmberPulse {
    0% {
        text-shadow: 0 0 5px rgba(209, 143, 92, 0.05), 0 0 10px rgba(209, 143, 92, 0.02);
        background-position: 0% 0%;
        filter: brightness(0.9);
    }

    50% {
        text-shadow: 0 0 15px rgba(209, 143, 92, 0.3), 0 0 25px rgba(209, 143, 92, 0.15);
        background-position: 0% 100%;
        filter: brightness(1.3);
    }

    100% {
        text-shadow: 0 0 8px rgba(209, 143, 92, 0.1), 0 0 12px rgba(209, 143, 92, 0.05);
        background-position: 0% 50%;
        filter: brightness(1);
    }
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 3rem;
    color: #a0a0a0;
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s ease 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Embers */
.ember {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color), 0 0 20px #ff9800;
    animation: floatUp linear forwards;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .wyrm-nav {
        padding: 1rem 2rem;
    }

    .ch03-logo {
        width: 45px;
    }

    .title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-content {
        padding: 1rem;
    }

    /* Keep the torch effect but scale the max radius down slightly for smaller screens */
    .wyrm-bg {
        background-image:
            radial-gradient(circle var(--torch-size, 400px) at var(--mouse-x, 50vw) var(--mouse-y, 50vh),
                rgba(5, 2, 1, 0.90) 0%,
                rgba(8, 5, 4, 0.96) 20%,
                rgba(11, 12, 16, 1) 70%),
            url('Dreadthorn%20Dragon.jpg');
    }
}