:root {
    --color-bg-dark: #0a0a0f;
    --color-bg-card: #12121a;
    --color-bg-card-hover: #1a1a25;
    --color-gold: #c9a227;
    --color-gold-light: #e8c547;
    --color-gold-dark: #8a6d1b;
    --color-text: #e8e6e3;
    --color-text-muted: #9a9a9a;
    --color-accent-red: #8b2635;
    --color-accent-blue: #2a4a6d;
    --color-border: #2a2a35;
    --font-display: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    line-height: 1.6;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.98) 0%, rgba(10, 10, 15, 0.9) 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.3s ease;
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 3rem;
    list-style: none;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--color-gold);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(139, 38, 53, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(42, 74, 109, 0.1) 0%, transparent 40%),
        var(--color-bg-dark);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.02"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.02"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Floating Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

/* Fade In Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for cards */
.fade-in:nth-child(1) { transition-delay: 0.05s; }
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.15s; }
.fade-in:nth-child(4) { transition-delay: 0.2s; }
.fade-in:nth-child(5) { transition-delay: 0.25s; }
.fade-in:nth-child(6) { transition-delay: 0.3s; }

/* Hero content fade in */
.hero-content {
    animation: hero-fade-in 1.2s ease-out;
    position: relative;
    z-index: 1;
    max-width: 900px;
}

@keyframes hero-fade-in {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse glow for stat values */
.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gold);
    display: block;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(201, 162, 39, 0.3); }
    50% { text-shadow: 0 0 25px rgba(201, 162, 39, 0.6); }
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--color-gold-dark) 0%, transparent 100%);
    border: 1px solid var(--color-gold-dark);
    border-radius: 2rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold-light);
    margin-bottom: 2rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--color-text) 0%, var(--color-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 60px rgba(201, 162, 39, 0.3);
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-text-muted);
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: var(--color-bg-dark);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

/* Showcase + Demo Combined Section */
.showcase-demo {
    padding: 6rem 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(201, 162, 39, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 85%, rgba(201, 162, 39, 0.1) 0%, transparent 40%),
        var(--color-bg-dark);
    position: relative;
}

.showcase-demo-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.showcase-demo .section-header {
    margin-bottom: 2rem;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.showcase-item {
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    transition: all 0.3s ease;
}

.showcase-item:hover {
    border-color: var(--color-gold-dark);
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(201, 162, 39, 0.08);
    z-index: 2;
}

.showcase-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 7px 7px 0 0;
}

.showcase-caption {
    display: block;
    padding: 0.85rem 0.5rem;
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold);
    background: linear-gradient(180deg, var(--color-bg-card) 0%, rgba(201, 162, 39, 0.08) 100%);
    border-top: 1px solid var(--color-gold-dark);
    position: relative;
    z-index: 1;
}

/* Demo CTA (below GIFs) */
.demo-cta {
    margin-top: 4rem;
    text-align: center;
    position: relative;
}

.demo-cta::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-gold-dark), transparent);
    margin: 0 auto 2.5rem;
}

.demo-cta-text {
    margin-bottom: 2rem;
}

.demo-cta-text h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.demo-cta-text p {
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.7;
}

.demo-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(139, 38, 53, 0.3);
    border: 1px solid var(--color-accent-red);
    border-radius: 4px;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ff6b6b;
    margin-bottom: 0.75rem;
}

.demo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.demo-container iframe {
    border-radius: 8px;
    max-width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(201, 162, 39, 0.1);
}

@media (max-width: 900px) {
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }
    
}

/* Divider */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-gold-dark) 50%, transparent 100%);
    margin: 0;
}

/* Overview Section */
.overview {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.section-header p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.overview-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.overview-card:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-gold-dark);
    transform: translateY(-4px);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-gold-dark) 0%, transparent 100%);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.overview-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-gold-light);
}

.overview-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Gameplay Loop Section */
.gameplay-loop {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-card) 50%, var(--color-bg-dark) 100%);
}

.gameplay-loop .container {
    max-width: 1000px;
    margin: 0 auto;
}

.loop-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.loop-step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
    padding-bottom: 3rem;
}

.loop-step:last-child {
    padding-bottom: 0;
}

.step-number {
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-dark);
    border: 2px solid var(--color-gold);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gold);
    position: relative;
    z-index: 2;
}

.loop-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 29px;
    top: 60px;
    width: 2px;
    height: calc(100% - 60px);
    background: linear-gradient(180deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    z-index: 1;
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.step-content p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

.step-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.step-feature {
    padding: 0.4rem 1rem;
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid var(--color-gold-dark);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--color-gold-light);
}

/* Technical Section */
.technical {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.tech-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
}

.tech-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-gold-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tech-list {
    list-style: none;
}

.tech-list li {
    padding: 0.5rem 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tech-list li::before {
    content: '▸';
    color: var(--color-gold);
}

/* Factions Section */
.factions {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.factions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.faction-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.faction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.faction-card.dwarves::before { background: linear-gradient(90deg, #8b4513, #cd853f); }
.faction-card.humans::before { background: linear-gradient(90deg, #4169e1, #87ceeb); }
.faction-card.elves::before { background: linear-gradient(90deg, #228b22, #90ee90); }
.faction-card.orcs::before { background: linear-gradient(90deg, #8b0000, #ff6347); }

.faction-card:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-gold-dark);
    transform: translateY(-4px);
}

.faction-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-gold-light);
}

.faction-style {
    font-size: 0.85rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
    font-weight: 600;
}

.faction-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.faction-units {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.faction-units span {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Campaign Section */
.campaign {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-card) 50%, var(--color-bg-dark) 100%);
}

.campaign .container {
    max-width: 1000px;
    margin: 0 auto;
}

.campaign-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.campaign-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.campaign-item:hover {
    border-color: var(--color-gold-dark);
    transform: translateX(4px);
}

.campaign-levels {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-gold);
    min-width: 60px;
    text-align: center;
}

.campaign-info h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.campaign-info p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.campaign-boss {
    text-align: right;
}

.boss-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.boss-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--color-accent-red);
}

/* Footer */
footer {
    padding: 4rem 2rem 3rem;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.footer-left {
    text-align: left;
}

.footer-left h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-gold-light);
    margin-bottom: 0.5rem;
}

.footer-left p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.footer-left .tech-stack {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    opacity: 0.8;
}

.footer-right {
    text-align: right;
}

.footer-right .contact-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.footer-right a {
    color: var(--color-gold);
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-right a:hover {
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1000px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-bottom .copyright {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 900px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    nav ul {
        gap: 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }

    nav a {
        font-size: 0.75rem;
        letter-spacing: 0.05em;
    }
}

@media (max-width: 480px) {
    nav ul {
        gap: 0.5rem;
        padding: 0.75rem 0.5rem;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    nav ul::-webkit-scrollbar {
        display: none;
    }

    nav a {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .loop-step {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .step-number {
        margin-bottom: 1rem;
    }

    .loop-step:not(:last-child)::after {
        display: none;
    }

    .step-features {
        justify-content: center;
    }

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

    .campaign-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .campaign-boss {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-left, .footer-right {
        text-align: center;
    }
}
