/* ============================================
   PROFESSOR DANJUMA SALE - ANIMATIONS
   Cinematic Animation System (Enhanced)
   ============================================ */

/* ===== Keyframe Animations ===== */

/* Enhanced Image Slider - Crossfade with Scale */
@keyframes heroSlideIn {
    0% {
        opacity: 0;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes heroSlideOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.05);
    }
}

/* Ken Burns Effect for Hero Slider */
@keyframes kenBurns1 {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.15) translate(-2%, -1%);
    }
}

@keyframes kenBurns2 {
    0% {
        transform: scale(1.1) translate(-1%, 0);
    }

    100% {
        transform: scale(1) translate(1%, 1%);
    }
}

@keyframes kenBurns3 {
    0% {
        transform: scale(1.05) translate(1%, -1%);
    }

    100% {
        transform: scale(1.2) translate(-1%, 0);
    }
}

/* Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Scroll Indicator Bounce (y = [0, 8, 0]) */
@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

/* Reveal Lines */
@keyframes revealLine {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Text Reveal */
@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* Gradient Text Shimmer */
@keyframes gradientShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Pulsing Dot */
@keyframes pulseDot {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.7);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(201, 162, 39, 0);
    }
}

/* Counter Animation Support */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Particles */
@keyframes floatParticle {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }

    25% {
        transform: translate(10px, -20px) rotate(90deg);
        opacity: 0.5;
    }

    50% {
        transform: translate(-5px, -40px) rotate(180deg);
        opacity: 0.3;
    }

    75% {
        transform: translate(15px, -60px) rotate(270deg);
        opacity: 0.4;
    }
}

/* ===== Animation Utility Classes ===== */

/* Fade animations - triggered by JS */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-up {
    opacity: 0;
    transform: translateY(40px);
}

.animate-fade-up.animated {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-down {
    opacity: 0;
    transform: translateY(-40px);
}

.animate-fade-down.animated {
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-left {
    opacity: 0;
    transform: translateX(-40px);
}

.animate-fade-left.animated {
    animation: fadeInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-fade-right {
    opacity: 0;
    transform: translateX(40px);
}

.animate-fade-right.animated {
    animation: fadeInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.9);
}

.animate-scale-in.animated {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger animation delays per specification */
.stagger-1 {
    animation-delay: 0.2s;
}

/* Badge */
.stagger-2 {
    animation-delay: 0.4s;
}

/* Hero Title line 1 */
.stagger-3 {
    animation-delay: 0.5s;
}

/* Hero Title line 2 */
.stagger-4 {
    animation-delay: 0.6s;
}

/* Credentials */
.stagger-5 {
    animation-delay: 0.7s;
}

/* Subtitle */
.stagger-6 {
    animation-delay: 0.9s;
}

/* CTA Buttons */
.stagger-7 {
    animation-delay: 1.1s;
}

/* Stats */
.stagger-8 {
    animation-delay: 1.3s;
}

/* Continuous animations */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ===== Hero Section Animations ===== */

/* Hero Image Slider with crossfade + scale */
.hero-slider {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1.2s ease-in-out, transform 1.2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide.exiting {
    opacity: 0;
    transform: scale(1.05);
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Ken Burns on active slides */
.hero-slide.active:nth-child(1) img {
    animation: kenBurns1 12s ease-in-out infinite alternate;
}

.hero-slide.active:nth-child(2) img {
    animation: kenBurns2 12s ease-in-out infinite alternate;
}

.hero-slide.active:nth-child(3) img {
    animation: kenBurns3 12s ease-in-out infinite alternate;
}

/* Hero Overlays - Horizontal fade left → right */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(10, 15, 26, 0.95) 0%,
            rgba(10, 15, 26, 0.85) 30%,
            rgba(10, 15, 26, 0.6) 70%,
            rgba(10, 15, 26, 0.4) 100%);
    z-index: 1;
}

/* Vertical fade bottom → top */
.hero-overlay-vertical {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(10, 15, 26, 1) 0%,
            transparent 40%,
            rgba(10, 15, 26, 0.4) 100%);
    z-index: 2;
}

/* Pattern overlay for visual depth */
.hero-overlay-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.05) 0%, transparent 50%);
    z-index: 3;
    pointer-events: none;
}

/* Floating particles layer */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.hero-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 15s linear infinite;
}

.hero-particle:nth-child(1) {
    left: 10%;
    top: 90%;
    animation-delay: 0s;
}

.hero-particle:nth-child(2) {
    left: 20%;
    top: 85%;
    animation-delay: 2s;
}

.hero-particle:nth-child(3) {
    left: 30%;
    top: 92%;
    animation-delay: 4s;
}

.hero-particle:nth-child(4) {
    left: 70%;
    top: 88%;
    animation-delay: 1s;
}

.hero-particle:nth-child(5) {
    left: 80%;
    top: 95%;
    animation-delay: 3s;
}

.hero-particle:nth-child(6) {
    left: 90%;
    top: 90%;
    animation-delay: 5s;
}

/* Hero Content Animation */
.hero-content {
    position: relative;
    z-index: 10;
}

