/* ============================================
   FENGÁRI - Animations & Effects
   ============================================ */

/* --- Reveal Animation (Scroll) --- */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* --- Hero Title Animation --- */
.hero__title-line {
    opacity: 0;
    transform: translateY(20px);
    animation: title-appear 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__title-line:nth-child(1) { animation-delay: 0.3s; }
.hero__title-line:nth-child(2) { animation-delay: 0.5s; }

@keyframes title-appear {
    to { opacity: 1; transform: translateY(0); }
}

/* --- Logo Moon Animation --- */
.logo-moon--1 {
    opacity: 0;
    animation: moon-appear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.8s;
}
.logo-moon--2 {
    opacity: 0;
    animation: moon-appear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.0s;
}
.logo-moon--3 {
    opacity: 0;
    animation: moon-appear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.2s;
}

@keyframes moon-appear {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Logo 3D Rotate on Scroll --- */
.nav__logo-svg {
    transition: transform 0.4s ease, color 0.3s ease;
    transform-style: preserve-3d;
}

/* --- Logo Orbit Animation (for use in special sections) --- */
@keyframes logo-orbit {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.logo-3d-spin {
    animation: logo-orbit 8s linear infinite;
    transform-style: preserve-3d;
}

/* --- Logo Color Shift (brand animation) --- */
@keyframes logo-color-shift {
    0%, 100% { fill: #1a2744; }
    33% { fill: #2a3f66; }
    66% { fill: #3b6cb5; }
}

.logo-color-animated circle {
    animation: logo-color-shift 6s ease-in-out infinite;
}

.logo-color-animated circle:nth-child(2) { animation-delay: 0.5s; }
.logo-color-animated circle:nth-child(3) { animation-delay: 1s; }

/* --- Card Hover Effect --- */
.discipline-card::after,
.program-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 108, 181, 0.04), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
    border-radius: inherit;
}

.discipline-card:hover::after,
.program-card:hover::after {
    left: 100%;
}

/* --- Gallery Hover Overlay --- */
.gallery__item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 39, 68, 0.4), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: inherit;
}

.gallery__item:hover::after { opacity: 1; }

/* --- Event Card Glow --- */
.event-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--color-accent-light), transparent, var(--color-accent-light));
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.event-card:hover::before { opacity: 0.3; }

/* --- Form Focus Animation --- */
.form__input:focus {
    animation: input-glow 0.3s ease;
}

@keyframes input-glow {
    0% { box-shadow: 0 0 0 0 var(--color-accent-glow); }
    100% { box-shadow: 0 0 0 3px var(--color-accent-glow); }
}

/* --- Counter Appear --- */
@keyframes count-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Scroll Indicator --- */
@keyframes scroll-hint {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(5px); }
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .hero__title-line { opacity: 1; transform: none; }
    .logo-moon--1, .logo-moon--2, .logo-moon--3 { opacity: 1; }
}
