/* =========================================================
   animations.css — keyframet, scroll-reveal, parallax, pills
   ========================================================= */

/* ---------- Scroll reveal (Intersection Observer) ---------- */
.reveal {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1);
	transition-delay: var(--delay, 0s);
	will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Yhteystietokortit eri suunnista */
.vitv-contact-card[data-from="left"]  { transform: translateX(-60px); }
.vitv-contact-card[data-from="right"] { transform: translateX(60px); }
.vitv-contact-card[data-from="bottom"]{ transform: translateY(60px); }
.vitv-contact-card.is-visible { transform: translate(0, 0); }

/* ---------- Hero badge pulse ---------- */
@keyframes vitv-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(232, 180, 74, .5); }
	50%      { box-shadow: 0 0 0 12px rgba(232, 180, 74, 0); }
}
.vitv-badge--pulse { animation: vitv-pulse 2.4s infinite; }

/* ---------- Brändin ikonin kultahehku ---------- */
@keyframes vitv-glow-pulse {
	0%, 100% { box-shadow: 0 0 16px rgba(232, 180, 74, .45); transform: translateY(0); }
	50%      { box-shadow: 0 0 30px rgba(255, 215, 122, .85); transform: translateY(-1px); }
}

/* ---------- Floating pills ---------- */
@keyframes vitv-float {
	0%, 100% { transform: translateY(0) rotate(-4deg); }
	50%      { transform: translateY(-26px) rotate(4deg); }
}
.vitv-hero__pills { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.vitv-pill {
	position: absolute;
	background: rgba(255, 255, 255, .15);
	backdrop-filter: blur(6px);
	border: 1px solid rgba(255, 255, 255, .4);
	color: #fff; font-weight: 700; font-size: 15px;
	padding: 12px 22px; border-radius: 50px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	animation: vitv-float 6s ease-in-out infinite;
}
.vitv-pill--1 { top: 18%; left: 12%; animation-duration: 6s; }
.vitv-pill--2 { top: 32%; right: 10%; animation-duration: 7.5s; animation-delay: .8s; }
.vitv-pill--3 { bottom: 22%; left: 18%; animation-duration: 6.8s; animation-delay: 1.6s; }

/* ---------- Hero scroll-indicator ---------- */
@keyframes vitv-scroll-dot { 0% { top: 6px; opacity: 1; } 100% { top: 26px; opacity: 0; } }
.vitv-hero__scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); width: 26px; height: 44px; border: 2px solid rgba(255,255,255,.7); border-radius: 16px; z-index: 3; }
.vitv-hero__scroll span { position: absolute; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; background: #fff; border-radius: 50%; animation: vitv-scroll-dot 1.6s infinite; }

/* ---------- Typing-kursori ---------- */
@keyframes vitv-caret { 0%, 100% { border-color: var(--vitv-yellow); } 50% { border-color: transparent; } }
.vitv-typing { animation: vitv-caret .8s step-end infinite; }

/* ---------- Parallax ---------- */
.vitv-hero__parallax { position: absolute; inset: -10% 0; z-index: 1; background: inherit; will-change: transform; }

/* ---------- Stat number pop ---------- */
@keyframes vitv-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.vitv-stat.is-visible .vitv-stat__num { animation: vitv-pop .6s cubic-bezier(.22, 1, .36, 1) both; }

/* ---------- Legal hero -ikonien animaatiot ---------- */
@keyframes vitv-shield { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes vitv-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes vitv-swing { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes vitv-envelope { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-8px) rotate(-6deg); } 75% { transform: translateY(-8px) rotate(6deg); } }
.vitv-legal-hero__icon--shield   { animation: vitv-shield 2.6s ease-in-out infinite; }
.vitv-legal-hero__icon--bounce   { animation: vitv-bounce 2s ease-in-out infinite; }
.vitv-legal-hero__icon--swing    { animation: vitv-swing 2.4s ease-in-out infinite; transform-origin: top center; }
.vitv-legal-hero__icon--envelope { animation: vitv-envelope 2.8s ease-in-out infinite; }

/* ---------- Send-napin animaatio ---------- */
.vitv-btn--send { position: relative; overflow: hidden; }
.vitv-btn--send::after { content: "✈"; margin-left: 8px; display: inline-block; transition: transform .3s ease; }
.vitv-btn--send:hover::after { transform: translateX(6px) translateY(-4px) rotate(8deg); }

/* ---------- Saavutettavuus: kunnioita reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
	.reveal { opacity: 1 !important; transform: none !important; }
}

/* Smooth scroll ankkureille */
html { scroll-behavior: smooth; }
