// home-hero.jsx: scrapbook Hero (cut-outs, brand stickers, intent page, "Trusted by brands"). // Motion is imperative inside one Engine frame; see hero-fx.js / engine.js. const HERO_C = window.SITE_CONTENT || {}; const HERO_DESK = [[4, 14, 13, -7, 'ashri', 'skincare ✦', 'sun', -4], [19, 54, 11.5, 5, 'jude', 'wedding day', 'pop', 6], [41, 5, 10, -3, 'sculpted', 'beauty shelf', 'blue', -2], [60, 56, 12, -5, 'rite-burj', 'dubai, 7am', 'sun', 3], [80, 11, 13, 8, 'nyx', 'event night', 'pop', -6], [81, 58, 11, -9, 'whoop-styling', 'golden hour', 'blue', 5]]; const HERO_MOB = [[6, 9, 30, -7, 'ashri', 'skincare ✦', 'sun', -4], [62, 8, 30, 7, 'nyx', 'event night', 'pop', -6], [3, 67, 29, 5, 'jude', 'wedding day', 'pop', 6], [36, 73, 28, -3, 'rite-burj', 'dubai, 7am', 'blue', 3], [68, 66, 29, 8, 'whoop-styling', 'golden hour', 'sun', 5]]; const HERO_STACK = [-4, 3, -2, 5, -6, 2]; // Card hover-to-play only while still at the top of the hero; scrolling past this disables it. const CARD_HOVER_MAX = 0.05; const HERO_STK_D = [[27, 10, -8, 'whoop'], [63, 12, 6, 'samsung'], [38, 84, 7, 'sephora'], [90, 88, -4, 'philips']]; const HERO_STK_M = [[42, 14, -8, 'whoop'], [44, 92, 7, 'sephora']]; const HERO_DOODLES_D = [ { kind: 'star', x: '33%', y: '13%', s: 54, r: 12, c: 'var(--ink)', fill: 'var(--sun)', sw: 3.5 }, { kind: 'sparkle', x: '71%', y: '22%', s: 44, r: 0, c: 'var(--blue)', fill: 'none', sw: 6 }, { kind: 'sparkle', x: '74%', y: '28%', s: 22, r: 20, c: 'var(--blue)', fill: 'none', sw: 8 }, { kind: 'squiggle', x: '42%', y: '76%', s: 110, r: -6, c: 'var(--pop)', fill: 'none', sw: 6 }, { kind: 'burst', x: '91%', y: '48%', s: 40, r: 10, c: 'var(--sun)', fill: 'none', sw: 7 }, { kind: 'zig', x: '53%', y: '5%', s: 60, r: 4, c: 'var(--blue)', fill: 'none', sw: 6 }, ]; const HERO_DOODLES_M = [ { kind: 'star', x: '82%', y: '33%', s: 34, r: 12, c: 'var(--ink)', fill: 'var(--sun)', sw: 4 }, { kind: 'sparkle', x: '10%', y: '50%', s: 30, r: 0, c: 'var(--blue)', fill: 'none', sw: 6 }, ]; const bounceOut = (q) => { const k = 7.5625, d = 2.75; if (q < 1 / d) return k * q * q; if (q < 2 / d) { q -= 1.5 / d; return k * q * q + 0.75; } if (q < 2.5 / d) { q -= 2.25 / d; return k * q * q + 0.9375; } q -= 2.625 / d; return k * q * q + 0.984375; }; // Intent page heart: click for a squish + a burst of little hearts that float up and fade. const HEART_COLORS = ['var(--pop)', 'var(--sun)', 'var(--blue)', 'var(--pop)', 'var(--ink)']; function HeartPop() { const btn = React.useRef(null), icon = React.useRef(null); const pop = () => { const b = btn.current, ic = icon.current; if (!b || !ic) return; if (LL.REDUCED) { ic.animate([{ transform: 'scale(1)' }, { transform: 'scale(1.15)' }, { transform: 'scale(1)' }], { duration: 300 }); return; } ic.animate([ { transform: 'scale(1,1)' }, { transform: 'scale(.76,.88)', offset: 0.18 }, { transform: 'scale(1.3,1.18)', offset: 0.42 }, { transform: 'scale(.94,.98)', offset: 0.65 }, { transform: 'scale(1.06)', offset: 0.82 }, { transform: 'scale(1,1)' }, ], { duration: 650, easing: 'cubic-bezier(.34,1.3,.5,1)' }); ic.animate([{ rotate: '0deg' }, { rotate: '-14deg', offset: 0.3 }, { rotate: '9deg', offset: 0.6 }, { rotate: '0deg' }], { duration: 650 }); const n = 11; for (let i = 0; i < n; i++) { const el = document.createElement('span'); const size = 12 + Math.random() * 16, a = -Math.PI / 2 + (Math.random() - 0.5) * Math.PI * 1.15, dist = 60 + Math.random() * 70; const dx = Math.cos(a) * dist, dy = Math.sin(a) * dist, rot = (Math.random() - 0.5) * 80; el.setAttribute('aria-hidden', 'true'); el.style.cssText = 'position:absolute;left:50%;top:50%;width:' + size + 'px;height:' + size + 'px;margin:' + (-size / 2) + 'px 0 0 ' + (-size / 2) + 'px;pointer-events:none;z-index:2;'; el.innerHTML = ''; b.appendChild(el); const an = el.animate([ { transform: 'translate(0,0) scale(.2) rotate(0deg)', opacity: 0 }, { transform: 'translate(' + dx * 0.55 + 'px,' + dy * 0.55 + 'px) scale(1.1) rotate(' + rot * 0.5 + 'deg)', opacity: 1, offset: 0.35 }, { transform: 'translate(' + dx + 'px,' + (dy - 26) + 'px) scale(.8) rotate(' + rot + 'deg)', opacity: 0 }, ], { duration: 900 + Math.random() * 500, delay: Math.random() * 90, easing: 'cubic-bezier(.2,.7,.3,1)', fill: 'both' }); an.onfinish = () => el.remove(); } }; return ( ); } function Hero() { const C = HERO_C, hero = C.hero || {}, st = C.statement || {}, br = C.brands || {}; const { W, H, mobile: mob } = useViewport(); const rootRef = React.useRef(null), stageRef = React.useRef(null), titleRef = React.useRef(null), lensWordRef = React.useRef(null); const ringRef = React.useRef(null), tagRef = React.useRef(null), tagTextRef = React.useRef(null), pageRef = React.useRef(null), hintRef = React.useRef(null), countRef = React.useRef(null); const [focus, setFocusState] = React.useState(-1); const [cat, setCat] = React.useState(0); const [more, setMore] = React.useState(false); const [forHover, setForHover] = React.useState(false); const forHoverRef = React.useRef(false); const S = React.useRef({ focus: -1, ptr: { x: -999, y: -999, in: false }, pop: { i: -1, at: 0 }, lastTouch: 0, mob }).current; S.mob = mob; const set = mob ? HERO_MOB : HERO_DESK, stkSet = mob ? HERO_STK_M : HERO_STK_D; const rotating = hero.rotating || ['UGC', 'Events', 'Travel']; const logoById = {}; LL.LOGOS.forEach((l) => (logoById[l.id] = l)); const moreBrands = LL.LOGOS.filter((l) => !stkSet.map((d) => d[3]).includes(l.id)).slice(0, 5); const setFocus = React.useCallback((i) => { const root = rootRef.current; if (!root || i === S.focus) return; S.focus = i; Engine.qa(root, '[data-live]').forEach((el) => (+el.getAttribute('data-live') === i ? LL.clip(el).play() : LL.clip(el).pause())); setFocusState(i); }, []); // label rotation + mobile idle hop React.useEffect(() => LL.rotate(rotating.length, (i) => { if (!forHoverRef.current) setCat(i); }, 2600), []); const svc = (typeof SERVICES_DATA !== 'undefined' && SERVICES_DATA[cat]) || null; const svcHref = svc ? (svc.page || '/services/#' + svc.anchor) : '/services/'; // hovering "Lens": the scribble rewinds from where it is (un-draws) and draws back in, so it never jumps const spinScribble = () => { const el = lensWordRef.current, path = el && el.querySelector('svg[data-doodle] path'); if (!path || LL.REDUCED || !S.introAt || performance.now() < S.introAt + 800) return; if (path._hv && path._hv.playState === 'running') return; path._hv = path.animate([{ strokeDashoffset: 0 }, { strokeDashoffset: 1, offset: 0.4 }, { strokeDashoffset: 0 }], { duration: 1500, easing: 'cubic-bezier(.65,0,.35,1)' }); }; React.useEffect(() => { if (LL.REDUCED) return; const id = setInterval(() => { if (!S.mob || performance.now() - S.lastTouch < 6000 || Engine.prog(rootRef.current) > 0.02) return; setFocus((S.focus + 1) % HERO_MOB.length); }, 3000); return () => clearInterval(id); }, []); // layout-dependent setup + intro React.useEffect(() => { const root = rootRef.current; Engine.invalidate(root); LL.decorate(root); if (S.introDone) return; S.introDone = true; if (LL.REDUCED) { root.querySelectorAll('svg[data-doodle] path').forEach((p) => (p.style.strokeDasharray = 'none')); return; } const E = LL.EASE; root.querySelectorAll('[data-word]').forEach((el, i) => el.animate([{ opacity: 0, transform: 'translateY(50px) rotate(4deg)' }, { opacity: 1, transform: 'none' }], { duration: 1000, delay: 80 + i * 130, easing: E.spring, fill: 'backwards' })); root.querySelectorAll('[data-in]').forEach((el) => { const i = +el.getAttribute('data-in'); el.animate([{ opacity: 0, transform: `translateY(-46px) scale(1.22) rotate(${i % 2 ? 9 : -9}deg)` }, { opacity: 1, transform: 'none' }], { duration: 950, delay: 380 + i * 110, easing: E.bouncy, fill: 'backwards' }); }); root.querySelectorAll('[data-tp]').forEach((el) => { const i = +el.getAttribute('data-tp'); el.animate([{ clipPath: 'inset(0 100% 0 0)' }, { clipPath: TAPE_FULL }], { duration: 420, delay: 900 + i * 110, easing: E.out, fill: 'backwards' }); }); root.querySelectorAll('[data-stk] [data-pop]').forEach((el, i) => el.animate([{ opacity: 0, transform: 'scale(0) rotate(-30deg)' }, { opacity: 1, transform: 'none' }], { duration: 800, delay: 1200 + i * 90, easing: E.bouncy, fill: 'backwards' })); LL.draw(root.querySelector('[data-word="1"]'), { delay: 1300, dur: 1100 }); const ds = [...root.querySelectorAll('svg[data-dood] path'), ...hintRef.current.querySelectorAll('path')]; ds.forEach((p, i) => { p.style.strokeDasharray = '1 1'; p.animate([{ strokeDashoffset: 1 }, { strokeDashoffset: 0 }], { duration: 800, delay: 1500 + i * 120, easing: 'cubic-bezier(.65,0,.35,1)', fill: 'both' }); }); S.introAt = performance.now() + 1700; }, [mob]); // scroll settle: glide to the nearest fully-played state (hero start, stack + intent page) React.useEffect(() => Engine.snap(rootRef.current, [0, 0.82]), []); // per-frame React.useEffect(() => { const w = Engine.w, qa = Engine.qa, red = LL.REDUCED; return Engine.add((dt, now) => { const root = rootRef.current, stg = stageRef.current; if (!root || !stg || !Engine.vis(root)) return; const mobile = S.mob, ptr = S.ptr; const sr = stg.getBoundingClientRect(), W = sr.width, H = sr.height; const p = Engine.prog(root); S.p = p; if (S.focus >= 0 && p > CARD_HOVER_MAX) setFocus(-1); if (!S.pos) { S.pos = { x: new LL.Spring(W / 2, 300, 30), y: new LL.Spring(H / 2, 300, 30) }; S.rad = new LL.Spring(0, 220, 20); } const stks = qa(root, '[data-stk]'), slots = qa(root, '[data-slot]'); let hov = -1; if (ptr.in && !mobile && S.focus < 0) stks.forEach((el, i) => { const c = el._c; if (c && c.t <= 0 && Math.hypot(ptr.x - c.x, ptr.y - c.y) < c.r) hov = i; }); if (S.pop.i >= 0 && now - S.pop.at > 2600) S.pop.i = -1; const sel = p > 0.3 ? -1 : (hov >= 0 ? hov : S.pop.i); const f = S.focus; let tx, ty, tr = 30, photo = null; if (f >= 0) { photo = root.querySelector(`[data-photo="${f}"]`); if (photo) { const r = photo.getBoundingClientRect(); tx = r.left + r.width / 2 - sr.left; ty = r.top + r.height / 2 - sr.top; tr = photo.offsetWidth * 0.44; } } if (!photo && sel >= 0 && stks[sel]._c) { const c = stks[sel]._c; tx = c.x; ty = c.y; tr = c.r * 1.04; } else if (!photo) { if (ptr.in && !mobile) { tx = ptr.x; ty = ptr.y; tr = 30; } else { const wd = lensWordRef.current; if (wd) { const r = wd.getBoundingClientRect(); tx = r.left + r.width * 0.5 - sr.left; ty = r.top + r.height * 0.55 - sr.top; } tr = (S.introAt && now > S.introAt && now < S.introAt + 2600) ? 38 : 0; } } S.pos.x.t = tx; S.pos.y.t = ty; if (red) { S.pos.x.x = tx; S.pos.y.x = ty; } else { S.pos.x.step(dt); S.pos.y.step(dt); } const x = S.pos.x.x, y = S.pos.y.x, dist = Math.hypot(tx - x, ty - y); S.rad.t = photo ? (dist < 24 ? tr : 18) : tr; if (red) S.rad.x = S.rad.t; else S.rad.step(dt); const r = Math.max(0, S.rad.x); const op = (r > 3 ? 1 : 0) * (1 - LL.range(p, 0.02, 0.12)); w(ringRef.current, 'opacity', op); w(ringRef.current, 'transform', `translate(${x.toFixed(1)}px,${y.toFixed(1)}px) scale(${(r / 100).toFixed(4)})`); let tagTxt = ''; if (photo) { const d = (mobile ? HERO_MOB : HERO_DESK)[f]; const c = d && LL.byId[d[4]]; tagTxt = c ? 'playing · ' + c.title : ''; } else if (sel >= 0) tagTxt = stks[sel].getAttribute('data-name'); w(tagTextRef.current, '@text', tagTxt); w(tagRef.current, 'opacity', tagTxt && dist < 30 ? op : 0); w(tagRef.current, 'transform', `translate(${Math.max(8, Math.min(W - 180, x - r * 0.7)).toFixed(1)}px,${(y + r + 12).toFixed(1)}px) rotate(-3deg)`); qa(root, '[data-live]').forEach((el) => w(el, 'clipPath', +el.getAttribute('data-live') === f && photo ? `circle(${(r / 1.07).toFixed(1)}px at 50% 50%)` : 'circle(0px at 50% 50%)')); // cut-outs fly into a stack qa(root, '[data-fly]').forEach((el) => { const i = +el.getAttribute('data-fly'); const e = red ? 0 : LL.easeInOut(LL.range(p, 0.01 + i * 0.03, 0.34 + i * 0.03)); const cx = el.offsetLeft + el.offsetWidth / 2, cy = el.offsetTop + el.offsetHeight / 2; const base = (mobile ? HERO_MOB : HERO_DESK)[i], dr = base ? (HERO_STACK[i] - base[3]) : 0; w(el, 'transform', e <= 0 ? '' : `translate(${((W / 2 - cx) * e).toFixed(1)}px,${((H * 0.56 - cy) * e).toFixed(1)}px) rotate(${(dr * e).toFixed(2)}deg) scale(${(1 + 0.12 * e).toFixed(3)})`); }); const e0 = red ? 0 : LL.easeInOut(LL.range(p, 0, 0.36)); w(titleRef.current, 'transform', `translateY(${(-H * 0.2 * e0).toFixed(1)}px) scale(${(1 - 0.38 * e0).toFixed(3)})`); w(hintRef.current, 'opacity', 1 - LL.range(p, 0, 0.05)); qa(root, '[data-dood]').forEach((el, i) => w(el, 'opacity', 1 - LL.range(p, 0.04 + i * 0.01, 0.22 + i * 0.01))); const pe = red ? (p > 0.45 ? 1 : 0) : LL.easeOut(LL.range(p, 0.42, 0.74)); const cnt = countRef.current, total = br.count || 300; if (cnt) { if (pe > 0.85 && S.countAt == null) S.countAt = now; if (pe < 0.2) S.countAt = null; const t = red ? 1 : (S.countAt == null ? 0 : LL.range(now - S.countAt, 250, 1850)); w(cnt, '@text', String(Math.round(total * (1 - Math.pow(1 - t, 4))))); } const pg = pageRef.current; w(pg, 'transform', `translateY(${((1 - pe) * 110).toFixed(2)}%) rotate(${((1 - pe) * 4).toFixed(2)}deg)`); // stickers: bob in the collage, then fall into the "Trusted by" slots const sset = mobile ? HERO_STK_M : HERO_STK_D; stks.forEach((el, i) => { const d = sset[i]; if (!d) return; const size = el.offsetWidth, half = size / 2; const bob = red ? 0 : Math.sin(now / 1500 + i * 1.7) * 3; const lift = red ? 0 : LL.easeInOut(LL.range(p, 0.05, 0.36)); let X = W * d[0] / 100 + half, Y = H * d[1] / 100 + half + bob - lift * H * 0.08, S2 = 1, ROT = d[2]; const t = red ? (pe >= 1 ? 1 : 0) : LL.range(p, 0.44 + i * 0.024, 0.76 + i * 0.024); if (t > 0 && slots[i]) { const b = slots[i].getBoundingClientRect(), sx = b.left + b.width / 2 - sr.left, sy = b.top + b.height / 2 - sr.top; X = LL.lerp(X, sx, LL.easeInOut(t)); Y = LL.lerp(Y, sy, bounceOut(t)); S2 = LL.lerp(1, b.width / size, t); ROT = LL.lerp(ROT, 0, LL.easeOut(t)) + Math.sin(Math.min(1, t) * Math.PI) * (i % 2 ? 50 : -50); } el._h = LL.lerp(el._h || 1, i === sel ? 1.28 : 1, Math.min(1, dt * 9)); const SS = S2 * el._h; w(el, 'transform', `translate(${(X - half).toFixed(1)}px,${(Y - half).toFixed(1)}px) scale(${SS.toFixed(4)}) rotate(${ROT.toFixed(2)}deg)`); w(el, 'zIndex', t > 0 ? 75 : (i === sel ? 48 : 45)); el._c = { x: X, y: Y, r: half * SS, t }; const live = el.__live || (el.__live = el.querySelector('[data-stklive]')); if (live) { const inset = live.offsetLeft, dd = Math.hypot(x - X, y - Y); if (i === sel && r > 2 && dd < r + half * SS) { const a = -ROT * Math.PI / 180, dx = (x - X) / SS, dy = (y - Y) / SS; const lx = dx * Math.cos(a) - dy * Math.sin(a) + half - inset, ly = dx * Math.sin(a) + dy * Math.cos(a) + half - inset; w(live, 'clipPath', `circle(${(r / SS).toFixed(1)}px at ${lx.toFixed(1)}px ${ly.toFixed(1)}px)`); } else w(live, 'clipPath', 'circle(0px at 50% 50%)'); } }); }); }, []); const stickerSize = mob ? 50 : Math.round(Math.min(78, W * 0.054)); const slotSize = mob ? 52 : Math.round(Math.min(84, H * 0.085)); const moreSize = mob ? 46 : 58; const labelOn = true; const touchy = () => matchMedia('(hover: none)').matches; const doodles = mob ? HERO_DOODLES_M : HERO_DOODLES_D; const FAC = [['Services', st.services || 'UGC / Events', st.servicesLabel || 'Services'], [st.knownForLabel || 'Known for', st.knownFor || 'Creative Edits'], [st.shotOnLabel || 'Content shot on', st.shotOn || 'iPhone 18 Pro']]; return (
{ const r = stageRef.current.getBoundingClientRect(); S.ptr.x = e.clientX - r.left; S.ptr.y = e.clientY - r.top; S.ptr.in = e.pointerType !== 'touch'; }} onPointerLeave={() => { S.ptr.in = false; }}>