/* Hero Badge with pulsing dot */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-5);
    background: rgba(201, 162, 39, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--accent-gold);
    margin-bottom: var(--space-8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 50%;
    animation: pulseDot 2s ease-in-out infinite;
}

/* Hero Title - Playfair Display, gradient text */
.hero-title {
    font-family: var(--font-serif);
    font-size: var(--text-6xl);
    font-weight: var(--font-bold);
    line-height: 1.1;
    margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--text-6xl);
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: var(--text-7xl);
    }
}

.hero-title-line {
    display: block;
    overflow: hidden;
}

.hero-title-text {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
}

.hero-title-text.animated {
    animation: textReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Gradient text with shimmer effect */
.text-gradient {
    background: linear-gradient(135deg,
            var(--text-primary) 0%,
            var(--accent-gold) 50%,
            var(--accent-gold-light) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShimmer 4s ease infinite;
}

/* Hero Credentials - Playfair Display, gold */
.hero-credentials {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--accent-gold);
    margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
    .hero-credentials {
        font-size: var(--text-2xl);
    }
}

/* Hero Subtitle - Inter Light */
.hero-subtitle {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-light);
    color: var(--text-secondary);
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--space-4);
    line-height: var(--leading-snug);
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: var(--text-xl);
    }
}

.hero-description {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: var(--space-10);
    line-height: var(--leading-relaxed);
}

@media (min-width: 768px) {
    .hero-description {
        font-size: var(--text-lg);
    }
}

/* Hero Stats - Serif numbers, accent color */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    margin-bottom: var(--space-10);
}

.hero-stat {
    position: relative;
}

.hero-stat::after {
    content: '';
    position: absolute;
    right: calc(-1 * var(--space-4));
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, var(--surface-glass-border), transparent);
}

.hero-stat:last-child::after {
    display: none;
}

.hero-stat-number {
    font-family: var(--font-serif);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--accent-gold);
    line-height: var(--leading-none);
}

@media (min-width: 768px) {
    .hero-stat-number {
        font-size: var(--text-4xl);
    }
}

.hero-stat-label {
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    margin-top: var(--space-1);
}

/* Hero CTAs */
.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

/* Hero Scroll Indicator - bounce y=[0,8,0], delay 2s */
.hero-scroll {
    position: absolute;
    bottom: var(--space-8);
    right: var(--space-8);
    z-index: 10;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    opacity: 0;
    animation: fadeIn 0.5s ease-out 2s forwards;
}

@media (min-width: 1024px) {
    .hero-scroll {
        display: flex;
    }
}

.hero-scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent-gold), transparent);
    animation: scrollBounce 1.5s ease-in-out infinite;
}

.hero-scroll-icon {
    width: 24px;
    height: 40px;
    border: 2px solid var(--surface-glass-border);
    border-radius: var(--radius-full);
    position: relative;
    animation: scrollBounce 1.5s ease-in-out infinite;
}

.hero-scroll-icon::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: var(--radius-full);
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0.3;
    }
}

/* Slider Navigation Dots */
.slider-dots {
    position: absolute;
    bottom: var(--space-10);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: var(--space-3);
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.slider-dot.active {
    background: var(--accent-gold);
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.5);
}

.slider-dot:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.4);
}

.slider-dot.active:hover {
    background: var(--accent-gold);
}

/* ===== Section Reveal Animations ===== */
.reveal-section {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Parallax Layers ===== */
.parallax-container {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    inset: -20%;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* ===== Interactive Hover Effects ===== */

/* Button hover lift effect */
.btn-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-lift:hover {
    transform: translateY(-3px);
}

/* Card Lift Effect */
.card-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.card-lift:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(201, 162, 39, 0.15);
}

/* Link Underline Effect */
.link-hover {
    position: relative;
    display: inline-block;
}

.link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-hover:hover::after {
    width: 100%;
}

/* ===== Loading States ===== */
.skeleton {
    background: linear-gradient(90deg,
            var(--surface-card) 0%,
            var(--surface-card-hover) 50%,
            var(--surface-card) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ===== Counter Animation Support ===== */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ===== Timeline Animation ===== */
.timeline-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.animated {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Grid Item Stagger ===== */
.grid-stagger>* {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-stagger.animated>*:nth-child(1) {
    transition-delay: 0s;
}

.grid-stagger.animated>*:nth-child(2) {
    transition-delay: 0.1s;
}

.grid-stagger.animated>*:nth-child(3) {
    transition-delay: 0.2s;
}

.grid-stagger.animated>*:nth-child(4) {
    transition-delay: 0.3s;
}

.grid-stagger.animated>*:nth-child(5) {
    transition-delay: 0.4s;
}

.grid-stagger.animated>*:nth-child(6) {
    transition-delay: 0.5s;
}

.grid-stagger.animated>* {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive Animation Adjustments ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-stats {
        gap: var(--space-6);
    }

    .hero-stat::after {
        display: none;
    }

    .reveal-section {
        transform: translateY(40px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide img {
        animation: none !important;
    }

    .animate-float,
    .animate-pulse {
        animation: none !important;
    }

    .hero-scroll {
        animation: none !important;
    }

    .text-gradient {
        animation: none !important;
    }
}