/* ==========================================================================
   ThermometerGuru — cinematic.css
   Reveal-on-scroll, parallax, hero depth, shimmer.
   ========================================================================== */

/* Reveal on scroll. */
.tmg-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .8s ease, transform .8s ease;
	will-change: opacity, transform;
}
.tmg-reveal.is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.tmg-reveal { opacity: 1; transform: none; transition: none; }
	.tmg-hero-headline .tmg-word { opacity: 1; transform: none; transition: none; }
}

/* Parallax. */
.tmg-hero-l1 { transform: translate3d(0, calc(var(--p, 0) * 6px), 0); }
.tmg-hero-l2 { transform: translate3d(0, calc(var(--p, 0) * 12px), 0); }
.tmg-hero-l3 { transform: translate3d(0, calc(var(--p, 0) * 18px), 0); }

/* Hero word reveal staggered timings. */
.tmg-hero-headline .tmg-word { transition-delay: calc(var(--i, 0) * 60ms); }

/* Shimmer for any progress / pill. */
.tmg-shimmer {
	background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.16) 40%, transparent 80%);
	background-size: 200% 100%;
	animation: tmg-shimmer 2.4s linear infinite;
}
@keyframes tmg-shimmer {
	from { background-position: 200% 0; }
	to   { background-position: -200% 0; }
}

/* Section radial backdrop on dark sections. */
.tmg-section-cinematic::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(ellipse at 50% 0%, rgba(14,165,233,.18), transparent 55%);
	z-index: 1;
}

/* Cinematic backdrops (full-bleed SVG sky + ambient particle canvas) MUST stay
 * absolutely positioned beneath the content. A previous catch-all
 * `.tmg-section-cinematic > *` rule was forcing them into the page flow,
 * pushing hero copy and every section below it off-screen. */
.tmg-section-cinematic > svg,
.tmg-section-cinematic > canvas {
	position: absolute;
	z-index: 0;
	pointer-events: none;
}

/* Content layers above the backdrops and the radial overlay (::after at z:1). */
.tmg-section-cinematic > .tmg-container,
.tmg-section-cinematic > header,
.tmg-section-cinematic > .tmg-env-body {
	position: relative;
	z-index: 2;
}

/* Headline word reveal transition. */
.tmg-hero-headline .tmg-word {
	display: inline-block;
	opacity: 0;
	transform: translateY(.3em);
	transition: opacity .8s ease calc(var(--i, 0) * 60ms),
	            transform .8s ease calc(var(--i, 0) * 60ms);
}
.tmg-hero-headline.is-revealed .tmg-word { opacity: 1; transform: none; }

/* Card top fade */
.tmg-card-deep::after {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60px;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(255,255,255,.06), transparent);
}
.tmg-mode-dark .tmg-card-deep::after {
	background: linear-gradient(180deg, rgba(255,255,255,.04), transparent);
}

/* Sticky mobile CTA */
.tmg-mobile-cta {
	display: none;
	position: fixed; left: 12px; right: 12px; bottom: 12px;
	z-index: 50;
	background: var(--tmg-surface);
	border: 1px solid var(--tmg-line);
	box-shadow: var(--tmg-shadow-3);
	border-radius: 999px;
	padding: 8px 8px 8px 16px;
	align-items: center; gap: 12px; justify-content: space-between;
}
.tmg-mobile-cta-label { font-size: .85rem; font-weight: 600; color: var(--tmg-text); }
@media (max-width: 800px) {
	.tmg-mobile-cta { display: flex; }
}

/* Quick-tools dock (floating). */
.tmg-quicktools {
	position: fixed; right: 16px; bottom: 80px;
	width: 52px; height: 52px;
	border-radius: 50%; background: linear-gradient(135deg, var(--tmg-primary), var(--tmg-accent));
	color: #fff; border: 0; box-shadow: var(--tmg-shadow-3);
	z-index: 50;
}
.tmg-quicktools-dock {
	position: fixed; right: 16px; bottom: 144px;
	background: var(--tmg-surface); border: 1px solid var(--tmg-line);
	border-radius: var(--tmg-radius); padding: 8px;
	display: grid; gap: 4px; z-index: 50; box-shadow: var(--tmg-shadow-3);
}
.tmg-quicktools-dock a {
	display: flex; align-items: center; gap: 8px;
	padding: 8px 12px; border-radius: 8px; color: var(--tmg-text); font-size: .9rem;
}
.tmg-quicktools-dock a:hover { background: var(--tmg-surface-2); }

/* Confetti container (JS-driven). */
.tmg-confetti {
	position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden;
}
.tmg-confetti span {
	position: absolute; top: -10vh; width: 8px; height: 14px;
	background: var(--tmg-cta); opacity: .9;
	animation: tmg-confetti 1.6s ease-out forwards;
}
@keyframes tmg-confetti {
	to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}
