/* Basic Reset & Global Styles */
:root {
    --primary-color: #00aaff; /* A vibrant blue for accents */
    --dark-bg: #121212;
    --medium-bg: #1a1a1a;
    --light-gray: #f4f4f4;
    --text-color: #cccccc;
    --font-title: 'Ethnocentric', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Ethnocentric';
    /* Make sure you have these font files in a 'fonts' folder */
    src: url('fonts/ethnocentric.woff2') format('woff2'),
         url('fonts/ethnocentric.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Helps with font loading performance */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2 {
    font-family: var(--font-title);
    color: var(--light-gray);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Header and Navigation */
header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-bottom-color 0.4s ease, box-shadow 0.4s ease;
}

/* Style for the header when the page is scrolled */
header.scrolled {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    border-bottom: 1px solid var(--primary-color);
    animation: hue-cycle 10s linear infinite;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    /* The logo is now an image, so we style the image within the link */
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Adds space between the logo and the text */
    color: var(--light-gray); /* Sets the color for the text */
}

nav .logo img {
    height: 45px; /* Adjust height as needed */
}

nav .logo span {
    font-family: var(--font-title);
    font-size: 1.3rem;
}

nav .nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    position: relative; /* For the animated underline */
    color: var(--text-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Animated underline for nav links */
nav .nav-links li a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

nav .nav-links li a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--light-gray);
    margin: 5px;
    transition: all 0.3s ease;
}

/* For JS Toggling */
.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative; /* Needed for pseudo-elements */
    overflow: hidden; /* Hide anything that goes outside */
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/HallwayRunLookingBack.png') no-repeat center center/cover;
}

/* Scanline Overlay Effect */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%; /* Taller to allow for movement */
    background: repeating-linear-gradient(
        0deg,
        transparent 0,
        transparent 1px,
        rgba(255, 255, 255, 0.04) 2px,
        rgba(255, 255, 255, 0.04) 3px
    );
    animation: scanline 120s linear infinite;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    /* Use a semi-transparent background to make rounding visible */
    background-color: rgba(18, 18, 18, 0.5);
    padding: 4rem; /* Add padding to create space around the text */
    animation: background-glow 4s ease-in-out infinite alternate;
    border-radius: 20px; /* Even rounding on all corners */
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    position: relative; /* Required for the glitch effect */
    /* Add background image to text */
    color: var(--light-gray); /* Restore text color */
    text-shadow: 0 0 5px rgba(0,0,0,0.7); /* Add shadow for readability */
}

/* Glitch Effect Layers */
.hero-content h1::before,
.hero-content h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
    clip-path: inset(50% 0 50% 0); /* Start clipped */
}

.hero-content h1::before {
    left: -2px;
    text-shadow: 1px 0 var(--primary-color);
    animation: glitch-anim-1 6s infinite linear alternate-reverse;
}

.hero-content h1::after {
    left: 2px;
    text-shadow: -1px 0 #ff00c1; /* A magenta for a classic cyberpunk feel */
    animation: glitch-anim-2 12s infinite linear alternate-reverse;
}

.hero-content .release-date {
    font-family: var(--font-title);
    font-size: 1.8rem;
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-color);
    margin: 1rem 0;
    letter-spacing: 3px;
}

.hero-content .subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9); /* Improves readability on complex backgrounds */
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--dark-bg);
    padding: 1rem 2.5rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: pulse 2s infinite;
}

.cta-button:hover {
    background-color: #0088cc;
    transform: scale(1.05);
}

/* Content Sections */
.content-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.content-section.alt-bg {
    background-color: var(--medium-bg);
}

.content-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.section-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    text-align: left;
}

.section-content.reverse {
    flex-direction: row-reverse;
}

.content-image {
    flex: 1;
    /* Add these properties to control image scaling */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    max-height: 400px; /* Prevents the image from making the section too tall */
    min-width: 0; /* Fix for flexbox overflow issues with large content */
}

.text-content {
    flex: 1;
}

.text-content h3 {
    font-family: var(--font-body);
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 1.5rem;
}

.text-content p {
    font-size: 1.1rem;
}

/* Social Links */
.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-links a img {
    height: 40px; /* Control the size of the logos */
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--medium-bg);
    border-top: 1px solid #222;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content .subtitle {
        font-size: 1.2rem;
    }
    .section-content, .section-content.reverse {
        flex-direction: column;
    }

    /* Mobile Nav Styling */
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 60%;
        background-color: var(--dark-bg);
        flex-direction: column;
        align-items: center;
        justify-content: space-evenly;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        border-left: 1px solid #222;
    }

    .nav-links li {
        opacity: 0;
    }

    .hamburger {
        display: block;
    }

    .nav-active {
        transform: translateX(0%);
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }
}
/* Keyframe Animations */

@keyframes scanline {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

@keyframes background-glow {
    from {
        filter: drop-shadow(0 0 15px var(--primary-color));
    }
    to {
        filter: drop-shadow(0 0 30px var(--primary-color));
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 170, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 170, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 170, 255, 0);
    }
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(40% 0 61% 0); }
    20% { clip-path: inset(19% 0 40% 0); }
    40% { clip-path: inset(49% 0 21% 0); }
    60% { clip-path: inset(5% 0 80% 0); }
    80% { clip-path: inset(80% 0 5% 0); }
    100% { clip-path: inset(45% 0 35% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(89% 0 5% 0); }
    20% { clip-path: inset(45% 0 45% 0); }
    40% { clip-path: inset(10% 0 65% 0); }
    60% { clip-path: inset(90% 0 1% 0); }
    80% { clip-path: inset(30% 0 50% 0); }
    100% { clip-path: inset(70% 0 10% 0); }
}

@keyframes hue-cycle {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes hue-cycle {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}
