/**
 * JAIK Solutions — Additional Animation Utilities
 *
 * Layered on top of style.css for decorative and micro-interaction effects.
 *
 * @package JaikSolutions
 */

/* ============================================================
   TEXT SHIMMER — animated gradient sweep on headings
   ============================================================ */
.text-shimmer {
    background: linear-gradient(
        120deg,
        var(--color-text-primary) 0%,
        var(--color-text-primary) 35%,
        var(--color-accent-teal) 50%,
        var(--color-text-primary) 65%,
        var(--color-text-primary) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

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

/* ============================================================
   GLOW LINE — animated top-border on cards
   ============================================================ */
.glow-line::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent-blue), var(--color-accent-teal), transparent);
    background-size: 200% 100%;
    animation: glowSlide 3s linear infinite;
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.glow-line:hover::after {
    opacity: 1;
}

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

/* ============================================================
   TYPING CURSOR — blinking caret for hero subtitle
   ============================================================ */
.typing-cursor::after {
    content: '|';
    display: inline-block;
    color: var(--color-accent-teal);
    animation: blink 0.8s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ============================================================
   COUNTER ANIMATION — odometer-style number reveal
   ============================================================ */
.counter-number {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: all 0.6s var(--ease-out-expo);
}

/* ============================================================
   TILT HOVER — subtle 3D perspective tilt on cards
   ============================================================ */
.tilt-hover {
    transition: transform 0.4s var(--ease-out-expo);
    will-change: transform;
}

/* ============================================================
   ANIMATED BORDER — rotating conic gradient border
   ============================================================ */
.animated-border {
    position: relative;
    z-index: 0;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        var(--color-accent-blue) 60deg,
        var(--color-accent-teal) 120deg,
        transparent 180deg
    );
    animation: rotateBorder 4s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.animated-border:hover::before {
    opacity: 1;
}

@keyframes rotateBorder {
    to { transform: rotate(360deg); }
}

/* ============================================================
   PULSE RING — concentric pulse on icons
   ============================================================ */
.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--color-accent-blue);
    border-radius: inherit;
    opacity: 0;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* ============================================================
   MARQUEE — infinite horizontal scroll for trust logos
   ============================================================ */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

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

/* ============================================================
   PARALLAX UTILITY — subtle depth layers
   ============================================================ */
.parallax-slow {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ============================================================
   WOW ICON (for What-We-Do large bg icons)
   ============================================================ */
.wwd-icon-large {
    font-size: 8rem !important;
    opacity: 0.08;
    animation: float 6s ease-in-out infinite;
}

/* ============================================================
   LOADING SPINNER (for contact form)
   ============================================================ */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   PAGE TRANSITION OVERLAY
   ============================================================ */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-bg-primary);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Text alignment utility */
.text-center { text-align: center; }

/* ============================================================
   HOLOGRAPHIC SHINE — Iridescent shimmer on glass cards
   Inspired by css-references/Holographic-Name-Card
   ============================================================ */
.glass-card:not(.pricing-card)::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(79, 125, 245, 0.04) 30%,
        rgba(0, 212, 170, 0.06) 40%,
        rgba(124, 92, 252, 0.04) 50%,
        rgba(0, 229, 255, 0.06) 60%,
        rgba(79, 125, 245, 0.04) 70%,
        transparent 80%
    );
    background-size: 250% 100%;
    opacity: 0;
    mix-blend-mode: screen;
    transition: opacity 0.5s ease, background-position 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.glass-card:not(.pricing-card):hover::after {
    opacity: 1;
    animation: holoShine 3s ease-in-out infinite alternate;
}

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

/* ============================================================
   ANIMATED GRADIENT BORDER — WWD Cards on hover
   Inspired by css-references/Holographic-Name-Card border glow
   Uses outline + box-shadow to avoid conflict with ::before
   ============================================================ */
