/* ========================================
   haka.run - Modern Landing Page
   Professional Crypto Analytics Platform
   ======================================== */

/* CSS Variables */
:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cosmic: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --nav-bg: rgba(10, 10, 10, 0.8);
    --card-bg: rgba(20, 20, 20, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --card-bg: rgba(248, 248, 248, 0.5);
    --border-color: rgba(0, 0, 0, 0.1);
    --container-bg: rgba(255, 255, 255, 0.7);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    transition: var(--transition);
}

/* Canvas Background */
#bg-canvas {
    display: none; /* Hide canvas to fix scrolling */
}

/* Gradient Overlay from original */
.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        transparent 0%, 
        rgba(10, 10, 10, 0.4) 40%, 
        rgba(10, 10, 10, 0.8) 100%);
    z-index: 2;
    pointer-events: none;
}

[data-theme="light"] .gradient-overlay {
    background: radial-gradient(ellipse at center, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 40%, 
        rgba(255, 255, 255, 0.3) 100%);
}

/* Cosmic overlay */
.gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255, 119, 198, 0.3), transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255, 119, 198, 0.1), transparent 50%);
    opacity: 0.5;
}

[data-theme="light"] .gradient-overlay::before {
    background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1), transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255, 119, 198, 0.1), transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255, 119, 198, 0.05), transparent 50%);
    opacity: 0.3;
}

/* Geometric Shapes Animation */
.geometric-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 3;
    pointer-events: none;
}

.shape {
    position: absolute;
    border: 2px solid;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    border-color: rgba(102, 126, 234, 0.5);
    transform: rotate(45deg);
    animation-duration: 25s;
    box-shadow: 0 0 50px rgba(102, 126, 234, 0.3);
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -100px;
    border-color: rgba(255, 119, 198, 0.5);
    border-radius: 50%;
    animation-duration: 30s;
    animation-delay: -5s;
    box-shadow: 0 0 50px rgba(255, 119, 198, 0.3);
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: -75px;
    left: 20%;
    border-color: rgba(139, 92, 246, 0.5);
    transform: rotate(30deg);
    animation-duration: 35s;
    animation-delay: -10s;
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

.shape-4 {
    width: 250px;
    height: 250px;
    top: 20%;
    right: 20%;
    border-color: rgba(167, 139, 250, 0.5);
    border-radius: 30%;
    animation-duration: 40s;
    animation-delay: -15s;
    box-shadow: 0 0 60px rgba(167, 139, 250, 0.3);
}

.shape-5 {
    width: 100px;
    height: 100px;
    top: 70%;
    left: 10%;
    border-color: rgba(196, 181, 253, 0.5);
    transform: rotate(60deg);
    animation-duration: 28s;
    animation-delay: -8s;
    box-shadow: 0 0 30px rgba(196, 181, 253, 0.3);
}

.shape-6 {
    width: 180px;
    height: 180px;
    bottom: 20%;
    right: 30%;
    border-color: rgba(165, 180, 252, 0.5);
    border-radius: 20%;
    animation-duration: 32s;
    animation-delay: -20s;
    box-shadow: 0 0 45px rgba(165, 180, 252, 0.3);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-30px) translateX(20px) rotate(90deg) scale(1.1);
        opacity: 0.2;
    }
    50% {
        transform: translateY(20px) translateX(-30px) rotate(180deg) scale(0.9);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-20px) translateX(30px) rotate(270deg) scale(1.05);
        opacity: 0.25;
    }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

[data-theme="light"] .nav {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    padding: 8px;
    position: relative;
}

.theme-icon {
    display: inline-block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px currentColor);
}

[data-theme="dark"] .theme-icon {
    color: #764ba2; /* Site color for moon */
}

[data-theme="light"] .theme-icon {
    color: #764ba2; /* Dark purple for sun */
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.2) rotate(20deg);
    filter: drop-shadow(0 0 12px currentColor);
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    position: relative;
    z-index: 10;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

[data-theme="light"] .container {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.hero-content {
    text-align: center;
    z-index: 12;
    position: relative;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    filter: drop-shadow(0 0 30px rgba(102, 126, 234, 0.5));
}

.gradient-text {
    background: var(--gradient-cosmic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-gradient {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn-gradient:hover::before {
    left: 100%;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid var(--text-secondary);
    border-right: none;
    border-top: none;
    transform: rotate(-45deg);
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 100% {
        transform: rotate(-45deg) translateY(0);
    }
    50% {
        transform: rotate(-45deg) translateY(-10px);
    }
}

/* Content Sections */
.section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-content.reverse {
    direction: rtl;
}

.section-content.reverse > * {
    direction: ltr;
}

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

.section-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.feature-icon {
    font-size: 1.5rem;
}

/* Preview Containers */
.preview-container {
    width: 100%;
    height: 500px;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .preview-container {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.chart-animation,
.bubble-animation {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Volume Section Specific */
.volume-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

/* Bubble Section Specific */
.bubble-section {
    background: linear-gradient(135deg, transparent 50%, rgba(139, 92, 246, 0.05) 100%);
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-delay {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.fade-in-delay-3 {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
}

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

/* Scroll Animations */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

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

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

/* Mobile Shape Adjustments */
@media (max-width: 768px) {
    .shape {
        opacity: 0.05;
    }
    
    .shape-1 {
        width: 200px;
        height: 200px;
        top: -100px;
        left: -100px;
    }
    
    .shape-2 {
        width: 150px;
        height: 150px;
    }
    
    .shape-3 {
        width: 100px;
        height: 100px;
    }
    
    .shape-4 {
        width: 180px;
        height: 180px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .section {
        padding: 60px 20px;
    }
    
    .section-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Show preview containers normally on mobile */
    .preview-container {
        position: relative;
        width: 100%;
        height: 200px;
        opacity: 1;
        z-index: 1;
        pointer-events: auto;
        margin-bottom: 2rem;
    }
    
    .content-left,
    .content-right {
        position: relative;
        z-index: 1;
        background: transparent;
        padding: 0;
        border-radius: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        border: none;
    }
    
    [data-theme="light"] .content-left,
    [data-theme="light"] .content-right {
        background: transparent;
        box-shadow: none;
        border: none;
    }
    
    .section-content.reverse {
        direction: ltr;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}