Lamia{' '} Lens

{ forHoverRef.current = true; setForHover(true); }} onPointerLeave={() => { forHoverRef.current = false; setForHover(false); }}>
{hero.rotatingPrefix || 'for'} {rotating.map((c) => {c})}

{hero.tagline || 'High-end, organic content for brands'}

{!mob && { const f = document.getElementById('inquire'); if (!f) return; e.preventDefault(); e.stopPropagation(); Engine.scrollTo(f); }}>{hero.cta || 'Book your content'} }
{doodles.map((d, i) => ( ))} {set.map((d, i) => { const c = LL.byId[d[4]], on = focus === i, rot = on ? d[3] * 0.45 : d[3]; const w = mob ? Math.min(W * d[2] / 100, H * 0.2) : Math.min(W * d[2] / 100, H * 0.235); return (
); })}
✦({st.eyebrow || 'The intent'})

{st.title}

{[[st.servicesLabel || 'Services', st.services], [st.knownForLabel || 'Known for', st.knownFor], [st.shotOnLabel || 'Content shot on', st.shotOn]].map(([k, v]) => (
{k}
{v}
))}

{br.title || 'Trusted by'} {br.titleEm || 'brands'}

{ if (!touchy()) setMore(true); }} onPointerLeave={() => { if (!touchy()) setMore(false); }}>
    {moreBrands.map((l, i) => (
  • {l.name}
  • ))}
    {stkSet.map((d, i) => (
  • {logoById[d[3]].name}
  • ))}
{stkSet.map((d, i) => { const l = logoById[d[3]], rad = i % 3 === 1 ? '28%' : '50%', inset = mob ? 3 : 6; const lw = l.tone === 'white' ? '108%' : '74%', lmh = l.tone === 'white' ? 'none' : '62%', lr = l.wide ? 0 : [-6, 4, -3, 7][i % 4]; const imgStyle = { width: lw, maxWidth: 'none', maxHeight: lmh, objectFit: 'contain', transform: `rotate(${lr}deg)` }; return ( ); })}
); } const TAPE_FULL = 'inset(0 0 0 0)'; Object.assign(window, { Hero });