/**
 * Lucas Notes - Custom Styles
 * Dark Cyber Theme with Animations
 */

/* ==========================================
   GLOBAL STYLES & RESET
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

/* ==========================================
   ANIMATED BACKGROUND GRID
   ========================================== */

.grid-background {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 25s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(60px, 60px);
    }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 30%,
        transparent 0%,
        rgba(11, 14, 17, 0.6) 50%,
        rgba(11, 14, 17, 0.95) 100%
    );
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

header {
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(11, 14, 17, 0.95) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
    color: #9CA3AF;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6, #10B981);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #3B82F6;
}

/* Mobile Menu */
#mobile-menu-btn.active .burger-line-1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .burger-line-2 {
    opacity: 0;
}

#mobile-menu-btn.active .burger-line-3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

.mobile-nav-link {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(55, 65, 81, 0.3);
}

/* Status Indicator Animation */
.status-dot {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
    }
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero-title {
    opacity: 0;
    transform: translateY(30px);
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta {
    opacity: 0;
    transform: translateY(15px);
}

/* Hero Image */
.hero-image-wrapper {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.hero-image {
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: scale(1.02);
}

/* Floating Badges */
.floating-badge {
    animation: floatBadge 3s ease-in-out infinite;
}

.floating-badge-2 {
    animation: floatBadge 3s ease-in-out infinite 1.5s;
}

@keyframes floatBadge {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* CTA Buttons */
.cta-primary, .cta-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-primary:hover::before {
    width: 300px;
    height: 300px;
}

.cta-primary:active {
    transform: scale(0.98);
}

/* Stats Counter */
.stat-item {
    opacity: 0;
    transform: translateY(20px);
}

/* Scroll Indicator */
.scroll-indicator {
    animation: bounce 2s infinite;
}

.scroll-dot {
    animation: scrollDot 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes scrollDot {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(15px);
        opacity: 0.3;
    }
}

/* ==========================================
   INTELLIGENCE SECTION (Notes Cards)
   ========================================== */

.note-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
    background: linear-gradient(135deg, #151922 0%, #1a1f2e 100%);
}

.note-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.12);
}

.volatility-badge {
    border-radius: 4px;
}

.volatility-badge.low {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.volatility-badge.medium {
    background: rgba(251, 191, 36, 0.15);
    color: #FBD024;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.volatility-badge.high {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================
   METHODOLOGY SECTION
   ========================================== */

.methodology-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.methodology-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transition: left 0.6s ease;
}

.methodology-card:hover::before {
    left: 100%;
}

.methodology-card:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(59, 130, 246, 0.4);
}

.methodology-stat {
    opacity: 0;
    transform: translateY(20px);
}

/* ==========================================
   TERMINAL SECTION
   ========================================== */

.terminal-box {
    opacity: 0;
    transform: scale(0.95);
}

.terminal-text {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* Terminal text lines are hidden by default, GSAP will reveal them */
.terminal-text p {
    opacity: 0;
}

/* Telegram CTA glow */
.telegram-cta {
    position: relative;
}

.telegram-cta::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, #3B82F6, #10B981);
    border-radius: 0.5rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(10px);
}

.telegram-cta:hover::after {
    opacity: 0.5;
}

/* Trust Badges */
.trust-badge {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

.trust-badge:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-3px);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .note-card {
        margin-bottom: 0.5rem;
    }
    
    .terminal-content {
        padding: 1.5rem;
    }
    
    .floating-badge,
    .floating-badge-2 {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0B0E11;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3B82F6, #10B981);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #10B981, #3B82F6);
}

/* ==========================================
   SELECTION STYLING
   ========================================== */

::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

/* ==========================================
   LOADING STATES
   ========================================== */

.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus States */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Keyboard navigation mode */
body.keyboard-nav a:focus,
body.keyboard-nav button:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .no-print,
    header,
    .grid-background,
    .grid-overlay,
    .scroll-indicator {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .note-card,
    .methodology-card,
    .terminal-box,
    .stat-item,
    .hero-title,
    .hero-subtitle,
    .hero-cta,
    .hero-image-wrapper,
    .trust-badge,
    .methodology-stat {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================
   INLINE TELEGRAM CTA BUTTONS
   ========================================== */

.telegram-cta-inline {
    position: relative;
}

.telegram-cta-inline::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, #3B82F6, #10B981);
    border-radius: 0.75rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(10px);
}

.telegram-cta-inline:hover::after {
    opacity: 0.4;
}

/* Note cards as links - remove default link styling */
a.note-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.note-card:hover {
    text-decoration: none;
}

/* Telegram CTA pulse animation */
@keyframes ctaPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(59, 130, 246, 0);
    }
}

.telegram-cta {
    animation: ctaPulse 3s ease-in-out infinite;
}

.telegram-cta:hover {
    animation: none;
}
