/* === Custom Styles for Center for Creative Change Th === */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* === Hero Animations === */
.hero-fade {
    opacity: 0;
    animation: heroFadeIn 0.8s ease forwards;
}

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

.hero-orb {
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-2 {
    animation-delay: -3s;
    animation-duration: 10s;
}

.orb-3 {
    animation-delay: -5s;
    animation-duration: 12s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.05); }
    66% { transform: translate(-15px, 20px) scale(0.95); }
}

/* === Navbar === */
#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger to X */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* === Service Cards === */
.service-card {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), background 0.4s ease, border-color 0.4s ease;
}

.service-card.visible {
    animation: cardReveal 0.6s ease forwards;
}

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

/* === About Section === */
.about-image {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.about-image.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.2s;
}

.about-content.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-image-grid {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.3s;
}

.about-image-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Section Reveals === */
.section-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Image hover effects === */
.rounded-xl.overflow-hidden {
    overflow: hidden;
}

.rounded-xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* === Custom scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E87461;
}

/* === Selection color === */
::selection {
    background: rgba(232, 116, 97, 0.3);
    color: #f7f7f7;
}

/* === Focus visible === */
:focus-visible {
    outline: 2px solid #E87461;
    outline-offset: 2px;
}

/* === Responsive adjustments === */
@media (max-width: 768px) {
    .hero-orb {
        opacity: 0.6;
    }
}
