/* Agena Digital Landing Page - Custom Styles */

/* CSS Custom Properties */
:root {
    /* Primary - Deep Space */
    --color-primary: #0a0f1a;
    --color-primary-light: #141b2d;
    --color-primary-dark: #050810;
    
    /* Accent Primary - Ciano */
    --color-accent-cyan: #00d4ff;
    --color-accent-cyan-light: #4de8ff;
    --color-accent-cyan-dark: #00a8cc;
    
    /* Accent Secondary - Violeta (diferenciação corporativa) */
    --color-accent-violet: #8b5cf6;
    --color-accent-violet-light: #a78bfa;
    --color-accent-violet-dark: #7c3aed;
    
    /* Text */
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0aec0;
    --color-text-muted: #718096;
    
    /* Metallic */
    --color-silver: #c0c5ce;
    --color-silver-dark: #8892a0;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0a0f1a 0%, #141b2d 50%, #0a0f1a 100%);
    --gradient-accent: linear-gradient(90deg, #00d4ff 0%, #8b5cf6 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', var(--font-primary);
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base body styles */
body {
    font-family: var(--font-primary);
    background-color: var(--color-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Display font for headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--color-accent-cyan);
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background-color: var(--color-accent-cyan);
    color: var(--color-primary);
}

/* ==========================================
   Header Styles
   ========================================== */

/* Header scroll state - solid background */
#header.scrolled {
    background-color: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Hamburger menu lines animation */
#mobile-menu-button.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobile-menu-button.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-button.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================
   Mobile Menu Styles
   ========================================== */

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(5, 8, 16, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 40;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Mobile menu slide-in panel */
#mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 320px;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* Mobile menu header with close button */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 64px;
}

/* Close button */
.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mobile-menu-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-close:focus-visible {
    outline: 2px solid var(--color-accent-cyan);
    outline-offset: 2px;
}

/* Close button X icon */
.mobile-menu-close svg {
    width: 24px;
    height: 24px;
    color: var(--color-text-secondary);
    transition: color 0.3s ease;
}

.mobile-menu-close:hover svg {
    color: var(--color-accent-cyan);
}

/* Mobile menu navigation */
.mobile-menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
}

.mobile-menu-nav a {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
    text-decoration: none;
    padding: 0.75rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a:focus {
    color: var(--color-accent-cyan);
    border-bottom-color: var(--color-accent-cyan);
}

/* Mobile menu footer */
.mobile-menu-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.mobile-menu-footer p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}


/* ==========================================
   Hero Section Styles
   ========================================== */

/* Hero section base */
#hero {
    background: var(--gradient-hero);
}

/* Hero background gradient overlay for depth */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--color-primary-dark) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Hero content container */
#hero > .relative.z-10 {
    z-index: 10;
}

/* Scroll indicator animation */
@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(6px);
        opacity: 1;
    }
}

#hero .animate-bounce {
    animation: scrollBounce 2s ease-in-out infinite;
}

/* Hero section responsive padding */
@media (max-width: 640px) {
    #hero > .relative.z-10 {
        padding-top: 6rem; /* Account for fixed header on mobile */
        padding-bottom: 4rem;
    }
}

@media (min-width: 641px) {
    #hero > .relative.z-10 {
        padding-top: 8rem; /* Account for fixed header on desktop */
    }
}

/* ==========================================
   Hero CTA Button Styles
   ========================================== */

/* Primary CTA - Gradient background */
.hero-cta-primary {
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.hero-cta-primary:hover {
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4), 0 4px 15px rgba(139, 92, 246, 0.3);
}

.hero-cta-primary:active {
    transform: scale(0.98);
}

/* Secondary CTA - Outline style */
.hero-cta-secondary {
    min-width: 200px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-cta-secondary:hover {
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.hero-cta-secondary:active {
    transform: scale(0.98);
}

/* CTA buttons responsive - full width on mobile */
@media (max-width: 639px) {
    .hero-cta-primary,
    .hero-cta-secondary {
        width: 100%;
        max-width: 300px;
    }
}

/* ==========================================
   Hero Animated Background
   ========================================== */

/* Animated background container */
#hero-background-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 2;
}

/* Grid pattern layer */
#hero-background-animation::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 8s ease-in-out infinite;
}

/* Constellation dots layer */
#hero-background-animation::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.15) 1px, transparent 1px),
        radial-gradient(circle at 30% 70%, rgba(139, 92, 246, 0.12) 1.5px, transparent 1.5px),
        radial-gradient(circle at 50% 30%, rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.15) 1.5px, transparent 1.5px),
        radial-gradient(circle at 90% 40%, rgba(0, 212, 255, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 20% 90%, rgba(139, 92, 246, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 10%, rgba(0, 212, 255, 0.15) 1.5px, transparent 1.5px),
        radial-gradient(circle at 40% 50%, rgba(139, 92, 246, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 60% 60%, rgba(0, 212, 255, 0.1) 1.5px, transparent 1.5px),
        radial-gradient(circle at 15% 45%, rgba(139, 92, 246, 0.15) 1px, transparent 1px),
        radial-gradient(circle at 85% 65%, rgba(0, 212, 255, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 45% 15%, rgba(139, 92, 246, 0.1) 1.5px, transparent 1.5px),
        radial-gradient(circle at 75% 35%, rgba(0, 212, 255, 0.15) 1px, transparent 1px),
        radial-gradient(circle at 25% 55%, rgba(139, 92, 246, 0.12) 1.5px, transparent 1.5px),
        radial-gradient(circle at 55% 85%, rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 95% 25%, rgba(139, 92, 246, 0.15) 1px, transparent 1px);
    background-size: 100% 100%;
    animation: constellationFloat 20s ease-in-out infinite;
}

/* Grid pulse animation - subtle opacity change */
@keyframes gridPulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.7;
    }
}

/* Constellation floating animation - subtle movement */
@keyframes constellationFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(5px, -5px) scale(1.02);
        opacity: 0.8;
    }
    50% {
        transform: translate(0, -10px) scale(1);
        opacity: 0.5;
    }
    75% {
        transform: translate(-5px, -5px) scale(1.02);
        opacity: 0.7;
    }
}

