/* ==========================================
   CODEX MASCOT - Premium Mascot Showcase
   ==========================================
   Clean, minimal, and animated CSS stylesheet
   With mesh gradient hero and grid backgrounds
   Color theme: #CDFF9B (Lime Green)
   ========================================== */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --color-primary: #1a1a2e;
    --color-secondary: #16213e;
    --color-accent: #CDFF9B;
    --color-accent-dark: #a8e063;
    --color-white: #ffffff;
    --color-off-white: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #eeeeee;
    --color-gray-300: #e0e0e0;
    --color-gray-400: #bdbdbd;
    --color-gray-500: #9e9e9e;
    --color-gray-600: #757575;
    --color-gray-700: #616161;
    --color-gray-800: #424242;
    --color-gray-900: #212121;
    --color-black: #000000;
    
    /* Mesh Gradient Colors */
    --mesh-1: #8b5cf6;
    --mesh-2: #4c1d95;
    --mesh-3: #1e1b4b;
    --mesh-4: #000000;
    
    /* Typography */
    --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --letter-spacing: -0.03em;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-loader: 500;
}

/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-primary);
    letter-spacing: var(--letter-spacing);
    line-height: 1.6;
    color: var(--color-gray-800);
    background-color: var(--color-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.loading {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

button {
    font-family: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

/* ==================== GLOBAL GRID BACKGROUND ==================== */
.grid-bg-global {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--color-white);
    background-image:
        linear-gradient(to right, #f0f0f0 1px, transparent 1px),
        linear-gradient(to bottom, #f0f0f0 1px, transparent 1px),
        radial-gradient(circle 600px at 0% 200px, rgba(205, 255, 155, 0.5), transparent),
        radial-gradient(circle 600px at 100% 200px, rgba(205, 255, 155, 0.5), transparent);
    background-size:
        96px 64px,
        96px 64px,
        100% 100%,
        100% 100%;
}

/* ==================== LOADING SCREEN ==================== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--color-white);
    background-image:
        linear-gradient(to right, #f0f0f0 1px, transparent 1px),
        linear-gradient(to bottom, #f0f0f0 1px, transparent 1px),
        radial-gradient(circle 600px at 0% 200px, rgba(205, 255, 155, 0.5), transparent),
        radial-gradient(circle 600px at 100% 200px, rgba(205, 255, 155, 0.5), transparent);
    background-size:
        96px 64px,
        96px 64px,
        100% 100%,
        100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loader);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-mascot {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.loader-circle {
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: loaderBounce 1.4s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(205, 255, 155, 0.5);
}

.loader-circle:nth-child(1) { animation-delay: 0s; }
.loader-circle:nth-child(2) { animation-delay: 0.2s; }
.loader-circle:nth-child(3) { animation-delay: 0.4s; }

@keyframes loaderBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loader-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-gray-600);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== CONTAINER ==================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--color-white);
}

/* Hide mesh gradient - using grid background instead */
.mesh-gradient-bg {
    display: none;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.8;
    animation: meshFloat 20s ease-in-out infinite;
}

.mesh-blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.6) 0%, transparent 70%);
    top: -20%;
    right: -10%;
    animation-delay: 0s;
}

.mesh-blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    bottom: 0;
    left: 30%;
    animation-delay: -7s;
}

.mesh-blob-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(76, 29, 149, 0.6) 0%, transparent 70%);
    top: 40%;
    left: -10%;
    animation-delay: -14s;
}

@keyframes meshFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

.mesh-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* ==================== HEADER / NAVIGATION ==================== */
.header {
    position: relative;
    z-index: var(--z-fixed);
    padding: var(--spacing-lg) 0;
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-gray-600);
    padding: var(--spacing-sm) 0;
    transition: color var(--transition-fast);
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.hamburger {
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--color-gray-800);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--color-gray-800);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ==================== HERO CONTENT ==================== */
.hero-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
    align-items: center;
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-4xl);
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

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

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(205, 255, 155, 0.3);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-xl);
    border: 1px solid rgba(205, 255, 155, 0.5);
}

