/* =============================================
   APP ESPIÃO - Cyberpunk Futuristic Design System
   ============================================= */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    /* Colors */
    --color-bg-primary: #050810;
    --color-bg-secondary: #0a0f1c;
    --color-bg-card: rgba(10, 15, 30, 0.7);
    --color-neon-green: #00ff41;
    --color-neon-green-dim: rgba(0, 255, 65, 0.15);
    --color-neon-cyan: #00e5ff;
    --color-neon-cyan-dim: rgba(0, 229, 255, 0.1);
    --color-neon-red: #ff3d3d;
    --color-neon-red-dim: rgba(255, 61, 61, 0.15);
    --color-text-primary: #e8eaf6;
    --color-text-secondary: #9e9eab;
    --color-text-muted: #5a5a6e;
    --color-border: rgba(0, 255, 65, 0.12);
    --color-border-hover: rgba(0, 255, 65, 0.35);

    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --fs-xs: clamp(0.7rem, 1.5vw, 0.8rem);
    --fs-sm: clamp(0.8rem, 1.8vw, 0.9rem);
    --fs-base: clamp(0.95rem, 2vw, 1.05rem);
    --fs-lg: clamp(1.1rem, 2.5vw, 1.25rem);
    --fs-xl: clamp(1.5rem, 4vw, 2rem);
    --fs-2xl: clamp(2rem, 5vw, 2.8rem);
    --fs-3xl: clamp(2.5rem, 6vw, 3.5rem);
    --fs-counter: clamp(2.5rem, 7vw, 4rem);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows & Glows */
    --glow-green: 0 0 20px rgba(0, 255, 65, 0.3), 0 0 60px rgba(0, 255, 65, 0.1);
    --glow-green-strong: 0 0 30px rgba(0, 255, 65, 0.5), 0 0 80px rgba(0, 255, 65, 0.2);
    --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.25), 0 0 60px rgba(0, 229, 255, 0.08);
    --glow-red: 0 0 15px rgba(255, 61, 61, 0.3);

    /* Z-Index Scale */
    --z-bg: 0;
    --z-content: 10;
    --z-card: 20;
    --z-overlay: 30;
    --z-modal: 50;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.16, 1, 0.32, 1);
    --transition-normal: 250ms cubic-bezier(0.16, 1, 0.32, 1);
    --transition-slow: 400ms cubic-bezier(0.16, 1, 0.32, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

strong {
    font-weight: 700;
    color: var(--color-neon-green);
}

/* --- Animated Background Grid --- */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: var(--z-bg);
    background-image:
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* --- Scanline Overlay --- */
.scanline-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.008) 2px,
        rgba(0, 255, 65, 0.008) 4px
    );
}

/* --- Particle Canvas --- */
#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* --- Main Container --- */
.main-container {
    position: relative;
    z-index: var(--z-content);
    max-width: 680px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
    padding-bottom: var(--space-3xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    min-height: 100vh;
}

/* --- Hero Section --- */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg);
    padding-top: var(--space-2xl);
}

/* Status Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 16px;
    background: rgba(0, 255, 65, 0.06);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--color-neon-green);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-neon-green);
    box-shadow: 0 0 8px var(--color-neon-green);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Logo with Radar Rings */
.logo-container {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    width: 90px;
    height: 90px;
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 0 20px rgba(0, 255, 65, 0.4));
    animation: float 4s ease-in-out infinite;
    border-radius: 50%;
}

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

.radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 65, 0.25);
    animation: radar-pulse 3s ease-out infinite;
}

.ring-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.ring-2 {
    width: 130%;
    height: 130%;
    animation-delay: 1s;
}

.ring-3 {
    width: 160%;
    height: 160%;
    animation-delay: 2s;
}

@keyframes radar-pulse {
    0% {
        opacity: 0.6;
        transform: scale(0.85);
    }
    100% {
        opacity: 0;
        transform: scale(1.3);
    }
}