.wwd-card {
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.wwd-card:hover {
    border-color: rgba(79, 125, 245, 0.3);
    box-shadow:
        0 0 30px rgba(79, 125, 245, 0.08),
        0 0 60px rgba(0, 212, 170, 0.05),
        inset 0 0 30px rgba(79, 125, 245, 0.03);
}

/* ============================================================
   TECH BADGE — Enhanced hover with glow
   ============================================================ */
.tech-badge {
    transition: all var(--transition-base);
    cursor: default;
}

.tech-badge:hover {
    border-color: var(--color-accent-blue);
    color: var(--color-text-primary);
    background: rgba(79, 125, 245, 0.08);
    box-shadow: 0 0 16px rgba(79, 125, 245, 0.2), 0 0 4px rgba(79, 125, 245, 0.1);
    transform: translateY(-2px);
}

/* ============================================================
   CARD ICON PULSE — Subtle glow pulse on card icons hover
   ============================================================ */
.card-icon {
    transition: all var(--transition-base);
}

.glass-card:hover .card-icon--blue {
    box-shadow: 0 0 24px rgba(79, 125, 245, 0.3);
}

.glass-card:hover .card-icon--teal {
    box-shadow: 0 0 24px rgba(0, 212, 170, 0.3);
}

.glass-card:hover .card-icon--purple {
    box-shadow: 0 0 24px rgba(124, 92, 252, 0.3);
}

.glass-card:hover .card-icon--cyan {
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.3);
}

/* ============================================================
   TECH BADGE TOOLTIP — Animated hover tooltip with description
   ============================================================ */
.tech-badge[data-tooltip] {
    position: relative;
    cursor: pointer;
}

.tech-badge[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.92);
    width: max-content;
    max-width: 280px;
    padding: 0.75rem 1rem;
    background: rgba(16, 20, 56, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(79, 125, 245, 0.25);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(79, 125, 245, 0.1);
    transition: opacity 0.3s var(--ease-out-expo),
                transform 0.3s var(--ease-out-expo);
}

/* Tooltip arrow */
.tech-badge[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 10px;
    height: 10px;
    background: rgba(16, 20, 56, 0.96);
    border-right: 1px solid rgba(79, 125, 245, 0.25);
    border-bottom: 1px solid rgba(79, 125, 245, 0.25);
    border-radius: 0 0 2px 0;
    rotate: 45deg;
    pointer-events: none;
    opacity: 0;
    z-index: 101;
    transition: opacity 0.3s var(--ease-out-expo),
                transform 0.3s var(--ease-out-expo);
}

