/**
 * MS Digital Branding - Bespoke Premium Stylesheet
 * High-Performance Modern Agency UI System
 */

:root {
    --bg-primary: #090d16;
    --bg-surface: #0f172a;
    --bg-surface-elevated: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(56, 189, 248, 0.3);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;

    --brand-primary: #38bdf8;
    --brand-secondary: #6366f1;
    --brand-accent: #a855f7;
    --brand-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);
    --brand-glow: 0 0 30px rgba(56, 189, 248, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography & Gradients */
.brand-text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-muted-custom {
    color: var(--text-muted) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Glassmorphism & Cards */
.glass-nav {
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-highlight);
    box-shadow: var(--brand-glow);
}

/* Custom Buttons */
.btn-brand-gradient {
    background: var(--brand-gradient);
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 9999px;
    position: relative;
    z-index: 1;
    transition: var(--transition-normal);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-brand-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-brand-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid var(--border-highlight);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 9999px;
    transition: var(--transition-normal);
}

.btn-brand-outline:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Section Header */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 16px;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--brand-primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
    margin-bottom: 16px;
}

/* Hero Section */
.hero-wrapper {
    position: relative;
    padding: 140px 0 100px;
    background: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.2) 0%, rgba(9, 13, 22, 0) 70%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.hero-stat-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

/* Service Card */
.service-icon-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--brand-primary);
    margin-bottom: 24px;
    transition: var(--transition-normal);
}

.glass-card:hover .service-icon-box {
    background: var(--brand-gradient);
    color: #ffffff;
    transform: scale(1.08) rotate(5deg);
}

/* Tech Stack Badges */
.tech-badge {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.tech-badge:hover {
    border-color: var(--brand-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Process Timeline */
.process-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

/* Accordion FAQ */
.custom-accordion .accordion-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) !important;
    margin-bottom: 14px;
    overflow: hidden;
}

.custom-accordion .accordion-button {
    background: var(--bg-surface);
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 20px 24px;
    box-shadow: none;
}

.custom-accordion .accordion-button:not(.collapsed) {
    background: var(--bg-surface-elevated);
    color: var(--brand-primary);
}

.custom-accordion .accordion-body {
    background: var(--bg-surface-elevated);
    color: var(--text-muted);
    padding: 0 24px 20px;
    line-height: 1.7;
}

/* Custom Form Inputs */
.form-control,
.form-select,
textarea.form-control,
input.form-control {
    background-color: #0b1329 !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    font-size: 0.95rem;
    border-radius: 10px;
    padding: 10px 14px;
}

.form-control::placeholder,
textarea.form-control::placeholder,
input.form-control::placeholder,
.form-custom::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus,
.form-custom:focus {
    background-color: #0f172a !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
    color: #ffffff !important;
}

.form-select option {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.form-label {
    color: #cbd5e1 !important;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

/* Custom Badges (Guaranteed High Contrast) */
.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.badge-tag-cyan {
    background: rgba(6, 182, 212, 0.15) !important;
    color: #22d3ee !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
}

.badge-tag-green {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.35) !important;
}

.badge-tag-purple {
    background: rgba(168, 85, 247, 0.15) !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.35) !important;
}

.badge-tag-amber {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

.badge-tag-blue {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

/* Footer */
.footer-wrapper {
    background: #060911;
    border-top: 1px solid var(--border-color);
    padding: 80px 0 30px;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-block;
    margin-bottom: 10px;
}

.footer-link:hover {
    color: var(--brand-primary);
    transform: translateX(4px);
}

/* ==========================================================================
   ADVANCED MOTION GRAPHICS & ANIMATION ENGINE
   ========================================================================== */

/* Keyframe Animations */
@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-14px) rotate(2deg);
    }
}

@keyframes floatReverse {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(14px) rotate(-2deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.45;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.08);
    }
}

@keyframes auroraFlow {
    0% {
        transform: rotate(0deg) scale(1);
        filter: blur(60px);
    }
    50% {
        transform: rotate(180deg) scale(1.15);
        filter: blur(80px);
    }
    100% {
        transform: rotate(360deg) scale(1);
        filter: blur(60px);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmerSweep {
    0% {
        transform: translateX(-100%) skewX(-15deg);
    }
    100% {
        transform: translateX(200%) skewX(-15deg);
    }
}

@keyframes laserLine {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Motion Graphic Utility Classes */
.motion-float {
    animation: floatSlow 6s ease-in-out infinite;
    will-change: transform;
}

.motion-float-reverse {
    animation: floatReverse 7s ease-in-out infinite;
    will-change: transform;
}

.motion-float-delayed {
    animation: floatSlow 8s ease-in-out 1.5s infinite;
    will-change: transform;
}

.motion-pulse {
    animation: pulseGlow 4s ease-in-out infinite;
    will-change: transform, opacity;
}

.motion-gradient-text {
    background: linear-gradient(135deg, #38bdf8, #818cf8, #c084fc, #38bdf8);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite;
}

/* Ambient Glowing Aurora Background Nodes */
.motion-glow-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: auroraFlow 16s linear infinite;
    mix-blend-mode: screen;
}

.glow-orb-primary {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, rgba(99, 102, 241, 0.08) 60%, transparent 70%);
}

.glow-orb-secondary {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, rgba(56, 189, 248, 0.06) 60%, transparent 70%);
}

/* Shimmer Button Effect */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 70%
    );
    transform: translateX(-100%) skewX(-20deg);
    pointer-events: none;
    transition: none;
}

.btn-shimmer:hover::after {
    animation: shimmerSweep 1.2s ease-in-out;
}

/* Scroll-Driven Reveal Engine */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.reveal-left {
    transform: translateX(-40px);
}

.reveal-on-scroll.reveal-right {
    transform: translateX(40px);
}

.reveal-on-scroll.reveal-scale {
    transform: scale(0.92);
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Stagger Delays */
.reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger > *:nth-child(8) { transition-delay: 0.54s; }

/* Interactive Hover Cards with Laser Glow */
.card-motion-interactive {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
}

.card-motion-interactive:hover {
    transform: translateY(-8px) scale(1.015);
    border-color: rgba(56, 189, 248, 0.45) !important;
    box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.35);
}

/* Animated Tech Pill Badges */
.motion-badge-pill {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.motion-badge-pill:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
}

/* Animated Stat Counter */
.counter-num {
    font-variant-numeric: tabular-nums;
    transition: all 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-wrapper {
        padding: 110px 0 60px;
    }
    .motion-glow-orb {
        width: 300px;
        height: 300px;
    }
}

