/* CSS Variables & Theme Setup */
:root {
    --bg-base: #030305;
    --bg-surface: #0a0b10;
    --bg-card: #0e1017;
    --text-primary: #ffffff;
    --text-secondary: #8bc1cc;
    --text-muted: #52666d;
    --accent: #83f0ff;
    --accent-glow: 0 0 25px rgba(131, 240, 255, 0.45);
    --accent-glow-intense: 0 0 40px rgba(131, 240, 255, 0.8);
    --font-header: 'Orbitron', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --grid-color: rgba(131, 240, 255, 0.02);
}

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

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

::-webkit-scrollbar-thumb {
    background: #1c2331;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
    box-shadow: var(--accent-glow);
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center;
}

h1,
h2,
h3 {
    font-family: var(--font-header);
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Dynamic Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 25px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    transition: all 0.4s ease;
    z-index: 1000;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(3, 3, 5, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(131, 240, 255, 0.08);
    padding: 15px 50px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 3px;
}

.logo span {
    color: var(--accent);
    text-shadow: var(--accent-glow);
}

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

.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
    text-shadow: var(--accent-glow);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    position: relative;

    background-image:
        radial-gradient(circle at center, rgba(3, 3, 5, 0.65) 0%, var(--bg-base) 100%),
        url('/assets/matben_sideprofile_dark-color_v1_nologo.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero h1 {
    font-size: clamp(3.5rem, 9vw, 6.5rem);
    line-height: 0.95;
    margin-bottom: 20px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

.hero h1 span {
    color: var(--accent);
    text-shadow: var(--accent-glow), 0 0 10px rgba(0, 0, 0, 1);
    animation: textPulse 3s infinite alternate;
}

.hero p {
    font-size: 1.25rem;
    color: #e0f2f5;
    max-width: 650px;
    margin-bottom: 40px;
    letter-spacing: 1px;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.button-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 14px 35px;
    background: rgba(3, 3, 5, 0.6);
    color: var(--accent);
    border: 1px solid var(--accent);
    font-family: var(--font-header);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(131, 240, 255, 0.05) inset;
}

.btn:hover {
    background: rgba(131, 240, 255, 0.15);
    box-shadow: var(--accent-glow), 0 0 15px rgba(131, 240, 255, 0.1) inset;
    transform: translateY(-2px);
}

.btn.primary {
    background: var(--accent);
    color: var(--bg-base);
    box-shadow: var(--accent-glow);
    border: 1px solid var(--accent);
}

.btn.primary:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--bg-base);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Section Layouts */
section {
    padding: 120px 10%;
    position: relative;
}

.section-title {
    font-size: 2.3rem;
    margin-bottom: 60px;
    color: #ffffff;
    text-align: center;
}

.section-title span {
    color: var(--accent);
    text-shadow: var(--accent-glow);
}

/* The Game */
.game-content {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.game-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #cbdce0;
    font-weight: 300;
}

.game-text .button-group {
    justify-content: flex-start;
    margin-top: 35px;
}

.video-wrapper {
    position: relative;
    background: #020203;
    border: 1px solid rgba(131, 240, 255, 0.2);
    padding: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: border-color 0.4s ease;
}

.video-wrapper:hover {
    border-color: var(--accent);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Soundtrack Section */
.soundtrack-section {
    background-color: var(--bg-surface);
    border-top: 1px solid rgba(131, 240, 255, 0.05);
}

.audio-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.audio-track {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.audio-track::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 8px;
    height: 8px;
    border-top: 2px solid rgba(131, 240, 255, 0.3);
    border-left: 2px solid rgba(131, 240, 255, 0.3);
    transition: 0.3s ease;
}

.audio-track:hover {
    border-color: rgba(131, 240, 255, 0.2);
    transform: translateX(5px);
    background: #121520;
}

.audio-track:hover::before {
    border-color: var(--accent);
}

.track-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.track-info h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin: 0;
}

.track-info h4 span {
    color: var(--accent);
    margin-right: 10px;
}

audio {
    width: 100%;
    height: 40px;
    outline: none;
    border-radius: 4px;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

audio:hover {
    opacity: 1;
}

/* The Studio */
.studio-section {
    background-color: var(--bg-surface);
    border-top: 1px solid rgba(131, 240, 255, 0.05);
    border-bottom: 1px solid rgba(131, 240, 255, 0.05);
}

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

.studio-card {
    padding: 50px 35px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.02);
    position: relative;
    transition: all 0.3s ease;
}

.studio-card::before,
.studio-card::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.studio-card::before {
    top: -1px;
    left: -1px;
    border-top-color: rgba(131, 240, 255, 0.2);
    border-left-color: rgba(131, 240, 255, 0.2);
}

.studio-card::after {
    bottom: -1px;
    right: -1px;
    border-bottom-color: rgba(131, 240, 255, 0.2);
    border-right-color: rgba(131, 240, 255, 0.2);
}

.studio-card:hover {
    transform: translateY(-5px);
    background: #121520;
}

.studio-card:hover::before {
    border-top-color: var(--accent);
    border-left-color: var(--accent);
}

.studio-card:hover::after {
    border-bottom-color: var(--accent);
    border-right-color: var(--accent);
}

.studio-card h3 {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.studio-card p {
    color: #a4b7bd;
    font-size: 1rem;
    font-weight: 300;
}

.portraits {
    max-width: 100%;
    display: block;
    margin: auto;
    margin-top: 20px;
    cursor: crosshair;
}

#namnspalt-L {
    display: inline-block;
    width: 49%;
    text-align: center;
    margin-top: 5px;
    padding-right: 45px;
}

#namnspalt-R {
    display: inline-block;
    width: 49%;
    text-align: center;
    margin-top: 5px;
    padding-left: 60px;
}


/* Newsletter (Moved below Studio) */
.newsletter-section {
    background-color: #050608;
    text-align: center;
    border-bottom: 1px solid rgba(131, 240, 255, 0.05);
    padding: 80px 10%;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 500px;
    margin: 30px auto 0;
    justify-content: center;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 15px;
    background: var(--bg-surface);
    border: 1px solid rgba(131, 240, 255, 0.1);
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
}

.newsletter-form input:focus {
    border-color: var(--accent);
}

/* Contact & Press Kit */
.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 650px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 18px;
    background: var(--bg-surface);
    border: 1px solid rgba(131, 240, 255, 0.1);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(131, 240, 255, 0.15);
    background: var(--bg-card);
}

.contact-form textarea {
    min-height: 180px;
    resize: vertical;
}

.contact-form .btn {
    align-self: center;
    width: 100%;
}

.press-kit-box {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(131, 240, 255, 0.05);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    background: #020204;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-top: 1px solid rgba(131, 240, 255, 0.03);
    font-family: var(--font-header);
}

@keyframes textPulse {
    0% {
        text-shadow: var(--accent-glow), 0 0 10px rgba(0, 0, 0, 1);
    }

    100% {
        text-shadow: var(--accent-glow-intense), 0 0 15px rgba(0, 0, 0, 1);
    }
}

/* Mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s ease;
}

@media (max-width: 968px) {
    header {
        padding: 20px 30px;
    }

    header.scrolled {
        padding: 15px 30px;
    }

    .game-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .game-text .button-group {
        justify-content: center;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 6, 10, 0.98);
        flex-direction: column;
        text-align: center;
        padding: 40px 0;
        border-bottom: 1px solid rgba(131, 240, 255, 0.2);
        gap: 25px;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        background-attachment: scroll;
    }
}
