/**
 * Smooth Animations - Marina Sabater
 * Simple, clean entrance animations
 */

/* ==========================================================================
   Smooth Scroll
   ========================================================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

* {
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Hero Section - Fade In on Load
   ========================================================================== */

.hero-title-line {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-title-line:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

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

/* ==========================================================================
   Header Elements
   ========================================================================== */

.logo-text {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.1s forwards;
}

.social-icon {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.social-icon:nth-child(1) { animation-delay: 0.2s; }
.social-icon:nth-child(2) { animation-delay: 0.3s; }
.social-icon:nth-child(3) { animation-delay: 0.4s; }
.social-icon:nth-child(4) { animation-delay: 0.5s; }

.hamburger {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.4s forwards;
}

.scroll-indicator {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.8s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Scroll Animations - Trigger on Viewport Entry
   ========================================================================== */

.content-section,
.diferentes-section,
#gallerysection,
.footer-section {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.content-section.in-view,
.diferentes-section.in-view,
#gallerysection.in-view,
.footer-section.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Content Section Children
   ========================================================================== */

.content-quote,
.content-main,
.content-info {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.in-view .content-quote {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.content-section.in-view .content-main {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.content-section.in-view .content-info {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

/* ==========================================================================
   Diferentes Section Children
   ========================================================================== */

.gray-content {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.diferentes-section.in-view .gray-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.title-line {
    opacity: 0;
    transform: translateX(-2rem);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.diferentes-section.in-view .title-line {
    opacity: 1;
    transform: translateX(0);
}

.diferentes-section.in-view .title-line:nth-child(1) { transition-delay: 0.3s; }
.diferentes-section.in-view .title-line:nth-child(2) { transition-delay: 0.45s; }
.diferentes-section.in-view .title-line:nth-child(3) { transition-delay: 0.6s; }

.text-paragraph {
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.diferentes-section.in-view .text-paragraph {
    opacity: 1;
    transform: translateY(0);
}

.diferentes-section.in-view .text-paragraph:nth-child(1) { transition-delay: 0.7s; }
.diferentes-section.in-view .text-paragraph:nth-child(2) { transition-delay: 0.8s; }
.diferentes-section.in-view .text-paragraph:nth-child(3) { transition-delay: 0.9s; }
.diferentes-section.in-view .text-paragraph:nth-child(4) { transition-delay: 1s; }

.image-left,
.image-right {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.diferentes-section.in-view .image-left,
#gallerysection.in-view .image-left {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.3s;
}

.diferentes-section.in-view .image-right,
#gallerysection.in-view .image-right {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.5s;
}

/* ==========================================================================
   Gallery Section Children
   ========================================================================== */

.image-description,
.description-text {
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

#gallerysection.in-view .image-description {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}

#gallerysection.in-view .description-text {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Footer Section Children
   ========================================================================== */

.contact-title,
.contact-subtitle,
.contact-description,
.contact-form-container,
.contact-two-columns,
.footer-contact-info,
.footer-brand,
.footer-bottom {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.footer-section.in-view .contact-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.footer-section.in-view .contact-subtitle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.footer-section.in-view .contact-description {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.footer-section.in-view .contact-form-container {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.footer-section.in-view .contact-two-columns {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.footer-section.in-view .footer-contact-info {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.footer-section.in-view .footer-brand {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}

.footer-section.in-view .footer-bottom {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.8s;
}

/* ==========================================================================
   Scroll Indicator Bounce
   ========================================================================== */

.scroll-arrow {
    animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(0.5rem); }
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