.badge-icon {
    font-size: 0.875rem;
}

.badge-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
}

/* Hero Title */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
}

.hero-title-italic {
    font-style: italic;
    font-weight: 300;
}

.hero-title-bold {
    display: block;
    font-weight: 700;
    background: linear-gradient(135deg, #65a30d 0%, #4d7c0f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Description */
.hero-description {
    font-size: 1.125rem;
    color: var(--color-gray-600);
    max-width: 480px;
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

/* Hero CTA Buttons */
.hero-cta {
    display: flex;
    gap: var(--spacing-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(205, 255, 155, 0.4);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    position: relative;
    z-index: 2;
    max-width: 400px;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ==================== MAIN CONTENT ==================== */
.main {
    position: relative;
    z-index: 1;
}

/* ==================== ILLUSTRATIONS SECTION ==================== */
.illustrations {
    position: relative;
    padding: var(--spacing-4xl) 0;
    min-height: 100vh;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Mascot Grid - No Cards, Just Images */
.mascot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-3xl);
    position: relative;
    z-index: 1;
}

/* Mascot Item - No Card Style */
.mascot-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeInUp 0.5s ease-out both;
}

.mascot-item:hover .mascot-image {
    transform: scale(1.08);
}

.mascot-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    object-fit: contain;
    transition: transform var(--transition-base);
    margin-bottom: var(--spacing-md);
}

.mascot-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.download-btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-xl);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    background: var(--color-accent);
    color: var(--color-primary);
}

.download-btn:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(205, 255, 155, 0.4);
}

/* Grid Loader */
.grid-loader {
    display: none;
    justify-content: center;
    padding: var(--spacing-3xl);
    position: relative;
    z-index: 1;
}

.grid-loader.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-gray-200);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== ABOUT SECTION ==================== */
.about {
    position: relative;
    padding: var(--spacing-4xl) 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--color-gray-600);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
}

.about-text strong {
    color: var(--color-primary);
}

/* Creator Info */
.about-creator {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background: rgba(205, 255, 155, 0.2);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(205, 255, 155, 0.3);
}

.creator-label {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-bottom: var(--spacing-xs);
}

.creator-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.creator-platforms {
    font-size: 0.9375rem;
    color: var(--color-gray-600);
}

.about-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.about-image {
    max-width: 350px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
    animation: float 6s ease-in-out infinite;
}

/* ==================== FOOTER ==================== */
.footer {
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    background: rgba(205, 255, 155, 0.1);
    border-top: 1px solid rgba(205, 255, 155, 0.2);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-block;
    margin-bottom: var(--spacing-lg);
}

.footer-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.footer-logo:hover .footer-logo-img {
    transform: scale(1.1);
}

.footer-divider {
    height: 1px;
    background: var(--color-gray-300);
    margin: var(--spacing-lg) 0;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--color-gray-600);
}

.footer-nav {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-nav a {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    transition: color var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--color-primary);
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet - 1024px */
@media (max-width: 1024px) {
    .mascot-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-2xl);
    }
    
    .hero-container {
        gap: var(--spacing-2xl);
    }
    
    .hero-image {
        max-width: 320px;
    }
}

/* Tablet Small - 768px */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 100px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: var(--spacing-xl);
        gap: var(--spacing-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: var(--spacing-xl);
        padding-bottom: var(--spacing-2xl);
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-visual {
        order: 1;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-badge {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-image {
        max-width: 260px;
    }
    
    .mascot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-2xl);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-visual {
        order: -1;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .footer-nav {
        justify-content: center;
    }
}

/* Mobile - 480px */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero {
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-image {
        max-width: 200px;
    }
    
    .mascot-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .mascot-image {
        max-width: 220px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .mesh-blob-1 {
        width: 300px;
        height: 300px;
    }
    
    .mesh-blob-2,
    .mesh-blob-3 {
        width: 200px;
        height: 200px;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.sr-only {
    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 Styles for Accessibility */
:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Selection Styles */
::selection {
    background: rgba(205, 255, 155, 0.4);
    color: var(--color-primary);
}
