/**
 * TSPL Premium CSS
 * ================
 * Supporting styles for all premium micro-interactions.
 * These CANNOT be replicated with Tailwind alone — they rely
 * on CSS custom properties set by JavaScript at runtime.
 */

/* ====================================================
   EFFECT 2: SPECULAR CARD SHEEN
   A radial gradient "light spot" positioned via --mx / --my
   CSS custom properties that are updated by JS on mousemove.
   The after-pseudo-element overlays the gradient independently
   of the card's own background, preserving glassmorphism.
   ==================================================== */
.has-specular {
    position: relative;
    overflow: hidden;
}

.has-specular::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 160px at var(--mx, 50%) var(--my, 50%),
            rgba(255, 78, 69, 0.14),
            rgba(255, 40, 30, 0.04) 40%,
            transparent 70%);
    pointer-events: none;
    border-radius: inherit;
    transition: opacity 0.2s;
    z-index: 10;
}


/* ====================================================
   EFFECT 3: CHAR-BY-CHAR STAGGER REVEAL
   Each .hero-char starts invisible + blurred + shifted down.
   The animation brings it to the final resting state.
   The animation-delay is set inline by JS per character.
   ==================================================== */
/* hero-char stagger removed — was animating 100+ spans simultaneously → jank source */


/* ====================================================
   EFFECT 4: GOLD CURSOR TRAIL
   Each particle is a fixed-positioned div with a gold
   radial-gradient fill. CSS custom properties --dx, --dy
   are set per-particle by JS with random values, creating
   unique trajectories for each.
   ==================================================== */
.cursor-trail-dot {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%,
            rgba(255, 120, 110, 1),
            rgba(255, 78, 69, 0.6) 50%,
            rgba(200, 40, 30, 0) 100%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    animation: trail-particle 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    will-change: transform, opacity;
}

@keyframes trail-particle {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }

    30% {
        opacity: 0.7;
    }

    100% {
        opacity: 0;
        transform:
            translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -60px))) rotate(var(--r, 180deg)) scale(0.1);
    }
}


/* ====================================================
   HERO GOLD GLOW — Pulsing luminous text effect
   Applied to the accent headline in the dark hero section.
   The 3-stop animation creates a breathing glow pattern
   that cannot be achieved with a simple CSS transition.
   ==================================================== */
/* GPU-compositor glow: filter: drop-shadow animates on compositor thread
   (no paint, no layout) — visually identical to text-shadow but jank-free. */
@keyframes gold-pulse-glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 78, 69, 0.4), 0 0 25px rgba(255, 40, 30, 0.2);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 78, 69, 0.7), 0 0 40px rgba(255, 78, 69, 0.4);
    }
}

.hero-gold-glow {
    animation: gold-pulse-glow 4s ease-in-out infinite;
}

/* ====================================================
   SCAN LINE EFFECT
   A thin horizontal beam that scans across the hero.
   ==================================================== */
.scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 78, 69, 0.2) 15%,
            rgba(255, 40, 30, 0.7) 50%,
            rgba(255, 78, 69, 0.2) 85%,
            transparent);
    box-shadow: 0 0 20px rgba(255, 78, 69, 0.4);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    animation: scan-move 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scan-move {
    0% {
        top: -5%;
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        top: 105%;
        opacity: 0;
    }
}

/* --- Ticker Refinement --- */
.premium-ticker-wrapper {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.ticker-item-label {
    font-size: 7px !important;
    letter-spacing: 0.2em !important;
    opacity: 0.6;
}

.ticker-item-value {
    font-size: 10px !important;
    font-weight: 800 !important;
}

/* --- Performance Tweaks --- */
.parallax-vertical,
.parallax-horizontal,
.perspective-container {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transition: none !important;
}

/* Eliminate any lingering transitions from specific containers */
.premium-ticker-wrapper,
.ticker-content,
.ticker-wrapper {
    transition: none !important;
}

.bg-grid-pattern {
    transform: translateZ(0);
    will-change: opacity;
}

/* ====================================================
   EFFECT 5: SVG DRAW ANIMATION
   ==================================================== */
.draw-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    pointer-events: none;
}

.active .draw-path,
.reveal.active .draw-path,
.reveal-up.active .draw-path {
    animation: drawSVG 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawSVG {
    from {
        stroke-dashoffset: 2000;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.svg-blueprint-glow {
    filter: drop-shadow(0 0 12px rgba(255, 78, 69, 0.4));
}

.tech-grid-bg {
    background-image: radial-gradient(rgba(15, 23, 42, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}