/* ============================================
   THE PSYCHOLOGICAL GAME UNIVERSE
   Shared Styles & Variables
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: auto;
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    background: #0a0a0a;
    color: #fff;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s ease;
    backdrop-filter: blur(0px);
}

.main-nav.scrolled {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    padding: 0.75rem 2rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-logo span {
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* ============================================
   GLITCH EFFECT
   ============================================ */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-active::before {
    animation: glitch-1 0.3s ease;
    color: #ff0040;
    z-index: -1;
}

.glitch-active::after {
    animation: glitch-2 0.3s ease;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { opacity: 0; transform: translate(0); }
    20% { opacity: 0.8; transform: translate(-3px, 3px); }
    40% { opacity: 0.8; transform: translate(3px, -3px); }
    60% { opacity: 0.8; transform: translate(-3px, -3px); }
    80% { opacity: 0.8; transform: translate(3px, 3px); }
}

@keyframes glitch-2 {
    0%, 100% { opacity: 0; transform: translate(0); }
    20% { opacity: 0.8; transform: translate(3px, -3px); }
    40% { opacity: 0.8; transform: translate(-3px, 3px); }
    60% { opacity: 0.8; transform: translate(3px, 3px); }
    80% { opacity: 0.8; transform: translate(-3px, -3px); }
}

/* ============================================
   DISTORTION HOVER EFFECT
   ============================================ */
.distort-hover {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

/* ============================================
   SECTION BASE STYLES
   ============================================ */
section {
    position: relative;
    width: 100%;
    padding: 6rem 2rem;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.8;
    margin-bottom: 3rem;
    max-width: 600px;
}

/* ============================================
   STAT COUNTERS
   ============================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

/* ============================================
   CARDS & GRIDS
   ============================================ */
.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.concept-card {
    padding: 2rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.concept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.concept-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.concept-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.concept-card p {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* ============================================
   CASE STUDY BLOCK
   ============================================ */
.case-study {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin: 4rem 0;
    padding: 3rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.case-study-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.case-study-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

.case-study-visual {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   CTA FOOTER
   ============================================ */
.cta-section {
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.cta-text {
    font-size: 1.25rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.cta-button {
    display: inline-block;
    padding: 1.25rem 3rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid currentColor;
    color: #fff;
    background: transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.cta-button:hover::before {
    transform: translateX(0);
}

.cta-button:hover {
    color: #000;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    padding: 3rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.5;
}

/* ============================================
   BACKGROUND CANVAS
   ============================================ */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    z-index: 10000;
    transform-origin: left;
    transform: scaleX(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        font-size: 1.5rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .case-study {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    section {
        padding: 4rem 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
}

.parallax-layer {
    will-change: transform;
}

.no-select {
    user-select: none;
}

.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Particle container */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

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