/* ================================================================
	PREMIUM HERO  (css/premium-hero.css)  +  js/premium-hero.js
	3D hero scene + gold-dust cursor. Desktop landscape + mouse only;
	phones and tablets see a normal photo.
	Used on: ram-verma-titan-membership.html, index.html

	MARKUP
	<body class="... tt-hero-cursor" data-custom-cursor="true">   (cursor: Canvas custom cursor)
	  <div id="wrapper">
	    <div class="cnvs-cursor"></div>
	...
	<section id="hero" class="tt-scene-hero ... overflow-hidden">
	  <img|div class="tt-scene-photo d-lg-none ...">            phones/tablets photo
	  <div class="tt-scene d-none d-lg-block position-absolute top-0 start-0 w-100 h-100" id="tt-scene">
	    <div class="tt-scene-bg" style="background-image: url('images/...bg.webp');"></div>   background WITHOUT the person
	    <span class="tt-scene-light"></span>
	    <div class="tt-scene-ram"><img src="images/...cutout.webp" ...></div>                 clean transparent cutout
	  </div>
	...
	<script src="js/premium-hero.js"></script>   after js/functions.bundle.js

	Colours use the premium theme accent (--tt-a) when the page has one,
	otherwise gold. Canvas has no mouse-parallax module (sliderparallax is
	scroll-only), so the scene is custom; the cursor dot is Canvas's own.
================================================================ */
.tt-scene { perspective: 1600px; overflow: hidden; }
.tt-scene-bg, .tt-scene-ram { transition: transform 1s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.tt-scene.is-moving .tt-scene-bg, .tt-scene.is-moving .tt-scene-ram { transition: transform .2s ease-out; }
/* back layer: background without the person, lightly blurred for depth */
.tt-scene-bg { position: absolute; inset: -6%; background-position: center; background-size: cover; background-repeat: no-repeat; filter: blur(3px) brightness(1.15) saturate(1.2);
	transform: translate3d(var(--tt-bx, 0px), var(--tt-by, 0px), 0) scale(1.08); }
/* front layer wrapper: position, movement and glow (glow on the wrapper so the photo's fade never cuts it into a box) */
.tt-scene-ram { position: absolute; right: 3%; bottom: calc(6% + 30px); width: 33vw;
	filter: drop-shadow(0 0 38px rgba(var(--tt-a-rgb, 233,187,90), .22)) drop-shadow(0 30px 60px rgba(0,0,0,.55));
	transform-origin: 50% 100%; transform: translate3d(var(--tt-fx, 0px), var(--tt-fy, 0px), 60px) rotateY(var(--tt-ry, 0deg)) rotateX(var(--tt-rx, 0deg));
	animation: ttRamIn 1.6s cubic-bezier(.2,.7,.2,1) both .15s; }
@keyframes ttRamIn { from { opacity: 0; translate: 0 50px; } to { opacity: 1; translate: 0 0; } }
/* the cutout photo: soft bottom edge, capped height on wide-but-short screens */
.tt-scene-ram img { display: block; width: 100%; height: auto; max-height: calc(66vh + 40px); object-fit: contain; object-position: right bottom;
	-webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); }