.tech-badge[data-tooltip]:hover::before,
.tech-badge[data-tooltip].tooltip-active::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.tech-badge[data-tooltip]:hover::after,
.tech-badge[data-tooltip].tooltip-active::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Light mode — white bg + black text for tooltip readability */
[data-theme="light"] .tech-badge[data-tooltip]::before {
    background: rgba(255, 255, 255, 0.97);
    color: #1a1e36;
    border-color: rgba(61, 106, 229, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 16px rgba(61, 106, 229, 0.06);
}

[data-theme="light"] .tech-badge[data-tooltip]::after {
    background: rgba(255, 255, 255, 0.97);
    border-right-color: rgba(61, 106, 229, 0.2);
    border-bottom-color: rgba(61, 106, 229, 0.2);
}

/* Ensure tooltips near left edge don't overflow */
.tech-stack .tech-badge:first-child[data-tooltip]::before {
    left: 0;
    transform: translateX(0) translateY(8px) scale(0.92);
}

.tech-stack .tech-badge:first-child[data-tooltip]:hover::before,
.tech-stack .tech-badge:first-child[data-tooltip].tooltip-active::before {
    transform: translateX(0) translateY(0) scale(1);
}

.tech-stack .tech-badge:first-child[data-tooltip]::after {
    left: 24px;
}

/* ============================================================
   PAGE TITLE — Layered text shadow hover effect
   Inspired by css-references/CSS-Text-Hover-Effects (2)
   Uses multi-layer text-shadow with brand palette colors
   ============================================================ */
.page-header h1,
.hero h1,
.home .jaik-section h2,
.home .cta-box h2 {
    transition: text-shadow 0.5s var(--ease-out-expo);
}

.page-title-effect {
    cursor: default;
}

.page-title-effect,
.page-title-effect .gsap-word-inner {
    text-shadow:
        0 0 0 transparent,
        0 0 0 transparent,
        0 0 0 transparent,
        0 0 0 transparent;
    transition: text-shadow 0.5s var(--ease-out-expo);
}

.page-title-effect:hover,
.page-title-effect:hover .gsap-word-inner {
    text-shadow:
        2px 2px 0 rgba(79, 125, 245, 0.6),
        4px 4px 0 rgba(124, 92, 252, 0.4),
        6px 6px 0 rgba(0, 212, 170, 0.3),
        8px 8px 16px rgba(79, 125, 245, 0.15);
    /* No letter-spacing change — prevents text reflow / line wrapping */
}

/* Allow text-shadow to show on gradient-text inside page titles */
.page-title-effect .gradient-text {
    transition: -webkit-text-fill-color 0.5s var(--ease-out-expo),
                text-shadow 0.5s var(--ease-out-expo);
}

.page-title-effect:hover .gradient-text,
.page-title-effect:hover .gradient-text .gsap-word-inner {
    -webkit-text-fill-color: var(--color-text-primary);
    text-shadow:
        2px 2px 0 rgba(0, 212, 170, 0.5),
        4px 4px 0 rgba(124, 92, 252, 0.35),
        6px 6px 0 rgba(79, 125, 245, 0.25),
        8px 8px 16px rgba(0, 212, 170, 0.12);
}

/* Subtle idle shimmer on page titles */
.page-title-effect .gsap-word-inner,
.page-title-effect .gsap-char {
    transition: text-shadow 0.4s ease, transform 0.4s var(--ease-out-expo);
}

/* ============================================================
   PRICING CARD — Enhanced featured card animated glow
   ============================================================ */
.pricing-card.featured {
    overflow: visible;
    animation: featuredGlow 3s ease-in-out infinite alternate;
}

@keyframes featuredGlow {
    0% {
        box-shadow: 0 0 30px rgba(0, 212, 170, 0.2),
                    0 0 60px rgba(0, 184, 148, 0.1);
    }
    100% {
        box-shadow: 0 0 50px rgba(0, 212, 170, 0.3),
                    0 0 100px rgba(0, 184, 148, 0.15),
                    0 0 20px rgba(0, 229, 255, 0.1);
    }
}

/* ============================================================
   SERVICE CARD — Hover shine sweep
   Inspired by css-references/CSS-Card-Hover-Effects face overlay
   ============================================================ */
.service-card {
    overflow: hidden;
}

.service-card .card-icon {
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.service-card:hover .card-icon {
    transform: scale(1.1);
}

/* ============================================================
   TEAM CARD — Enhanced portrait ring glow on hover (tiered)
   ============================================================ */
.team-card .portrait-wrap {
    transition: all 0.4s var(--ease-out-expo), box-shadow 0.6s ease;
}

.team-card--owner:hover .portrait-wrap {
    box-shadow:
        0 0 30px rgba(79, 125, 245, 0.4),
        0 0 60px rgba(79, 125, 245, 0.2),
        0 0 0 4px rgba(79, 125, 245, 0.2);
}

.team-card--operations:hover .portrait-wrap {
    box-shadow:
        0 0 24px rgba(0, 212, 170, 0.35),
        0 0 48px rgba(0, 212, 170, 0.15);
}

.team-card--lead:hover .portrait-wrap {
    box-shadow:
        0 0 20px rgba(124, 92, 252, 0.3),
        0 0 40px rgba(124, 92, 252, 0.15);
}

.team-card--developer:hover .portrait-wrap {
    box-shadow:
        0 0 16px rgba(0, 229, 255, 0.25),
        0 0 32px rgba(0, 229, 255, 0.1);
}

/* ============================================================
   SECTION KICKER — Breathing gradient text animation
   Letters cycle through brand palette colors smoothly
   ============================================================ */
.section-kicker {
    background: linear-gradient(
        90deg,
        var(--color-accent-teal) 0%,
        var(--color-accent-blue) 25%,
        var(--color-accent-purple) 50%,
        var(--color-accent-cyan) 75%,
        var(--color-accent-teal) 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: kickerBreathe 6s ease-in-out infinite;
}

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

/* Override: ensure the dash ::before stays as solid teal bar */
.section-kicker::before {
    -webkit-text-fill-color: var(--color-accent-teal);
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
}

