import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{a as t,o as n,r}from"./vendor-motion-COLzAB1Q.js";import{n as i}from"./index-DLFWvoW-.js";var a=e(n(),1),o=t(),s=[.22,1,.36,1];function c(e){let t=e.match(/vimeo\.com\/(?:video\/)?(\d+)/);return t?t[1]:null}function l(e){return/\.(mp4|webm|mov|ogg)(\?|$)/i.test(e)||/supabase\.co\/storage/i.test(e)}var u=()=>{let{settings:e}=i(),t=e.showreel_video_url||`https://vimeo.com/778710881`,n=l(t),u=n?null:c(t)||`778710881`,[d,f]=(0,a.useState)(!1),p=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let e=p.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(f(!0),t.disconnect())},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[]),(0,o.jsxs)(`section`,{ref:p,id:`showreel`,className:`relative overflow-hidden`,style:{background:`var(--surface-3)`},children:[(0,o.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center pointer-events-none`,children:(0,o.jsx)(`span`,{className:`font-condensed font-bold text-[100px] md:text-[130px] text-white opacity-[0.02] whitespace-nowrap select-none uppercase tracking-widest`,children:`Showreel`})}),(0,o.jsxs)(`div`,{className:`container mx-auto px-4 md:px-8 relative z-10 py-16 md:py-24`,children:[(0,o.jsx)(r.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:`-100px`},transition:{duration:1,ease:s},className:`text-center mb-10`,children:(0,o.jsx)(`div`,{className:`flex items-center justify-center gap-6 mb-8`,children:(0,o.jsxs)(`a`,{href:`#showreel-player`,className:`group flex items-center gap-4`,children:[(0,o.jsx)(`div`,{className:`w-[60px] h-[60px] rounded-full border border-brand-red flex items-center justify-center group-hover:bg-brand-red/10 transition-all duration-250`,children:(0,o.jsx)(`svg`,{width:`16`,height:`18`,viewBox:`0 0 16 18`,fill:`none`,children:(0,o.jsx)(`path`,{d:`M0 0L16 9L0 18V0Z`,fill:`#e8000f`})})}),(0,o.jsx)(`span`,{className:`font-condensed font-semibold uppercase text-[12px] tracking-[0.2em] text-brand-red`,children:`Watch Showreel`})]})})}),(0,o.jsx)(r.div,{id:`showreel-player`,initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:`-100px`},transition:{duration:1,ease:s,delay:.2},className:`relative w-full max-w-6xl mx-auto`,children:(0,o.jsx)(`div`,{className:`aspect-video md:aspect-[21/9] overflow-hidden border border-[rgba(255,255,255,0.06)] relative`,style:{background:`var(--surface-2)`},children:d&&(n?(0,o.jsx)(`video`,{src:t,controls:!0,playsInline:!0,preload:`none`,className:`absolute inset-0 w-full h-full object-cover bg-black`}):(0,o.jsx)(`iframe`,{src:`https://player.vimeo.com/video/${u}?badge=0&autopause=0&player_id=0&app_id=58479`,className:`absolute inset-0 w-full h-full`,allow:`autoplay; fullscreen; picture-in-picture`,allowFullScreen:!0,loading:`lazy`,title:`AO3 Studios Showreel`,frameBorder:`0`}))})}),(0,o.jsx)(r.p,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:1,ease:s,delay:.5},className:`text-center mt-6 font-condensed uppercase text-[11px] tracking-[0.25em] text-muted-foreground/60`,children:e.showreel_tagline||`Crafting cinematic experiences — one frame at a time`})]})]})};export{u as default};