:root{color-scheme:dark;--bg:#070a12;--panel:#101522;--ink:#f5f5f8;--muted:#9ba4b7;--line:rgba(204,215,255,.13);--violet:#9f79ff;--cyan:#76e4e0}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;overflow-x:hidden}button,input{font:inherit}button,a{-webkit-tap-highlight-color:transparent}a{color:inherit;text-decoration:none}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--cyan);outline-offset:4px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ambient{position:absolute;pointer-events:none;z-index:-1;border-radius:50%;filter:blur(100px)}.ambient-one{width:550px;height:550px;background:rgba(95,63,180,.18);top:6rem;right:-12rem}.ambient-two{width:400px;height:400px;background:rgba(24,136,154,.1);top:56rem;left:-15rem}.shell{max-width:1512px;margin:0 auto;padding-left:clamp(22px,5vw,84px);padding-right:clamp(22px,5vw,84px)}.site-header{height:88px;padding:0 clamp(22px,5vw,84px);display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);max-width:1512px;margin:auto}.brand,.footer-brand{font-size:18px;font-weight:700;letter-spacing:.19em;display:inline-flex;align-items:center;gap:12px;white-space:nowrap}.brand strong,.footer-brand strong{font-weight:350}.brand-symbol{position:relative;width:30px;height:30px;display:inline-flex;border:1.5px solid var(--violet);border-radius:8px;transform:rotate(-17deg);align-items:center;justify-content:center}.brand-symbol span{position:absolute;border:1px solid var(--cyan);width:11px;height:11px;border-radius:3px;transform:rotate(45deg)}.brand-symbol span:last-child{margin-left:9px;border-color:var(--violet)}.site-header nav{display:flex;align-items:center;gap:32px;font-size:13px;color:#bdc3d0}.site-header nav a:hover,.site-footer a:hover{color:var(--cyan)}.nav-home{border:1px solid var(--line);padding:12px 16px;border-radius:5px;color:var(--ink)}.nav-home span{color:var(--cyan);margin-left:16px}.hero{min-height:664px;display:grid;grid-template-columns:minmax(0,1fr) minmax(440px,1fr);align-items:center;gap:4vw;padding-top:72px;padding-bottom:110px;position:relative}.hero-copy{z-index:1}.eyebrow,.section-kicker{font-size:11px;letter-spacing:.25em;font-weight:700;color:var(--cyan)}.eyebrow{display:flex;align-items:center;gap:12px}.eyebrow-line{height:1px;width:26px;background:var(--cyan)}.eyebrow-index{color:#667185}.hero h1{font-family:Georgia,"Times New Roman",serif;font-weight:400;font-size:clamp(68px,6.8vw,110px);line-height:.97;letter-spacing:-.065em;margin:33px 0 30px;max-width:720px}.hero h1 em{font-style:italic;background:linear-gradient(110deg,#b898ff,#6ce3df);color:transparent;background-clip:text}.hero-copy>p{color:#afb8c7;line-height:1.75;font-size:17px;max-width:490px}.hero-actions{display:flex;align-items:center;gap:28px;margin-top:36px;flex-wrap:wrap}.primary-button{background:linear-gradient(110deg,#ad8cff,#8d70ea);color:#100c1b;border-radius:5px;padding:17px 20px;font-weight:750;font-size:13px;display:inline-flex;gap:34px;align-items:center;box-shadow:0 10px 36px rgba(128,86,239,.25);transition:transform .2s,box-shadow .2s}.primary-button:hover{transform:translateY(-3px);box-shadow:0 16px 42px rgba(128,86,239,.37)}.interaction-hint{color:#8c96a9;font-size:12px;display:flex;align-items:center;gap:10px}.pulse{height:6px;width:6px;border-radius:50%;background:var(--cyan);box-shadow:0 0 14px var(--cyan)}.hero-stats{display:flex;gap:44px;margin-top:67px}.hero-stats div{display:flex;flex-direction:column;gap:5px;border-right:1px solid var(--line);padding-right:44px}.hero-stats div:last-child{border:0}.hero-stats strong{font-size:28px;font-weight:450;letter-spacing:-.06em}.hero-stats span{font-size:11px;color:#7c879b;letter-spacing:.05em}.hero-stage{height:550px;position:relative;perspective:900px}.stage-halo{position:absolute;inset:14% 4%;border:1px solid rgba(123,120,216,.18);border-radius:50%;box-shadow:0 0 120px rgba(72,53,147,.22),inset 0 0 100px rgba(35,160,181,.08);transform:rotate(-18deg)}.stage-card{position:absolute;display:block;overflow:hidden;border:1px solid rgba(255,255,255,.25);border-radius:11px;background:#141827;box-shadow:0 24px 75px rgba(0,0,0,.55);transition:transform .35s ease,box-shadow .35s ease}.stage-card:hover{transform:translateY(-10px) rotate(0deg);box-shadow:0 28px 85px rgba(94,67,176,.4);z-index:5}.stage-card img{width:100%;height:100%;object-fit:cover;display:block}.stage-card:after{content:"";position:absolute;inset:35% 0 0;background:linear-gradient(transparent,rgba(2,3,10,.82))}.stage-card-main{width:78%;height:57%;top:23%;left:13%;z-index:3;transform:rotate(-3deg)}.stage-card-back{width:58%;height:39%;top:2%;right:-1%;z-index:2;transform:rotate(7deg)}.stage-card-front{width:52%;height:34%;bottom:0;left:-5%;z-index:4;transform:rotate(7deg)}.stage-caption{position:absolute;bottom:21px;left:24px;z-index:1;display:flex;flex-direction:column;gap:6px}.stage-caption small{color:var(--cyan);font-size:10px;letter-spacing:.2em}.stage-caption strong{font-family:Georgia,serif;font-size:clamp(17px,2vw,28px);font-weight:400}.stage-orbit{position:absolute;top:17%;left:0;writing-mode:vertical-rl;transform:rotate(180deg);letter-spacing:.22em;color:#718098;font-size:9px}.collection{padding-top:60px;padding-bottom:115px}.section-intro{display:flex;align-items:end;justify-content:space-between;gap:40px;margin-bottom:42px}.section-kicker span{color:#717a90}.section-intro h2,.endnote h2{font-family:Georgia,serif;font-weight:400;letter-spacing:-.045em;font-size:clamp(37px,4vw,59px);margin:16px 0 0}.section-intro p{color:#9ca7ba;line-height:1.6;font-size:14px;max-width:350px;margin:0 0 6px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:22px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:17px 0}.filter-list{display:flex;gap:6px;overflow:auto;scrollbar-width:none}.filter-list::-webkit-scrollbar{display:none}.filter{background:transparent;border:1px solid transparent;border-radius:5px;color:#8d97aa;font-size:12px;white-space:nowrap;padding:10px 12px}.filter:hover{color:var(--ink)}.filter.is-active{background:#1a2132;border-color:#3d365a;color:#dbccff}.filter span{margin-left:7px;opacity:.65}.toolbar-tools{display:flex;gap:11px;flex-shrink:0}.search,.sort{height:39px;border:1px solid var(--line);background:#111725;color:#adbacd;border-radius:5px;display:flex;align-items:center}.search{gap:8px;padding:0 11px}.search>span:first-child{font-size:20px}.search input{width:148px;outline:none;border:0;background:none;color:var(--ink);font-size:12px}.search input::placeholder{color:#8c95a7}.sort{padding:0 11px;font-size:12px;gap:14px}.sort span{color:var(--cyan)}.result-line{display:flex;justify-content:space-between;color:#69768a;font-size:10px;letter-spacing:.16em;margin:25px 0 20px;text-transform:uppercase}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:26px 18px}.clip{min-width:0}.clip-button{display:block;width:100%;padding:0;text-align:left;background:none;color:inherit;border:0}.clip-frame{display:block;position:relative;aspect-ratio:16/10;overflow:hidden;border-radius:6px;background:#17202b;border:1px solid rgba(175,190,234,.13);transition:transform .25s,border-color .25s,box-shadow .25s}.clip-button:hover .clip-frame,.clip-button:focus-visible .clip-frame{transform:translateY(-5px);border-color:rgba(157,124,250,.65);box-shadow:0 12px 38px rgba(115,78,211,.22)}.clip-frame img,.clip-frame video{position:absolute;width:100%;height:100%;inset:0;object-fit:cover}.clip-frame video{opacity:0;transition:opacity .2s}.clip.is-playing .clip-frame video{opacity:1}.clip-frame:after{content:"";position:absolute;inset:40% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.53));pointer-events:none}.clip-marker{position:absolute;z-index:1;top:13px;left:13px;background:rgba(7,9,18,.55);backdrop-filter:blur(8px);padding:7px 9px;border:1px solid rgba(255,255,255,.2);border-radius:3px;font-size:10px;letter-spacing:.08em}.clip-play{position:absolute;z-index:1;bottom:12px;right:12px;border-radius:50%;height:34px;width:34px;display:grid;place-items:center;background:rgba(251,251,255,.91);color:#101522;font-size:13px;transition:transform .2s}.clip-button:hover .clip-play{transform:scale(1.12)}.clip-detail{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:13px 1px}.clip-detail strong{font-size:14px;font-weight:530;line-height:1.35}.clip-detail small{font-size:10px;color:#758399;white-space:nowrap;text-transform:uppercase;letter-spacing:.06em}.empty{padding:100px 20px;text-align:center;color:var(--muted);border:1px solid var(--line)}.endnote{margin-top:12px;margin-bottom:74px;padding-top:55px;padding-bottom:55px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:25px}.endnote-mark{color:var(--violet);font-size:64px}.endnote h2{font-size:clamp(30px,3.4vw,48px)}.endnote-link{margin-left:auto;border:1px solid #514779;border-radius:5px;padding:15px;white-space:nowrap;color:#d7c8ff;font-size:13px}.endnote-link span{margin-left:25px}.site-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;color:#7c879b;font-size:10px;letter-spacing:.11em;padding-bottom:42px}.footer-brand{color:#c5c8d0;font-size:13px}.viewer{width:min(970px,calc(100vw - 32px));max-height:calc(100dvh - 30px);border:1px solid #444467;border-radius:10px;background:#111522;color:var(--ink);padding:0;box-shadow:0 30px 110px #000;overflow:auto}.viewer::backdrop{background:rgba(1,3,10,.87);backdrop-filter:blur(9px)}.viewer-head,.viewer-foot{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;gap:15px}.viewer-index{font-size:10px;color:var(--cyan);letter-spacing:.2em}.viewer h2{margin:4px 0 0;font-family:Georgia,serif;font-weight:400;font-size:27px}.viewer-head button{background:none;border:1px solid var(--line);color:var(--ink);border-radius:5px;font-size:28px;line-height:1;width:40px;height:40px}.viewer-video{background:#030509}.viewer-video video{width:100%;max-height:65dvh;display:block}.viewer-foot{font-size:11px;color:#9ba6b9;text-transform:uppercase;letter-spacing:.1em}.viewer-foot button{border:1px solid #504578;background:#25203b;color:#e2d7ff;border-radius:4px;padding:9px 12px;font-size:11px;white-space:nowrap}@media(max-width:1180px){.hero{grid-template-columns:1fr 1fr}.hero-stage{height:450px}.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.toolbar{align-items:stretch;flex-direction:column}.toolbar-tools{justify-content:space-between}}@media(max-width:800px){.site-header{height:70px}.site-header nav>a:not(.nav-home){display:none}.brand{font-size:14px}.hero{grid-template-columns:1fr;padding-top:80px;padding-bottom:55px}.hero h1{font-size:clamp(60px,12vw,85px)}.hero-stage{height:420px;max-width:630px;width:100%;margin:10px auto 0}.hero-stats{margin-top:45px}.section-intro{display:block}.section-intro p{margin-top:20px}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.endnote{flex-wrap:wrap}.endnote-link{margin-left:0}}@media(max-width:540px){.nav-home{font-size:0;padding:10px}.nav-home span{font-size:17px;margin:0}.site-header{gap:10px}.brand{letter-spacing:.12em}.hero{padding-top:57px}.hero h1{font-size:clamp(55px,14vw,73px)}.hero-copy>p{font-size:15px}.interaction-hint{font-size:11px}.hero-stats{gap:15px}.hero-stats div{padding-right:15px}.hero-stats strong{font-size:23px}.hero-stats span{font-size:9px}.hero-stage{height:310px}.stage-caption{bottom:11px;left:12px}.stage-caption strong{font-size:17px}.stage-caption small{font-size:8px}.stage-orbit{font-size:7px}.collection{padding-top:40px}.toolbar-tools{flex-wrap:wrap}.search{flex:1}.search input{width:100%}.grid{gap:17px 10px}.clip-frame{aspect-ratio:4/3}.clip-detail{display:block;padding-top:9px}.clip-detail strong{display:block;font-size:12px}.clip-detail small{display:block;margin-top:4px;font-size:9px}.clip-marker{top:7px;left:7px;font-size:8px}.clip-play{width:27px;height:27px;right:7px;bottom:7px}.endnote-mark{display:none}.site-footer{flex-wrap:wrap}.site-footer span{order:3;flex-basis:100%}.result-line span:last-child{display:none}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

.brand-logo{width:32px;height:32px;object-fit:cover;border-radius:8px}

.sound-notice{position:fixed;z-index:30;bottom:18px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 30px);padding:12px 16px;border:1px solid #55517f;border-radius:6px;background:#1a2031;box-shadow:0 12px 40px #0009;color:#ecf6f5;font-size:12px;text-align:center}.sound-notice[hidden]{display:none}
.brand-logo{width:56px;height:33px;flex:none;background:url('../assets/cinema_brain_engine_logo.png') left center / auto 33px no-repeat;border-radius:0}
@media(max-width:540px){.site-header{padding-left:18px;padding-right:18px}.brand{gap:6px;font-size:13px;letter-spacing:.08em}.nav-home{min-width:38px}.hero h1{font-size:clamp(43px,12vw,63px);overflow-wrap:normal}.hero-actions{gap:18px}.hero-stats{justify-content:space-between}.hero-stats div{padding-right:8px}.hero-stats span{white-space:nowrap}.filter-list{max-width:100%}.toolbar-tools{width:100%}.search{min-width:0}.sort{min-width:0}.endnote-link{white-space:normal}}
@media(hover:none){.interaction-hint{font-size:0}.interaction-hint::after{content:'Tap any frame to watch with sound';font-size:12px}}

/* Constrain the collection and keep the video dialog centered on phones. */
html,body{max-width:100%;overflow-x:clip}
main,.site-header,.shell,.collection,.toolbar,.grid{min-width:0;max-width:100%}
.ambient-one,.ambient-two{max-width:100vw}
.hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.hero-copy,.hero-stage,.section-intro>*,.toolbar>*,.filter-list,.toolbar-tools,.clip-detail{min-width:0}
.viewer{position:fixed;inset:0;margin:auto;width:calc(100% - 32px);max-width:970px;max-height:calc(100dvh - 32px);overflow-x:hidden}
.viewer-head>div,.viewer-foot>span{min-width:0;overflow-wrap:anywhere}
.viewer-head button{flex:none}
.viewer-video,.viewer-video video{max-width:100%}
@media(max-width:800px){
  .hero{grid-template-columns:minmax(0,1fr)}
  .hero h1{overflow-wrap:anywhere}
  .hero-stage{overflow:hidden}
}
@media(max-width:540px){
  .shell{padding-left:18px;padding-right:18px}
  .hero h1{font-size:clamp(40px,11vw,55px);line-height:1.03}
  .hero-stats{gap:8px}
  .hero-stats div{min-width:0;padding-right:8px}
  .hero-stats span{white-space:normal;line-height:1.25}
  .toolbar-tools{min-width:0}
  .search{min-width:0;flex:1 1 150px}
  .search input{min-width:0}
  .sort{max-width:100%;white-space:nowrap}
  .viewer{width:calc(100% - 20px);max-height:calc(100dvh - 20px)}
  .viewer-head,.viewer-foot{padding:12px;gap:10px}
  .viewer h2{font-size:21px;line-height:1.15;overflow-wrap:anywhere}
  .viewer-foot{flex-wrap:wrap}
  .viewer-video video{max-height:55dvh;height:auto}
}
.site-footer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center}
.site-footer .footer-copyright{text-align:center;white-space:normal;letter-spacing:0;font-size:12px;color:#aeb8c9}
.site-footer>a:last-child{justify-self:end}
@media(max-width:760px){
  .site-footer{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;padding-bottom:100px}
  .site-footer .footer-copyright{order:1}
  .site-footer>a:last-child{order:2}
}
.site-header .brand-copy{display:flex;flex-direction:column;min-width:0;line-height:1.1}
.site-header .brand-tagline{display:block;margin-top:5px;color:#a9b7c7;font-size:10px;font-weight:500;letter-spacing:0;white-space:normal;line-height:1.2}
@media(max-width:540px){
  .site-header{height:78px}
  .site-header .brand-copy{max-width:calc(100vw - 150px)}
  .site-header .brand-tagline{font-size:9px;margin-top:4px}
}

/* Public Cinema + Animation collection */
.collection-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:20px}
.collection-tab{display:flex;align-items:center;justify-content:center;gap:12px;flex:0 1 220px;background:#111624;border:1px solid var(--line);color:#aeb8c9;border-radius:9px;padding:17px 24px;font-size:18px;font-weight:650}
.collection-tab span{font-size:12px;border-radius:5px;background:#ffffff0b;padding:4px 7px}.collection-tab.is-active{background:linear-gradient(110deg,#9f79ff25,#76e4e014);color:var(--ink);border-color:#a78be8}
.collection-description{color:var(--muted);font-size:14px;line-height:1.6;margin:0 0 24px}.toolbar{flex-direction:column;align-items:stretch;gap:18px;padding:20px 0}.toolbar-tools{display:flex;gap:10px;width:100%;flex-wrap:wrap}
.search{flex:1 1 280px;min-width:0}.search input{width:100%;min-width:0}.sort-label{display:flex}.sort{font:inherit;background:#111624;color:var(--ink);border:1px solid var(--line);padding:12px;border-radius:6px;font-size:12px}
.filter-list{display:flex;flex-wrap:wrap;overflow:visible;gap:8px;max-width:100%}.filter{white-space:normal;text-align:left;font-size:12px;line-height:1.3;padding:10px 12px}.filter span{font-size:10px;opacity:.7;margin-left:5px}
.load-more-wrap{display:flex;justify-content:center;margin-top:36px}.load-more-wrap [hidden]{display:none}.clip-frame{aspect-ratio:16/9!important}.clip-frame img,.clip-frame video{object-fit:contain;background:#0b0e16}
.clip-detail{align-items:flex-start}.clip-detail strong{overflow-wrap:anywhere}.clip-detail small{white-space:normal;line-height:1.4}.viewer-open{overflow:hidden}.viewer::backdrop{background:#02040be8;backdrop-filter:blur(8px)}.viewer-video video{aspect-ratio:16/9;object-fit:contain;background:#000}.video-error{padding:12px 20px;color:#ffcca7;font-size:13px}.viewer[open]{display:flex;flex-direction:column}.viewer:not([open]){display:none}
@media(max-width:600px){.collection-tab{flex:1;font-size:16px;padding:15px 10px;gap:8px}.toolbar-tools .search{flex-basis:100%}.sort-label{flex:1}.sort-label select{width:100%}.filter-list{gap:6px}.filter{font-size:11px;padding:9px}.collection{padding-bottom:70px}.hero{min-height:0;padding-bottom:55px}.hero-stage{height:290px}.viewer{border-radius:8px}.viewer-head{align-items:flex-start}.viewer-video video{height:auto;width:100%;max-height:60dvh}.hero-stats{gap:12px}}

/* Mobile overflow and clip-viewer repair. */
html,body{width:100%;max-width:100%;overflow-x:hidden;overscroll-behavior-x:none}
body{position:relative}
main,.site-header,.collection,.endnote,.site-footer{overflow-x:clip}

@media(max-width:800px){
  .ambient{display:none}
}

@media(max-width:600px){
  .grid{grid-template-columns:minmax(0,1fr);gap:24px}
  .clip-frame{aspect-ratio:16/9}
  .clip-detail{display:flex;align-items:flex-start}
  .collection-tabs{width:100%}
  .collection-tab{min-width:0}
  body.viewer-open{height:100dvh;overflow:hidden}
  .viewer{
    inset:0;
    box-sizing:border-box;
    width:100%;
    max-width:none;
    height:100dvh;
    max-height:100dvh;
    margin:0;
    padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    border:0;
    border-radius:0;
    overflow-x:hidden;
    overflow-y:auto;
  }
  .viewer[open]{justify-content:flex-start}
  .viewer-head{padding:16px;align-items:flex-start}
  .viewer-head>div{padding-right:6px}
  .viewer-video{width:100%;flex:0 0 auto}
  .viewer-video video{display:block;width:100%;height:auto;max-height:none;aspect-ratio:16/9;object-fit:contain}
  .viewer-foot{padding:14px 16px 18px;flex-wrap:wrap;align-items:center}
  .viewer-foot button{margin-left:auto}
}

@media(max-width:600px) and (orientation:landscape){
  .viewer{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,34vw);grid-template-rows:auto 1fr auto}
  .viewer-head{grid-column:1 / -1}
  .viewer-video{grid-column:1;grid-row:2 / 4;display:grid;place-items:center;background:#000}
  .viewer-video video{max-height:calc(100dvh - 76px);aspect-ratio:auto}
  .video-error{grid-column:2;grid-row:2}
  .viewer-foot{grid-column:2;grid-row:3;align-self:end}
}

.viewer-actions{display:flex;align-items:center;gap:10px;margin-left:auto}.viewer-actions a{border:1px solid #416f73;background:#17282d;color:#a9f4e7;border-radius:4px;padding:9px 12px;font-size:11px;white-space:nowrap;text-transform:none;letter-spacing:.02em}.viewer-actions a:hover{border-color:var(--cyan);color:#fff}
@media(max-width:600px){.viewer-actions{width:100%;margin-left:0}.viewer-actions a{flex:1;text-align:center}.viewer-foot .viewer-actions button{margin-left:0}}
