/* styles.css - Main stylesheet for Heretics website */

:root {
    --dark-bg: #0a0a0a;
    --accent-color: #cc0000;
    --text-color: #e0e0e0;
    --secondary-color: #550000;
    --highlight-color: #ff3333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cinzel', serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#preloader.hide {
    opacity: 0;
}

.loader {
    width: 80px;
    height: 80px;
    border: 4px solid transparent;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(5px);
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-scrolled {
    padding: 10px 50px;
    background-color: rgba(10, 10, 10, 0.95);
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--highlight-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.language-toggle {
    cursor: pointer;
    color: var(--text-color);
    font-size: 16px;
    background: none;
    border: 1px solid var(--accent-color);
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.language-toggle:hover {
    background-color: var(--accent-color);
}

.mobile-menu {
    display: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('./assets/images/hero.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Keeps the background fixed during scroll */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-color);
    padding: 0 20px;
}

.glitch-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.glitch {
    font-size: 72px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 5px;
    position: relative;
    color: var(--text-color);
    animation: glitch 2s infinite alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: 'HERETICS';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    color: var(--accent-color);
    animation: glitch-layer 2s infinite alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, -2px);
}

.glitch::after {
    color: var(--highlight-color);
    animation: glitch-layer 2s 1s infinite alternate-reverse;
    clip-path: polygon(0 80%, 100% 20%, 100% 100%, 0 100%);
    transform: translate(2px, 2px);
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 var(--accent-color), -0.05em -0.025em 0 var(--highlight-color);
    }
    25% {
        text-shadow: -0.05em -0.025em 0 var(--accent-color), 0.025em 0.025em 0 var(--highlight-color);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 var(--accent-color), -0.05em -0.05em 0 var(--highlight-color);
    }
    75% {
        text-shadow: -0.05em -0.025em 0 var(--accent-color), -0.025em -0.025em 0 var(--highlight-color);
    }
    100% {
        text-shadow: -0.025em 0.025em 0 var(--accent-color), 0.025em -0.025em 0 var(--highlight-color);
    }
}

@keyframes glitch-layer {
    0% {
        opacity: 1;
        transform: translate(-2px, 2px);
    }
    33% {
        opacity: 1;
        transform: translate(1px, -1px);
    }
    66% {
        opacity: 0.8;
        transform: translate(0.5px, 0.5px);
    }
    100% {
        opacity: 1;
        transform: translate(-1px, -1px);
    }
}

.hero-tagline {
    font-size: 24px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.hero-description {
    font-size: 18px;
    max-width: 800px;
    margin-bottom: 50px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 20px;
}

.cta-btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--accent-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    z-index: -1;
}

.cta-btn:hover::before {
    left: 0;
}

.cta-btn:hover {
    color: var(--text-color);
}

.primary-btn {
    background-color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.primary-btn::before {
    background-color: var(--secondary-color);
}

/* About Section */
.section {
    padding: 100px 50px;
    position: relative;
}

.section-title {
    font-size: 36px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    text-align: center;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    margin-top: 50px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.about-text p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    border: 2px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-color), transparent);
    opacity: 0.2;
    z-index: 1;
}

/* Features Section */
.features {
    background-color: rgba(15, 15, 15, 0.9);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid var(--accent-color);
    padding: 30px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, var(--accent-color), transparent, var(--accent-color));
    z-index: -1;
    animation: border-glow 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

@keyframes border-glow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.feature-card p {
    font-size: 16px;
    line-height: 1.6;
}

/* Animation for feature cards */
.feature-card.animate {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gameplay Section */
.gameplay-roles {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    gap: 30px;
}

.role-card {
    flex: 1;
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid var(--accent-color);
    padding: 30px;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s ease;
}

.role-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(204, 0, 0, 0.2);
}

.role-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.role-card p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.role-image {
    margin-bottom: 20px;
    border: 2px solid var(--accent-color);
    overflow: hidden;
    max-height: 300px; /* Control max height */
}

.role-image img {
    width: 100%;
    height: auto;
    max-height: 300px; /* Control image max height */
    object-fit: cover; /* Important: makes image cover the area without distortion */
    display: block;
    transition: transform 0.5s ease;
}

.role-image:hover img {
    transform: scale(1.05);
}

/* Devlog Section */
.devlog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.devlog-card {
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.devlog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(204, 0, 0, 0.2);
}

.devlog-image {
    width: 100%;
    height: 200px;
    background-color: #222;
    overflow: hidden;
}

.devlog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.devlog-card:hover .devlog-image img {
    transform: scale(1.05);
}

.devlog-content {
    padding: 20px;
}

.devlog-date {
    font-size: 14px;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.devlog-title {
    font-size: 20px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.devlog-card:hover .devlog-title {
    color: var(--accent-color);
}

.devlog-excerpt {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    position: relative;
}

.read-more::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.read-more:hover::after {
    width: 100%;
}

/* Media Section */
.media-tabs {
    display: flex;
    justify-content: center;
    margin: 50px 0 30px;
    border-bottom: 1px solid var(--accent-color);
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.tab-btn.active {
    color: var(--accent-color);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.media-item {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--accent-color);
}

.media-image {
    width: 100%;
    height: 200px;
    background-color: #222;
    transition: transform 0.5s ease;
}

.media-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item:hover .media-image {
    transform: scale(1.05);
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-play {
    color: var(--text-color);
    font-size: 50px;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.team-card {
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: center;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(204, 0, 0, 0.2);
}

.team-image {
    width: 100%;
    height: 250px;
    background-color: #222;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image img {
    transform: scale(1.05);
}

.team-info {
    padding: 20px;
}

.team-name {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.team-role {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 15px;
}

.team-bio {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-link {
    color: var(--text-color);
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: rgba(10, 10, 10, 0.95);
    padding: 50px;
    text-align: center;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-social a {
    color: var(--text-color);
    font-size: 20px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 80%;
    max-width: 800px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--text-color);
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-color);
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* Custom cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    z-index: 9999;
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    border-color: var(--highlight-color);
    background-color: rgba(204, 0, 0, 0.1);
}

.custom-cursor.clicked {
    transform: translate(-50%, -50%) scale(0.5);
    background-color: var(--accent-color);
}

/* Responsive */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        order: -1;
    }
    
    .gameplay-roles {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 20px;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .mobile-menu.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .mobile-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .section {
        padding: 70px 20px;
    }
    
    .glitch {
        font-size: 48px;
    }
    
    .hero-tagline {
        font-size: 18px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .custom-cursor {
        display: none;
    }
}

@media (max-width: 480px) {
    .glitch {
        font-size: 36px;
    }
    
    .hero-tagline {
        font-size: 16px;
    }
    
    .hero-description {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 28px;
    }
}