/* ITESV — motion, icons, micro-interactions */

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

    .hero-eyebrow,
    .hero-pills,
    .hero-description,
    .hero-buttons,
    .hero-stats,
    .hero-title .title-line {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    .hero-decor {
        display: none;
    }

    .reveal-item:not(.is-visible),
    .aos-header,
    .aos-cta {
        opacity: 1 !important;
        transform: none !important;
    }

    .reveal-item {
        opacity: 1 !important;
    }
}

/* —— Hero ambient motion —— */
.hero {
    isolation: isolate;
}

.hero-decor {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(56px);
    opacity: 0.42;
    animation: orbFloat 18s ease-in-out infinite;
}

.hero-orb:nth-child(1) {
    width: min(420px, 70vw);
    height: min(420px, 70vw);
    background: radial-gradient(circle, rgba(16, 185, 129, 0.32) 0%, transparent 70%);
    top: -12%;
    right: -8%;
    animation-delay: 0s;
}

.hero-orb:nth-child(2) {
    width: min(320px, 55vw);
    height: min(320px, 55vw);
    background: radial-gradient(circle, rgba(52, 211, 153, 0.24) 0%, transparent 68%);
    bottom: 5%;
    left: -6%;
    animation-delay: -6s;
    animation-duration: 22s;
}

.hero-orb:nth-child(3) {
    width: min(200px, 40vw);
    height: min(200px, 40vw);
    background: radial-gradient(circle, rgba(5, 150, 105, 0.28) 0%, transparent 65%);
    top: 42%;
    left: 38%;
    animation-delay: -10s;
    animation-duration: 15s;
    opacity: 0.28;
}

@keyframes orbFloat {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(3%, -4%) scale(1.05);
    }
    66% {
        transform: translate(-4%, 3%) scale(0.96);
    }
}

.hero-decor.is-parallax .hero-orb {
    animation: none;
    opacity: 0.5;
    transition: transform 0.35s ease-out;
}

/* Hero eyebrow & pills */
.hero-eyebrow {
    opacity: 0;
    animation: heroLineIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.06s forwards;
}

.hero-pills {
    opacity: 0;
    animation: heroLineIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.14s forwards;
}

/* Hero title entrance */
.hero-title .title-line {
    display: block;
    opacity: 0;
    animation: heroLineIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

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

@keyframes heroLineIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-description {
    opacity: 0;
    animation: heroLineIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: heroLineIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.58s forwards;
}

.hero-stats {
    opacity: 0;
    animation: heroLineIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.66s forwards;
}

.stat-item {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item:hover .stat-number {
    color: var(--emerald-600);
}

/* —— Section headers —— */
.aos-header {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.aos-header.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.section-tag {
    display: inline-block;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.aos-header.is-visible .section-tag {
    animation: tagPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes tagPop {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* —— Scroll reveals (only hide before visible so hover transforms still work) —— */
.reveal-item:not(.is-visible) {
    opacity: 0;
    transform: translateY(32px);
}

.reveal-item {
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-item.is-visible {
    opacity: 1;
}

/* —— Icons: service, value, product, etc. —— */
.service-icon,
.value-icon,
.product-icon,
.partner-icon,
.service-detail-icon,
.contact-card-icon,
.achievement-icon {
    position: relative;
}

.service-icon i,
.value-icon i,
.product-icon i,
.partner-icon i,
.service-detail-icon i {
    display: inline-block;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover .service-icon i,
.value-card:hover .value-icon i,
.product-card:hover .product-icon i,
.partner-card:hover .partner-icon i,
.service-detail-card:hover .service-detail-icon i {
    transform: scale(1.06);
}

.service-icon::after,
.value-icon::after,
.product-icon::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, transparent 72%);
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.service-card:hover .service-icon::after,
.value-card:hover .value-icon::after,
.product-card:hover .product-icon::after {
    opacity: 0.55;
    transform: scale(1);
}

/* —— Buttons —— */
.btn {
    position: relative;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.25s ease;
}

.btn-primary:hover {
    box-shadow: var(--shadow-emerald);
}

.btn-secondary:hover {
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: scale(0.98);
}

/* —— Cards: depth + border glow —— */
.service-card,
.testimonial-card,
.value-card,
.product-card,
.partner-card,
.contact-card-main,
.contact-info-box {
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.45s ease,
        border-color 0.35s ease;
}

/* —— CTA band —— */
.aos-cta {
    opacity: 0;
    transform: scale(0.98);
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.aos-cta.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* —— Page hero (inner pages) —— */
.page-hero {
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    display: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero .section-header {
    opacity: 0;
    transform: translateY(20px);
    animation: pageHeroIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

@keyframes pageHeroIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* —— Footer social —— */
.social-links a {
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        background 0.25s ease,
        border-color 0.25s ease;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.08);
}

.social-links a:active {
    transform: scale(0.95);
}

/* —— Service link arrow —— */
.service-link i.fa-arrow-right {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-link:hover i.fa-arrow-right {
    transform: translateX(5px);
}

/* —— Review card stars —— */
.testimonial-stars i {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.testimonial-card:hover .testimonial-stars i {
    transform: translateY(-1px);
}

.testimonial-stars i:nth-child(1) {
    transition-delay: 0s;
}
.testimonial-stars i:nth-child(2) {
    transition-delay: 0.03s;
}
.testimonial-stars i:nth-child(3) {
    transition-delay: 0.06s;
}
.testimonial-stars i:nth-child(4) {
    transition-delay: 0.09s;
}
.testimonial-stars i:nth-child(5) {
    transition-delay: 0.12s;
}

/* —— Nav icons (Font Awesome, semantic classes in HTML) —— */
.nav-link-icon {
    font-size: 0.88em;
    width: 1.125rem;
    text-align: center;
    color: var(--emerald-700);
    opacity: 0.88;
    transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover .nav-link-icon,
.nav-link.active .nav-link-icon {
    color: var(--emerald-800);
    opacity: 1;
    transform: translateY(-1px);
}

@media (max-width: 968px) {
    .nav-menu .nav-link {
        gap: 0.65rem;
    }

    .nav-menu .nav-link-icon {
        width: 1.25rem;
        font-size: 0.95em;
    }
}
