/* ==========================================================================
   K&A Consulting - Custom Styles
   ========================================================================== */

/* CSS Custom Properties */
:root {
    /* Core Palette */
    --color-bg: #F8F7F4;
    --color-ink: #0F1116;
    --color-ink-muted: #4A4D57;
    --color-ink-subtle: #9496A1;
    --color-accent: #1A3A5C;
    --color-accent-mid: #2E6DA4;
    --color-accent-glow: #3D8BCD;
    --color-rule: #E2E0DC;
    --color-surface: #FFFFFF;
    
    /* Animation Timing */
    --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-fast: 300ms;
    --duration-normal: 500ms;
    --duration-slow: 800ms;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    font-feature-settings: "kern" 1, "liga" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Styling */
::selection {
    background-color: var(--color-accent);
    color: white;
}

/* ==========================================================================
   Navigation Styles
   ========================================================================== */

#navbar {
    transition: background-color 0.5s var(--ease-out-quint),
                backdrop-filter 0.5s var(--ease-out-quint),
                box-shadow 0.5s var(--ease-out-quint);
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Hero Animations
   ========================================================================== */

/* Initial states for animated elements */
.hero-eyebrow,
.hero-headline,
.hero-body,
.hero-cta,
.hero-visual {
    opacity: 0;
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn var(--duration-normal) var(--ease-out-quint) forwards;
}

.animate-slide-up {
    animation: slideUp var(--duration-normal) var(--ease-out-quint) forwards;
}

.animate-scale-in {
    animation: scaleIn var(--duration-normal) var(--ease-out-quint) forwards;
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Floating Cards Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* ==========================================================================
   Hero Image
   ========================================================================== */

/* ==========================================================================
   Service Cards Hover Effects
   ========================================================================== */

.service-card {
    transition: transform var(--duration-fast) var(--ease-out-quint),
                box-shadow var(--duration-fast) var(--ease-out-quint),
                border-color var(--duration-fast) var(--ease-out-quint);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ==========================================================================
   Client Logo Marquee
   ========================================================================== */

.marquee-container {
    width: 100%;
}

.marquee-track {
    width: fit-content;
}

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

.animate-marquee {
    animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .animate-marquee {
        animation: none;
    }
}

/* ==========================================================================
   Industry Cards
   ========================================================================== */

.industry-card {
    position: relative;
    overflow: hidden;
}

.industry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent-glow), transparent);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out-quint);
}

.industry-card:hover::before {
    opacity: 1;
}

/* ==========================================================================
   Stat Items
   ========================================================================== */

.stat-item {
    position: relative;
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--duration-fast) var(--ease-out-quint);
}

.stat-item:hover::after {
    width: 100%;
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-eyebrow,
    .hero-headline,
    .hero-body,
    .hero-cta,
    .hero-visual {
        opacity: 1;
    }
}

/* ==========================================================================
   Responsive Typography Adjustments
   ========================================================================== */

@media (max-width: 640px) {
    .hero-headline {
        font-size: 2.25rem;
        line-height: 1.1;
    }
}

/* ==========================================================================
   Scroll Reveal Animation Classes
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-slow) var(--ease-out-quint),
                transform var(--duration-slow) var(--ease-out-quint);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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

/* ==========================================================================
   EXPERT PAGE STYLES - Added March 2026
   ========================================================================== */

/* ─── Expert Card ─────────────────────────────────────────── */
.expert-card {
    background: var(--color-surface);
    border: 1px solid var(--color-rule);
    border-radius: 8px;
    padding: 28px;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.22, 1, 0.36, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.expert-card:hover {
    border-color: var(--color-accent-mid);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(26, 58, 92, 0.10);
}

.expert-card:hover .expert-card-arrow {
    transform: translateX(4px);
}

.expert-card-arrow {
    display: inline-block;
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Filter Pills ────────────────────────────────────────── */
.filter-pill {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    color: var(--color-ink-subtle);
    border: 1px solid var(--color-rule);
    border-radius: 999px;
    padding: 6px 16px;
    cursor: pointer;
    transition: all 200ms ease;
    background: transparent;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: var(--color-accent-mid);
    color: var(--color-accent-mid);
}

.filter-pill.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* ─── Expert Profile: Sticky Sidebar ─────────────────────── */
.expert-profile-sidebar {
    position: sticky;
    top: 100px;
    background: var(--color-surface);
    border: 1px solid var(--color-rule);
    border-radius: 8px;
    padding: 32px;
}

@media (max-width: 1023px) {
    .expert-profile-sidebar {
        position: relative;
        top: 0;
    }
}

/* ─── Expert Profile: Pull Quote Block ───────────────────── */
.expert-quote-block {
    background: rgba(26, 58, 92, 0.06);
    border-radius: 8px;
    padding: 32px;
    position: relative;
}

.expert-quote-block::before {
    content: '\201C';
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 96px;
    line-height: 0.8;
    color: rgba(26, 58, 92, 0.12);
    position: absolute;
    top: 20px;
    left: 24px;
}

/* ─── Expert Engagement Card ──────────────────────────────── */
.engagement-card {
    background: var(--color-bg);
    border-radius: 6px;
    padding: 16px 20px;
    border-left: 3px solid var(--color-accent-glow);
}

/* ─── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-ink-subtle);
}

.breadcrumb a { color: var(--color-ink-subtle); }
.breadcrumb a:hover { color: var(--color-accent-mid); }
.breadcrumb-sep { margin: 0 8px; color: var(--color-rule); }
.breadcrumb-current { color: var(--color-ink-muted); }

/* ─── Expertise Tags ──────────────────────────────────────── */
.expertise-tag {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    color: var(--color-ink-subtle);
    border: 1px solid var(--color-rule);
    border-radius: 999px;
    padding: 3px 10px;
    display: inline-block;
}

.expertise-tag-more {
    background: rgba(61, 139, 205, 0.15);
    border-color: transparent;
    color: var(--color-accent);
}

/* ─── Filter Bar Sticky ───────────────────────────────────── */
.filter-bar {
    position: sticky;
    top: 80px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-rule);
}

@media (max-width: 767px) {
    .filter-bar {
        position: relative;
        top: 0;
    }
    
    .filter-pills-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .filter-pills-container::-webkit-scrollbar {
        display: none;
    }
}

/* ─── Related Experts Carousel ────────────────────────────── */
.related-experts-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 8px;
}

.related-experts-container::-webkit-scrollbar {
    display: none;
}

.related-expert-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .related-expert-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

/* ─── Profile Page Animations ─────────────────────────────── */
.profile-fade-in {
    opacity: 0;
    animation: fadeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.profile-slide-up {
    opacity: 0;
    transform: translateY(16px);
    animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.profile-scale-in {
    opacity: 0;
    transform: scale(0.95);
    animation: scaleIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Animation Delays */
.delay-0 { animation-delay: 0ms; }
.delay-80 { animation-delay: 80ms; }
.delay-120 { animation-delay: 120ms; }
.delay-160 { animation-delay: 160ms; }
.delay-200 { animation-delay: 200ms; }
.delay-240 { animation-delay: 240ms; }
.delay-280 { animation-delay: 280ms; }
.delay-320 { animation-delay: 320ms; }

/* Expert Card Entrance */
.expert-card-wrapper {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.expert-card-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .expert-card-wrapper,
    .profile-fade-in,
    .profile-slide-up,
    .profile-scale-in {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
