Spaces:
Paused
Paused
File size: 26,584 Bytes
d8804ab cfaedfc 587459d d8804ab 6108588 d8804ab 587459d 5fa2c7a cfaedfc d8804ab 587459d d8804ab 587459d d8804ab a210ac1 d8804ab a210ac1 d8804ab a210ac1 d8804ab a210ac1 d8804ab a210ac1 d8804ab 587459d a210ac1 587459d cfaedfc 587459d d8804ab 587459d d8804ab cfaedfc d8804ab a210ac1 cfaedfc d8804ab cfaedfc 6108588 cfaedfc d8804ab 6108588 cfaedfc 6108588 cfaedfc 6108588 cfaedfc d8804ab cfaedfc d8804ab 6108588 d3aca8c 6108588 d8804ab a210ac1 d8804ab a210ac1 d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab 587459d d8804ab | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 | "use client";
import { useState, useEffect } from "react";
import { motion, useMotionValue, useTransform, useSpring, useReducedMotion } from "framer-motion";
import Image from "next/image";
import { WaitlistForm } from "./waitlist-form";
import { DiaTextReveal } from "./ui/dia-text-reveal";
import { AgentParticleCanvas } from "./AgentParticleCanvas";
import { ShimmerButton } from "@/components/ui/shimmer-button";
import { useLanguage } from "./LanguageContext";
const HERO_FEATURE_BADGES = [
"heroBadgeCompat",
"heroBadgeBilling",
"heroBadgeCompare",
"heroBadgeRouting",
"heroBadgeDashboard",
] as const;
export function HeroSection() {
const reducedMotion = useReducedMotion();
const { t } = useLanguage();
const [variant, setVariant] = useState<"classic" | "intelligence">("classic");
// variant is used via setVariant; state read happens through useEffect re-renders
void variant;
const scrollToWaitlist = () => {
const input = document.getElementById("email-input");
if (input) {
input.scrollIntoView({ behavior: "smooth", block: "center" });
setTimeout(() => input.focus(), 850);
}
};
const scrollToModels = () => {
document.getElementById("models")?.scrollIntoView({ behavior: "smooth", block: "start" });
};
const [isDesktop, setIsDesktop] = useState(false);
const [mounted, setMounted] = useState(false);
const [timeStr, setTimeStr] = useState("");
const [robotHovered, setRobotHovered] = useState(false);
const [rawMouse, setRawMouse] = useState({ x: 0, y: 0 });
// Determine A/B test variant on client mount
useEffect(() => {
const init = setTimeout(() => {
let savedVariant = localStorage.getItem("hubapi_hero_variant") as "classic" | "intelligence" | null;
// Fallback: check cookie as well
if (!savedVariant && typeof document !== "undefined") {
const match = document.cookie.match(/(^|;)\s*hubapi_hero_variant\s*=\s*([^;]+)/);
if (match) {
savedVariant = match[2] as "classic" | "intelligence";
}
}
if (!savedVariant) {
// 50/50 randomization
const selected = Math.random() < 0.5 ? "classic" : "intelligence";
localStorage.setItem("hubapi_hero_variant", selected);
if (typeof document !== "undefined") {
document.cookie = `hubapi_hero_variant=${selected}; path=/; max-age=${60 * 60 * 24 * 365}`;
}
savedVariant = selected;
}
setVariant(savedVariant);
}, 0);
return () => clearTimeout(init);
}, []);
// Check viewport for applying interactive parallax vs mobile float
useEffect(() => {
const checkViewport = () => {
setIsDesktop(window.innerWidth >= 1024);
};
checkViewport();
window.addEventListener("resize", checkViewport);
return () => window.removeEventListener("resize", checkViewport);
}, []);
// Update ticking clock on client only to prevent hydration mismatch
useEffect(() => {
const frame = requestAnimationFrame(() => {
setMounted(true);
});
const updateClock = () => {
setTimeStr(new Date().toISOString().substring(11, 19));
};
updateClock();
const interval = setInterval(updateClock, 1000);
return () => {
cancelAnimationFrame(frame);
clearInterval(interval);
};
}, []);
const disableThrusters = !!reducedMotion || (mounted && !isDesktop);
// Parallax motion values
const mouseX = useMotionValue(0);
const mouseY = useMotionValue(0);
// Smooth springs for the parallax
const springConfig = { damping: 25, stiffness: 150, mass: 0.5 };
const smoothMouseX = useSpring(mouseX, springConfig);
const smoothMouseY = useSpring(mouseY, springConfig);
// Map mouse values to rotations (-6 to 6 degrees)
const rotateX = useTransform(smoothMouseY, [-0.5, 0.5], [6, -6]);
const rotateY = useTransform(smoothMouseX, [-0.5, 0.5], [-6, 6]);
// Map mouse values to translations (-8px to 8px)
const translateX = useTransform(smoothMouseX, [-0.5, 0.5], [-8, 8]);
const translateY = useTransform(smoothMouseY, [-0.5, 0.5], [-8, 8]);
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
// Only apply parallax on desktop/when mouse is present
if (!isDesktop || reducedMotion) return;
const rect = e.currentTarget.getBoundingClientRect();
const x = (e.clientX - rect.left) / rect.width - 0.5; // -0.5 to 0.5
const y = (e.clientY - rect.top) / rect.height - 0.5; // -0.5 to 0.5
mouseX.set(x);
mouseY.set(y);
setRawMouse({ x, y });
};
const handleMouseLeave = () => {
mouseX.set(0);
mouseY.set(0);
setRawMouse({ x: 0, y: 0 });
};
return (
<div className="relative z-10 w-full min-h-screen flex items-center overflow-hidden">
{/* Dynamic Agent Neural Particle network canvas — behind content */}
<div className="absolute inset-y-0 right-0 rtl:left-0 rtl:right-auto w-full lg:w-[55%] pointer-events-none z-0">
<AgentParticleCanvas
className="w-full h-full opacity-60 dark:opacity-40"
mouseX={rawMouse.x}
mouseY={rawMouse.y}
isHovered={robotHovered}
/>
</div>
{/* HUD Telemetry Overlays - Minimal & Highly Refined */}
<div className="absolute top-28 left-6 rtl:right-6 rtl:left-auto font-mono text-[8px] text-primary/65 select-none tracking-widest hidden lg:block" aria-hidden="true">
LOC // 37.7749° N, 122.4194° W <br />
SEC // HUB_ALPHA_CORE
</div>
<div className="absolute bottom-10 left-6 rtl:right-6 rtl:left-auto font-mono text-[8px] text-primary/65 select-none tracking-widest hidden lg:block" aria-hidden="true">
SYS_CLOCK: {mounted ? timeStr : "--:--:--"} UTC
</div>
<div className="flex-1 w-full max-w-7xl mx-auto px-6 lg:px-12 relative z-20">
<section className="relative flex flex-col justify-center items-start py-20 lg:py-0 w-full lg:w-1/2">
{/* Symmetrical/Asymmetrical Sleek Gradient Vertical Accent */}
<div className="absolute -top-12 -left-4 rtl:-right-4 rtl:left-auto w-[2px] h-20 bg-gradient-to-b from-primary/40 to-transparent pointer-events-none hidden md:block" aria-hidden="true" />
<div className="w-full relative z-30">
<motion.div
initial={{ scaleX: 0, opacity: 0 }}
animate={{ scaleX: 1, opacity: 1 }}
transition={{ duration: 0.8, ease: "easeOut" }}
className="origin-left rtl:origin-right h-px w-full bg-gradient-to-r rtl:bg-gradient-to-l from-primary/60 via-primary/30 to-transparent"
></motion.div>
{/* A/B Test Variant Badge */}
<motion.div
initial={{ y: 20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.6, delay: 0.1 }}
className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-3 py-1 text-[9px] font-mono tracking-wider text-primary backdrop-blur-sm mt-6 mb-2 select-none"
>
<span className="relative flex h-1.5 w-1.5 mr-2 rtl:mr-0 rtl:ml-2">
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
<span className="relative inline-flex rounded-full h-1.5 w-1.5 bg-primary"></span>
</span>
{t("heroBadge")}
</motion.div>
<motion.div
initial={{ y: 40, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.6, delay: 0.2, ease: "easeOut" }}
className="mt-4 min-h-[72px] md:min-h-[120px]"
>
<h1 className="font-fast-hand text-[clamp(3.25rem,14vw,5.25rem)] lg:text-[clamp(3.9rem,4.8vw,5.5rem)] leading-none tracking-normal text-foreground">
<DiaTextReveal
text="HUBAPI"
duration={2.5}
colors={["#FFBE7B", "#FE8FB5", "#A07CFE"]}
/>
</h1>
</motion.div>
<motion.div
initial={{ y: 30, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.6, delay: 0.4, ease: "easeOut" }}
className="relative w-full space-y-4"
>
{/* Decorative vertical blueprint tag */}
<div className="absolute -left-5 rtl:-right-5 rtl:left-auto top-0 bottom-0 w-[2px] bg-primary/20 rounded-full hidden md:block" aria-hidden="true" />
<p className="mt-6 max-w-xl text-lg md:text-xl font-semibold text-foreground leading-snug tracking-tight">
{t("heroTagline")}
</p>
<p className="max-w-xl text-sm md:text-base text-muted-foreground leading-relaxed font-mono">
{t("heroSubtitle")}
</p>
<p className="max-w-xl text-sm md:text-base font-medium text-foreground/90 leading-relaxed font-mono">
{t("heroPunchline")}
</p>
<p className="max-w-xl text-xs sm:text-sm text-muted-foreground/80 leading-relaxed font-mono">
{t("heroSubtitleCost")}
</p>
</motion.div>
<motion.div
initial={{ y: 30, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.6, delay: 0.5, ease: "easeOut" }}
className="mt-8 flex flex-col sm:flex-row items-stretch sm:items-center gap-3 relative z-30"
>
<ShimmerButton
type="button"
onClick={scrollToWaitlist}
borderRadius="8px"
className="w-full sm:w-auto h-14 px-8 uppercase font-mono text-xs tracking-[0.2em] font-bold cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary"
>
<span className="relative z-10">{t("heroCtaGetKey")}</span>
</ShimmerButton>
<button
type="button"
onClick={scrollToModels}
className="w-full sm:w-auto h-14 px-8 uppercase font-mono text-xs tracking-[0.2em] font-bold cursor-pointer border border-border bg-secondary/20 dark:bg-white/5 hover:bg-primary/10 hover:border-primary/40 hover:text-primary transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary [clip-path:polygon(12px_0,100%_0,100%_calc(100%_-_12px),calc(100%_-_12px)_100%,0_100%,0_12px)]"
>
{t("heroCtaViewModels")}
</button>
</motion.div>
<motion.div
initial={{ y: 20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.6, delay: 0.55, ease: "easeOut" }}
className="mt-6 flex flex-wrap gap-2 max-w-xl"
>
{HERO_FEATURE_BADGES.map((key) => (
<span
key={key}
className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-3 py-1 text-[10px] sm:text-[11px] font-mono font-semibold tracking-wide text-primary/90"
>
{t(key)}
</span>
))}
</motion.div>
<motion.div
initial={{ y: 30, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.6, delay: 0.6, ease: "easeOut" }}
id="hero-waitlist"
className="mt-8 relative z-30 scroll-mt-28"
>
<div className="corner-bracket p-1 rounded-lg">
<div className="corner-bracket-inner" />
<WaitlistForm />
</div>
</motion.div>
{/* Cyber-Glass Community Badges */}
<motion.div
initial={{ y: 20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.6, delay: 0.62, ease: "easeOut" }}
className="mt-6 grid grid-cols-1 sm:grid-cols-2 gap-4 max-w-xl w-full z-30 relative"
>
{/* GitHub Discussions Badge */}
<a
href="https://github.com/orgs/community/discussions/196796"
target="_blank"
rel="noopener noreferrer"
className="premium-glass-card group flex items-center gap-4 p-4 rounded-xl border border-white/5 dark:border-white/10 bg-white/[0.02] dark:bg-black/30 backdrop-blur-md transition-all duration-300 hover:border-primary/40 hover:shadow-[0_0_15px_rgba(255,170,64,0.1)] hover:scale-[1.02] active:scale-[0.98]"
>
<div className="w-10 h-10 rounded-lg bg-black/10 dark:bg-white/5 border border-white/5 flex items-center justify-center text-muted-foreground group-hover:text-primary transition-colors duration-300 shadow-[inset_0_1px_1px_rgba(255,255,255,0.05)]">
<svg className="w-5 h-5 fill-current" viewBox="0 0 24 24" aria-hidden="true">
<path fillRule="evenodd" clipRule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" />
</svg>
</div>
<div className="flex flex-col text-left rtl:text-right">
<span className="font-mono text-[9px] text-muted-foreground/60 uppercase tracking-widest leading-none mb-1">{t("githubBadgeDesc")}</span>
<span className="text-xs font-bold text-foreground group-hover:text-primary transition-colors duration-300 tracking-wide leading-none">{t("githubBadgeTitle")}</span>
</div>
</a>
{/* Product Hunt Badge */}
<a
href="https://www.producthunt.com/products/hubapi?launch=hubapi"
target="_blank"
rel="noopener noreferrer"
className="premium-glass-card group flex items-center gap-4 p-4 rounded-xl border border-white/5 dark:border-white/10 bg-white/[0.02] dark:bg-black/30 backdrop-blur-md transition-all duration-300 hover:border-primary/40 hover:shadow-[0_0_15px_rgba(255,170,64,0.1)] hover:scale-[1.02] active:scale-[0.98]"
>
<div className="w-10 h-10 rounded-lg bg-black/10 dark:bg-white/5 border border-white/5 flex items-center justify-center text-muted-foreground group-hover:text-primary transition-colors duration-300 shadow-[inset_0_1px_1px_rgba(255,255,255,0.05)]">
<svg className="w-5 h-5 fill-current" viewBox="0 0 24 24" aria-hidden="true">
<path d="M13.6 8.4h-2.8v3.2h2.8c.9 0 1.6-.7 1.6-1.6s-.7-1.6-1.6-1.6zm-1.6 10c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8zm1-13H9v10h2v-4h2.6c2.1 0 3.8-1.7 3.8-3.8S15.7 5.4 13 5.4z" />
</svg>
</div>
<div className="flex flex-col text-left rtl:text-right">
<span className="font-mono text-[9px] text-muted-foreground/60 uppercase tracking-widest leading-none mb-1">{t("phBadgeDesc")}</span>
<span className="text-xs font-bold text-foreground group-hover:text-primary transition-colors duration-300 tracking-wide leading-none">{t("phBadgeTitle")}</span>
</div>
</a>
</motion.div>
<motion.p
initial={{ y: 20, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ duration: 0.6, delay: 0.65, ease: "easeOut" }}
className="mt-5 max-w-xl text-[10px] sm:text-[11px] text-muted-foreground/75 leading-relaxed font-mono"
>
{t("heroPrelaunchNotice")}
</motion.p>
</div>
</section>
</div>
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 1, delay: 0.5 }}
className="absolute right-0 rtl:left-0 rtl:right-auto top-0 lg:w-[50%] h-full z-[5] flex items-center justify-center opacity-40 lg:opacity-100 overflow-hidden pointer-events-auto cursor-pointer"
onMouseMove={handleMouseMove}
onMouseEnter={() => setRobotHovered(true)}
onMouseLeave={() => {
handleMouseLeave();
setRobotHovered(false);
}}
style={{ perspective: "1000px" }}
>
<div className="relative w-[350px] h-[350px] md:w-[500px] md:h-[500px] lg:w-[600px] lg:h-[600px] xl:w-[700px] xl:h-[700px] translate-x-[10%] lg:translate-x-[5%] rtl:-translate-x-[10%] rtl:lg:-translate-x-[5%] pointer-events-none">
<motion.div
className="w-full h-full relative flex items-center justify-center"
style={{
rotateX: reducedMotion ? 0 : rotateX,
rotateY: reducedMotion ? 0 : rotateY,
x: reducedMotion ? 0 : translateX,
y: reducedMotion ? 0 : translateY,
transformStyle: "preserve-3d"
}}
>
<div className="absolute inset-0 pointer-events-none flex items-center justify-center" aria-hidden="true">
{/* Dynamic theme-consistent ambient glow behind the robot, justifying its rim lights */}
<div className="absolute w-[60%] h-[60%] bg-gradient-to-tr from-cyan-500/15 via-indigo-500/10 to-transparent blur-3xl pointer-events-none" />
</div>
{/* 3D Robot Image (Floating & Glowing organically) */}
<motion.div
animate={{
y: reducedMotion ? 0 : [-15, 15, -15],
rotateZ: reducedMotion ? 0 : [-2, 2, -2]
}}
transition={{ duration: 6, repeat: Infinity, ease: "easeInOut" }}
className="w-[90%] md:w-auto md:h-[85%] aspect-square relative flex items-center justify-center"
>
{/* Double Rocket Booster Thruster Glow under the robot's left & right hip/thigh nozzles (behind legs) */}
{/* Left Thruster - Advanced Plasma Ion Drive */}
<div className="absolute bottom-[33.5%] left-[43.5%] -translate-x-1/2 w-24 h-44 pointer-events-none overflow-visible flex flex-col items-center z-0" aria-hidden="true">
{/* Intense Plasma Core Glow (Cyan/White matching eyes/core) */}
<motion.div
animate={disableThrusters ? { scaleY: 1.1, scaleX: 1.05, opacity: 0.95 } : {
scaleY: [0.85, 1.35, 0.85],
scaleX: [0.95, 1.15, 0.95],
opacity: [0.85, 1, 0.85],
}}
transition={disableThrusters ? {} : {
duration: 0.35,
repeat: Infinity,
ease: "easeInOut",
}}
className="w-6 h-28 bg-gradient-to-t from-transparent via-cyan-400 to-white rounded-b-full filter blur-[2px] origin-top opacity-95"
/>
{/* Hot cyan/blue ionization core directly at the nozzle */}
<motion.div
animate={disableThrusters ? { scale: 1.1, opacity: 0.95 } : {
scale: [0.9, 1.25, 0.9],
opacity: [0.9, 1, 0.9],
}}
transition={disableThrusters ? {} : {
duration: 0.3,
repeat: Infinity,
ease: "easeInOut",
}}
className="absolute top-0 w-12 h-6 bg-gradient-to-b from-cyan-400 via-indigo-600 to-transparent rounded-full filter blur-[3px] opacity-95"
/>
{/* Massive outer thermal halo */}
<motion.div
animate={disableThrusters ? { opacity: 0.55, scale: 1 } : {
opacity: [0.4, 0.7, 0.4],
scale: [0.95, 1.05, 0.95],
}}
transition={disableThrusters ? {} : {
duration: 0.45,
repeat: Infinity,
ease: "easeInOut",
}}
className="absolute top-0 w-24 h-36 bg-gradient-to-t from-transparent via-indigo-500/25 to-cyan-500/40 rounded-full filter blur-[14px] mix-blend-screen"
/>
{/* Spark particles */}
{!disableThrusters && (
<div className="absolute bottom-2 flex gap-3">
<motion.span
animate={{ y: [0, 40], opacity: [1, 0], scale: [1, 0.2] }}
transition={{ duration: 0.65, repeat: Infinity, delay: 0.05, ease: "easeOut" }}
className="w-0.5 h-0.5 bg-cyan-300 rounded-full"
/>
<motion.span
animate={{ y: [0, 50], opacity: [1, 0], scale: [1.2, 0.1] }}
transition={{ duration: 0.45, repeat: Infinity, delay: 0.2, ease: "easeOut" }}
className="w-1.5 h-1.5 bg-indigo-400 rounded-full"
/>
</div>
)}
</div>
{/* Right Thruster - Advanced Plasma Ion Drive */}
<div className="absolute bottom-[34.5%] left-[56.5%] -translate-x-1/2 w-24 h-44 pointer-events-none overflow-visible flex flex-col items-center z-0" aria-hidden="true">
{/* Intense Plasma Core Glow (Cyan/White matching eyes/core) */}
<motion.div
animate={disableThrusters ? { scaleY: 1.1, scaleX: 1.05, opacity: 0.95 } : {
scaleY: [0.85, 1.35, 0.85],
scaleX: [0.95, 1.15, 0.95],
opacity: [0.85, 1, 0.85],
}}
transition={disableThrusters ? {} : {
duration: 0.35,
repeat: Infinity,
ease: "easeInOut",
}}
className="w-6 h-28 bg-gradient-to-t from-transparent via-cyan-400 to-white rounded-b-full filter blur-[2px] origin-top opacity-95"
/>
{/* Hot cyan/blue ionization core directly at the nozzle */}
<motion.div
animate={disableThrusters ? { scale: 1.1, opacity: 0.95 } : {
scale: [0.9, 1.25, 0.9],
opacity: [0.9, 1, 0.9],
}}
transition={disableThrusters ? {} : {
duration: 0.3,
repeat: Infinity,
ease: "easeInOut",
}}
className="absolute top-0 w-12 h-6 bg-gradient-to-b from-cyan-400 via-indigo-600 to-transparent rounded-full filter blur-[3px] opacity-95"
/>
{/* Massive outer thermal halo */}
<motion.div
animate={disableThrusters ? { opacity: 0.55, scale: 1 } : {
opacity: [0.4, 0.7, 0.4],
scale: [0.95, 1.05, 0.95],
}}
transition={disableThrusters ? {} : {
duration: 0.45,
repeat: Infinity,
ease: "easeInOut",
}}
className="absolute top-0 w-24 h-36 bg-gradient-to-t from-transparent via-indigo-500/25 to-cyan-500/40 rounded-full filter blur-[14px] mix-blend-screen"
/>
{/* Spark particles */}
{!disableThrusters && (
<div className="absolute bottom-2 flex gap-3">
<motion.span
animate={{ y: [0, 40], opacity: [1, 0], scale: [1, 0.2] }}
transition={{ duration: 0.7, repeat: Infinity, delay: 0.1, ease: "easeOut" }}
className="w-0.5 h-0.5 bg-cyan-300 rounded-full"
/>
<motion.span
animate={{ y: [0, 50], opacity: [1, 0], scale: [1.2, 0.1] }}
transition={{ duration: 0.5, repeat: Infinity, delay: 0.3, ease: "easeOut" }}
className="w-1.5 h-1.5 bg-indigo-400 rounded-full"
/>
</div>
)}
</div>
<Image
src="/final-robot.png"
alt="Neural Core Robot"
fill
className="object-contain pointer-events-none z-10"
sizes="(max-width: 768px) 350px, (max-width: 1024px) 500px, (max-width: 1280px) 600px, 700px"
priority
/>
{/* Dynamic cyan/violet bottom reflection from the plasma thrusters, masked to the robot's silhouette */}
<motion.div
className="absolute inset-0 pointer-events-none z-20 mix-blend-color-dodge"
animate={disableThrusters ? { opacity: 0.75 } : {
opacity: [0.65, 0.85, 0.65],
}}
transition={disableThrusters ? {} : {
duration: 0.4,
repeat: Infinity,
ease: "easeInOut",
}}
style={{
maskImage: "url(/final-robot.png)",
WebkitMaskImage: "url(/final-robot.png)",
maskSize: "contain",
WebkitMaskSize: "contain",
maskRepeat: "no-repeat",
WebkitMaskRepeat: "no-repeat",
maskPosition: "center",
WebkitMaskPosition: "center",
background: "linear-gradient(to top, rgba(34, 211, 238, 0.75) 0%, rgba(34, 211, 238, 0.35) 25%, rgba(160, 124, 254, 0.2) 45%, transparent 65%)"
}}
/>
</motion.div>
</motion.div>
</div>
</motion.div>
</div>
);
}
|