/* Kodoa Landing Page - Custom Styles */

/* Fade in on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Elements hidden by default */
.fade-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Visible state */
.fade-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Image overlay with reduced opacity */
.image-overlay {
    position: relative;
    overflow: hidden;
}

/* Hero pattern overlay - on top of everything */
.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(0deg, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 5;
    pointer-events: none;
}

.image-overlay > * {
    position: relative;
    z-index: 10;
}

/* Soft hover with extended transition */
.hover-lift {
    transition: all 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

/* Border animation */
.border-animate {
    position: relative;
}

.border-animate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #1B5E20;
    transition: width 400ms ease;
}

.border-animate:hover::after {
    width: 100%;
}

/* Mobile menu */
#mobile-menu {
    transition: max-height 300ms ease-out;
}

/* Image filters - more subtle */
.img-nature {
    filter: saturate(1.05) contrast(1.03);
    opacity: 0.65;
    transition: opacity 800ms ease;
}

.img-app {
    opacity: 1;
    transition: opacity 800ms ease;
}

/* Breathing animation */
@keyframes breathe {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.breathe {
    animation: breathe 4s ease-in-out infinite;
}

/* Breathing pattern animation - very subtle */
@keyframes breathe-pattern {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

.pattern-breathing {
    animation: breathe-pattern 6s ease-in-out infinite;
}

/* Text shadow subtle */
.text-shadow-soft {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hero background image with reduced opacity */
.hero-bg {
    background-color: #0D2910;
}

/* Image with reduced opacity and subtle animation */
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1760867191563-791f803e1bcd?q=90&w=2400');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
    animation: hero-bg-zoom 20s ease-in-out infinite;
}

/* Subtle zoom and translate animation for hero background */
@keyframes hero-bg-zoom {
    0%, 100% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.05) translate(1%, -1%);
    }
}

/* Hero floating animation - very subtle */
@keyframes hero-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-content {
    animation: hero-float 8s ease-in-out infinite;
}

/* Pattern overlays */
.pattern-code-grid {
    position: relative;
}

.pattern-code-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(0deg, rgba(13,41,16,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13,41,16,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1200ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.pattern-code-grid:hover::before {
    opacity: 1;
    background-image:
        linear-gradient(0deg, rgba(13,41,16,0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13,41,16,0.12) 1px, transparent 1px);
}

.pattern-circuit {
    position: relative;
}

.pattern-circuit::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('patterns/circuit-lines.svg');
    background-size: 300px 300px;
    background-repeat: repeat;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1200ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.pattern-circuit:hover::after {
    opacity: 1;
}

/* Text weight shift on hover - subtle */
a, button {
    font-variation-settings: 'wght' 300;
    transition: font-variation-settings 400ms ease, letter-spacing 400ms ease;
}

a:hover, button:hover {
    letter-spacing: 0.01em;
}

/* Input focus glow - very subtle */
input:focus, textarea:focus {
    box-shadow: 0 0 0 1px rgba(200, 230, 201, 0.3), 0 0 12px rgba(129, 199, 132, 0.15);
}

/* Cursor trail particle - more visible */
.cursor-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(129, 199, 132, 0.6) 0%, rgba(129, 199, 132, 0.3) 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: particle-fade 1000ms ease-out forwards;
}

@keyframes particle-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.2);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .cursor-particle {
        display: none;
    }
}

/* Parallax micro-shift */
.parallax-shift {
    transition: transform 100ms ease-out;
    will-change: transform;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 41, 16, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 300ms ease-out;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 4px;
    transform: translateY(20px);
    transition: transform 300ms ease-out;
}

.modal.active .modal-content {
    transform: translateY(0);
}
