/*
 * Frontpage Pixel-Art Styles
 * Modern 8/16-bit inspired design with CSS animations
 * 
 * @package JeunerDefaultModern
 * @since 1.1.0
 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Colors - Light Theme */
    --fp-bg-primary: #f8f9ff;
    --fp-bg-secondary: #ffffff;
    --fp-bg-dark: #1e1b4b;
    
    --fp-accent-indigo: #6366f1;
    --fp-accent-cyan: #22d3ee;
    --fp-accent-pink: #f472b6;
    --fp-accent-lime: #a3e635;
    
    --fp-text-primary: #1e293b;
    --fp-text-secondary: #64748b;
    --fp-text-light: #f8fafc;
    
    /* Pixel Grid */
    --pixel-unit: 8px;
    --pixel-2x: 16px;
    --pixel-3x: 24px;
    --pixel-4x: 32px;
    
    /* Shadows - Pixel Style */
    --pixel-shadow: 
        4px 4px 0 rgba(0,0,0,0.1),
        8px 8px 0 rgba(0,0,0,0.05);
    --pixel-shadow-hover:
        2px 2px 0 rgba(0,0,0,0.1),
        4px 4px 0 rgba(0,0,0,0.05);
    
    /* Glow Effects */
    --glow-indigo: 0 0 20px rgba(99, 102, 241, 0.4);
    --glow-cyan: 0 0 20px rgba(34, 211, 238, 0.4);
    --glow-pink: 0 0 20px rgba(244, 114, 182, 0.4);
    
    /* Typography */
    --font-pixel: 'Press Start 2P', monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   Base Overrides for Frontpage
   ============================================ */
.frontpage-wrapper {
    background: var(--fp-bg-primary);
    overflow-x: hidden;
}

.frontpage-wrapper .site-main {
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--pixel-3x);
}

/* ============================================
   Pixel Typography
   ============================================ */
.pixel-text {
    font-family: var(--font-pixel);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.pixel-glow {
    text-shadow: 
        0 0 10px var(--fp-accent-cyan),
        0 0 20px var(--fp-accent-cyan),
        0 0 40px var(--fp-accent-indigo);
}

.pixel-bracket {
    color: var(--fp-accent-cyan);
    margin: 0 var(--pixel-unit);
}

.section-title {
    font-size: clamp(1rem, 3vw, 1.5rem);
    text-align: center;
    margin-bottom: var(--pixel-4x);
    color: var(--fp-text-primary);
}

/* ============================================
   Pixel Buttons
   ============================================ */
.pixel-btn {
    display: inline-block;
    padding: var(--pixel-2x) var(--pixel-4x);
    font-family: var(--font-pixel);
    font-size: 0.75rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 4px solid transparent;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    
    /* Pixel border effect */
    background: transparent;
    box-shadow: var(--pixel-shadow);
}

.pixel-btn span {
    position: relative;
    z-index: 1;
}

.pixel-btn--primary {
    background: var(--fp-accent-indigo);
    border-color: var(--fp-accent-indigo);
    color: var(--fp-text-light);
}

.pixel-btn--primary:hover {
    background: var(--fp-accent-cyan);
    border-color: var(--fp-accent-cyan);
    color: var(--fp-bg-dark);
    box-shadow: var(--pixel-shadow-hover), var(--glow-cyan);
    transform: translate(-2px, -2px);
}

.pixel-btn--secondary {
    background: transparent;
    border-color: var(--fp-accent-cyan);
    color: var(--fp-accent-cyan);
}

.pixel-btn--secondary:hover {
    background: var(--fp-accent-cyan);
    color: var(--fp-bg-dark);
    box-shadow: var(--pixel-shadow-hover), var(--glow-cyan);
    transform: translate(-2px, -2px);
}

.pixel-btn--large {
    padding: var(--pixel-3x) calc(var(--pixel-4x) * 1.5);
    font-size: 0.875rem;
}

/* ============================================
   Hero Section
   ============================================ */
.fp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--fp-bg-dark) 0%, #312e81 50%, #1e1b4b 100%);
    overflow: hidden;
}

.fp-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pixel-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 2;
}

.fp-hero__content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--pixel-4x);
}

.fp-hero__title {
    font-size: clamp(2rem, 8vw, 5rem);
    margin: 0 0 var(--pixel-3x);
    color: var(--fp-text-light);
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.fp-hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--fp-accent-cyan);
    margin: 0 0 var(--pixel-4x);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.fp-hero__scroll-indicator {
    position: absolute;
    bottom: var(--pixel-4x);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.scroll-arrow {
    display: block;
    width: var(--pixel-2x);
    height: var(--pixel-2x);
    border-right: 3px solid var(--fp-accent-cyan);
    border-bottom: 3px solid var(--fp-accent-cyan);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
    50% { transform: rotate(45deg) translateY(10px); opacity: 0.5; }
}

/* ============================================
   Features Section
   ============================================ */
.fp-features {
    padding: calc(var(--pixel-4x) * 3) 0;
    background: var(--fp-bg-primary);
}

.fp-features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--pixel-4x);
}

.feature-card {
    background: var(--fp-bg-secondary);
    padding: var(--pixel-4x);
    text-align: center;
    border: 4px solid transparent;
    box-shadow: var(--pixel-shadow);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--fp-accent-indigo), var(--fp-accent-cyan), var(--fp-accent-pink));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--fp-accent-indigo);
    box-shadow: var(--pixel-shadow-hover), var(--glow-indigo);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--pixel-3x);
}

/* Pixel Icons */
.pixel-icon {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
}

