/**
 * Riche Chain Mainnet - Global Styles
 * * This file contains custom styling that extends Tailwind CSS.
 * It uses CSS Variables for easy theming and maintenance.
 */

/* --- GLOBAL VARIABLES --- */
:root {
    --bg-dark: #050505;
    --bg-card: #1a1a1a;
    --gold-start: #FFD700;
    --gold-end: #B8860B;
    --discord-color: #5865F2; /* Added Discord Color */
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --border-glass: rgba(255, 215, 0, 0.15);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* --- BACKGROUND ANIMATION (CANVAS) --- */
#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind everything */
    pointer-events: none; /* Let clicks pass through */
}

/* --- MODERN ANIMATIONS SYSTEM --- */

/* Base Reveal Class */
.reveal {
    opacity: 0;
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

/* Variant 1: Fade Up (Default) */
.reveal:not(.reveal-left):not(.reveal-right):not(.reveal-zoom) {
    transform: translateY(50px);
}

/* Variant 2: Fade From Left */
.reveal-left {
    transform: translateX(-50px);
}

/* Variant 3: Fade From Right */
.reveal-right {
    transform: translateX(50px);
}

/* Variant 4: Zoom In */
.reveal-zoom {
    transform: scale(0.8);
}

/* Active State for All Variants */
.reveal.active {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Staggered Delays (Manual CSS overrides if Tailwind delay not sufficient) */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* 2. Floating Animation (Hero Elements) */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* 3. Gradient Pulse */
@keyframes gradient-pulse {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Utility: Gold Gradient Text */
.text-gold-gradient {
    background: linear-gradient(135deg, var(--gold-start) 0%, var(--gold-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-pulse 3s ease infinite;
}

/* Utility: Gold Gradient Background */
.bg-gold-gradient {
    background: linear-gradient(135deg, var(--gold-start) 0%, var(--gold-end) 100%);
}

/* Component: Glassmorphism Card */
.glass-card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Interactive Hover Effect for Cards */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.05), transparent);
    transition: 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 40px -10px rgba(184, 134, 11, 0.2);
}

/* Component: Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--gold-start) 0%, var(--gold-end) 100%);
    color: #000;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--gold-end) 0%, var(--gold-start) 100%);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}
.btn-primary:hover::after {
    opacity: 1;
}
.btn-primary:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--gold-start);
    color: var(--gold-start);
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* Discord Button Specifics */
.btn-discord {
    background-color: var(--discord-color);
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.3);
}
.btn-discord:hover {
    background-color: #4752C4;
    box-shadow: 0 0 25px rgba(88, 101, 242, 0.6);
    transform: translateY(-2px);
}

/* Smart Navbar Animation */
#main-nav {
    transition: transform 0.3s ease-in-out, background-color 0.3s ease, padding 0.3s ease;
}
#main-nav.nav-hidden {
    transform: translateY(-100%);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 49;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid var(--gold-start);
    color: var(--gold-start);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
#back-to-top:hover {
    background: var(--gold-start);
    color: black;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: translateY(0) scale(1.1);
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}
#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Toast Notification */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--bg-card);
    border-left: 4px solid var(--gold-start);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 50;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* Active Nav States (Helper Classes) */
.nav-link-active-desktop {
    color: #FACC15 !important; /* text-yellow-400 */
    border-bottom: 2px solid #EAB308 !important; /* border-yellow-500 */
}

.nav-link-active-mobile {
    background-color: rgba(202, 138, 4, 0.2) !important; /* bg-yellow-600/20 */
    border: 1px solid rgba(202, 138, 4, 0.3) !important; /* border-yellow-600/30 */
    color: white !important;
}

/* --- NEW SECTIONS STYLING --- */

/* Timeline Component */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-50%);
}

/* FAQ Accordion */
.accordion-content {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}
.accordion-button.active .icon-plus {
    transform: rotate(45deg);
}
.accordion-button.active {
    color: var(--gold-start);
}

/* Tech Stack Marquee (Infinite Scroll) */
.marquee-container {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Developer Grant Box */
.grant-box {
    background: radial-gradient(circle at top right, rgba(234, 179, 8, 0.1), transparent 40%),
                rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.2);
}