/* incore-motion.css — companion styles for incore-motion.js (original). Brand: navy #16204A, deep #0B0E24, lime #B7E34A, royal #304CF5, light #F3F6FC */
:root { --im-deep:#0B0E24; --im-navy:#16204A; --im-lime:#B7E34A; --im-royal:#304CF5; --im-light:#F3F6FC; }

/* Pre-hide only when JS is running and motion allowed (no FOUC, no hidden content without JS) */
.im-on:not(.im-reduced) [data-im-blur],
.im-on:not(.im-reduced) [data-im-fold-card],
.im-on:not(.im-reduced) [data-im-mask] { visibility: hidden; }
[data-im-blur] .im-w, [data-im-blur] .im-c { display: inline-block; will-change: transform, opacity, filter; }

/* Page-transition belts (10 horizontal bars) */
.im-belts { position: fixed; inset: 0; z-index: 10000; pointer-events: none; visibility: hidden; display: flex; flex-direction: column; }
.im-belts i { flex: 1; background: var(--im-deep); transform: scaleX(0); transform-origin: 0 50%; margin-top: -1px; }
.im-belts-mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; color: var(--im-lime); font: 600 28px/1 "Inter Tight", Inter, sans-serif; opacity: 0; }

/* Stripe wipes (5 vertical-growing bars, injected by JS) */
[data-im-stripes] { position: relative; }
.im-stripes { position: absolute; inset: 0; z-index: 30; pointer-events: none; display: flex; flex-direction: column; }
.im-stripes i { flex: 1; transform: scaleY(0); transform-origin: 50% 100%; margin-top: -1px; padding-bottom: 1px; will-change: transform; }

/* Pill → full-screen */
[data-im-pill] { position: relative; height: 100vh; height: 100dvh; overflow: hidden; background: var(--im-light); }
[data-im-pill] .im-pill { position: absolute; inset: 0; overflow: hidden; will-change: clip-path; }
[data-im-pill] .im-pill-media { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
[data-im-pill] .im-pill-title { position: absolute; left: 0; top: 50%; translate: 0 -50%; z-index: 3; white-space: nowrap; pointer-events: none;
  font: 600 clamp(64px, 12vw, 220px)/0.9 "Inter Tight", sans-serif; letter-spacing: -0.04em; color: #fff; mix-blend-mode: difference; will-change: transform; }
[data-im-pill] .im-pill-after { position: relative; z-index: 4; }

/* Paper fold */
[data-im-fold] { transform-style: preserve-3d; }
[data-im-fold-card] { backface-visibility: hidden; will-change: transform, opacity; }

/* Slot counters */
.im-slotting { display: inline-flex; font-variant-numeric: tabular-nums; }
.im-reel { display: inline-block; height: 1em; line-height: 1; overflow: clip; vertical-align: top; }
.im-reel-strip { display: flex; flex-direction: column; will-change: transform; }
.im-reel-strip > span { display: block; height: 1em; line-height: 1; }

/* Marquee */
[data-im-marquee] { overflow: hidden; white-space: nowrap; }
[data-im-marquee] > * { display: inline-flex; will-change: transform; }

/* Gallery */
[data-im-gallery] { position: relative; height: 100vh; height: 100dvh; overflow: hidden; background: #DADDE6; }
.im-gallery-tone { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 0; }
[data-im-gallery-item] { width: var(--im-gw, 18vw); margin: 0; cursor: pointer; z-index: 3; }
[data-im-gallery-item] > * { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(11,14,36,.45); will-change: transform; }
[data-im-gallery-item] img { width: 100%; height: auto; display: block; }
@media (max-width: 767px) { [data-im-gallery-item] { width: var(--im-gw-m, 42vw); } }

/* Team drag-to-meet */
[data-im-team] { position: relative; overflow: hidden; }
[data-im-member] { position: relative; cursor: grab; user-select: none; will-change: transform; }
[data-im-member]:active { cursor: grabbing; }
[data-im-frame] { position: relative; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; overflow: hidden; background: var(--im-deep); }
[data-im-frame]::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: url(/assets/motion/scanlines.svg); opacity: .35; mix-blend-mode: overlay; }
[data-im-frame]::after  { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: url(/assets/motion/vignette.svg) center/cover no-repeat; }
[data-im-frame-img] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
@media (max-width: 1023px) { [data-im-member] { cursor: pointer; } }

/* Grain overlay utility (optional, off on mobile for perf) */
.im-grain::after { content: ""; position: absolute; inset: -50%; pointer-events: none; background: url(/assets/motion/grain-128.png); opacity: .06; z-index: 1; }
@media (max-width: 767px) { .im-grain::after { display: none; } }

/* Reduced motion: everything visible, no fixed overlays */
@media (prefers-reduced-motion: reduce) {
  [data-im-blur], [data-im-fold-card], [data-im-mask], [data-im-gallery-item], [data-im-member] { visibility: visible !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .im-belts, .im-stripes { display: none !important; }
  [data-im-pill], [data-im-gallery] { height: auto; }
  [data-im-gallery-item] { position: static !important; display: inline-block; margin: 8px; }
  [data-im-pill] .im-pill { position: relative; height: 70vh; clip-path: none !important; }
}

/* Safety: if GSAP failed to load, never leave content hidden */
.im-off [data-im-blur], .im-off [data-im-fold-card], .im-off [data-im-mask] { visibility: visible !important; }