.pixel-icon--code {
    background: linear-gradient(135deg, var(--fp-accent-indigo), var(--fp-accent-cyan));
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.pixel-icon--design {
    background: linear-gradient(135deg, var(--fp-accent-pink), var(--fp-accent-indigo));
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-.28 0-.5.22-.5.5 0 .12.05.23.13.33.41.47.64 1.06.64 1.67A2.5 2.5 0 0112 22zm0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c.28 0 .5-.22.5-.5a.54.54 0 00-.14-.35c-.41-.46-.63-1.05-.63-1.65a2.5 2.5 0 012.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7z'/%3E%3Ccircle cx='6.5' cy='11.5' r='1.5'/%3E%3Ccircle cx='9.5' cy='7.5' r='1.5'/%3E%3Ccircle cx='14.5' cy='7.5' r='1.5'/%3E%3Ccircle cx='17.5' cy='11.5' r='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 22C6.49 22 2 17.51 2 12S6.49 2 12 2s10 4.04 10 9c0 3.31-2.69 6-6 6h-1.77c-.28 0-.5.22-.5.5 0 .12.05.23.13.33.41.47.64 1.06.64 1.67A2.5 2.5 0 0112 22zm0-18c-4.41 0-8 3.59-8 8s3.59 8 8 8c.28 0 .5-.22.5-.5a.54.54 0 00-.14-.35c-.41-.46-.63-1.05-.63-1.65a2.5 2.5 0 012.5-2.5H16c2.21 0 4-1.79 4-4 0-3.86-3.59-7-8-7z'/%3E%3Ccircle cx='6.5' cy='11.5' r='1.5'/%3E%3Ccircle cx='9.5' cy='7.5' r='1.5'/%3E%3Ccircle cx='14.5' cy='7.5' r='1.5'/%3E%3Ccircle cx='17.5' cy='11.5' r='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.pixel-icon--rocket {
    background: linear-gradient(135deg, var(--fp-accent-cyan), var(--fp-accent-lime));
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2.5s4.5 2.04 4.5 10.5c0 2.49-1.04 5.57-1.6 7H9.1c-.56-1.43-1.6-4.51-1.6-7C7.5 4.54 12 2.5 12 2.5zm0 5a2 2 0 100 4 2 2 0 000-4zm-4.5 10c-.83 1.82-1.5 3-1.5 3h4l-1-3h-1.5zm9 0h-1.5l-1 3h4s-.67-1.18-1.5-3z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2.5s4.5 2.04 4.5 10.5c0 2.49-1.04 5.57-1.6 7H9.1c-.56-1.43-1.6-4.51-1.6-7C7.5 4.54 12 2.5 12 2.5zm0 5a2 2 0 100 4 2 2 0 000-4zm-4.5 10c-.83 1.82-1.5 3-1.5 3h4l-1-3h-1.5zm9 0h-1.5l-1 3h4s-.67-1.18-1.5-3z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.pixel-icon--shield {
    background: linear-gradient(135deg, var(--fp-accent-lime), var(--fp-accent-indigo));
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.feature-card__title {
    font-family: var(--font-pixel);
    font-size: 0.75rem;
    color: var(--fp-text-primary);
    margin: 0 0 var(--pixel-2x);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feature-card__text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--fp-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   About Section
   ============================================ */
.fp-about {
    padding: calc(var(--pixel-4x) * 3) 0;
    background: var(--fp-bg-secondary);
}

.fp-about__grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: calc(var(--pixel-4x) * 2);
    align-items: center;
}

@media (max-width: 768px) {
    .fp-about__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.pixel-frame {
    position: relative;
    padding: var(--pixel-unit);
    background: linear-gradient(135deg, var(--fp-accent-indigo), var(--fp-accent-cyan));
    box-shadow: var(--pixel-shadow);
}

.pixel-avatar {
    width: 100%;
    aspect-ratio: 1;
    background: var(--fp-bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.pixel-avatar::after {
    content: '🎮';
}

.fp-about__content .section-title {
    text-align: left;
}

@media (max-width: 768px) {
    .fp-about__content .section-title {
        text-align: center;
    }
}

.fp-about__text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--fp-text-secondary);
    margin: 0 0 var(--pixel-4x);
}

.fp-about__stats {
    display: flex;
    gap: var(--pixel-4x);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .fp-about__stats {
        justify-content: center;
    }
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    color: var(--fp-accent-indigo);
    margin-bottom: var(--pixel-unit);
}

.stat-label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--fp-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   CTA Section
   ============================================ */
.fp-cta {
    padding: calc(var(--pixel-4x) * 3) 0;
    background: linear-gradient(135deg, var(--fp-bg-dark) 0%, #312e81 100%);
}

.fp-cta__box {
    text-align: center;
    padding: calc(var(--pixel-4x) * 2);
    border: 4px solid var(--fp-accent-cyan);
    position: relative;
    box-shadow: var(--glow-cyan);
}

.fp-cta__box::before,
.fp-cta__box::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--fp-accent-cyan);
}

.fp-cta__box::before {
    top: -8px;
    left: -8px;
}

.fp-cta__box::after {
    bottom: -8px;
    right: -8px;
}

.fp-cta__title {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--fp-text-light);
    margin: 0 0 var(--pixel-2x);
}

.fp-cta__text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--fp-accent-cyan);
    margin: 0 0 var(--pixel-4x);
}

/* ============================================
   Scroll Animations (AOS-like)
   ============================================ */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 480px) {
    :root {
        --pixel-unit: 6px;
        --pixel-2x: 12px;
        --pixel-3x: 18px;
        --pixel-4x: 24px;
    }
    
    .pixel-btn {
        padding: var(--pixel-2x) var(--pixel-3x);
        font-size: 0.65rem;
    }
}
