/**
 * IBK Motion Engine — Frontend Utility CSS
 *
 * Structural helpers that support motion features. No visual design opinions.
 */

/* ── Lenis smooth scroll integration ─────────────────────────────────────── */

html.lenis,
html.lenis body {
	height: auto;
}

.lenis.lenis-smooth {
	scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
	overscroll-behavior: contain;
}

.lenis.lenis-stopped {
	overflow: hidden;
}

.lenis.lenis-scrolling iframe {
	pointer-events: none;
}

/* ── Motion Engine state classes ─────────────────────────────────────────── */

/* Added to html once GSAP is ready */
html.ibk-ready * {
	/* Prevent accidental layout recalculations from will-change on inert elements. */
}

/* ── Split text helpers ───────────────────────────────────────────────────── */

.split-text {
	overflow: hidden;
}

.split-text .word {
	display: inline-block;
}

.split-text .char {
	display: inline-block;
}

/* ── Floating element ────────────────────────────────────────────────────── */

.float {
	display: inline-block;
}

/* ── Scroll indicator ────────────────────────────────────────────────────── */

.ibk-scroll-indicator {
	/* Background and height set via JS data-attributes as CSS custom properties. */
	background: var( --ibk-indicator-color, #5B21B6 );
	height: var( --ibk-indicator-height, 3px );
}

/* ── No-motion utility class ─────────────────────────────────────────────── */

.no-motion,
.no-motion * {
	animation: none !important;
	transition: none !important;
	transform: none !important;
}

/* ── Horizontal scroll ───────────────────────────────────────────────────── */

.horizontal-scroll {
	position: relative;
}

/* ── Accessibility: visible focus for JS-controlled elements ─────────────── */

[data-ibk-animation]:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
