/* ===== TrueDigi Crystal Motion Design System ===== */

/* Base */
body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: #f9f9f9;
    color: #1a1c1c;
    overflow-x: hidden;
}

.font-headline { font-family: 'Lexend', sans-serif; }

/* Material Icons Fix */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}

/* ===== Crystal Gradients & Glass ===== */
.crystal-gradient {
    background: linear-gradient(135deg, #5f3add 0%, #7857f8 100%);
}

.text-gradient {
    background: linear-gradient(to right, #5f3add, #b70b67);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.glass-badge {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== Hero Shape ===== */
.hero-shape {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

/* ===== Marquee ===== */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Hover Effects ===== */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.hover-scale:hover {
    transform: scale(1.02);
}

/* ===== Navigation Links ===== */
.nav-link {
    color: #64748b;
    font-weight: 500;
    font-family: 'Be Vietnam Pro', sans-serif;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    padding-bottom: 4px;
}
.nav-link:hover {
    color: #7C5CFC;
}
.nav-link.active {
    color: #7C5CFC;
    font-weight: 700;
    border-bottom: 2px solid #7C5CFC;
}

.nav-link-mobile {
    color: #64748b;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    display: block;
    transition: all 0.3s ease;
}
.nav-link-mobile:hover,
.nav-link-mobile.active {
    color: #7C5CFC;
    font-weight: 700;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
    opacity: 0;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Floating Label Input ===== */
.floating-label-input:focus-within label,
.floating-label-input input:not(:placeholder-shown) + label,
.floating-label-input textarea:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.85);
    color: #5f3add;
}

/* ===== Comparison Table ===== */
.comparison-table tr:hover td {
    background-color: rgba(95, 58, 221, 0.02);
}

/* ===== Bento Grid Gradient ===== */
.bento-gradient-1 {
    background: linear-gradient(135deg, #5f3add 0%, #7857f8 100%);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f3f3f4;
}
::-webkit-scrollbar-thumb {
    background: #c9c4d8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7C5CFC;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-shape {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* ===== Selection ===== */
::selection {
    background-color: #e6deff;
    color: #5f3add;
}

/* ===== Float Animation for Hero Cards ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* ===== Image Zoom on Hover ===== */
.img-zoom-wrap {
    overflow: hidden;
}
.img-zoom-wrap img {
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.img-zoom-wrap:hover img {
    transform: scale(1.07);
}

/* ===== Card Hover Glow ===== */
.card-glow:hover {
    box-shadow: 0 20px 60px rgba(95, 58, 221, 0.12), 0 4px 16px rgba(95, 58, 221, 0.06);
}

/* ===== Gradient Text Animated ===== */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.text-gradient-animated {
    background: linear-gradient(270deg, #5f3add, #b70b67, #7857f8, #5f3add);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
}

/* ===== Section Divider Gradient ===== */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(95, 58, 221, 0.2), transparent);
}

/* ===== Portfolio Overlay ===== */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
}
.portfolio-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    transition: opacity 0.4s ease;
}
.portfolio-item:hover .overlay {
    background: linear-gradient(to top, rgba(95,58,221,0.85) 0%, rgba(0,0,0,0.3) 100%);
}

/* ===== Team Card ===== */
.team-card img {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.team-card:hover img {
    transform: scale(1.08);
}

/* ===== Blog Card ===== */
.blog-card {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
}

/* ===== Stat Highlight ===== */
.stat-highlight {
    position: relative;
    overflow: hidden;
}
.stat-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(95, 58, 221, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.stat-highlight:hover::before {
    opacity: 1;
}

/* ===== Slide-in from left ===== */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Slide-in from right ===== */
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Stagger children ===== */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children > *:nth-child(6) { transition-delay: 500ms; }

/* ===== Pulse dot ===== */
@keyframes pulseRing {
    0% { transform: scale(0.8); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(0.8); opacity: 0; }
}

/* ===== Badge Shine Effect ===== */
.badge-shine {
    position: relative;
    overflow: hidden;
}
.badge-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 3s ease-in-out infinite;
}
@keyframes shine {
    0% { left: -100%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

/* ===== Wavy underline ===== */
.wavy-underline {
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-color: #7857f8;
    text-underline-offset: 4px;
}

/* ===== Number counter glow ===== */
.counter-glow {
    text-shadow: 0 0 30px rgba(95, 58, 221, 0.3);
}

/* ===== Page transition ===== */
.page-fade-in {
    animation: pageFade 0.5s ease forwards;
}
@keyframes pageFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
