/* ============================================================
   Prompts2Prod — shared "facelift" animation system.
   Linked from index.html and every industry-*.html page.
   Tweak animations here once to update the whole site.
   All motion is disabled for users who prefer reduced motion.
   ============================================================ */

/* Animated gradient headline — subtle left-to-right shimmer */
.gradient-text {
    background: linear-gradient(110deg, #38bdf8, #3b82f6, #0ea5e9, #38bdf8);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-pan 6s linear infinite;
}
@keyframes gradient-pan {
    to { background-position: 250% center; }
}

/* Scroll progress bar (top of page) */
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(to right, #0ea5e9, #3b82f6);
    z-index: 60;
    transition: width 0.1s linear;
}

/* Scroll-reveal — elements fade + rise into view */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }

/* Hero — staggered entrance + drifting background icons (index) */
@keyframes hero-rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-rise {
    opacity: 0;
    animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-rise.d1 { animation-delay: 0.1s; }
.hero-rise.d2 { animation-delay: 0.25s; }
.hero-rise.d3 { animation-delay: 0.4s; }
.hero-rise.d4 { animation-delay: 0.55s; }

@keyframes drift {
    0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
    50%      { transform: translateY(-18px) rotate(var(--rot, 0deg)); }
}
#hero-icons > div {
    animation: drift 7s ease-in-out infinite;
}
#hero-icons > div:nth-child(2)  { animation-duration: 9s;  animation-delay: -1s; }
#hero-icons > div:nth-child(3)  { animation-duration: 8s;  animation-delay: -3s; }
#hero-icons > div:nth-child(4)  { animation-duration: 11s; animation-delay: -2s; }
#hero-icons > div:nth-child(5)  { animation-duration: 7.5s;animation-delay: -4s; }
#hero-icons > div:nth-child(6)  { animation-duration: 10s; animation-delay: -1.5s; }
#hero-icons > div:nth-child(7)  { animation-duration: 8.5s;animation-delay: -2.5s; }
#hero-icons > div:nth-child(8)  { animation-duration: 9.5s;animation-delay: -3.5s; }
#hero-icons > div:nth-child(9)  { animation-duration: 7s;  animation-delay: -0.5s; }
#hero-icons > div:nth-child(10) { animation-duration: 12s; animation-delay: -5s; }
#hero-icons > div:nth-child(11) { animation-duration: 8s;  animation-delay: -4.5s; }

/* Slow breathing glow behind the hero headline */
@keyframes glow-pulse {
    0%, 100% { opacity: 0.55; transform: translate(-50%, 0) scale(1); }
    50%      { opacity: 0.85; transform: translate(-50%, 0) scale(1.08); }
}
.glow-orb { animation: glow-pulse 8s ease-in-out infinite; }

/* "Live" pulse dot — signals the bot working autonomously */
.live-dot {
    position: relative;
    display: inline-flex;
    height: 0.5rem;
    width: 0.5rem;
}
.live-dot::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: currentColor;
    opacity: 0.75;
    animation: live-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.live-dot::after {
    content: "";
    position: relative;
    display: inline-flex;
    border-radius: 9999px;
    height: 0.5rem;
    width: 0.5rem;
    background: currentColor;
}
@keyframes live-ping {
    75%, 100% { transform: scale(2.4); opacity: 0; }
}

/* Card hover lift (pillars, use-cases, team, kanban) */
.lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease;
}
.lift:hover { transform: translateY(-6px); }

/* Typing indicator dots in chat mockups */
.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 1px;
    border-radius: 9999px;
    background: #94a3b8;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1; }
}

/* LLM router rows — auto-cycle the "Active" model (index) */
.llm-row {
    border: 1px solid #374151;
    background: rgba(17, 24, 39, 0.5);
    transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.llm-row.active {
    border-color: #0ea5e9;
    box-shadow: 0 12px 24px -10px rgba(14, 165, 233, 0.45);
}
.llm-active-overlay { opacity: 0; transition: opacity 0.5s ease; }
.llm-row.active .llm-active-overlay { opacity: 1; }
.llm-badge-active { display: none; }
.llm-row.active .llm-badge-active { display: inline-flex; }
.llm-row.active .llm-badge-standby { display: none; }

/* Nav shadow once the user scrolls */
#main-nav { transition: box-shadow 0.3s ease, background-color 0.3s ease; }
#main-nav.scrolled { box-shadow: 0 4px 24px -8px rgba(2, 132, 199, 0.25); }

/* Respect users who prefer reduced motion — disable all of it */
@media (prefers-reduced-motion: reduce) {
    .gradient-text { animation: none; }
    #hero-icons > div,
    .glow-orb,
    .live-dot::before,
    .typing-dot { animation: none !important; }
    .hero-rise { opacity: 1; animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    #scroll-progress { display: none; }
    html { scroll-behavior: auto; }
}
