6868 z-index : 11 ;
6969}
7070
71- /* CURSOR – faster response */
71+ /* CURSOR – identical to main site for smooth response */
7272.custom-cursor {
73- width : 22 px ;
74- height : 22 px ;
73+ width : 20 px ;
74+ height : 20 px ;
7575 border : 2px solid var (--gold );
7676 border-radius : 50% ;
7777 position : fixed;
7878 pointer-events : none;
7979 z-index : 9999 ;
8080 mix-blend-mode : screen;
81- will-change : transform;
82- transition : transform 0.05s ease, background 0.15s ease, box-shadow 0.15s ease;
81+ transition : transform 0.1s ease, background 0.2s ease, box-shadow 0.2s ease;
8382 transform : translate (-50% , -50% );
8483 box-shadow : 0 0 15px var (--gold ), 0 0 30px rgba (212 , 175 , 55 , 0.3 );
8584}
8685.custom-cursor .hover {
8786 transform : translate (-50% , -50% ) scale (1.8 );
88- background : rgba (212 , 175 , 55 , 0.12 );
87+ background : rgba (212 , 175 , 55 , 0.1 );
8988 border-color : var (--rose );
9089 box-shadow : 0 0 25px var (--rose ), 0 0 50px rgba (232 , 160 , 176 , 0.5 );
9190}
9796 background : var (--gold );
9897 pointer-events : none;
9998 z-index : 9998 ;
100- opacity : 0.5 ;
99+ opacity : 0.6 ;
101100 box-shadow : 0 0 10px var (--gold );
102- will-change : transform , opacity;
101+ transition : opacity 0.3 s ease ;
103102}
104103
105104# hero-canvas {
@@ -497,22 +496,19 @@ <h1 class="hero-title"><em>Happy</em> Mother's<br>Day</h1>
497496 const sctx = scrollCanvas . getContext ( '2d' ) ;
498497 const heartSymbols = [ '♥' , '❤' , '♡' , '✦' , '✧' , '❀' , '🌸' , '🌺' , '🌷' , '🌹' ] ;
499498 const centerX = 60 , centerY = 60 ;
500- const heartScale = 28 ; // size of heart shape
501499 let startAngle = 0 ;
502500
503- // Parametric heart shape
504501 function heartPoint ( t ) {
505- // t in [0, 2PI]
506502 const x = 16 * Math . pow ( Math . sin ( t ) , 3 ) ;
507503 const y = 13 * Math . cos ( t ) - 5 * Math . cos ( 2 * t ) - 2 * Math . cos ( 3 * t ) - Math . cos ( 4 * t ) ;
508- return { x : x * 1.8 , y : - y * 1.8 } ; // scale and flip y
504+ return { x : x * 1.8 , y : - y * 1.8 } ;
509505 }
510506
511- const numHeartSymbols = 18 ; // symbols around heart
507+ const numHeartSymbols = 18 ;
512508
513509 function drawScrollIndicator ( now ) {
514510 sctx . clearRect ( 0 , 0 , 120 , 120 ) ;
515- const angleOffset = startAngle + now * 0.0008 ; // rotate slowly
511+ const angleOffset = startAngle + now * 0.0008 ;
516512
517513 for ( let i = 0 ; i < numHeartSymbols ; i ++ ) {
518514 const t = ( i / numHeartSymbols ) * Math . PI * 2 + angleOffset ;
@@ -539,31 +535,29 @@ <h1 class="hero-title"><em>Happy</em> Mother's<br>Day</h1>
539535 }
540536 requestAnimationFrame ( drawScrollIndicator ) ;
541537
542- // ========== CUSTOM CURSOR (optimized ) ==========
538+ // ========== CUSTOM CURSOR (matches main site ) ==========
543539 const cursor = document . getElementById ( 'custom-cursor' ) ;
544540 const trailContainer = document . getElementById ( 'cursor-trail-container' ) ;
545541 let trailPositions = [ ] ;
546- const MAX_TRAIL = 5 ; // reduced for snappiness
542+ const MAX_TRAIL = 8 ;
547543
548544 function updateCursor ( e ) {
549545 const x = e . clientX , y = e . clientY ;
550546 cursor . style . left = x + 'px' ; cursor . style . top = y + 'px' ;
551547 trailPositions . push ( { x, y, time : Date . now ( ) } ) ;
552548 if ( trailPositions . length > MAX_TRAIL ) trailPositions . shift ( ) ;
553549 trailContainer . innerHTML = '' ;
554- for ( let i = 0 ; i < trailPositions . length ; i ++ ) {
555- const pos = trailPositions [ i ] ;
550+ trailPositions . forEach ( ( pos , i ) => {
556551 const dot = document . createElement ( 'div' ) ;
557552 dot . className = 'cursor-trail' ;
558553 const age = ( Date . now ( ) - pos . time ) / 1000 ;
559- const opacity = Math . max ( 0 , 0.5 - age * 1.2 ) ;
560- const scale = 1 - i * 0.12 ;
561- dot . style . left = pos . x + 'px' ;
562- dot . style . top = pos . y + 'px' ;
554+ const opacity = Math . max ( 0 , 0.6 - age * 0.8 ) ;
555+ const scale = 1 - i * 0.1 ;
556+ dot . style . left = pos . x + 'px' ; dot . style . top = pos . y + 'px' ;
563557 dot . style . opacity = opacity ;
564558 dot . style . transform = `translate(-50%, -50%) scale(${ scale } )` ;
565559 trailContainer . appendChild ( dot ) ;
566- }
560+ } ) ;
567561 }
568562
569563 document . addEventListener ( 'mousemove' , updateCursor , { passive : true } ) ;
0 commit comments