/* Radial glow effect for depth */
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    animation: glowPulse 10s ease-in-out infinite;
}

.hero-glow-cyan {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    top: 10%;
    left: 10%;
}

.hero-glow-violet {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    bottom: 20%;
    right: 15%;
    animation-delay: -5s;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    #hero-background-animation::before,
    #hero-background-animation::after,
    .hero-glow {
        animation: none;
    }
    
    #hero-background-animation::before {
        opacity: 0.5;
    }
    
    #hero-background-animation::after {
        opacity: 0.6;
        transform: none;
    }
    
    .hero-glow {
        opacity: 0.6;
    }
}


/* ==========================================
   Services Section Styles
   ========================================== */

/* Services section base */
#servicos {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-light) 50%, var(--color-primary) 100%);
}

/* Services background pattern */
.services-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
}

/* Glassmorphism card base */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 212, 255, 0.1);
}

/* Service card placeholder - subtle visual indicator */
.service-card-placeholder {
    position: relative;
    overflow: hidden;
}

.service-card-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0.5;
}

/* Services section responsive adjustments */
@media (max-width: 767px) {
    #servicos {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    .glass-card {
        min-height: 200px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* 2-column layout on tablets */
    #servicos .grid > div:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .glass-card {
        transition: none;
    }
    
    .glass-card:hover {
        transform: none;
    }
}


/* ==========================================
   Scroll Animation Styles
   ========================================== */

/* Fade in up animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered animation class */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger delay for cards */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .stagger-1,
    .stagger-2,
    .stagger-3,
    .stagger-4 {
        transition-delay: 0s;
    }
}


/* ==========================================
   Portfolio Section Styles
   ========================================== */

/* Portfolio section base */
#portfolio {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 50%, var(--color-primary) 100%);
}

/* Portfolio background pattern - subtle diagonal lines */
.portfolio-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(135deg, rgba(139, 92, 246, 0.02) 1px, transparent 1px),
        linear-gradient(225deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Portfolio featured card - enhanced glassmorphism */
.portfolio-featured-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(139, 92, 246, 0.05);
}

.portfolio-featured-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(139, 92, 246, 0.1),
        0 0 30px rgba(0, 212, 255, 0.05);
}

/* Portfolio section responsive adjustments */
@media (max-width: 767px) {
    #portfolio {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    .portfolio-featured-card {
        padding: 1.5rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .portfolio-featured-card {
        transition: none;
    }
    
    .portfolio-featured-card:hover {
        transform: none;
    }
}


/* ==========================================
   About Section Styles
   ========================================== */

/* About section base */
#sobre {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-light) 30%, var(--color-primary) 100%);
}

/* About background pattern - subtle constellation-like dots */
.about-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(139, 92, 246, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 85% 75%, rgba(0, 212, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 1.5px, transparent 1.5px),
        radial-gradient(circle at 25% 80%, rgba(0, 212, 255, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 75% 20%, rgba(139, 92, 246, 0.07) 1px, transparent 1px);
    background-size: 100% 100%;
}

/* About content container */
.about-content-container {
    position: relative;
}

/* About section responsive adjustments */
@media (max-width: 767px) {
    #sobre {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .about-bg-pattern {
        animation: none;
    }
}


/* ==========================================
   Contact Section Styles
   ========================================== */

/* Contact section base */
#contato {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 50%, var(--color-primary) 100%);
}

/* Contact background pattern - subtle grid with accent highlights */
.contact-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.06) 1px, transparent 1px);
    background-size: 60px 60px, 60px 60px, 100% 100%, 100% 100%;
}

/* Contact content container */
.contact-content-container {
    position: relative;
}

/* Contact section responsive adjustments */
@media (max-width: 767px) {
    #contato {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .contact-bg-pattern {
        animation: none;
    }
}


/* ==========================================
   MacBook Mockup Styles
   ========================================== */

.macbook-mockup-container {
    position: relative;
    padding: 1rem;
}

.macbook-wrapper {
    position: relative;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.macbook-wrapper:hover {
    transform: scale(1.02);
}

/* Responsive adjustments for MacBook mockup */
@media (max-width: 767px) {
    .macbook-mockup-container {
        padding: 0.5rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .macbook-wrapper:hover {
        transform: none;
    }
}