/* Hero Title */
.hero-title {
    font-size: var(--fs-2xl);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.title-icon {
    display: inline-flex;
    color: var(--color-neon-green);
    filter: drop-shadow(0 0 8px rgba(0, 255, 65, 0.5));
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-neon-green), var(--color-neon-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    position: relative;
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: var(--fs-lg);
    color: var(--color-text-secondary);
    max-width: 540px;
    line-height: 1.7;
}

/* --- Glass Card --- */
.glass-card {
    background: var(--color-bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    border-color: var(--color-border-hover);
}

/* --- CTA Card --- */
.cta-card {
    width: 100%;
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

/* CTA Button */
.cta-button {
    position: relative;
    width: 100%;
    min-height: 64px;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: linear-gradient(135deg, #009624, #00c853, #00e676);
    color: #050810;
    font-family: var(--font-primary);
    font-size: var(--fs-lg);
    font-weight: 800;
    letter-spacing: 0.04em;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--glow-green);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-normal);
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--glow-green-strong);
}

.cta-button:active {
    transform: translateY(0) scale(0.98);
}

.cta-button:focus-visible {
    outline: 2px solid var(--color-neon-green);
    outline-offset: 3px;
}

.cta-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.cta-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

/* Warning Badge */
.warning-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 20px;
    background: var(--color-neon-red-dim);
    border: 1px solid rgba(255, 61, 61, 0.25);
    border-radius: var(--radius-full);
    color: var(--color-neon-red);
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.05em;
    animation: subtle-pulse 2.5s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

.anon-text {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    text-align: center;
}

/* --- Features Grid --- */
.features-section {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.feature-item {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow-cyan);
}

.feature-icon-wrap {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-neon-green-dim);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: var(--radius-sm);
}

.feature-icon {
    width: 22px;
    height: 22px;
    color: var(--color-neon-green);
    filter: drop-shadow(0 0 4px rgba(0, 255, 65, 0.4));
}

.feature-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.feature-desc {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* --- Stats Section --- */
.stats-section {
    width: 100%;
}

.stats-card {
    position: relative;
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    overflow: hidden;
}

.stats-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.08), transparent 70%);
    pointer-events: none;
}

.stats-number {
    font-family: var(--font-mono);
    font-size: var(--fs-counter);
    font-weight: 700;
    color: var(--color-neon-green);
    text-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.stats-label {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-xs);
    position: relative;
    z-index: 2;
}

.stats-bar-container {
    margin-top: var(--space-lg);
    width: 100%;
    height: 3px;
    background: rgba(0, 255, 65, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.stats-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-neon-green), var(--color-neon-cyan));
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    transition: width 2s cubic-bezier(0.16, 1, 0.32, 1);
}

/* --- Footer --- */
.footer {
    width: 100%;
    text-align: center;
    padding-top: var(--space-md);
}

.footer-text {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    letter-spacing: 0.03em;
}

/* --- Scroll Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.32, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.32, 1);
    transition-delay: var(--delay, 0s);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */

/* Tablet */
@media (max-width: 768px) {
    .main-container {
        padding: var(--space-lg) var(--space-md);
        gap: var(--space-lg);
    }

    .hero-section {
        padding-top: var(--space-xl);
    }

    .cta-card {
        padding: var(--space-xl);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .main-container {
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .hero-section {
        padding-top: var(--space-lg);
        gap: var(--space-md);
    }

    .features-section {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .feature-item {
        flex-direction: row;
        align-items: center;
        padding: var(--space-md);
    }

    .cta-card {
        padding: var(--space-lg);
    }

    .cta-button {
        min-height: 56px;
        font-size: var(--fs-base);
    }

    .logo-container {
        width: 120px;
        height: 120px;
    }

    .hero-logo {
        width: 70px;
        height: 70px;
    }
}

/* Small mobile */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .stats-number {
        font-size: 2rem;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bg-grid {
        animation: none;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* --- High Contrast --- */
@media (prefers-contrast: high) {
    :root {
        --color-bg-primary: #000;
        --color-text-primary: #fff;
        --color-border: rgba(255, 255, 255, 0.5);
    }

    .glass-card {
        border-width: 2px;
    }
}
