Carnero.Dev uses GSAP (GreenSock Animation Platform) with theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/moradoadrian/carneroDev/llms.txt
Use this file to discover all available pages before exploring further.
ScrollTrigger plugin to create fluid, accessible animations across the landing page. All animations are initialized client-side in the main <script> tag of src/pages/index.astro, keeping them decoupled from the Astro component layer while retaining full access to the rendered DOM.
Animation Architecture
The animation system is built around three core principles that keep it robust, accessible, and non-destructive to Tailwind’s utility classes. Memory-safe context. All GSAP calls are wrapped in agsap.context() instance stored in ctx. On page unload, ctx.revert() is called to tear down all animations, kill all ScrollTrigger instances, and release memory — essential for environments with client-side navigation.
prefers-reduced-motion media query. Users who have opted into reduced motion receive dramatically shortened durations, no spatial offsets, and no blur effects.
clearProps. Every gsap.from() call ends with clearProps: 'transform,opacity,filter' or clearProps: 'all'. This removes the inline styles GSAP writes during the animation so that Tailwind’s hover:, focus:, and layout utilities (flex, grid) are fully restored once the animation finishes.
Hero Entrance Sequence
The hero section plays a chained entrance timeline on page load — no scroll required. Each element in the sequence overlaps slightly with the previous one using GSAP’s position parameter ('-=0.4'), producing a smooth cascading feel rather than discrete steps.
h1 title, the .font-mono slogan, the countdown card grid, and the CTA buttons — each staggered into view with power2.out or power3.out easing. Countdown cards use clearProps: 'all' because they participate in a CSS grid layout that must be restored after the animation.
ScrollTrigger Section Reveals
All ten major content sections useScrollTrigger to fade in and slide up their title container when the section reaches 85% scroll progress in the viewport. The pattern is applied uniformly across every section ID:
toggleActions: 'play none none none' means the animation fires once when the trigger enters the viewport and never reverses — appropriate for a single-scroll landing page where sections are not expected to leave and re-enter the view repeatedly.
Staggered Card Animations
Card grids in the Challenge, Evaluation, Deliverables, Rules, and Prizes sections use a shared stagger pattern. Each card fans in slightly after the previous one, creating a ripple effect as the grid comes into view. The trigger fires at 75% scroll progress — slightly earlier than the section headers — so the cards are already animating as the user’s eye moves down from the title.| Section | Targets | Stagger Delay |
|---|---|---|
#desafio | .grid > div | 0.04s |
#evaluacion | .grid > div | 0.04s |
#entregables | .grid > div | 0.04s |
#bases-resumen | .grid > div | 0.05s |
#prizes | .flex.flex-col > div | 0.06s |
Evaluation Progress Bars
The Evaluation section renders judging rubric criteria with.gsap-progress-bar elements. Each bar carries a data-percent attribute (e.g. data-percent="85%") representing its target fill width. On scroll, GSAP animates the bar’s width from 0 to that target value over 1.2 seconds.
gsap.from() calls elsewhere, these bars use gsap.to() — the initial width: 0 is set in the component’s CSS, and GSAP only drives the bar to its final value. This means clearProps is intentionally omitted so the filled state persists after the animation ends.
Countdown Timer
The Hero component includes asetInterval-based JavaScript countdown that targets the event start date. It runs every second and writes the remaining time to four DOM elements: #days, #hours, #minutes, and #seconds.
clearProps: 'all', ensuring that any Tailwind hover and transform utilities on the cards continue to function normally after the pop-in animation completes.