/* ============================================
   SendSignals – 3D & Heading Animations
   Professional, clean, responsive
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-display: 'Outfit', 'DM Sans', sans-serif;
    --font-body: 'DM Sans', 'Inter', sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --perspective: 1200px;
    --card-3d-rotate-x: 8deg;
    --card-3d-rotate-y: 8deg;
}

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

/* Hero heading typography */
.hero-heading {
    font-family: var(--font-display);
}


/* ---- 3D card container ---- */
.card-3d-wrapper {
    perspective: var(--perspective);
    transform-style: preserve-3d;
}

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
    will-change: transform;
}

.card-3d:hover {
    transform: rotateX(calc(var(--card-3d-rotate-x) * -1)) rotateY(var(--card-3d-rotate-y)) translateZ(12px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* Section title: centered + color-changing animation for all section headings */
.section-title,
.section-title-animated,
.section-header .section-title,
.section-header h2,
.page-header h1,
h1, h2, h3 {
    text-align: center;
    width: 100%;
    display: block;
    line-height: 1;
}

.section-title,
.section-title-animated,
.section-header h2,
.page-header h1 {
    color: #0B2578;
}

.section-title-animated {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
    position: relative;
    padding-bottom: 0;
    line-height: 1;
}

/* Staggered children (for grids) */
.stagger-children > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.47s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.54s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}


/* Page load: content fade up (only when no admin) */
body:not(.admin-layout) main {
    animation: contentSlideUp 0.7s var(--ease-out-expo) both;
}

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

/* Scroll-triggered fade (enhanced) */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-3d .service-icon,
.card-3d .stat-value {
    transition: transform 0.25s ease;
}

.card-3d:hover .service-icon {
    transform: scale(1.02);
}

.card-3d:hover .stat-value {
    transform: scale(1.02);
}


/* Mobile tone down 3D */
@media (max-width: 768px) {
    .card-3d:hover {
        transform: translateY(-6px);
    }
    .heading-reveal .line .word {
        transition-duration: 0.4s;
    }
}