/* soft accent light that follows the mouse */
.tt-scene-light { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s ease; background: radial-gradient(520px 420px at var(--tt-mx, 70%) var(--tt-my, 35%), rgba(var(--tt-a-rgb, 233,187,90), .14), transparent 65%); }
.tt-scene.is-moving .tt-scene-light { opacity: 1; }
@media (min-width: 1200px) { .tt-scene-ram { right: 13%; } }
@media (min-width: 1400px) { .tt-scene-ram { right: 16%; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .tt-scene-ram { width: 38vw; } }   /* iPad landscape: person a bit bigger */
/* big tablets held upright (iPad Pro portrait): use the normal photo like other tablets */
@media (min-width: 992px) and (orientation: portrait) { .tt-scene-hero .tt-scene { display: none !important; } .tt-scene-hero .tt-scene-photo { display: block !important; } }

/* Gold-dust cursor: Canvas custom cursor (gold dot), shown only over the hero */
body.tt-hero-cursor .cnvs-cursor { --cnvs-cursor-bg: var(--tt-a, #e9bb5a); --cnvs-cursor-opacity: 1;
	--cnvs-cursor-action-bg: var(--tt-a, #e9bb5a); --cnvs-cursor-action-size: 4.4rem; --cnvs-cursor-action-opacity: .18;
	opacity: 0; transition: transform .05s ease, opacity .35s ease; }
body.tt-hero-cursor .cnvs-cursor .cnvs-cursor-dot { --cnvs-cursor-size: .5rem; box-shadow: 0 0 10px rgba(var(--tt-a-rgb, 233,187,90), .8); }
body.tt-hero-cursor .cnvs-cursor:not(.cnvs-cursor-action) .cnvs-cursor-follower { opacity: 0; }   /* soft circle only over buttons and links */
body.tt-hero-cursor:has(#hero:hover) .cnvs-cursor { opacity: 1; }
/* hide the arrow over the hero only when the gold dot is surely running */
@supports selector(:has(a)) { @media (hover: hover) and (pointer: fine) { body.tt-hero-cursor.has-plugin-cursor #hero, body.tt-hero-cursor.has-plugin-cursor #hero a, body.tt-hero-cursor.has-plugin-cursor #hero button { cursor: none; } } }
/* the gold dust itself: fine, mixed brightness, drifts and twinkles out */
.tt-spark { position: fixed; z-index: 999998; pointer-events: none; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); border-radius: 50%;
	background: radial-gradient(circle, #fff 0%, var(--tt-a, #e9bb5a) 45%, rgba(var(--tt-a-rgb, 233,187,90), 0) 72%); box-shadow: 0 0 6px rgba(var(--tt-a-rgb, 233,187,90), .6);
	animation: ttDust 1.2s cubic-bezier(.2,.6,.3,1) forwards; }
@keyframes ttDust {
	0%   { opacity: 0; transform: translate(0, 0) scale(.4); }
	18%  { opacity: var(--o); transform: translate(calc(var(--dx) * .2), calc(var(--dy) * .2)) scale(1); }
	45%  { opacity: calc(var(--o) * .35); }
	60%  { opacity: var(--o); }
	100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); }
}

/* ===== HOME PAGE placement (index.html, section class "tt-scene-home") ===== */
/* Ram stands in the middle (like the original home photo), between the headline and the event card */
.tt-scene-home .tt-scene-ram { width: 34vw; right: calc(48% - 17vw); bottom: 0; animation-delay: .9s; }   /* rises in after the page loader */
.tt-scene-home .tt-scene-ram img { max-height: 84vh; object-position: center bottom; }
@media (min-width: 992px) and (max-width: 1199.98px) { .tt-scene-home .tt-scene-ram { width: 38vw; right: calc(48% - 19vw); } }
/* floating golden light dots IN FRONT of Ram (<div class="tt-orbs"><i style="--x --y --s --d --o --b"></i>...</div>):
   the nearest layer, so they move the most with the mouse; each drifts slowly up and down */
.tt-orbs { position: absolute; inset: 0; pointer-events: none; z-index: 1;
	transform: translate3d(calc(var(--tt-fx, 0px) * 1.9), calc(var(--tt-fy, 0px) * 1.9), 0); transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.tt-orbs i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; opacity: var(--o, .6);
	background: radial-gradient(circle, rgba(255,226,160,.95) 0%, rgba(233,187,90,.4) 45%, rgba(233,187,90,0) 70%); filter: blur(var(--b, 1px));
	animation: ttOrbFloat var(--d, 8s) ease-in-out infinite alternate; }
@keyframes ttOrbFloat { from { translate: 0 0; } to { translate: 0 -26px; } }
.tt-scene.is-moving .tt-orbs { transition: transform .2s ease-out; }
/* scroll depth + scroll fade-out (--sp 0..1 = how far the hero has scrolled away, set on #hero by js/premium-hero.js):
   Ram comes towards you while the stage and Ram blur and darken; the headline, button and card stay sharp */
.tt-scene-home .tt-scene-ram { scale: calc(1 + var(--sp, 0) * .07);
	filter: drop-shadow(0 0 38px rgba(var(--tt-a-rgb, 233,187,90), .22)) drop-shadow(0 30px 60px rgba(0,0,0,.55)) blur(calc(var(--sp, 0) * 7px)) brightness(calc(1 - var(--sp, 0) * .6)); }
.tt-scene-home .tt-scene-bg { scale: calc(1 + var(--sp, 0) * .1); filter: blur(calc(3px + var(--sp, 0) * 12px)) brightness(calc(1.15 - var(--sp, 0) * .85)) saturate(1.2); }   /* darkens towards black, never see-through */
.tt-scene-home .tt-orbs { opacity: calc(1 - var(--sp, 0)); }
.tt-scene-home .tt-scene-photo { filter: blur(calc(var(--sp, 0) * 10px)) brightness(calc(1 - var(--sp, 0) * .7)); }   /* phones + upright tablets */
.tt-scene-home .tt-scene { background: #000; }   /* black base under the stage, never the page grey */
/* home headline 3D edge (laptops + desktops): 4px of dark red letter depth; with a mouse the edge shifts away
   from the cursor (--hx/--hy -0.5..0.5 set on #hero by js/premium-hero.js), as if the mouse were the light */
@media (min-width: 992px) {
	#hero.tt-scene-home h1 { filter:
		drop-shadow(calc(2px + var(--hx, 0) * -6px) calc(2px + var(--hy, 0) * -6px) 0 rgba(110,16,48,1))
		drop-shadow(calc(2px + var(--hx, 0) * -6px) calc(2px + var(--hy, 0) * -6px) 0 rgba(70,8,30,1))
		drop-shadow(calc(var(--hx, 0) * -24px) calc(var(--hy, 0) * -24px + 12px) 18px rgba(0,0,0,.7));
		transition: filter 1s cubic-bezier(.2,.7,.2,1); }
	#hero.tt-scene-home.tt-hero-moving h1 { transition: filter .2s ease-out; }
}
/* home: normal clickable hand over buttons/links in the hero; the gold dot hides while the hand shows */
body.tt-hero-cursor #hero.tt-scene-home a, body.tt-hero-cursor #hero.tt-scene-home button { cursor: pointer !important; }
body.tt-hero-cursor:has(#hero.tt-scene-home) .cnvs-cursor.cnvs-cursor-action { opacity: 0 !important; }

/* ===== SCROLL FADE-OUT for other heroes (section class "tt-scene-fade", e.g. Titan) =====
   --sp 0..1 set on #hero by js/premium-hero.js. The background and person blur and darken as the hero
   scrolls away; the text stays sharp. Phones get a lighter blur. */
.tt-scene-fade .tt-scene { background: #000; }
.tt-scene-fade .tt-scene-bg { filter: blur(calc(3px + var(--sp, 0) * 28px)) brightness(calc(1.15 - var(--sp, 0) * .85)) saturate(1.2); }
.tt-scene-fade .tt-scene-ram { filter: drop-shadow(0 0 38px rgba(var(--tt-a-rgb, 233,187,90), .22)) drop-shadow(0 30px 60px rgba(0,0,0,.55)) blur(calc(var(--sp, 0) * 18px)) brightness(calc(1 - var(--sp, 0) * .6)); }
.tt-scene-fade .tt-scene-photo { filter: blur(calc(var(--sp, 0) * 10px)) brightness(calc(1 - var(--sp, 0) * .7)); }

@media (prefers-reduced-motion: reduce) { .tt-scene-fade { --sp: 0 !important; } .tt-scene-ram { animation: none; } .tt-scene-bg, .tt-scene-ram { transform: none !important; } .tt-orbs i { animation: none; } .tt-orbs { transform: none !important; } .tt-scene-home { --sp: 0 !important; } }
